// Code generated by girgen. DO NOT EDIT.

package gtk

import (
	"context"
	"fmt"
	"runtime"
	_ "runtime/cgo"
	"strings"
	"unsafe"

	"github.com/diamondburned/gotk4/pkg/atk"
	"github.com/diamondburned/gotk4/pkg/cairo"
	"github.com/diamondburned/gotk4/pkg/core/gbox"
	"github.com/diamondburned/gotk4/pkg/core/gcancel"
	"github.com/diamondburned/gotk4/pkg/core/gerror"
	"github.com/diamondburned/gotk4/pkg/core/gextras"
	coreglib "github.com/diamondburned/gotk4/pkg/core/glib"
	"github.com/diamondburned/gotk4/pkg/gdk/v3"
	"github.com/diamondburned/gotk4/pkg/gdkpixbuf/v2"
	"github.com/diamondburned/gotk4/pkg/gio/v2"
	"github.com/diamondburned/gotk4/pkg/glib/v2"
	"github.com/diamondburned/gotk4/pkg/pango"
)

// #cgo pkg-config: gtk+-3.0
// #cgo CFLAGS: -Wno-deprecated-declarations
// #include <stdlib.h>
// #include <glib-object.h>
// #include <gtk/gtk-a11y.h>
// #include <gtk/gtk.h>
// #include <gtk/gtkx.h>
// extern void callbackDelete(gpointer);
// extern void _gotk4_gtk3_Window_ConnectSetFocus(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Window_ConnectKeysChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Window_ConnectActivateFocus(gpointer, guintptr);
// extern void _gotk4_gtk3_Window_ConnectActivateDefault(gpointer, guintptr);
// extern void _gotk4_gtk3_WindowClass_set_focus(GtkWindow*, GtkWidget*);
// extern void _gotk4_gtk3_WindowClass_keys_changed(GtkWindow*);
// extern void _gotk4_gtk3_WindowClass_activate_focus(GtkWindow*);
// extern void _gotk4_gtk3_WindowClass_activate_default(GtkWindow*);
// extern void _gotk4_gtk3_Widget_ConnectUnrealize(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectUnmap(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectStyleUpdated(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectStyleSet(gpointer, GtkStyle*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectStateFlagsChanged(gpointer, GtkStateFlags, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectStateChanged(gpointer, GtkStateType, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectSizeAllocate(gpointer, GtkAllocation*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectShow(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectSelectionReceived(gpointer, GtkSelectionData*, guint, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectSelectionGet(gpointer, GtkSelectionData*, guint, guint, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectScreenChanged(gpointer, GdkScreen*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectRealize(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectParentSet(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectMoveFocus(gpointer, GtkDirectionType, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectMap(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectHierarchyChanged(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectHide(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectGrabNotify(gpointer, gboolean, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectGrabFocus(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectEventAfter(gpointer, GdkEvent, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragLeave(gpointer, GdkDragContext*, guint, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragEnd(gpointer, GdkDragContext*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragDataReceived(gpointer, GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragDataGet(gpointer, GdkDragContext*, GtkSelectionData*, guint, guint, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragDataDelete(gpointer, GdkDragContext*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDragBegin(gpointer, GdkDragContext*, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDirectionChanged(gpointer, GtkTextDirection, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectDestroy(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectCompositedChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Widget_ConnectAccelClosuresChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_WidgetClass_unrealize(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_unmap(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_style_updated(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_style_set(GtkWidget*, GtkStyle*);
// extern void _gotk4_gtk3_WidgetClass_state_flags_changed(GtkWidget*, GtkStateFlags);
// extern void _gotk4_gtk3_WidgetClass_state_changed(GtkWidget*, GtkStateType);
// extern void _gotk4_gtk3_WidgetClass_size_allocate(GtkWidget*, GtkAllocation*);
// extern void _gotk4_gtk3_WidgetClass_show_all(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_show(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_selection_received(GtkWidget*, GtkSelectionData*, guint);
// extern void _gotk4_gtk3_WidgetClass_selection_get(GtkWidget*, GtkSelectionData*, guint, guint);
// extern void _gotk4_gtk3_WidgetClass_screen_changed(GtkWidget*, GdkScreen*);
// extern void _gotk4_gtk3_WidgetClass_realize(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_queue_draw_region(GtkWidget*, cairo_region_t*);
// extern void _gotk4_gtk3_WidgetClass_parent_set(GtkWidget*, GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_move_focus(GtkWidget*, GtkDirectionType);
// extern void _gotk4_gtk3_WidgetClass_map(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_hierarchy_changed(GtkWidget*, GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_hide(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_grab_notify(GtkWidget*, gboolean);
// extern void _gotk4_gtk3_WidgetClass_grab_focus(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_get_preferred_width_for_height(GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_get_preferred_width(GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_get_preferred_height_for_width(GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_get_preferred_height_and_baseline_for_width(GtkWidget*, gint, gint*, gint*, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_get_preferred_height(GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_drag_leave(GtkWidget*, GdkDragContext*, guint);
// extern void _gotk4_gtk3_WidgetClass_drag_end(GtkWidget*, GdkDragContext*);
// extern void _gotk4_gtk3_WidgetClass_drag_data_received(GtkWidget*, GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint);
// extern void _gotk4_gtk3_WidgetClass_drag_data_get(GtkWidget*, GdkDragContext*, GtkSelectionData*, guint, guint);
// extern void _gotk4_gtk3_WidgetClass_drag_data_delete(GtkWidget*, GdkDragContext*);
// extern void _gotk4_gtk3_WidgetClass_drag_begin(GtkWidget*, GdkDragContext*);
// extern void _gotk4_gtk3_WidgetClass_direction_changed(GtkWidget*, GtkTextDirection);
// extern void _gotk4_gtk3_WidgetClass_destroy(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_composited_changed(GtkWidget*);
// extern void _gotk4_gtk3_WidgetClass_adjust_size_request(GtkWidget*, GtkOrientation, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_adjust_size_allocation(GtkWidget*, GtkOrientation, gint*, gint*, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_adjust_baseline_request(GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_WidgetClass_adjust_baseline_allocation(GtkWidget*, gint*);
// extern void _gotk4_gtk3_UIManager_ConnectPreActivate(gpointer, GtkAction*, guintptr);
// extern void _gotk4_gtk3_UIManager_ConnectPostActivate(gpointer, GtkAction*, guintptr);
// extern void _gotk4_gtk3_UIManager_ConnectDisconnectProxy(gpointer, GtkAction*, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_UIManager_ConnectConnectProxy(gpointer, GtkAction*, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_UIManager_ConnectAddWidget(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_UIManager_ConnectActionsChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_UIManagerClass_pre_activate(GtkUIManager*, GtkAction*);
// extern void _gotk4_gtk3_UIManagerClass_post_activate(GtkUIManager*, GtkAction*);
// extern void _gotk4_gtk3_UIManagerClass_disconnect_proxy(GtkUIManager*, GtkAction*, GtkWidget*);
// extern void _gotk4_gtk3_UIManagerClass_connect_proxy(GtkUIManager*, GtkAction*, GtkWidget*);
// extern void _gotk4_gtk3_UIManagerClass_add_widget(GtkUIManager*, GtkWidget*);
// extern void _gotk4_gtk3_UIManagerClass_actions_changed(GtkUIManager*);
// extern void _gotk4_gtk3_TreeView_ConnectRowExpanded(gpointer, GtkTreeIter*, GtkTreePath*, guintptr);
// extern void _gotk4_gtk3_TreeView_ConnectRowCollapsed(gpointer, GtkTreeIter*, GtkTreePath*, guintptr);
// extern void _gotk4_gtk3_TreeView_ConnectRowActivated(gpointer, GtkTreePath*, GtkTreeViewColumn*, guintptr);
// extern void _gotk4_gtk3_TreeView_ConnectCursorChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TreeView_ConnectColumnsChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TreeViewSearchPositionFunc(GtkTreeView*, GtkWidget*, gpointer);
// extern void _gotk4_gtk3_TreeViewMappingFunc(GtkTreeView*, GtkTreePath*, gpointer);
// extern void _gotk4_gtk3_TreeViewColumn_ConnectClicked(gpointer, guintptr);
// extern void _gotk4_gtk3_TreeViewColumnClass_clicked(GtkTreeViewColumn*);
// extern void _gotk4_gtk3_TreeViewClass_row_expanded(GtkTreeView*, GtkTreeIter*, GtkTreePath*);
// extern void _gotk4_gtk3_TreeViewClass_row_collapsed(GtkTreeView*, GtkTreeIter*, GtkTreePath*);
// extern void _gotk4_gtk3_TreeViewClass_row_activated(GtkTreeView*, GtkTreePath*, GtkTreeViewColumn*);
// extern void _gotk4_gtk3_TreeViewClass_cursor_changed(GtkTreeView*);
// extern void _gotk4_gtk3_TreeViewClass_columns_changed(GtkTreeView*);
// extern void _gotk4_gtk3_TreeSortable_ConnectSortColumnChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TreeSelection_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TreeSelectionForEachFunc(GtkTreeModel*, GtkTreePath*, GtkTreeIter*, gpointer);
// extern void _gotk4_gtk3_TreeSelectionClass_changed(GtkTreeSelection*);
// extern void _gotk4_gtk3_TreeModel_ConnectRowsReordered(gpointer, GtkTreePath*, GtkTreeIter*, gpointer, guintptr);
// extern void _gotk4_gtk3_TreeModel_ConnectRowInserted(gpointer, GtkTreePath*, GtkTreeIter*, guintptr);
// extern void _gotk4_gtk3_TreeModel_ConnectRowHasChildToggled(gpointer, GtkTreePath*, GtkTreeIter*, guintptr);
// extern void _gotk4_gtk3_TreeModel_ConnectRowDeleted(gpointer, GtkTreePath*, guintptr);
// extern void _gotk4_gtk3_TreeModel_ConnectRowChanged(gpointer, GtkTreePath*, GtkTreeIter*, guintptr);
// extern void _gotk4_gtk3_TreeModelFilterModifyFunc(GtkTreeModel*, GtkTreeIter*, GValue*, gint, gpointer);
// extern void _gotk4_gtk3_TreeModelFilterClass_modify(GtkTreeModelFilter*, GtkTreeModel*, GtkTreeIter*, GValue*, gint);
// extern void _gotk4_gtk3_TreeDestroyCountFunc(GtkTreeView*, GtkTreePath*, gint, gpointer);
// extern void _gotk4_gtk3_TreeCellDataFunc(GtkTreeViewColumn*, GtkCellRenderer*, GtkTreeModel*, GtkTreeIter*, gpointer);
// extern void _gotk4_gtk3_Toolbar_ConnectStyleChanged(gpointer, GtkToolbarStyle, guintptr);
// extern void _gotk4_gtk3_Toolbar_ConnectOrientationChanged(gpointer, GtkOrientation, guintptr);
// extern void _gotk4_gtk3_ToolbarClass_style_changed(GtkToolbar*, GtkToolbarStyle);
// extern void _gotk4_gtk3_ToolbarClass_orientation_changed(GtkToolbar*, GtkOrientation);
// extern void _gotk4_gtk3_ToolItem_ConnectToolbarReconfigured(gpointer, guintptr);
// extern void _gotk4_gtk3_ToolItemClass_toolbar_reconfigured(GtkToolItem*);
// extern void _gotk4_gtk3_ToolButton_ConnectClicked(gpointer, guintptr);
// extern void _gotk4_gtk3_ToolButtonClass_clicked(GtkToolButton*);
// extern void _gotk4_gtk3_ToggleToolButton_ConnectToggled(gpointer, guintptr);
// extern void _gotk4_gtk3_ToggleToolButtonClass_toggled(GtkToggleToolButton*);
// extern void _gotk4_gtk3_ToggleButton_ConnectToggled(gpointer, guintptr);
// extern void _gotk4_gtk3_ToggleButtonClass_toggled(GtkToggleButton*);
// extern void _gotk4_gtk3_ToggleAction_ConnectToggled(gpointer, guintptr);
// extern void _gotk4_gtk3_ToggleActionClass_toggled(GtkToggleAction*);
// extern void _gotk4_gtk3_ThemingEngineClass_render_slider(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkOrientation);
// extern void _gotk4_gtk3_ThemingEngineClass_render_option(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_line(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_layout(GtkThemingEngine*, cairo_t*, gdouble, gdouble, PangoLayout*);
// extern void _gotk4_gtk3_ThemingEngineClass_render_icon_surface(GtkThemingEngine*, cairo_t*, cairo_surface_t*, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_icon(GtkThemingEngine*, cairo_t*, GdkPixbuf*, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_handle(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_frame_gap(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkPositionType, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_frame(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_focus(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_extension(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkPositionType);
// extern void _gotk4_gtk3_ThemingEngineClass_render_expander(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_check(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_background(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_arrow(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_ThemingEngineClass_render_activity(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble);
// extern void _gotk4_gtk3_TextView_ConnectToggleOverwrite(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectToggleCursorVisible(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectSetAnchor(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectSelectAll(gpointer, gboolean, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectPreeditChanged(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectPopulatePopup(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectPasteClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectMoveViewport(gpointer, GtkScrollStep, gint, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectMoveCursor(gpointer, GtkMovementStep, gint, gboolean, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectInsertEmoji(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectInsertAtCursor(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectDeleteFromCursor(gpointer, GtkDeleteType, gint, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectCutClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectCopyClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_TextView_ConnectBackspace(gpointer, guintptr);
// extern void _gotk4_gtk3_TextViewClass_toggle_overwrite(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_set_anchor(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_populate_popup(GtkTextView*, GtkWidget*);
// extern void _gotk4_gtk3_TextViewClass_paste_clipboard(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_move_cursor(GtkTextView*, GtkMovementStep, gint, gboolean);
// extern void _gotk4_gtk3_TextViewClass_insert_emoji(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_insert_at_cursor(GtkTextView*, gchar*);
// extern void _gotk4_gtk3_TextViewClass_draw_layer(GtkTextView*, GtkTextViewLayer, cairo_t*);
// extern void _gotk4_gtk3_TextViewClass_delete_from_cursor(GtkTextView*, GtkDeleteType, gint);
// extern void _gotk4_gtk3_TextViewClass_cut_clipboard(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_copy_clipboard(GtkTextView*);
// extern void _gotk4_gtk3_TextViewClass_backspace(GtkTextView*);
// extern void _gotk4_gtk3_TextTagTable_ConnectTagRemoved(gpointer, GtkTextTag*, guintptr);
// extern void _gotk4_gtk3_TextTagTable_ConnectTagChanged(gpointer, GtkTextTag*, gboolean, guintptr);
// extern void _gotk4_gtk3_TextTagTable_ConnectTagAdded(gpointer, GtkTextTag*, guintptr);
// extern void _gotk4_gtk3_TextTagTableForEach(GtkTextTag*, gpointer);
// extern void _gotk4_gtk3_TextTagTableClass_tag_removed(GtkTextTagTable*, GtkTextTag*);
// extern void _gotk4_gtk3_TextTagTableClass_tag_changed(GtkTextTagTable*, GtkTextTag*, gboolean);
// extern void _gotk4_gtk3_TextTagTableClass_tag_added(GtkTextTagTable*, GtkTextTag*);
// extern void _gotk4_gtk3_TextBuffer_ConnectRemoveTag(gpointer, GtkTextTag*, GtkTextIter*, GtkTextIter*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectPasteDone(gpointer, GtkClipboard*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectModifiedChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectMarkSet(gpointer, GtkTextIter*, GtkTextMark*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectMarkDeleted(gpointer, GtkTextMark*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectInsertText(gpointer, GtkTextIter*, gchar*, gint, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectInsertPixbuf(gpointer, GtkTextIter*, GdkPixbuf*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectInsertChildAnchor(gpointer, GtkTextIter*, GtkTextChildAnchor*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectEndUserAction(gpointer, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectDeleteRange(gpointer, GtkTextIter*, GtkTextIter*, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectBeginUserAction(gpointer, guintptr);
// extern void _gotk4_gtk3_TextBuffer_ConnectApplyTag(gpointer, GtkTextTag*, GtkTextIter*, GtkTextIter*, guintptr);
// extern void _gotk4_gtk3_TextBufferClass_remove_tag(GtkTextBuffer*, GtkTextTag*, GtkTextIter*, GtkTextIter*);
// extern void _gotk4_gtk3_TextBufferClass_paste_done(GtkTextBuffer*, GtkClipboard*);
// extern void _gotk4_gtk3_TextBufferClass_modified_changed(GtkTextBuffer*);
// extern void _gotk4_gtk3_TextBufferClass_mark_set(GtkTextBuffer*, GtkTextIter*, GtkTextMark*);
// extern void _gotk4_gtk3_TextBufferClass_mark_deleted(GtkTextBuffer*, GtkTextMark*);
// extern void _gotk4_gtk3_TextBufferClass_insert_text(GtkTextBuffer*, GtkTextIter*, gchar*, gint);
// extern void _gotk4_gtk3_TextBufferClass_insert_pixbuf(GtkTextBuffer*, GtkTextIter*, GdkPixbuf*);
// extern void _gotk4_gtk3_TextBufferClass_insert_child_anchor(GtkTextBuffer*, GtkTextIter*, GtkTextChildAnchor*);
// extern void _gotk4_gtk3_TextBufferClass_end_user_action(GtkTextBuffer*);
// extern void _gotk4_gtk3_TextBufferClass_delete_range(GtkTextBuffer*, GtkTextIter*, GtkTextIter*);
// extern void _gotk4_gtk3_TextBufferClass_changed(GtkTextBuffer*);
// extern void _gotk4_gtk3_TextBufferClass_begin_user_action(GtkTextBuffer*);
// extern void _gotk4_gtk3_TextBufferClass_apply_tag(GtkTextBuffer*, GtkTextTag*, GtkTextIter*, GtkTextIter*);
// extern void _gotk4_gtk3_Switch_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_SwitchClass_activate(GtkSwitch*);
// extern void _gotk4_gtk3_Style_ConnectUnrealize(gpointer, guintptr);
// extern void _gotk4_gtk3_Style_ConnectRealize(gpointer, guintptr);
// extern void _gotk4_gtk3_StyleContext_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_StyleContextClass_changed(GtkStyleContext*);
// extern void _gotk4_gtk3_StyleClass_unrealize(GtkStyle*);
// extern void _gotk4_gtk3_StyleClass_set_background(GtkStyle*, GdkWindow*, GtkStateType);
// extern void _gotk4_gtk3_StyleClass_realize(GtkStyle*);
// extern void _gotk4_gtk3_StyleClass_init_from_rc(GtkStyle*, GtkRcStyle*);
// extern void _gotk4_gtk3_StyleClass_draw_vline(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_tab(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_spinner(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, guint, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_slider(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkOrientation);
// extern void _gotk4_gtk3_StyleClass_draw_shadow_gap(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_shadow(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_resize_grip(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, GdkWindowEdge, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_option(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_layout(GtkStyle*, cairo_t*, GtkStateType, gboolean, GtkWidget*, gchar*, gint, gint, PangoLayout*);
// extern void _gotk4_gtk3_StyleClass_draw_hline(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_handle(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkOrientation);
// extern void _gotk4_gtk3_StyleClass_draw_focus(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_flat_box(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_extension(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType);
// extern void _gotk4_gtk3_StyleClass_draw_expander(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, GtkExpanderStyle);
// extern void _gotk4_gtk3_StyleClass_draw_diamond(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_check(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_box_gap(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_box(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_draw_arrow(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, GtkArrowType, gboolean, gint, gint, gint, gint);
// extern void _gotk4_gtk3_StyleClass_copy(GtkStyle*, GtkStyle*);
// extern void _gotk4_gtk3_Statusbar_ConnectTextPushed(gpointer, guint, gchar*, guintptr);
// extern void _gotk4_gtk3_Statusbar_ConnectTextPopped(gpointer, guint, gchar*, guintptr);
// extern void _gotk4_gtk3_StatusbarClass_text_pushed(GtkStatusbar*, guint, gchar*);
// extern void _gotk4_gtk3_StatusbarClass_text_popped(GtkStatusbar*, guint, gchar*);
// extern void _gotk4_gtk3_StatusIcon_ConnectPopupMenu(gpointer, guint, guint, guintptr);
// extern void _gotk4_gtk3_StatusIcon_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_StatusIconClass_popup_menu(GtkStatusIcon*, guint, guint32);
// extern void _gotk4_gtk3_StatusIconClass_activate(GtkStatusIcon*);
// extern void _gotk4_gtk3_SpinButton_ConnectWrapped(gpointer, guintptr);
// extern void _gotk4_gtk3_SpinButton_ConnectValueChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_SpinButton_ConnectChangeValue(gpointer, GtkScrollType, guintptr);
// extern void _gotk4_gtk3_SpinButtonClass_wrapped(GtkSpinButton*);
// extern void _gotk4_gtk3_SpinButtonClass_value_changed(GtkSpinButton*);
// extern void _gotk4_gtk3_SpinButtonClass_change_value(GtkSpinButton*, GtkScrollType);
// extern void _gotk4_gtk3_Socket_ConnectPlugAdded(gpointer, guintptr);
// extern void _gotk4_gtk3_SocketClass_plug_added(GtkSocket*);
// extern void _gotk4_gtk3_ShortcutsWindow_ConnectSearch(gpointer, guintptr);
// extern void _gotk4_gtk3_ShortcutsWindow_ConnectClose(gpointer, guintptr);
// extern void _gotk4_gtk3_ShortcutsWindowClass_search(GtkShortcutsWindow*);
// extern void _gotk4_gtk3_ShortcutsWindowClass_close(GtkShortcutsWindow*);
// extern void _gotk4_gtk3_SearchEntry_ConnectStopSearch(gpointer, guintptr);
// extern void _gotk4_gtk3_SearchEntry_ConnectSearchChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_SearchEntry_ConnectPreviousMatch(gpointer, guintptr);
// extern void _gotk4_gtk3_SearchEntry_ConnectNextMatch(gpointer, guintptr);
// extern void _gotk4_gtk3_SearchEntryClass_stop_search(GtkSearchEntry*);
// extern void _gotk4_gtk3_SearchEntryClass_search_changed(GtkSearchEntry*);
// extern void _gotk4_gtk3_SearchEntryClass_previous_match(GtkSearchEntry*);
// extern void _gotk4_gtk3_SearchEntryClass_next_match(GtkSearchEntry*);
// extern void _gotk4_gtk3_ScrolledWindow_ConnectMoveFocusOut(gpointer, GtkDirectionType, guintptr);
// extern void _gotk4_gtk3_ScrolledWindow_ConnectEdgeReached(gpointer, GtkPositionType, guintptr);
// extern void _gotk4_gtk3_ScrolledWindow_ConnectEdgeOvershot(gpointer, GtkPositionType, guintptr);
// extern void _gotk4_gtk3_ScrolledWindowClass_move_focus_out(GtkScrolledWindow*, GtkDirectionType);
// extern void _gotk4_gtk3_ScaleClass_get_layout_offsets(GtkScale*, gint*, gint*);
// extern void _gotk4_gtk3_ScaleClass_draw_value(GtkScale*);
// extern void _gotk4_gtk3_ScaleButton_ConnectValueChanged(gpointer, gdouble, guintptr);
// extern void _gotk4_gtk3_ScaleButton_ConnectPopup(gpointer, guintptr);
// extern void _gotk4_gtk3_ScaleButton_ConnectPopdown(gpointer, guintptr);
// extern void _gotk4_gtk3_ScaleButtonClass_value_changed(GtkScaleButton*, gdouble);
// extern void _gotk4_gtk3_RecentManager_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_RecentManagerClass_changed(GtkRecentManager*);
// extern void _gotk4_gtk3_RecentChooser_ConnectSelectionChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_RecentChooser_ConnectItemActivated(gpointer, guintptr);
// extern void _gotk4_gtk3_RcStyleClass_merge(GtkRcStyle*, GtkRcStyle*);
// extern void _gotk4_gtk3_Range_ConnectValueChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Range_ConnectMoveSlider(gpointer, GtkScrollType, guintptr);
// extern void _gotk4_gtk3_Range_ConnectAdjustBounds(gpointer, gdouble, guintptr);
// extern void _gotk4_gtk3_RangeClass_value_changed(GtkRange*);
// extern void _gotk4_gtk3_RangeClass_move_slider(GtkRange*, GtkScrollType);
// extern void _gotk4_gtk3_RangeClass_get_range_size_request(GtkRange*, GtkOrientation, gint*, gint*);
// extern void _gotk4_gtk3_RangeClass_get_range_border(GtkRange*, GtkBorder*);
// extern void _gotk4_gtk3_RangeClass_adjust_bounds(GtkRange*, gdouble);
// extern void _gotk4_gtk3_RadioMenuItem_ConnectGroupChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_RadioMenuItemClass_group_changed(GtkRadioMenuItem*);
// extern void _gotk4_gtk3_RadioButton_ConnectGroupChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_RadioButtonClass_group_changed(GtkRadioButton*);
// extern void _gotk4_gtk3_RadioAction_ConnectChanged(gpointer, GtkRadioAction*, guintptr);
// extern void _gotk4_gtk3_RadioActionClass_changed(GtkRadioAction*, GtkRadioAction*);
// extern void _gotk4_gtk3_PrintSettingsFunc(gchar*, gchar*, gpointer);
// extern void _gotk4_gtk3_PrintOperation_ConnectUpdateCustomWidget(gpointer, GtkWidget*, GtkPageSetup*, GtkPrintSettings*, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectStatusChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectRequestPageSetup(gpointer, GtkPrintContext*, gint, GtkPageSetup*, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectEndPrint(gpointer, GtkPrintContext*, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectDrawPage(gpointer, GtkPrintContext*, gint, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectDone(gpointer, GtkPrintOperationResult, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectCustomWidgetApply(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_PrintOperation_ConnectBeginPrint(gpointer, GtkPrintContext*, guintptr);
// extern void _gotk4_gtk3_PrintOperationPreview_ConnectReady(gpointer, GtkPrintContext*, guintptr);
// extern void _gotk4_gtk3_PrintOperationPreview_ConnectGotPageSize(gpointer, GtkPrintContext*, GtkPageSetup*, guintptr);
// extern void _gotk4_gtk3_PrintOperationClass_update_custom_widget(GtkPrintOperation*, GtkWidget*, GtkPageSetup*, GtkPrintSettings*);
// extern void _gotk4_gtk3_PrintOperationClass_status_changed(GtkPrintOperation*);
// extern void _gotk4_gtk3_PrintOperationClass_request_page_setup(GtkPrintOperation*, GtkPrintContext*, gint, GtkPageSetup*);
// extern void _gotk4_gtk3_PrintOperationClass_end_print(GtkPrintOperation*, GtkPrintContext*);
// extern void _gotk4_gtk3_PrintOperationClass_draw_page(GtkPrintOperation*, GtkPrintContext*, gint);
// extern void _gotk4_gtk3_PrintOperationClass_done(GtkPrintOperation*, GtkPrintOperationResult);
// extern void _gotk4_gtk3_PrintOperationClass_custom_widget_apply(GtkPrintOperation*, GtkWidget*);
// extern void _gotk4_gtk3_PrintOperationClass_begin_print(GtkPrintOperation*, GtkPrintContext*);
// extern void _gotk4_gtk3_Popover_ConnectClosed(gpointer, guintptr);
// extern void _gotk4_gtk3_PopoverClass_closed(GtkPopover*);
// extern void _gotk4_gtk3_Plug_ConnectEmbedded(gpointer, guintptr);
// extern void _gotk4_gtk3_PlugClass_embedded(GtkPlug*);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectUnmount(gpointer, GMountOperation*, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowStarredLocation(gpointer, GtkPlacesOpenFlags, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowOtherLocationsWithFlags(gpointer, GtkPlacesOpenFlags, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowOtherLocations(gpointer, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowErrorMessage(gpointer, gchar*, gchar*, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowEnterLocation(gpointer, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectShowConnectToServer(gpointer, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectPopulatePopup(gpointer, GtkWidget*, GFile*, GVolume*, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectOpenLocation(gpointer, GFile*, GtkPlacesOpenFlags, guintptr);
// extern void _gotk4_gtk3_PlacesSidebar_ConnectMount(gpointer, GMountOperation*, guintptr);
// extern void _gotk4_gtk3_PageSetupDoneFunc(GtkPageSetup*, gpointer);
// extern void _gotk4_gtk3_Notebook_ConnectSwitchPage(gpointer, GtkWidget*, guint, guintptr);
// extern void _gotk4_gtk3_Notebook_ConnectPageReordered(gpointer, GtkWidget*, guint, guintptr);
// extern void _gotk4_gtk3_Notebook_ConnectPageRemoved(gpointer, GtkWidget*, guint, guintptr);
// extern void _gotk4_gtk3_Notebook_ConnectPageAdded(gpointer, GtkWidget*, guint, guintptr);
// extern void _gotk4_gtk3_Notebook_ConnectMoveFocusOut(gpointer, GtkDirectionType, guintptr);
// extern void _gotk4_gtk3_NotebookClass_switch_page(GtkNotebook*, GtkWidget*, guint);
// extern void _gotk4_gtk3_NotebookClass_page_reordered(GtkNotebook*, GtkWidget*, guint);
// extern void _gotk4_gtk3_NotebookClass_page_removed(GtkNotebook*, GtkWidget*, guint);
// extern void _gotk4_gtk3_NotebookClass_page_added(GtkNotebook*, GtkWidget*, guint);
// extern void _gotk4_gtk3_NotebookClass_move_focus_out(GtkNotebook*, GtkDirectionType);
// extern void _gotk4_gtk3_NativeDialog_ConnectResponse(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_NativeDialogClass_show(GtkNativeDialog*);
// extern void _gotk4_gtk3_NativeDialogClass_response(GtkNativeDialog*, gint);
// extern void _gotk4_gtk3_NativeDialogClass_hide(GtkNativeDialog*);
// extern void _gotk4_gtk3_Menu_ConnectPoppedUp(gpointer, gpointer, gpointer, gboolean, gboolean, guintptr);
// extern void _gotk4_gtk3_Menu_ConnectMoveScroll(gpointer, GtkScrollType, guintptr);
// extern void _gotk4_gtk3_MenuToolButton_ConnectShowMenu(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuToolButtonClass_show_menu(GtkMenuToolButton*);
// extern void _gotk4_gtk3_MenuShell_ConnectSelectionDone(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectMoveCurrent(gpointer, GtkMenuDirectionType, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectInsert(gpointer, GtkWidget*, gint, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectDeactivate(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectCycleFocus(gpointer, GtkDirectionType, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectCancel(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuShell_ConnectActivateCurrent(gpointer, gboolean, guintptr);
// extern void _gotk4_gtk3_MenuShellClass_selection_done(GtkMenuShell*);
// extern void _gotk4_gtk3_MenuShellClass_select_item(GtkMenuShell*, GtkWidget*);
// extern void _gotk4_gtk3_MenuShellClass_move_current(GtkMenuShell*, GtkMenuDirectionType);
// extern void _gotk4_gtk3_MenuShellClass_insert(GtkMenuShell*, GtkWidget*, gint);
// extern void _gotk4_gtk3_MenuShellClass_deactivate(GtkMenuShell*);
// extern void _gotk4_gtk3_MenuShellClass_cancel(GtkMenuShell*);
// extern void _gotk4_gtk3_MenuShellClass_activate_current(GtkMenuShell*, gboolean);
// extern void _gotk4_gtk3_MenuItem_ConnectToggleSizeRequest(gpointer, gpointer, guintptr);
// extern void _gotk4_gtk3_MenuItem_ConnectToggleSizeAllocate(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_MenuItem_ConnectSelect(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuItem_ConnectDeselect(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuItem_ConnectActivateItem(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuItem_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_MenuItemClass_toggle_size_allocate(GtkMenuItem*, gint);
// extern void _gotk4_gtk3_MenuItemClass_set_label(GtkMenuItem*, gchar*);
// extern void _gotk4_gtk3_MenuItemClass_select(GtkMenuItem*);
// extern void _gotk4_gtk3_MenuItemClass_deselect(GtkMenuItem*);
// extern void _gotk4_gtk3_MenuItemClass_activate_item(GtkMenuItem*);
// extern void _gotk4_gtk3_MenuItemClass_activate(GtkMenuItem*);
// extern void _gotk4_gtk3_ListBox_ConnectUnselectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectToggleCursorRow(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectSelectedRowsChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectSelectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectRowSelected(gpointer, GtkListBoxRow*, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectRowActivated(gpointer, GtkListBoxRow*, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectMoveCursor(gpointer, GtkMovementStep, gint, guintptr);
// extern void _gotk4_gtk3_ListBox_ConnectActivateCursorRow(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBoxUpdateHeaderFunc(GtkListBoxRow*, GtkListBoxRow*, gpointer);
// extern void _gotk4_gtk3_ListBoxRow_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_ListBoxRowClass_activate(GtkListBoxRow*);
// extern void _gotk4_gtk3_ListBoxForEachFunc(GtkListBox*, GtkListBoxRow*, gpointer);
// extern void _gotk4_gtk3_ListBoxClass_unselect_all(GtkListBox*);
// extern void _gotk4_gtk3_ListBoxClass_toggle_cursor_row(GtkListBox*);
// extern void _gotk4_gtk3_ListBoxClass_selected_rows_changed(GtkListBox*);
// extern void _gotk4_gtk3_ListBoxClass_select_all(GtkListBox*);
// extern void _gotk4_gtk3_ListBoxClass_row_selected(GtkListBox*, GtkListBoxRow*);
// extern void _gotk4_gtk3_ListBoxClass_row_activated(GtkListBox*, GtkListBoxRow*);
// extern void _gotk4_gtk3_ListBoxClass_move_cursor(GtkListBox*, GtkMovementStep, gint);
// extern void _gotk4_gtk3_ListBoxClass_activate_cursor_row(GtkListBox*);
// extern void _gotk4_gtk3_LevelBar_ConnectOffsetChanged(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_LevelBarClass_offset_changed(GtkLevelBar*, gchar*);
// extern void _gotk4_gtk3_Label_ConnectPopulatePopup(gpointer, GtkMenu*, guintptr);
// extern void _gotk4_gtk3_Label_ConnectMoveCursor(gpointer, GtkMovementStep, gint, gboolean, guintptr);
// extern void _gotk4_gtk3_Label_ConnectCopyClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_Label_ConnectActivateCurrentLink(gpointer, guintptr);
// extern void _gotk4_gtk3_LabelClass_populate_popup(GtkLabel*, GtkMenu*);
// extern void _gotk4_gtk3_LabelClass_move_cursor(GtkLabel*, GtkMovementStep, gint, gboolean);
// extern void _gotk4_gtk3_LabelClass_copy_clipboard(GtkLabel*);
// extern void _gotk4_gtk3_InfoBar_ConnectResponse(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_InfoBar_ConnectClose(gpointer, guintptr);
// extern void _gotk4_gtk3_InfoBarClass_response(GtkInfoBar*, gint);
// extern void _gotk4_gtk3_InfoBarClass_close(GtkInfoBar*);
// extern void _gotk4_gtk3_IconView_ConnectUnselectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_IconView_ConnectToggleCursorItem(gpointer, guintptr);
// extern void _gotk4_gtk3_IconView_ConnectSelectionChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_IconView_ConnectSelectCursorItem(gpointer, guintptr);
// extern void _gotk4_gtk3_IconView_ConnectSelectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_IconView_ConnectItemActivated(gpointer, GtkTreePath*, guintptr);
// extern void _gotk4_gtk3_IconViewForEachFunc(GtkIconView*, GtkTreePath*, gpointer);
// extern void _gotk4_gtk3_IconViewClass_unselect_all(GtkIconView*);
// extern void _gotk4_gtk3_IconViewClass_toggle_cursor_item(GtkIconView*);
// extern void _gotk4_gtk3_IconViewClass_selection_changed(GtkIconView*);
// extern void _gotk4_gtk3_IconViewClass_select_cursor_item(GtkIconView*);
// extern void _gotk4_gtk3_IconViewClass_select_all(GtkIconView*);
// extern void _gotk4_gtk3_IconViewClass_item_activated(GtkIconView*, GtkTreePath*);
// extern void _gotk4_gtk3_IconTheme_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_IconThemeClass_changed(GtkIconTheme*);
// extern void _gotk4_gtk3_IMContext_ConnectPreeditStart(gpointer, guintptr);
// extern void _gotk4_gtk3_IMContext_ConnectPreeditEnd(gpointer, guintptr);
// extern void _gotk4_gtk3_IMContext_ConnectPreeditChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_IMContext_ConnectCommit(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_IMContextClass_set_use_preedit(GtkIMContext*, gboolean);
// extern void _gotk4_gtk3_IMContextClass_set_surrounding(GtkIMContext*, gchar*, gint, gint);
// extern void _gotk4_gtk3_IMContextClass_set_cursor_location(GtkIMContext*, GdkRectangle*);
// extern void _gotk4_gtk3_IMContextClass_set_client_window(GtkIMContext*, GdkWindow*);
// extern void _gotk4_gtk3_IMContextClass_reset(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_preedit_start(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_preedit_end(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_preedit_changed(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_get_preedit_string(GtkIMContext*, gchar**, PangoAttrList**, gint*);
// extern void _gotk4_gtk3_IMContextClass_focus_out(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_focus_in(GtkIMContext*);
// extern void _gotk4_gtk3_IMContextClass_commit(GtkIMContext*, gchar*);
// extern void _gotk4_gtk3_HandleBox_ConnectChildDetached(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_HandleBox_ConnectChildAttached(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_HandleBoxClass_child_detached(GtkHandleBox*, GtkWidget*);
// extern void _gotk4_gtk3_HandleBoxClass_child_attached(GtkHandleBox*, GtkWidget*);
// extern void _gotk4_gtk3_HSV_ConnectMove(gpointer, GtkDirectionType, guintptr);
// extern void _gotk4_gtk3_HSV_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_HSVClass_move(GtkHSV*, GtkDirectionType);
// extern void _gotk4_gtk3_HSVClass_changed(GtkHSV*);
// extern void _gotk4_gtk3_Gesture_ConnectUpdate(gpointer, GdkEventSequence*, guintptr);
// extern void _gotk4_gtk3_Gesture_ConnectSequenceStateChanged(gpointer, GdkEventSequence*, GtkEventSequenceState, guintptr);
// extern void _gotk4_gtk3_Gesture_ConnectEnd(gpointer, GdkEventSequence*, guintptr);
// extern void _gotk4_gtk3_Gesture_ConnectCancel(gpointer, GdkEventSequence*, guintptr);
// extern void _gotk4_gtk3_Gesture_ConnectBegin(gpointer, GdkEventSequence*, guintptr);
// extern void _gotk4_gtk3_GestureZoom_ConnectScaleChanged(gpointer, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureSwipe_ConnectSwipe(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureStylus_ConnectUp(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureStylus_ConnectProximity(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureStylus_ConnectMotion(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureStylus_ConnectDown(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureRotate_ConnectAngleChanged(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GesturePan_ConnectPan(gpointer, GtkPanDirection, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureMultiPress_ConnectStopped(gpointer, guintptr);
// extern void _gotk4_gtk3_GestureMultiPress_ConnectReleased(gpointer, gint, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureMultiPress_ConnectPressed(gpointer, gint, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureLongPress_ConnectPressed(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureLongPress_ConnectCancelled(gpointer, guintptr);
// extern void _gotk4_gtk3_GestureDrag_ConnectDragUpdate(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureDrag_ConnectDragEnd(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GestureDrag_ConnectDragBegin(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_GLArea_ConnectResize(gpointer, gint, gint, guintptr);
// extern void _gotk4_gtk3_GLAreaClass_resize(GtkGLArea*, int, int);
// extern void _gotk4_gtk3_FrameClass_compute_child_allocation(GtkFrame*, GtkAllocation*);
// extern void _gotk4_gtk3_FontChooser_ConnectFontActivated(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_FontButton_ConnectFontSet(gpointer, guintptr);
// extern void _gotk4_gtk3_FontButtonClass_font_set(GtkFontButton*);
// extern void _gotk4_gtk3_FlowBox_ConnectUnselectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBox_ConnectToggleCursorChild(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBox_ConnectSelectedChildrenChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBox_ConnectSelectAll(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBox_ConnectChildActivated(gpointer, GtkFlowBoxChild*, guintptr);
// extern void _gotk4_gtk3_FlowBox_ConnectActivateCursorChild(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBoxForEachFunc(GtkFlowBox*, GtkFlowBoxChild*, gpointer);
// extern void _gotk4_gtk3_FlowBoxClass_unselect_all(GtkFlowBox*);
// extern void _gotk4_gtk3_FlowBoxClass_toggle_cursor_child(GtkFlowBox*);
// extern void _gotk4_gtk3_FlowBoxClass_selected_children_changed(GtkFlowBox*);
// extern void _gotk4_gtk3_FlowBoxClass_select_all(GtkFlowBox*);
// extern void _gotk4_gtk3_FlowBoxClass_child_activated(GtkFlowBox*, GtkFlowBoxChild*);
// extern void _gotk4_gtk3_FlowBoxClass_activate_cursor_child(GtkFlowBox*);
// extern void _gotk4_gtk3_FlowBoxChild_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_FlowBoxChildClass_activate(GtkFlowBoxChild*);
// extern void _gotk4_gtk3_FileChooser_ConnectUpdatePreview(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooser_ConnectSelectionChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooser_ConnectFileActivated(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooser_ConnectCurrentFolderChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectUpFolder(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectShowHidden(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectSearchShortcut(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectRecentShortcut(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectQuickBookmark(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectPlacesShortcut(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectLocationTogglePopup(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectLocationPopupOnPaste(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectLocationPopup(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectHomeFolder(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectDownFolder(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserWidget_ConnectDesktopFolder(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserButton_ConnectFileSet(gpointer, guintptr);
// extern void _gotk4_gtk3_FileChooserButtonClass_file_set(GtkFileChooserButton*);
// extern void _gotk4_gtk3_Expander_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_ExpanderClass_activate(GtkExpander*);
// extern void _gotk4_gtk3_EventControllerScroll_ConnectScrollEnd(gpointer, guintptr);
// extern void _gotk4_gtk3_EventControllerScroll_ConnectScrollBegin(gpointer, guintptr);
// extern void _gotk4_gtk3_EventControllerScroll_ConnectScroll(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_EventControllerScroll_ConnectDecelerate(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_EventControllerMotion_ConnectMotion(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_EventControllerMotion_ConnectLeave(gpointer, guintptr);
// extern void _gotk4_gtk3_EventControllerMotion_ConnectEnter(gpointer, gdouble, gdouble, guintptr);
// extern void _gotk4_gtk3_EventControllerKey_ConnectKeyReleased(gpointer, guint, guint, GdkModifierType, guintptr);
// extern void _gotk4_gtk3_EventControllerKey_ConnectIMUpdate(gpointer, guintptr);
// extern void _gotk4_gtk3_EventControllerKey_ConnectFocusOut(gpointer, guintptr);
// extern void _gotk4_gtk3_EventControllerKey_ConnectFocusIn(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectToggleOverwrite(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectPreeditChanged(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectPopulatePopup(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectPasteClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectMoveCursor(gpointer, GtkMovementStep, gint, gboolean, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectInsertEmoji(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectInsertAtCursor(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectIconRelease(gpointer, GtkEntryIconPosition, GdkEvent, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectIconPress(gpointer, GtkEntryIconPosition, GdkEvent, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectDeleteFromCursor(gpointer, GtkDeleteType, gint, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectCutClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectCopyClipboard(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectBackspace(gpointer, guintptr);
// extern void _gotk4_gtk3_Entry_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_EntryCompletion_ConnectNoMatches(gpointer, guintptr);
// extern void _gotk4_gtk3_EntryCompletion_ConnectActionActivated(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_EntryCompletionClass_no_matches(GtkEntryCompletion*);
// extern void _gotk4_gtk3_EntryCompletionClass_action_activated(GtkEntryCompletion*, gint);
// extern void _gotk4_gtk3_EntryClass_toggle_overwrite(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_populate_popup(GtkEntry*, GtkWidget*);
// extern void _gotk4_gtk3_EntryClass_paste_clipboard(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_move_cursor(GtkEntry*, GtkMovementStep, gint, gboolean);
// extern void _gotk4_gtk3_EntryClass_insert_emoji(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_insert_at_cursor(GtkEntry*, gchar*);
// extern void _gotk4_gtk3_EntryClass_get_text_area_size(GtkEntry*, gint*, gint*, gint*, gint*);
// extern void _gotk4_gtk3_EntryClass_get_frame_size(GtkEntry*, gint*, gint*, gint*, gint*);
// extern void _gotk4_gtk3_EntryClass_delete_from_cursor(GtkEntry*, GtkDeleteType, gint);
// extern void _gotk4_gtk3_EntryClass_cut_clipboard(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_copy_clipboard(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_backspace(GtkEntry*);
// extern void _gotk4_gtk3_EntryClass_activate(GtkEntry*);
// extern void _gotk4_gtk3_EntryBuffer_ConnectInsertedText(gpointer, guint, gchar*, guint, guintptr);
// extern void _gotk4_gtk3_EntryBuffer_ConnectDeletedText(gpointer, guint, guint, guintptr);
// extern void _gotk4_gtk3_EntryBufferClass_inserted_text(GtkEntryBuffer*, guint, gchar*, guint);
// extern void _gotk4_gtk3_EntryBufferClass_deleted_text(GtkEntryBuffer*, guint, guint);
// extern void _gotk4_gtk3_Editable_ConnectDeleteText(gpointer, gint, gint, guintptr);
// extern void _gotk4_gtk3_Editable_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Dialog_ConnectResponse(gpointer, gint, guintptr);
// extern void _gotk4_gtk3_Dialog_ConnectClose(gpointer, guintptr);
// extern void _gotk4_gtk3_DialogClass_response(GtkDialog*, gint);
// extern void _gotk4_gtk3_DialogClass_close(GtkDialog*);
// extern void _gotk4_gtk3_CssProvider_ConnectParsingError(gpointer, GtkCssSection*, GError*, guintptr);
// extern void _gotk4_gtk3_CssProviderClass_parsing_error(GtkCssProvider*, GtkCssSection*, GError*);
// extern void _gotk4_gtk3_Container_ConnectSetFocusChild(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Container_ConnectRemove(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Container_ConnectCheckResize(gpointer, guintptr);
// extern void _gotk4_gtk3_Container_ConnectAdd(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_ContainerClass_set_focus_child(GtkContainer*, GtkWidget*);
// extern void _gotk4_gtk3_ContainerClass_remove(GtkContainer*, GtkWidget*);
// extern void _gotk4_gtk3_ContainerClass_check_resize(GtkContainer*);
// extern void _gotk4_gtk3_ContainerClass_add(GtkContainer*, GtkWidget*);
// extern void _gotk4_gtk3_ComboBox_ConnectPopup(gpointer, guintptr);
// extern void _gotk4_gtk3_ComboBox_ConnectMoveActive(gpointer, GtkScrollType, guintptr);
// extern void _gotk4_gtk3_ComboBox_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_ComboBoxClass_changed(GtkComboBox*);
// extern void _gotk4_gtk3_ColorSelection_ConnectColorChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_ColorSelectionClass_color_changed(GtkColorSelection*);
// extern void _gotk4_gtk3_ColorChooser_ConnectColorActivated(gpointer, GdkRGBA*, guintptr);
// extern void _gotk4_gtk3_ColorButton_ConnectColorSet(gpointer, guintptr);
// extern void _gotk4_gtk3_ColorButtonClass_color_set(GtkColorButton*);
// extern void _gotk4_gtk3_Clipboard_ConnectOwnerChange(gpointer, GdkEventOwnerChange*, guintptr);
// extern void _gotk4_gtk3_ClipboardURIReceivedFunc(GtkClipboard*, gchar**, gpointer);
// extern void _gotk4_gtk3_ClipboardTextReceivedFunc(GtkClipboard*, gchar*, gpointer);
// extern void _gotk4_gtk3_ClipboardImageReceivedFunc(GtkClipboard*, GdkPixbuf*, gpointer);
// extern void _gotk4_gtk3_CheckMenuItem_ConnectToggled(gpointer, guintptr);
// extern void _gotk4_gtk3_CheckMenuItemClass_toggled(GtkCheckMenuItem*);
// extern void _gotk4_gtk3_CheckMenuItemClass_draw_indicator(GtkCheckMenuItem*, cairo_t*);
// extern void _gotk4_gtk3_CheckButtonClass_draw_indicator(GtkCheckButton*, cairo_t*);
// extern void _gotk4_gtk3_CellRenderer_ConnectEditingStarted(gpointer, GtkCellEditable*, gchar*, guintptr);
// extern void _gotk4_gtk3_CellRenderer_ConnectEditingCanceled(gpointer, guintptr);
// extern void _gotk4_gtk3_CellRendererToggle_ConnectToggled(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_CellRendererToggleClass_toggled(GtkCellRendererToggle*, gchar*);
// extern void _gotk4_gtk3_CellRendererText_ConnectEdited(gpointer, gchar*, gchar*, guintptr);
// extern void _gotk4_gtk3_CellRendererTextClass_edited(GtkCellRendererText*, gchar*, gchar*);
// extern void _gotk4_gtk3_CellRendererCombo_ConnectChanged(gpointer, gchar*, GtkTreeIter*, guintptr);
// extern void _gotk4_gtk3_CellRendererClass_render(GtkCellRenderer*, cairo_t*, GtkWidget*, GdkRectangle*, GdkRectangle*, GtkCellRendererState);
// extern void _gotk4_gtk3_CellRendererClass_get_size(GtkCellRenderer*, GtkWidget*, GdkRectangle*, gint*, gint*, gint*, gint*);
// extern void _gotk4_gtk3_CellRendererClass_get_preferred_width_for_height(GtkCellRenderer*, GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellRendererClass_get_preferred_width(GtkCellRenderer*, GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_CellRendererClass_get_preferred_height_for_width(GtkCellRenderer*, GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellRendererClass_get_preferred_height(GtkCellRenderer*, GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_CellRendererClass_get_aligned_area(GtkCellRenderer*, GtkWidget*, GtkCellRendererState, GdkRectangle*, GdkRectangle*);
// extern void _gotk4_gtk3_CellRendererClass_editing_started(GtkCellRenderer*, GtkCellEditable*, gchar*);
// extern void _gotk4_gtk3_CellRendererClass_editing_canceled(GtkCellRenderer*);
// extern void _gotk4_gtk3_CellRendererAccel_ConnectAccelEdited(gpointer, gchar*, guint, GdkModifierType, guint, guintptr);
// extern void _gotk4_gtk3_CellRendererAccel_ConnectAccelCleared(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_CellRendererAccelClass_accel_edited(GtkCellRendererAccel*, gchar*, guint, GdkModifierType, guint);
// extern void _gotk4_gtk3_CellRendererAccelClass_accel_cleared(GtkCellRendererAccel*, gchar*);
// extern void _gotk4_gtk3_CellLayoutDataFunc(GtkCellLayout*, GtkCellRenderer*, GtkTreeModel*, GtkTreeIter*, gpointer);
// extern void _gotk4_gtk3_CellEditable_ConnectRemoveWidget(gpointer, guintptr);
// extern void _gotk4_gtk3_CellEditable_ConnectEditingDone(gpointer, guintptr);
// extern void _gotk4_gtk3_CellArea_ConnectRemoveEditable(gpointer, GtkCellRenderer*, GtkCellEditable*, guintptr);
// extern void _gotk4_gtk3_CellArea_ConnectFocusChanged(gpointer, GtkCellRenderer*, gchar*, guintptr);
// extern void _gotk4_gtk3_CellArea_ConnectApplyAttributes(gpointer, GtkTreeModel*, GtkTreeIter*, gboolean, gboolean, guintptr);
// extern void _gotk4_gtk3_CellArea_ConnectAddEditable(gpointer, GtkCellRenderer*, GtkCellEditable*, GdkRectangle*, gchar*, guintptr);
// extern void _gotk4_gtk3_CellAreaContextClass_reset(GtkCellAreaContext*);
// extern void _gotk4_gtk3_CellAreaContextClass_get_preferred_width_for_height(GtkCellAreaContext*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaContextClass_get_preferred_height_for_width(GtkCellAreaContext*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaContextClass_allocate(GtkCellAreaContext*, gint, gint);
// extern void _gotk4_gtk3_CellAreaClass_render(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, cairo_t*, GdkRectangle*, GdkRectangle*, GtkCellRendererState, gboolean);
// extern void _gotk4_gtk3_CellAreaClass_remove(GtkCellArea*, GtkCellRenderer*);
// extern void _gotk4_gtk3_CellAreaClass_get_preferred_width_for_height(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaClass_get_preferred_width(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaClass_get_preferred_height_for_width(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaClass_get_preferred_height(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint*, gint*);
// extern void _gotk4_gtk3_CellAreaClass_apply_attributes(GtkCellArea*, GtkTreeModel*, GtkTreeIter*, gboolean, gboolean);
// extern void _gotk4_gtk3_CellAreaClass_add(GtkCellArea*, GtkCellRenderer*);
// extern void _gotk4_gtk3_CellAccessibleClass_update_cache(GtkCellAccessible*, gboolean);
// extern void _gotk4_gtk3_Callback(GtkWidget*, gpointer);
// extern void _gotk4_gtk3_Calendar_ConnectPrevYear(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectPrevMonth(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectNextYear(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectNextMonth(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectMonthChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectDaySelectedDoubleClick(gpointer, guintptr);
// extern void _gotk4_gtk3_Calendar_ConnectDaySelected(gpointer, guintptr);
// extern void _gotk4_gtk3_CalendarClass_prev_year(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_prev_month(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_next_year(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_next_month(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_month_changed(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_day_selected_double_click(GtkCalendar*);
// extern void _gotk4_gtk3_CalendarClass_day_selected(GtkCalendar*);
// extern void _gotk4_gtk3_Button_ConnectReleased(gpointer, guintptr);
// extern void _gotk4_gtk3_Button_ConnectPressed(gpointer, guintptr);
// extern void _gotk4_gtk3_Button_ConnectLeave(gpointer, guintptr);
// extern void _gotk4_gtk3_Button_ConnectEnter(gpointer, guintptr);
// extern void _gotk4_gtk3_Button_ConnectClicked(gpointer, guintptr);
// extern void _gotk4_gtk3_Button_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_ButtonClass_released(GtkButton*);
// extern void _gotk4_gtk3_ButtonClass_pressed(GtkButton*);
// extern void _gotk4_gtk3_ButtonClass_leave(GtkButton*);
// extern void _gotk4_gtk3_ButtonClass_enter(GtkButton*);
// extern void _gotk4_gtk3_ButtonClass_clicked(GtkButton*);
// extern void _gotk4_gtk3_ButtonClass_activate(GtkButton*);
// extern void _gotk4_gtk3_AsyncReadyCallback(GObject*, GAsyncResult*, gpointer);
// extern void _gotk4_gtk3_Assistant_ConnectPrepare(gpointer, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_Assistant_ConnectEscape(gpointer, guintptr);
// extern void _gotk4_gtk3_Assistant_ConnectClose(gpointer, guintptr);
// extern void _gotk4_gtk3_Assistant_ConnectCancel(gpointer, guintptr);
// extern void _gotk4_gtk3_Assistant_ConnectApply(gpointer, guintptr);
// extern void _gotk4_gtk3_AssistantClass_prepare(GtkAssistant*, GtkWidget*);
// extern void _gotk4_gtk3_AssistantClass_close(GtkAssistant*);
// extern void _gotk4_gtk3_AssistantClass_cancel(GtkAssistant*);
// extern void _gotk4_gtk3_AssistantClass_apply(GtkAssistant*);
// extern void _gotk4_gtk3_Application_ConnectWindowRemoved(gpointer, GtkWindow*, guintptr);
// extern void _gotk4_gtk3_Application_ConnectWindowAdded(gpointer, GtkWindow*, guintptr);
// extern void _gotk4_gtk3_Application_ConnectQueryEnd(gpointer, guintptr);
// extern void _gotk4_gtk3_ApplicationClass_window_removed(GtkApplication*, GtkWindow*);
// extern void _gotk4_gtk3_ApplicationClass_window_added(GtkApplication*, GtkWindow*);
// extern void _gotk4_gtk3_AppChooserWidget_ConnectPopulatePopup(gpointer, GtkMenu*, GAppInfo*, guintptr);
// extern void _gotk4_gtk3_AppChooserWidget_ConnectApplicationSelected(gpointer, GAppInfo*, guintptr);
// extern void _gotk4_gtk3_AppChooserWidget_ConnectApplicationActivated(gpointer, GAppInfo*, guintptr);
// extern void _gotk4_gtk3_AppChooserWidgetClass_populate_popup(GtkAppChooserWidget*, GtkMenu*, GAppInfo*);
// extern void _gotk4_gtk3_AppChooserWidgetClass_application_selected(GtkAppChooserWidget*, GAppInfo*);
// extern void _gotk4_gtk3_AppChooserWidgetClass_application_activated(GtkAppChooserWidget*, GAppInfo*);
// extern void _gotk4_gtk3_AppChooserButton_ConnectCustomItemActivated(gpointer, gchar*, guintptr);
// extern void _gotk4_gtk3_AppChooserButtonClass_custom_item_activated(GtkAppChooserButton*, gchar*);
// extern void _gotk4_gtk3_Adjustment_ConnectValueChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_Adjustment_ConnectChanged(gpointer, guintptr);
// extern void _gotk4_gtk3_AdjustmentClass_value_changed(GtkAdjustment*);
// extern void _gotk4_gtk3_AdjustmentClass_changed(GtkAdjustment*);
// extern void _gotk4_gtk3_Action_ConnectActivate(gpointer, guintptr);
// extern void _gotk4_gtk3_ActionGroup_ConnectPreActivate(gpointer, GtkAction*, guintptr);
// extern void _gotk4_gtk3_ActionGroup_ConnectPostActivate(gpointer, GtkAction*, guintptr);
// extern void _gotk4_gtk3_ActionGroup_ConnectDisconnectProxy(gpointer, GtkAction*, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_ActionGroup_ConnectConnectProxy(gpointer, GtkAction*, GtkWidget*, guintptr);
// extern void _gotk4_gtk3_ActionClass_disconnect_proxy(GtkAction*, GtkWidget*);
// extern void _gotk4_gtk3_ActionClass_connect_proxy(GtkAction*, GtkWidget*);
// extern void _gotk4_gtk3_ActionClass_activate(GtkAction*);
// extern void _gotk4_gtk3_AccessibleClass_widget_unset(GtkAccessible*);
// extern void _gotk4_gtk3_AccessibleClass_widget_set(GtkAccessible*);
// extern void _gotk4_gtk3_AccessibleClass_connect_widget_destroyed(GtkAccessible*);
// extern void _gotk4_gtk3_AccelMap_ConnectChanged(gpointer, gchar*, guint, GdkModifierType, guintptr);
// extern void _gotk4_gio2_AsyncReadyCallback(GObject*, GAsyncResult*, gpointer);
// extern guint _gotk4_gtk3_RcStyleClass_parse(GtkRcStyle*, GtkSettings*, GScanner*);
// extern guint _gotk4_gtk3_EntryBufferClass_insert_text(GtkEntryBuffer*, guint, gchar*, guint);
// extern guint _gotk4_gtk3_EntryBufferClass_get_length(GtkEntryBuffer*);
// extern guint _gotk4_gtk3_EntryBufferClass_delete_text(GtkEntryBuffer*, guint, guint);
// extern gint _gotk4_gtk3_TreeIterCompareFunc(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*, gpointer);
// extern gint _gotk4_gtk3_SpinButtonClass_output(GtkSpinButton*);
// extern gint _gotk4_gtk3_SpinButtonClass_input(GtkSpinButton*, gdouble*);
// extern gint _gotk4_gtk3_RecentSortFunc(GtkRecentInfo*, GtkRecentInfo*, gpointer);
// extern gint _gotk4_gtk3_PlacesSidebar_ConnectDragActionAsk(gpointer, gint, guintptr);
// extern gint _gotk4_gtk3_NotebookClass_insert_page(GtkNotebook*, GtkWidget*, GtkWidget*, GtkWidget*, gint);
// extern gint _gotk4_gtk3_MenuShellClass_get_popup_delay(GtkMenuShell*);
// extern gint _gotk4_gtk3_ListBoxSortFunc(GtkListBoxRow*, GtkListBoxRow*, gpointer);
// extern gint _gotk4_gtk3_FlowBoxSortFunc(GtkFlowBoxChild*, GtkFlowBoxChild*, gpointer);
// extern gint _gotk4_gtk3_CellAreaClass_event(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, GdkEvent*, GdkRectangle*, GtkCellRendererState);
// extern gint _gotk4_gtk3_AssistantPageFunc(gint, gpointer);
// extern gchar* _gotk4_gtk3_TranslateFunc(gchar*, gpointer);
// extern gchar* _gotk4_gtk3_Scale_ConnectFormatValue(gpointer, gdouble, guintptr);
// extern gchar* _gotk4_gtk3_ScaleClass_format_value(GtkScale*, gdouble);
// extern gchar* _gotk4_gtk3_MenuItemClass_get_label(GtkMenuItem*);
// extern gchar* _gotk4_gtk3_EntryBufferClass_get_text(GtkEntryBuffer*, gsize*);
// extern gchar* _gotk4_gtk3_ContainerClass_composite_name(GtkContainer*, GtkWidget*);
// extern gchar* _gotk4_gtk3_ComboBox_ConnectFormatEntryText(gpointer, gchar*, guintptr);
// extern gchar* _gotk4_gtk3_ComboBoxClass_format_entry_text(GtkComboBox*, gchar*);
// extern gchar* _gotk4_gtk3_CalendarDetailFunc(GtkCalendar*, guint, guint, guint, gpointer);
// extern gboolean _gotk4_gtk3_Window_ConnectEnableDebugging(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_WindowClass_enable_debugging(GtkWindow*, gboolean);
// extern gboolean _gotk4_gtk3_Widget_ConnectWindowStateEvent(gpointer, GdkEventWindowState*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectVisibilityNotifyEvent(gpointer, GdkEventVisibility*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectUnmapEvent(gpointer, GdkEventAny*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectTouchEvent(gpointer, GdkEvent, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectShowHelp(gpointer, GtkWidgetHelpType, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectSelectionRequestEvent(gpointer, GdkEventSelection*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectSelectionNotifyEvent(gpointer, GdkEventSelection*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectSelectionClearEvent(gpointer, GdkEventSelection*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectScrollEvent(gpointer, GdkEventScroll*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectQueryTooltip(gpointer, gint, gint, gboolean, GtkTooltip*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectProximityOutEvent(gpointer, GdkEventProximity*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectProximityInEvent(gpointer, GdkEventProximity*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectPropertyNotifyEvent(gpointer, GdkEventProperty*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectPopupMenu(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectMotionNotifyEvent(gpointer, GdkEventMotion*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectMnemonicActivate(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectMapEvent(gpointer, GdkEventAny*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectLeaveNotifyEvent(gpointer, GdkEventCrossing*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectKeynavFailed(gpointer, GtkDirectionType, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectKeyReleaseEvent(gpointer, GdkEventKey*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectKeyPressEvent(gpointer, GdkEventKey*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectGrabBrokenEvent(gpointer, GdkEventGrabBroken*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectFocusOutEvent(gpointer, GdkEventFocus*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectFocusInEvent(gpointer, GdkEventFocus*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectFocus(gpointer, GtkDirectionType, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectEvent(gpointer, GdkEvent, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectEnterNotifyEvent(gpointer, GdkEventCrossing*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDraw(gpointer, cairo_t*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDragMotion(gpointer, GdkDragContext*, gint, gint, guint, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDragFailed(gpointer, GdkDragContext*, GtkDragResult, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDragDrop(gpointer, GdkDragContext*, gint, gint, guint, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDestroyEvent(gpointer, GdkEvent, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDeleteEvent(gpointer, GdkEvent, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectDamageEvent(gpointer, GdkEventExpose*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectConfigureEvent(gpointer, GdkEventConfigure*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectCanActivateAccel(gpointer, guint, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectButtonReleaseEvent(gpointer, GdkEventButton*, guintptr);
// extern gboolean _gotk4_gtk3_Widget_ConnectButtonPressEvent(gpointer, GdkEventButton*, guintptr);
// extern gboolean _gotk4_gtk3_WidgetClass_window_state_event(GtkWidget*, GdkEventWindowState*);
// extern gboolean _gotk4_gtk3_WidgetClass_visibility_notify_event(GtkWidget*, GdkEventVisibility*);
// extern gboolean _gotk4_gtk3_WidgetClass_unmap_event(GtkWidget*, GdkEventAny*);
// extern gboolean _gotk4_gtk3_WidgetClass_touch_event(GtkWidget*, GdkEventTouch*);
// extern gboolean _gotk4_gtk3_WidgetClass_show_help(GtkWidget*, GtkWidgetHelpType);
// extern gboolean _gotk4_gtk3_WidgetClass_selection_request_event(GtkWidget*, GdkEventSelection*);
// extern gboolean _gotk4_gtk3_WidgetClass_selection_notify_event(GtkWidget*, GdkEventSelection*);
// extern gboolean _gotk4_gtk3_WidgetClass_selection_clear_event(GtkWidget*, GdkEventSelection*);
// extern gboolean _gotk4_gtk3_WidgetClass_scroll_event(GtkWidget*, GdkEventScroll*);
// extern gboolean _gotk4_gtk3_WidgetClass_query_tooltip(GtkWidget*, gint, gint, gboolean, GtkTooltip*);
// extern gboolean _gotk4_gtk3_WidgetClass_proximity_out_event(GtkWidget*, GdkEventProximity*);
// extern gboolean _gotk4_gtk3_WidgetClass_proximity_in_event(GtkWidget*, GdkEventProximity*);
// extern gboolean _gotk4_gtk3_WidgetClass_property_notify_event(GtkWidget*, GdkEventProperty*);
// extern gboolean _gotk4_gtk3_WidgetClass_popup_menu(GtkWidget*);
// extern gboolean _gotk4_gtk3_WidgetClass_motion_notify_event(GtkWidget*, GdkEventMotion*);
// extern gboolean _gotk4_gtk3_WidgetClass_mnemonic_activate(GtkWidget*, gboolean);
// extern gboolean _gotk4_gtk3_WidgetClass_map_event(GtkWidget*, GdkEventAny*);
// extern gboolean _gotk4_gtk3_WidgetClass_leave_notify_event(GtkWidget*, GdkEventCrossing*);
// extern gboolean _gotk4_gtk3_WidgetClass_keynav_failed(GtkWidget*, GtkDirectionType);
// extern gboolean _gotk4_gtk3_WidgetClass_key_release_event(GtkWidget*, GdkEventKey*);
// extern gboolean _gotk4_gtk3_WidgetClass_key_press_event(GtkWidget*, GdkEventKey*);
// extern gboolean _gotk4_gtk3_WidgetClass_grab_broken_event(GtkWidget*, GdkEventGrabBroken*);
// extern gboolean _gotk4_gtk3_WidgetClass_focus_out_event(GtkWidget*, GdkEventFocus*);
// extern gboolean _gotk4_gtk3_WidgetClass_focus_in_event(GtkWidget*, GdkEventFocus*);
// extern gboolean _gotk4_gtk3_WidgetClass_focus(GtkWidget*, GtkDirectionType);
// extern gboolean _gotk4_gtk3_WidgetClass_event(GtkWidget*, GdkEvent*);
// extern gboolean _gotk4_gtk3_WidgetClass_enter_notify_event(GtkWidget*, GdkEventCrossing*);
// extern gboolean _gotk4_gtk3_WidgetClass_draw(GtkWidget*, cairo_t*);
// extern gboolean _gotk4_gtk3_WidgetClass_drag_motion(GtkWidget*, GdkDragContext*, gint, gint, guint);
// extern gboolean _gotk4_gtk3_WidgetClass_drag_failed(GtkWidget*, GdkDragContext*, GtkDragResult);
// extern gboolean _gotk4_gtk3_WidgetClass_drag_drop(GtkWidget*, GdkDragContext*, gint, gint, guint);
// extern gboolean _gotk4_gtk3_WidgetClass_destroy_event(GtkWidget*, GdkEventAny*);
// extern gboolean _gotk4_gtk3_WidgetClass_delete_event(GtkWidget*, GdkEventAny*);
// extern gboolean _gotk4_gtk3_WidgetClass_damage_event(GtkWidget*, GdkEventExpose*);
// extern gboolean _gotk4_gtk3_WidgetClass_configure_event(GtkWidget*, GdkEventConfigure*);
// extern gboolean _gotk4_gtk3_WidgetClass_can_activate_accel(GtkWidget*, guint);
// extern gboolean _gotk4_gtk3_WidgetClass_button_release_event(GtkWidget*, GdkEventButton*);
// extern gboolean _gotk4_gtk3_WidgetClass_button_press_event(GtkWidget*, GdkEventButton*);
// extern gboolean _gotk4_gtk3_TreeView_ConnectUnselectAll(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectToggleCursorRow(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectTestExpandRow(gpointer, GtkTreeIter*, GtkTreePath*, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectTestCollapseRow(gpointer, GtkTreeIter*, GtkTreePath*, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectStartInteractiveSearch(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectSelectCursorRow(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectSelectCursorParent(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectSelectAll(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectMoveCursor(gpointer, GtkMovementStep, gint, guintptr);
// extern gboolean _gotk4_gtk3_TreeView_ConnectExpandCollapseCursorRow(gpointer, gboolean, gboolean, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_TreeViewSearchEqualFunc(GtkTreeModel*, gint, gchar*, GtkTreeIter*, gpointer);
// extern gboolean _gotk4_gtk3_TreeViewRowSeparatorFunc(GtkTreeModel*, GtkTreeIter*, gpointer);
// extern gboolean _gotk4_gtk3_TreeViewColumnDropFunc(GtkTreeView*, GtkTreeViewColumn*, GtkTreeViewColumn*, GtkTreeViewColumn*, gpointer);
// extern gboolean _gotk4_gtk3_TreeViewClass_unselect_all(GtkTreeView*);
// extern gboolean _gotk4_gtk3_TreeViewClass_toggle_cursor_row(GtkTreeView*);
// extern gboolean _gotk4_gtk3_TreeViewClass_test_expand_row(GtkTreeView*, GtkTreeIter*, GtkTreePath*);
// extern gboolean _gotk4_gtk3_TreeViewClass_test_collapse_row(GtkTreeView*, GtkTreeIter*, GtkTreePath*);
// extern gboolean _gotk4_gtk3_TreeViewClass_start_interactive_search(GtkTreeView*);
// extern gboolean _gotk4_gtk3_TreeViewClass_select_cursor_row(GtkTreeView*, gboolean);
// extern gboolean _gotk4_gtk3_TreeViewClass_select_cursor_parent(GtkTreeView*);
// extern gboolean _gotk4_gtk3_TreeViewClass_select_all(GtkTreeView*);
// extern gboolean _gotk4_gtk3_TreeViewClass_move_cursor(GtkTreeView*, GtkMovementStep, gint);
// extern gboolean _gotk4_gtk3_TreeViewClass_expand_collapse_cursor_row(GtkTreeView*, gboolean, gboolean, gboolean);
// extern gboolean _gotk4_gtk3_TreeSelectionFunc(GtkTreeSelection*, GtkTreeModel*, GtkTreePath*, gboolean, gpointer);
// extern gboolean _gotk4_gtk3_TreeModelForEachFunc(GtkTreeModel*, GtkTreePath*, GtkTreeIter*, gpointer);
// extern gboolean _gotk4_gtk3_TreeModelFilterVisibleFunc(GtkTreeModel*, GtkTreeIter*, gpointer);
// extern gboolean _gotk4_gtk3_TreeModelFilterClass_visible(GtkTreeModelFilter*, GtkTreeModel*, GtkTreeIter*);
// extern gboolean _gotk4_gtk3_Toolbar_ConnectPopupContextMenu(gpointer, gint, gint, gint, guintptr);
// extern gboolean _gotk4_gtk3_Toolbar_ConnectFocusHomeOrEnd(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_ToolbarClass_popup_context_menu(GtkToolbar*, gint, gint, gint);
// extern gboolean _gotk4_gtk3_ToolItem_ConnectCreateMenuProxy(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_ToolItemClass_create_menu_proxy(GtkToolItem*);
// extern gboolean _gotk4_gtk3_TickCallback(GtkWidget*, GdkFrameClock*, gpointer);
// extern gboolean _gotk4_gtk3_TextView_ConnectExtendSelection(gpointer, GtkTextExtendSelection, GtkTextIter*, GtkTextIter*, GtkTextIter*, guintptr);
// extern gboolean _gotk4_gtk3_TextViewClass_extend_selection(GtkTextView*, GtkTextExtendSelection, GtkTextIter*, GtkTextIter*, GtkTextIter*);
// extern gboolean _gotk4_gtk3_TextTag_ConnectEvent(gpointer, GObject*, GdkEvent, GtkTextIter*, guintptr);
// extern gboolean _gotk4_gtk3_TextTagClass_event(GtkTextTag*, GObject*, GdkEvent*, GtkTextIter*);
// extern gboolean _gotk4_gtk3_TextCharPredicate(gunichar, gpointer);
// extern gboolean _gotk4_gtk3_Switch_ConnectStateSet(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_SwitchClass_state_set(GtkSwitch*, gboolean);
// extern gboolean _gotk4_gtk3_StatusIcon_ConnectSizeChanged(gpointer, gint, guintptr);
// extern gboolean _gotk4_gtk3_StatusIcon_ConnectScrollEvent(gpointer, GdkEventScroll*, guintptr);
// extern gboolean _gotk4_gtk3_StatusIcon_ConnectQueryTooltip(gpointer, gint, gint, gboolean, GtkTooltip*, guintptr);
// extern gboolean _gotk4_gtk3_StatusIcon_ConnectButtonReleaseEvent(gpointer, GdkEventButton*, guintptr);
// extern gboolean _gotk4_gtk3_StatusIcon_ConnectButtonPressEvent(gpointer, GdkEventButton*, guintptr);
// extern gboolean _gotk4_gtk3_StatusIconClass_size_changed(GtkStatusIcon*, gint);
// extern gboolean _gotk4_gtk3_StatusIconClass_scroll_event(GtkStatusIcon*, GdkEventScroll*);
// extern gboolean _gotk4_gtk3_StatusIconClass_query_tooltip(GtkStatusIcon*, gint, gint, gboolean, GtkTooltip*);
// extern gboolean _gotk4_gtk3_StatusIconClass_button_release_event(GtkStatusIcon*, GdkEventButton*);
// extern gboolean _gotk4_gtk3_StatusIconClass_button_press_event(GtkStatusIcon*, GdkEventButton*);
// extern gboolean _gotk4_gtk3_SpinButton_ConnectOutput(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_Socket_ConnectPlugRemoved(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_SocketClass_plug_removed(GtkSocket*);
// extern gboolean _gotk4_gtk3_ShortcutsSection_ConnectChangeCurrentPage(gpointer, gint, guintptr);
// extern gboolean _gotk4_gtk3_ScrolledWindow_ConnectScrollChild(gpointer, GtkScrollType, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_ScrolledWindowClass_scroll_child(GtkScrolledWindow*, GtkScrollType, gboolean);
// extern gboolean _gotk4_gtk3_RecentFilterFunc(GtkRecentFilterInfo*, gpointer);
// extern gboolean _gotk4_gtk3_Range_ConnectChangeValue(gpointer, GtkScrollType, gdouble, guintptr);
// extern gboolean _gotk4_gtk3_RangeClass_change_value(GtkRange*, GtkScrollType, gdouble);
// extern gboolean _gotk4_gtk3_PrintOperation_ConnectPreview(gpointer, GtkPrintOperationPreview*, GtkPrintContext*, GtkWindow*, guintptr);
// extern gboolean _gotk4_gtk3_PrintOperation_ConnectPaginate(gpointer, GtkPrintContext*, guintptr);
// extern gboolean _gotk4_gtk3_PrintOperationClass_preview(GtkPrintOperation*, GtkPrintOperationPreview*, GtkPrintContext*, GtkWindow*);
// extern gboolean _gotk4_gtk3_PrintOperationClass_paginate(GtkPrintOperation*, GtkPrintContext*);
// extern gboolean _gotk4_gtk3_Paned_ConnectToggleHandleFocus(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_Paned_ConnectMoveHandle(gpointer, GtkScrollType, guintptr);
// extern gboolean _gotk4_gtk3_Paned_ConnectCycleHandleFocus(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_Paned_ConnectCycleChildFocus(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_Paned_ConnectCancelPosition(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_Paned_ConnectAcceptPosition(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_PanedClass_toggle_handle_focus(GtkPaned*);
// extern gboolean _gotk4_gtk3_PanedClass_move_handle(GtkPaned*, GtkScrollType);
// extern gboolean _gotk4_gtk3_PanedClass_cycle_handle_focus(GtkPaned*, gboolean);
// extern gboolean _gotk4_gtk3_PanedClass_cycle_child_focus(GtkPaned*, gboolean);
// extern gboolean _gotk4_gtk3_PanedClass_cancel_position(GtkPaned*);
// extern gboolean _gotk4_gtk3_PanedClass_accept_position(GtkPaned*);
// extern gboolean _gotk4_gtk3_Overlay_ConnectGetChildPosition(gpointer, GtkWidget*, GdkRectangle*, guintptr);
// extern gboolean _gotk4_gtk3_OverlayClass_get_child_position(GtkOverlay*, GtkWidget*, GtkAllocation*);
// extern gboolean _gotk4_gtk3_Notebook_ConnectSelectPage(gpointer, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_Notebook_ConnectReorderTab(gpointer, GtkDirectionType, gboolean, guintptr);
// extern gboolean _gotk4_gtk3_Notebook_ConnectFocusTab(gpointer, GtkNotebookTab, guintptr);
// extern gboolean _gotk4_gtk3_Notebook_ConnectChangeCurrentPage(gpointer, gint, guintptr);
// extern gboolean _gotk4_gtk3_NotebookClass_select_page(GtkNotebook*, gboolean);
// extern gboolean _gotk4_gtk3_NotebookClass_reorder_tab(GtkNotebook*, GtkDirectionType, gboolean);
// extern gboolean _gotk4_gtk3_NotebookClass_focus_tab(GtkNotebook*, GtkNotebookTab);
// extern gboolean _gotk4_gtk3_NotebookClass_change_current_page(GtkNotebook*, gint);
// extern gboolean _gotk4_gtk3_MenuShell_ConnectMoveSelected(gpointer, gint, guintptr);
// extern gboolean _gotk4_gtk3_MenuShellClass_move_selected(GtkMenuShell*, gint);
// extern gboolean _gotk4_gtk3_ListBoxFilterFunc(GtkListBoxRow*, gpointer);
// extern gboolean _gotk4_gtk3_LinkButton_ConnectActivateLink(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_LinkButtonClass_activate_link(GtkLinkButton*);
// extern gboolean _gotk4_gtk3_Label_ConnectActivateLink(gpointer, gchar*, guintptr);
// extern gboolean _gotk4_gtk3_LabelClass_activate_link(GtkLabel*, gchar*);
// extern gboolean _gotk4_gtk3_IconView_ConnectMoveCursor(gpointer, GtkMovementStep, gint, guintptr);
// extern gboolean _gotk4_gtk3_IconView_ConnectActivateCursorItem(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_IconViewClass_move_cursor(GtkIconView*, GtkMovementStep, gint);
// extern gboolean _gotk4_gtk3_IconViewClass_activate_cursor_item(GtkIconView*);
// extern gboolean _gotk4_gtk3_IMContext_ConnectRetrieveSurrounding(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_IMContext_ConnectDeleteSurrounding(gpointer, gint, gint, guintptr);
// extern gboolean _gotk4_gtk3_IMContextClass_retrieve_surrounding(GtkIMContext*);
// extern gboolean _gotk4_gtk3_IMContextClass_get_surrounding(GtkIMContext*, gchar**, gint*);
// extern gboolean _gotk4_gtk3_IMContextClass_filter_keypress(GtkIMContext*, GdkEventKey*);
// extern gboolean _gotk4_gtk3_IMContextClass_delete_surrounding(GtkIMContext*, gint, gint);
// extern gboolean _gotk4_gtk3_GLArea_ConnectRender(gpointer, GdkGLContext*, guintptr);
// extern gboolean _gotk4_gtk3_GLAreaClass_render(GtkGLArea*, GdkGLContext*);
// extern gboolean _gotk4_gtk3_FontFilterFunc(PangoFontFamily*, PangoFontFace*, gpointer);
// extern gboolean _gotk4_gtk3_FlowBox_ConnectMoveCursor(gpointer, GtkMovementStep, gint, guintptr);
// extern gboolean _gotk4_gtk3_FlowBoxFilterFunc(GtkFlowBoxChild*, gpointer);
// extern gboolean _gotk4_gtk3_FlowBoxClass_move_cursor(GtkFlowBox*, GtkMovementStep, gint);
// extern gboolean _gotk4_gtk3_FileFilterFunc(GtkFileFilterInfo*, gpointer);
// extern gboolean _gotk4_gtk3_EventControllerKey_ConnectModifiers(gpointer, GdkModifierType, guintptr);
// extern gboolean _gotk4_gtk3_EventControllerKey_ConnectKeyPressed(gpointer, guint, guint, GdkModifierType, guintptr);
// extern gboolean _gotk4_gtk3_EntryCompletion_ConnectMatchSelected(gpointer, GtkTreeModel*, GtkTreeIter*, guintptr);
// extern gboolean _gotk4_gtk3_EntryCompletion_ConnectInsertPrefix(gpointer, gchar*, guintptr);
// extern gboolean _gotk4_gtk3_EntryCompletion_ConnectCursorOnMatch(gpointer, GtkTreeModel*, GtkTreeIter*, guintptr);
// extern gboolean _gotk4_gtk3_EntryCompletionMatchFunc(GtkEntryCompletion*, gchar*, GtkTreeIter*, gpointer);
// extern gboolean _gotk4_gtk3_EntryCompletionClass_match_selected(GtkEntryCompletion*, GtkTreeModel*, GtkTreeIter*);
// extern gboolean _gotk4_gtk3_EntryCompletionClass_insert_prefix(GtkEntryCompletion*, gchar*);
// extern gboolean _gotk4_gtk3_EntryCompletionClass_cursor_on_match(GtkEntryCompletion*, GtkTreeModel*, GtkTreeIter*);
// extern gboolean _gotk4_gtk3_ComboBox_ConnectPopdown(gpointer, guintptr);
// extern gboolean _gotk4_gtk3_CellRendererClass_activate(GtkCellRenderer*, GdkEvent*, GtkWidget*, gchar*, GdkRectangle*, GdkRectangle*, GtkCellRendererState);
// extern gboolean _gotk4_gtk3_CellCallback(GtkCellRenderer*, gpointer);
// extern gboolean _gotk4_gtk3_CellAreaClass_is_activatable(GtkCellArea*);
// extern gboolean _gotk4_gtk3_CellAreaClass_focus(GtkCellArea*, GtkDirectionType);
// extern gboolean _gotk4_gtk3_CellAreaClass_activate(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, GdkRectangle*, GtkCellRendererState, gboolean);
// extern gboolean _gotk4_gtk3_CellAllocCallback(GtkCellRenderer*, GdkRectangle*, GdkRectangle*, gpointer);
// extern gboolean _gotk4_gtk3_AccelGroup_ConnectAccelActivate(gpointer, GObject*, guint, GdkModifierType, guintptr);
// extern gboolean _gotk4_gtk3_AboutDialog_ConnectActivateLink(gpointer, gchar*, guintptr);
// extern gboolean _gotk4_gtk3_AboutDialogClass_activate_link(GtkAboutDialog*, gchar*);
// extern GtkWidgetPath* _gotk4_gtk3_ContainerClass_get_path_for_child(GtkContainer*, GtkWidget*);
// extern GtkWidget* _gotk4_gtk3_UIManagerClass_get_widget(GtkUIManager*, gchar*);
// extern GtkWidget* _gotk4_gtk3_ListBoxCreateWidgetFunc(gpointer, gpointer);
// extern GtkWidget* _gotk4_gtk3_FlowBoxCreateWidgetFunc(gpointer, gpointer);
// extern GtkWidget* _gotk4_gtk3_ActionClass_create_tool_item(GtkAction*);
// extern GtkWidget* _gotk4_gtk3_ActionClass_create_menu_item(GtkAction*);
// extern GtkWidget* _gotk4_gtk3_ActionClass_create_menu(GtkAction*);
// extern GtkSizeRequestMode _gotk4_gtk3_WidgetClass_get_request_mode(GtkWidget*);
// extern GtkSizeRequestMode _gotk4_gtk3_CellRendererClass_get_request_mode(GtkCellRenderer*);
// extern GtkSizeRequestMode _gotk4_gtk3_CellAreaClass_get_request_mode(GtkCellArea*);
// extern GtkNotebook* _gotk4_gtk3_Notebook_ConnectCreateWindow(gpointer, GtkWidget*, gint, gint, guintptr);
// extern GtkFileChooserConfirmation _gotk4_gtk3_FileChooser_ConnectConfirmOverwrite(gpointer, guintptr);
// extern GtkCellEditable* _gotk4_gtk3_CellRendererClass_start_editing(GtkCellRenderer*, GdkEvent*, GtkWidget*, gchar*, GdkRectangle*, GdkRectangle*, GtkCellRendererState);
// extern GtkCellAreaContext* _gotk4_gtk3_CellAreaClass_create_context(GtkCellArea*);
// extern GtkCellAreaContext* _gotk4_gtk3_CellAreaClass_copy_context(GtkCellArea*, GtkCellAreaContext*);
// extern GtkAction* _gotk4_gtk3_UIManagerClass_get_action(GtkUIManager*, gchar*);
// extern GtkAction* _gotk4_gtk3_ActionGroupClass_get_action(GtkActionGroup*, gchar*);
// extern GdkPixbuf* _gotk4_gtk3_StyleClass_render_icon(GtkStyle*, GtkIconSource*, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget*, gchar*);
// extern GdkGLContext* _gotk4_gtk3_GLArea_ConnectCreateContext(gpointer, guintptr);
// extern GType _gotk4_gtk3_ContainerClass_child_type(GtkContainer*);
// extern GType _gotk4_gtk3_BuilderClass_get_type_from_name(GtkBuilder*, char*);
// extern GObject* _gotk4_gtk3_PrintOperation_ConnectCreateCustomWidget(gpointer, guintptr);
// extern AtkObject* _gotk4_gtk3_WidgetClass_get_accessible(GtkWidget*);
// AtkObject* _gotk4_gtk3_Widget_virtual_get_accessible(void* fnptr, GtkWidget* arg0) {
//   return ((AtkObject* (*)(GtkWidget*))(fnptr))(arg0);
// };
// GList* _gotk4_gtk3_CellLayout_virtual_get_cells(void* fnptr, GtkCellLayout* arg0) {
//   return ((GList* (*)(GtkCellLayout*))(fnptr))(arg0);
// };
// GList* _gotk4_gtk3_RecentChooser_virtual_get_items(void* fnptr, GtkRecentChooser* arg0) {
//   return ((GList* (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// GObject* _gotk4_gtk3_Buildable_virtual_construct_child(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, gchar* arg2) {
//   return ((GObject* (*)(GtkBuildable*, GtkBuilder*, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// GObject* _gotk4_gtk3_Buildable_virtual_get_internal_child(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, gchar* arg2) {
//   return ((GObject* (*)(GtkBuildable*, GtkBuilder*, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// GSList* _gotk4_gtk3_RecentChooser_virtual_list_filters(void* fnptr, GtkRecentChooser* arg0) {
//   return ((GSList* (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// GType _gotk4_gtk3_Builder_virtual_get_type_from_name(void* fnptr, GtkBuilder* arg0, char* arg1) {
//   return ((GType (*)(GtkBuilder*, char*))(fnptr))(arg0, arg1);
// };
// GType _gotk4_gtk3_Container_virtual_child_type(void* fnptr, GtkContainer* arg0) {
//   return ((GType (*)(GtkContainer*))(fnptr))(arg0);
// };
// GType _gotk4_gtk3_TreeModel_virtual_get_column_type(void* fnptr, GtkTreeModel* arg0, gint arg1) {
//   return ((GType (*)(GtkTreeModel*, gint))(fnptr))(arg0, arg1);
// };
// GVariant* _gotk4_gtk3_Actionable_virtual_get_action_target_value(void* fnptr, GtkActionable* arg0) {
//   return ((GVariant* (*)(GtkActionable*))(fnptr))(arg0);
// };
// GdkPixbuf* _gotk4_gtk3_Style_virtual_render_icon(void* fnptr, GtkStyle* arg0, GtkIconSource* arg1, GtkTextDirection arg2, GtkStateType arg3, GtkIconSize arg4, GtkWidget* arg5, gchar* arg6) {
//   return ((GdkPixbuf* (*)(GtkStyle*, GtkIconSource*, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget*, gchar*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// GtkAction* _gotk4_gtk3_ActionGroup_virtual_get_action(void* fnptr, GtkActionGroup* arg0, gchar* arg1) {
//   return ((GtkAction* (*)(GtkActionGroup*, gchar*))(fnptr))(arg0, arg1);
// };
// GtkAction* _gotk4_gtk3_UIManager_virtual_get_action(void* fnptr, GtkUIManager* arg0, gchar* arg1) {
//   return ((GtkAction* (*)(GtkUIManager*, gchar*))(fnptr))(arg0, arg1);
// };
// GtkCellArea* _gotk4_gtk3_CellLayout_virtual_get_area(void* fnptr, GtkCellLayout* arg0) {
//   return ((GtkCellArea* (*)(GtkCellLayout*))(fnptr))(arg0);
// };
// GtkCellAreaContext* _gotk4_gtk3_CellArea_virtual_copy_context(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1) {
//   return ((GtkCellAreaContext* (*)(GtkCellArea*, GtkCellAreaContext*))(fnptr))(arg0, arg1);
// };
// GtkCellAreaContext* _gotk4_gtk3_CellArea_virtual_create_context(void* fnptr, GtkCellArea* arg0) {
//   return ((GtkCellAreaContext* (*)(GtkCellArea*))(fnptr))(arg0);
// };
// GtkCellEditable* _gotk4_gtk3_CellRenderer_virtual_start_editing(void* fnptr, GtkCellRenderer* arg0, GdkEvent* arg1, GtkWidget* arg2, gchar* arg3, GdkRectangle* arg4, GdkRectangle* arg5, GtkCellRendererState arg6) {
//   return ((GtkCellEditable* (*)(GtkCellRenderer*, GdkEvent*, GtkWidget*, gchar*, GdkRectangle*, GdkRectangle*, GtkCellRendererState))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// GtkCellRendererState _gotk4_gtk3_CellAccessibleParent_virtual_get_renderer_state(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   return ((GtkCellRendererState (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// GtkIconFactory* _gotk4_gtk3_StyleProvider_virtual_get_icon_factory(void* fnptr, GtkStyleProvider* arg0, GtkWidgetPath* arg1) {
//   return ((GtkIconFactory* (*)(GtkStyleProvider*, GtkWidgetPath*))(fnptr))(arg0, arg1);
// };
// GtkIconSize _gotk4_gtk3_ToolShell_virtual_get_icon_size(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkIconSize (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkOrientation _gotk4_gtk3_ToolShell_virtual_get_orientation(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkOrientation (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkOrientation _gotk4_gtk3_ToolShell_virtual_get_text_orientation(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkOrientation (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkReliefStyle _gotk4_gtk3_ToolShell_virtual_get_relief_style(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkReliefStyle (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkSizeGroup* _gotk4_gtk3_ToolShell_virtual_get_text_size_group(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkSizeGroup* (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkSizeRequestMode _gotk4_gtk3_CellArea_virtual_get_request_mode(void* fnptr, GtkCellArea* arg0) {
//   return ((GtkSizeRequestMode (*)(GtkCellArea*))(fnptr))(arg0);
// };
// GtkSizeRequestMode _gotk4_gtk3_CellRenderer_virtual_get_request_mode(void* fnptr, GtkCellRenderer* arg0) {
//   return ((GtkSizeRequestMode (*)(GtkCellRenderer*))(fnptr))(arg0);
// };
// GtkSizeRequestMode _gotk4_gtk3_Widget_virtual_get_request_mode(void* fnptr, GtkWidget* arg0) {
//   return ((GtkSizeRequestMode (*)(GtkWidget*))(fnptr))(arg0);
// };
// GtkStyleProperties* _gotk4_gtk3_StyleProvider_virtual_get_style(void* fnptr, GtkStyleProvider* arg0, GtkWidgetPath* arg1) {
//   return ((GtkStyleProperties* (*)(GtkStyleProvider*, GtkWidgetPath*))(fnptr))(arg0, arg1);
// };
// GtkToolbarStyle _gotk4_gtk3_ToolShell_virtual_get_style(void* fnptr, GtkToolShell* arg0) {
//   return ((GtkToolbarStyle (*)(GtkToolShell*))(fnptr))(arg0);
// };
// GtkTreeModelFlags _gotk4_gtk3_TreeModel_virtual_get_flags(void* fnptr, GtkTreeModel* arg0) {
//   return ((GtkTreeModelFlags (*)(GtkTreeModel*))(fnptr))(arg0);
// };
// GtkTreePath* _gotk4_gtk3_TreeModel_virtual_get_path(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   return ((GtkTreePath* (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// GtkWidget* _gotk4_gtk3_Action_virtual_create_menu(void* fnptr, GtkAction* arg0) {
//   return ((GtkWidget* (*)(GtkAction*))(fnptr))(arg0);
// };
// GtkWidget* _gotk4_gtk3_Action_virtual_create_menu_item(void* fnptr, GtkAction* arg0) {
//   return ((GtkWidget* (*)(GtkAction*))(fnptr))(arg0);
// };
// GtkWidget* _gotk4_gtk3_Action_virtual_create_tool_item(void* fnptr, GtkAction* arg0) {
//   return ((GtkWidget* (*)(GtkAction*))(fnptr))(arg0);
// };
// GtkWidget* _gotk4_gtk3_UIManager_virtual_get_widget(void* fnptr, GtkUIManager* arg0, gchar* arg1) {
//   return ((GtkWidget* (*)(GtkUIManager*, gchar*))(fnptr))(arg0, arg1);
// };
// GtkWidget* _gotk4_gtk3_dialog_new2(const gchar* title, GtkWindow* parent, GtkDialogFlags flags) {
// 	return gtk_dialog_new_with_buttons(title, parent, flags, NULL, NULL);
// }
// GtkWidget* _gotk4_gtk_message_dialog_new2(GtkWindow* parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons) {
// 	return gtk_message_dialog_new_with_markup(parent, flags, type, buttons, NULL);
// }
// GtkWidgetPath* _gotk4_gtk3_Container_virtual_get_path_for_child(void* fnptr, GtkContainer* arg0, GtkWidget* arg1) {
//   return ((GtkWidgetPath* (*)(GtkContainer*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// PangoEllipsizeMode _gotk4_gtk3_ToolShell_virtual_get_ellipsize_mode(void* fnptr, GtkToolShell* arg0) {
//   return ((PangoEllipsizeMode (*)(GtkToolShell*))(fnptr))(arg0);
// };
// PangoFontFace* _gotk4_gtk3_FontChooser_virtual_get_font_face(void* fnptr, GtkFontChooser* arg0) {
//   return ((PangoFontFace* (*)(GtkFontChooser*))(fnptr))(arg0);
// };
// PangoFontFamily* _gotk4_gtk3_FontChooser_virtual_get_font_family(void* fnptr, GtkFontChooser* arg0) {
//   return ((PangoFontFamily* (*)(GtkFontChooser*))(fnptr))(arg0);
// };
// PangoFontMap* _gotk4_gtk3_FontChooser_virtual_get_font_map(void* fnptr, GtkFontChooser* arg0) {
//   return ((PangoFontMap* (*)(GtkFontChooser*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_AboutDialog_virtual_activate_link(void* fnptr, GtkAboutDialog* arg0, gchar* arg1) {
//   return ((gboolean (*)(GtkAboutDialog*, gchar*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Buildable_virtual_custom_tag_start(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, GObject* arg2, gchar* arg3, GMarkupParser* arg4, gpointer* arg5) {
//   return ((gboolean (*)(GtkBuildable*, GtkBuilder*, GObject*, gchar*, GMarkupParser*, gpointer*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// gboolean _gotk4_gtk3_CellAccessibleParent_virtual_grab_focus(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   return ((gboolean (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_CellArea_virtual_activate(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, GdkRectangle* arg3, GtkCellRendererState arg4, gboolean arg5) {
//   return ((gboolean (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, GdkRectangle*, GtkCellRendererState, gboolean))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// gboolean _gotk4_gtk3_CellArea_virtual_focus(void* fnptr, GtkCellArea* arg0, GtkDirectionType arg1) {
//   return ((gboolean (*)(GtkCellArea*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_CellArea_virtual_is_activatable(void* fnptr, GtkCellArea* arg0) {
//   return ((gboolean (*)(GtkCellArea*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_CellRenderer_virtual_activate(void* fnptr, GtkCellRenderer* arg0, GdkEvent* arg1, GtkWidget* arg2, gchar* arg3, GdkRectangle* arg4, GdkRectangle* arg5, GtkCellRendererState arg6) {
//   return ((gboolean (*)(GtkCellRenderer*, GdkEvent*, GtkWidget*, gchar*, GdkRectangle*, GdkRectangle*, GtkCellRendererState))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// gboolean _gotk4_gtk3_Editable_virtual_get_selection_bounds(void* fnptr, GtkEditable* arg0, gint* arg1, gint* arg2) {
//   return ((gboolean (*)(GtkEditable*, gint*, gint*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_EntryCompletion_virtual_cursor_on_match(void* fnptr, GtkEntryCompletion* arg0, GtkTreeModel* arg1, GtkTreeIter* arg2) {
//   return ((gboolean (*)(GtkEntryCompletion*, GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_EntryCompletion_virtual_insert_prefix(void* fnptr, GtkEntryCompletion* arg0, gchar* arg1) {
//   return ((gboolean (*)(GtkEntryCompletion*, gchar*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_EntryCompletion_virtual_match_selected(void* fnptr, GtkEntryCompletion* arg0, GtkTreeModel* arg1, GtkTreeIter* arg2) {
//   return ((gboolean (*)(GtkEntryCompletion*, GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_FlowBox_virtual_move_cursor(void* fnptr, GtkFlowBox* arg0, GtkMovementStep arg1, gint arg2) {
//   return ((gboolean (*)(GtkFlowBox*, GtkMovementStep, gint))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_GLArea_virtual_render(void* fnptr, GtkGLArea* arg0, GdkGLContext* arg1) {
//   return ((gboolean (*)(GtkGLArea*, GdkGLContext*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_IMContext_virtual_delete_surrounding(void* fnptr, GtkIMContext* arg0, gint arg1, gint arg2) {
//   return ((gboolean (*)(GtkIMContext*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_IMContext_virtual_filter_keypress(void* fnptr, GtkIMContext* arg0, GdkEventKey* arg1) {
//   return ((gboolean (*)(GtkIMContext*, GdkEventKey*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_IMContext_virtual_get_surrounding(void* fnptr, GtkIMContext* arg0, gchar** arg1, gint* arg2) {
//   return ((gboolean (*)(GtkIMContext*, gchar**, gint*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_IMContext_virtual_retrieve_surrounding(void* fnptr, GtkIMContext* arg0) {
//   return ((gboolean (*)(GtkIMContext*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_IconView_virtual_activate_cursor_item(void* fnptr, GtkIconView* arg0) {
//   return ((gboolean (*)(GtkIconView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_IconView_virtual_move_cursor(void* fnptr, GtkIconView* arg0, GtkMovementStep arg1, gint arg2) {
//   return ((gboolean (*)(GtkIconView*, GtkMovementStep, gint))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Label_virtual_activate_link(void* fnptr, GtkLabel* arg0, gchar* arg1) {
//   return ((gboolean (*)(GtkLabel*, gchar*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_LinkButton_virtual_activate_link(void* fnptr, GtkLinkButton* arg0) {
//   return ((gboolean (*)(GtkLinkButton*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_MenuShell_virtual_move_selected(void* fnptr, GtkMenuShell* arg0, gint arg1) {
//   return ((gboolean (*)(GtkMenuShell*, gint))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Notebook_virtual_change_current_page(void* fnptr, GtkNotebook* arg0, gint arg1) {
//   return ((gboolean (*)(GtkNotebook*, gint))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Notebook_virtual_focus_tab(void* fnptr, GtkNotebook* arg0, GtkNotebookTab arg1) {
//   return ((gboolean (*)(GtkNotebook*, GtkNotebookTab))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Notebook_virtual_reorder_tab(void* fnptr, GtkNotebook* arg0, GtkDirectionType arg1, gboolean arg2) {
//   return ((gboolean (*)(GtkNotebook*, GtkDirectionType, gboolean))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Notebook_virtual_select_page(void* fnptr, GtkNotebook* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkNotebook*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Overlay_virtual_get_child_position(void* fnptr, GtkOverlay* arg0, GtkWidget* arg1, GtkAllocation* arg2) {
//   return ((gboolean (*)(GtkOverlay*, GtkWidget*, GtkAllocation*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Paned_virtual_accept_position(void* fnptr, GtkPaned* arg0) {
//   return ((gboolean (*)(GtkPaned*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_Paned_virtual_cancel_position(void* fnptr, GtkPaned* arg0) {
//   return ((gboolean (*)(GtkPaned*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_Paned_virtual_cycle_child_focus(void* fnptr, GtkPaned* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkPaned*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Paned_virtual_cycle_handle_focus(void* fnptr, GtkPaned* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkPaned*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Paned_virtual_move_handle(void* fnptr, GtkPaned* arg0, GtkScrollType arg1) {
//   return ((gboolean (*)(GtkPaned*, GtkScrollType))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Paned_virtual_toggle_handle_focus(void* fnptr, GtkPaned* arg0) {
//   return ((gboolean (*)(GtkPaned*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_PrintOperationPreview_virtual_is_selected(void* fnptr, GtkPrintOperationPreview* arg0, gint arg1) {
//   return ((gboolean (*)(GtkPrintOperationPreview*, gint))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_PrintOperation_virtual_paginate(void* fnptr, GtkPrintOperation* arg0, GtkPrintContext* arg1) {
//   return ((gboolean (*)(GtkPrintOperation*, GtkPrintContext*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_PrintOperation_virtual_preview(void* fnptr, GtkPrintOperation* arg0, GtkPrintOperationPreview* arg1, GtkPrintContext* arg2, GtkWindow* arg3) {
//   return ((gboolean (*)(GtkPrintOperation*, GtkPrintOperationPreview*, GtkPrintContext*, GtkWindow*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// gboolean _gotk4_gtk3_Range_virtual_change_value(void* fnptr, GtkRange* arg0, GtkScrollType arg1, gdouble arg2) {
//   return ((gboolean (*)(GtkRange*, GtkScrollType, gdouble))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_RecentChooser_virtual_select_uri(void* fnptr, GtkRecentChooser* arg0, gchar* arg1, GError** arg2) {
//   return ((gboolean (*)(GtkRecentChooser*, gchar*, GError**))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_RecentChooser_virtual_set_current_uri(void* fnptr, GtkRecentChooser* arg0, gchar* arg1, GError** arg2) {
//   return ((gboolean (*)(GtkRecentChooser*, gchar*, GError**))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Scrollable_virtual_get_border(void* fnptr, GtkScrollable* arg0, GtkBorder* arg1) {
//   return ((gboolean (*)(GtkScrollable*, GtkBorder*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_ScrolledWindow_virtual_scroll_child(void* fnptr, GtkScrolledWindow* arg0, GtkScrollType arg1, gboolean arg2) {
//   return ((gboolean (*)(GtkScrolledWindow*, GtkScrollType, gboolean))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Socket_virtual_plug_removed(void* fnptr, GtkSocket* arg0) {
//   return ((gboolean (*)(GtkSocket*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_StatusIcon_virtual_button_press_event(void* fnptr, GtkStatusIcon* arg0, GdkEventButton* arg1) {
//   return ((gboolean (*)(GtkStatusIcon*, GdkEventButton*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_StatusIcon_virtual_button_release_event(void* fnptr, GtkStatusIcon* arg0, GdkEventButton* arg1) {
//   return ((gboolean (*)(GtkStatusIcon*, GdkEventButton*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_StatusIcon_virtual_query_tooltip(void* fnptr, GtkStatusIcon* arg0, gint arg1, gint arg2, gboolean arg3, GtkTooltip* arg4) {
//   return ((gboolean (*)(GtkStatusIcon*, gint, gint, gboolean, GtkTooltip*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gboolean _gotk4_gtk3_StatusIcon_virtual_scroll_event(void* fnptr, GtkStatusIcon* arg0, GdkEventScroll* arg1) {
//   return ((gboolean (*)(GtkStatusIcon*, GdkEventScroll*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_StatusIcon_virtual_size_changed(void* fnptr, GtkStatusIcon* arg0, gint arg1) {
//   return ((gboolean (*)(GtkStatusIcon*, gint))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Switch_virtual_state_set(void* fnptr, GtkSwitch* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkSwitch*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TextTag_virtual_event(void* fnptr, GtkTextTag* arg0, GObject* arg1, GdkEvent* arg2, GtkTextIter* arg3) {
//   return ((gboolean (*)(GtkTextTag*, GObject*, GdkEvent*, GtkTextIter*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// gboolean _gotk4_gtk3_TextView_virtual_extend_selection(void* fnptr, GtkTextView* arg0, GtkTextExtendSelection arg1, GtkTextIter* arg2, GtkTextIter* arg3, GtkTextIter* arg4) {
//   return ((gboolean (*)(GtkTextView*, GtkTextExtendSelection, GtkTextIter*, GtkTextIter*, GtkTextIter*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gboolean _gotk4_gtk3_ToolItem_virtual_create_menu_proxy(void* fnptr, GtkToolItem* arg0) {
//   return ((gboolean (*)(GtkToolItem*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_Toolbar_virtual_popup_context_menu(void* fnptr, GtkToolbar* arg0, gint arg1, gint arg2, gint arg3) {
//   return ((gboolean (*)(GtkToolbar*, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// gboolean _gotk4_gtk3_TreeDragDest_virtual_drag_data_received(void* fnptr, GtkTreeDragDest* arg0, GtkTreePath* arg1, GtkSelectionData* arg2) {
//   return ((gboolean (*)(GtkTreeDragDest*, GtkTreePath*, GtkSelectionData*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeDragDest_virtual_row_drop_possible(void* fnptr, GtkTreeDragDest* arg0, GtkTreePath* arg1, GtkSelectionData* arg2) {
//   return ((gboolean (*)(GtkTreeDragDest*, GtkTreePath*, GtkSelectionData*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeDragSource_virtual_drag_data_delete(void* fnptr, GtkTreeDragSource* arg0, GtkTreePath* arg1) {
//   return ((gboolean (*)(GtkTreeDragSource*, GtkTreePath*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeDragSource_virtual_drag_data_get(void* fnptr, GtkTreeDragSource* arg0, GtkTreePath* arg1, GtkSelectionData* arg2) {
//   return ((gboolean (*)(GtkTreeDragSource*, GtkTreePath*, GtkSelectionData*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeDragSource_virtual_row_draggable(void* fnptr, GtkTreeDragSource* arg0, GtkTreePath* arg1) {
//   return ((gboolean (*)(GtkTreeDragSource*, GtkTreePath*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeModelFilter_virtual_visible(void* fnptr, GtkTreeModelFilter* arg0, GtkTreeModel* arg1, GtkTreeIter* arg2) {
//   return ((gboolean (*)(GtkTreeModelFilter*, GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_get_iter(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1, GtkTreePath* arg2) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreePath*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_children(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1, GtkTreeIter* arg2) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_has_child(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_next(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_nth_child(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1, GtkTreeIter* arg2, gint arg3) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*, gint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_parent(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1, GtkTreeIter* arg2) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeModel_virtual_iter_previous(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   return ((gboolean (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeSortable_virtual_get_sort_column_id(void* fnptr, GtkTreeSortable* arg0, gint* arg1, GtkSortType* arg2) {
//   return ((gboolean (*)(GtkTreeSortable*, gint*, GtkSortType*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeSortable_virtual_has_default_sort_func(void* fnptr, GtkTreeSortable* arg0) {
//   return ((gboolean (*)(GtkTreeSortable*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_expand_collapse_cursor_row(void* fnptr, GtkTreeView* arg0, gboolean arg1, gboolean arg2, gboolean arg3) {
//   return ((gboolean (*)(GtkTreeView*, gboolean, gboolean, gboolean))(fnptr))(arg0, arg1, arg2, arg3);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_move_cursor(void* fnptr, GtkTreeView* arg0, GtkMovementStep arg1, gint arg2) {
//   return ((gboolean (*)(GtkTreeView*, GtkMovementStep, gint))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_select_all(void* fnptr, GtkTreeView* arg0) {
//   return ((gboolean (*)(GtkTreeView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_select_cursor_parent(void* fnptr, GtkTreeView* arg0) {
//   return ((gboolean (*)(GtkTreeView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_select_cursor_row(void* fnptr, GtkTreeView* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkTreeView*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_start_interactive_search(void* fnptr, GtkTreeView* arg0) {
//   return ((gboolean (*)(GtkTreeView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_test_collapse_row(void* fnptr, GtkTreeView* arg0, GtkTreeIter* arg1, GtkTreePath* arg2) {
//   return ((gboolean (*)(GtkTreeView*, GtkTreeIter*, GtkTreePath*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_test_expand_row(void* fnptr, GtkTreeView* arg0, GtkTreeIter* arg1, GtkTreePath* arg2) {
//   return ((gboolean (*)(GtkTreeView*, GtkTreeIter*, GtkTreePath*))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_toggle_cursor_row(void* fnptr, GtkTreeView* arg0) {
//   return ((gboolean (*)(GtkTreeView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_TreeView_virtual_unselect_all(void* fnptr, GtkTreeView* arg0) {
//   return ((gboolean (*)(GtkTreeView*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_Widget_virtual_button_press_event(void* fnptr, GtkWidget* arg0, GdkEventButton* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventButton*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_button_release_event(void* fnptr, GtkWidget* arg0, GdkEventButton* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventButton*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_can_activate_accel(void* fnptr, GtkWidget* arg0, guint arg1) {
//   return ((gboolean (*)(GtkWidget*, guint))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_configure_event(void* fnptr, GtkWidget* arg0, GdkEventConfigure* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventConfigure*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_damage_event(void* fnptr, GtkWidget* arg0, GdkEventExpose* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventExpose*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_delete_event(void* fnptr, GtkWidget* arg0, GdkEventAny* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventAny*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_destroy_event(void* fnptr, GtkWidget* arg0, GdkEventAny* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventAny*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_drag_drop(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, gint arg2, gint arg3, guint arg4) {
//   return ((gboolean (*)(GtkWidget*, GdkDragContext*, gint, gint, guint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gboolean _gotk4_gtk3_Widget_virtual_drag_failed(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, GtkDragResult arg2) {
//   return ((gboolean (*)(GtkWidget*, GdkDragContext*, GtkDragResult))(fnptr))(arg0, arg1, arg2);
// };
// gboolean _gotk4_gtk3_Widget_virtual_drag_motion(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, gint arg2, gint arg3, guint arg4) {
//   return ((gboolean (*)(GtkWidget*, GdkDragContext*, gint, gint, guint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gboolean _gotk4_gtk3_Widget_virtual_draw(void* fnptr, GtkWidget* arg0, cairo_t* arg1) {
//   return ((gboolean (*)(GtkWidget*, cairo_t*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_enter_notify_event(void* fnptr, GtkWidget* arg0, GdkEventCrossing* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventCrossing*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_event(void* fnptr, GtkWidget* arg0, GdkEvent* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEvent*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_focus(void* fnptr, GtkWidget* arg0, GtkDirectionType arg1) {
//   return ((gboolean (*)(GtkWidget*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_focus_in_event(void* fnptr, GtkWidget* arg0, GdkEventFocus* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventFocus*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_focus_out_event(void* fnptr, GtkWidget* arg0, GdkEventFocus* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventFocus*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_grab_broken_event(void* fnptr, GtkWidget* arg0, GdkEventGrabBroken* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventGrabBroken*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_key_press_event(void* fnptr, GtkWidget* arg0, GdkEventKey* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventKey*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_key_release_event(void* fnptr, GtkWidget* arg0, GdkEventKey* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventKey*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_keynav_failed(void* fnptr, GtkWidget* arg0, GtkDirectionType arg1) {
//   return ((gboolean (*)(GtkWidget*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_leave_notify_event(void* fnptr, GtkWidget* arg0, GdkEventCrossing* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventCrossing*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_map_event(void* fnptr, GtkWidget* arg0, GdkEventAny* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventAny*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_mnemonic_activate(void* fnptr, GtkWidget* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkWidget*, gboolean))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_motion_notify_event(void* fnptr, GtkWidget* arg0, GdkEventMotion* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventMotion*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_popup_menu(void* fnptr, GtkWidget* arg0) {
//   return ((gboolean (*)(GtkWidget*))(fnptr))(arg0);
// };
// gboolean _gotk4_gtk3_Widget_virtual_property_notify_event(void* fnptr, GtkWidget* arg0, GdkEventProperty* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventProperty*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_proximity_in_event(void* fnptr, GtkWidget* arg0, GdkEventProximity* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventProximity*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_proximity_out_event(void* fnptr, GtkWidget* arg0, GdkEventProximity* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventProximity*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_query_tooltip(void* fnptr, GtkWidget* arg0, gint arg1, gint arg2, gboolean arg3, GtkTooltip* arg4) {
//   return ((gboolean (*)(GtkWidget*, gint, gint, gboolean, GtkTooltip*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gboolean _gotk4_gtk3_Widget_virtual_scroll_event(void* fnptr, GtkWidget* arg0, GdkEventScroll* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventScroll*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_selection_clear_event(void* fnptr, GtkWidget* arg0, GdkEventSelection* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventSelection*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_selection_notify_event(void* fnptr, GtkWidget* arg0, GdkEventSelection* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventSelection*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_selection_request_event(void* fnptr, GtkWidget* arg0, GdkEventSelection* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventSelection*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_show_help(void* fnptr, GtkWidget* arg0, GtkWidgetHelpType arg1) {
//   return ((gboolean (*)(GtkWidget*, GtkWidgetHelpType))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_touch_event(void* fnptr, GtkWidget* arg0, GdkEventTouch* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventTouch*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_unmap_event(void* fnptr, GtkWidget* arg0, GdkEventAny* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventAny*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_visibility_notify_event(void* fnptr, GtkWidget* arg0, GdkEventVisibility* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventVisibility*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Widget_virtual_window_state_event(void* fnptr, GtkWidget* arg0, GdkEventWindowState* arg1) {
//   return ((gboolean (*)(GtkWidget*, GdkEventWindowState*))(fnptr))(arg0, arg1);
// };
// gboolean _gotk4_gtk3_Window_virtual_enable_debugging(void* fnptr, GtkWindow* arg0, gboolean arg1) {
//   return ((gboolean (*)(GtkWindow*, gboolean))(fnptr))(arg0, arg1);
// };
// gchar* _gotk4_gtk3_Actionable_virtual_get_action_name(void* fnptr, GtkActionable* arg0) {
//   return ((gchar* (*)(GtkActionable*))(fnptr))(arg0);
// };
// gchar* _gotk4_gtk3_Buildable_virtual_get_name(void* fnptr, GtkBuildable* arg0) {
//   return ((gchar* (*)(GtkBuildable*))(fnptr))(arg0);
// };
// gchar* _gotk4_gtk3_ComboBox_virtual_format_entry_text(void* fnptr, GtkComboBox* arg0, gchar* arg1) {
//   return ((gchar* (*)(GtkComboBox*, gchar*))(fnptr))(arg0, arg1);
// };
// gchar* _gotk4_gtk3_Container_virtual_composite_name(void* fnptr, GtkContainer* arg0, GtkWidget* arg1) {
//   return ((gchar* (*)(GtkContainer*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// gchar* _gotk4_gtk3_Editable_virtual_get_chars(void* fnptr, GtkEditable* arg0, gint arg1, gint arg2) {
//   return ((gchar* (*)(GtkEditable*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// gchar* _gotk4_gtk3_EntryBuffer_virtual_get_text(void* fnptr, GtkEntryBuffer* arg0, gsize* arg1) {
//   return ((gchar* (*)(GtkEntryBuffer*, gsize*))(fnptr))(arg0, arg1);
// };
// gchar* _gotk4_gtk3_MenuItem_virtual_get_label(void* fnptr, GtkMenuItem* arg0) {
//   return ((gchar* (*)(GtkMenuItem*))(fnptr))(arg0);
// };
// gchar* _gotk4_gtk3_RecentChooser_virtual_get_current_uri(void* fnptr, GtkRecentChooser* arg0) {
//   return ((gchar* (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// gchar* _gotk4_gtk3_Scale_virtual_format_value(void* fnptr, GtkScale* arg0, gdouble arg1) {
//   return ((gchar* (*)(GtkScale*, gdouble))(fnptr))(arg0, arg1);
// };
// gfloat _gotk4_gtk3_ToolShell_virtual_get_text_alignment(void* fnptr, GtkToolShell* arg0) {
//   return ((gfloat (*)(GtkToolShell*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_CellArea_virtual_event(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, GdkEvent* arg3, GdkRectangle* arg4, GtkCellRendererState arg5) {
//   return ((gint (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, GdkEvent*, GdkRectangle*, GtkCellRendererState))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// gint _gotk4_gtk3_Editable_virtual_get_position(void* fnptr, GtkEditable* arg0) {
//   return ((gint (*)(GtkEditable*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_FontChooser_virtual_get_font_size(void* fnptr, GtkFontChooser* arg0) {
//   return ((gint (*)(GtkFontChooser*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_MenuShell_virtual_get_popup_delay(void* fnptr, GtkMenuShell* arg0) {
//   return ((gint (*)(GtkMenuShell*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_Notebook_virtual_insert_page(void* fnptr, GtkNotebook* arg0, GtkWidget* arg1, GtkWidget* arg2, GtkWidget* arg3, gint arg4) {
//   return ((gint (*)(GtkNotebook*, GtkWidget*, GtkWidget*, GtkWidget*, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// gint _gotk4_gtk3_SpinButton_virtual_input(void* fnptr, GtkSpinButton* arg0, gdouble* arg1) {
//   return ((gint (*)(GtkSpinButton*, gdouble*))(fnptr))(arg0, arg1);
// };
// gint _gotk4_gtk3_SpinButton_virtual_output(void* fnptr, GtkSpinButton* arg0) {
//   return ((gint (*)(GtkSpinButton*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_TreeModel_virtual_get_n_columns(void* fnptr, GtkTreeModel* arg0) {
//   return ((gint (*)(GtkTreeModel*))(fnptr))(arg0);
// };
// gint _gotk4_gtk3_TreeModel_virtual_iter_n_children(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   return ((gint (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// guint _gotk4_gtk3_EntryBuffer_virtual_delete_text(void* fnptr, GtkEntryBuffer* arg0, guint arg1, guint arg2) {
//   return ((guint (*)(GtkEntryBuffer*, guint, guint))(fnptr))(arg0, arg1, arg2);
// };
// guint _gotk4_gtk3_EntryBuffer_virtual_get_length(void* fnptr, GtkEntryBuffer* arg0) {
//   return ((guint (*)(GtkEntryBuffer*))(fnptr))(arg0);
// };
// guint _gotk4_gtk3_EntryBuffer_virtual_insert_text(void* fnptr, GtkEntryBuffer* arg0, guint arg1, gchar* arg2, guint arg3) {
//   return ((guint (*)(GtkEntryBuffer*, guint, gchar*, guint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// guint _gotk4_gtk3_RCStyle_virtual_parse(void* fnptr, GtkRcStyle* arg0, GtkSettings* arg1, GScanner* arg2) {
//   return ((guint (*)(GtkRcStyle*, GtkSettings*, GScanner*))(fnptr))(arg0, arg1, arg2);
// };
// int _gotk4_gtk3_CellAccessibleParent_virtual_get_child_index(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   return ((int (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_AccelGroup_virtual_accel_changed(void* fnptr, GtkAccelGroup* arg0, guint arg1, GdkModifierType arg2, GClosure* arg3) {
//   ((void (*)(GtkAccelGroup*, guint, GdkModifierType, GClosure*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Accessible_virtual_connect_widget_destroyed(void* fnptr, GtkAccessible* arg0) {
//   ((void (*)(GtkAccessible*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Accessible_virtual_widget_set(void* fnptr, GtkAccessible* arg0) {
//   ((void (*)(GtkAccessible*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Accessible_virtual_widget_unset(void* fnptr, GtkAccessible* arg0) {
//   ((void (*)(GtkAccessible*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Action_virtual_activate(void* fnptr, GtkAction* arg0) {
//   ((void (*)(GtkAction*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Action_virtual_connect_proxy(void* fnptr, GtkAction* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkAction*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Action_virtual_disconnect_proxy(void* fnptr, GtkAction* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkAction*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Actionable_virtual_set_action_name(void* fnptr, GtkActionable* arg0, gchar* arg1) {
//   ((void (*)(GtkActionable*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Actionable_virtual_set_action_target_value(void* fnptr, GtkActionable* arg0, GVariant* arg1) {
//   ((void (*)(GtkActionable*, GVariant*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Activatable_virtual_sync_action_properties(void* fnptr, GtkActivatable* arg0, GtkAction* arg1) {
//   ((void (*)(GtkActivatable*, GtkAction*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Activatable_virtual_update(void* fnptr, GtkActivatable* arg0, GtkAction* arg1, gchar* arg2) {
//   ((void (*)(GtkActivatable*, GtkAction*, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Adjustment_virtual_changed(void* fnptr, GtkAdjustment* arg0) {
//   ((void (*)(GtkAdjustment*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Adjustment_virtual_value_changed(void* fnptr, GtkAdjustment* arg0) {
//   ((void (*)(GtkAdjustment*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_AppChooserButton_virtual_custom_item_activated(void* fnptr, GtkAppChooserButton* arg0, gchar* arg1) {
//   ((void (*)(GtkAppChooserButton*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_AppChooserWidget_virtual_application_activated(void* fnptr, GtkAppChooserWidget* arg0, GAppInfo* arg1) {
//   ((void (*)(GtkAppChooserWidget*, GAppInfo*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_AppChooserWidget_virtual_application_selected(void* fnptr, GtkAppChooserWidget* arg0, GAppInfo* arg1) {
//   ((void (*)(GtkAppChooserWidget*, GAppInfo*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_AppChooserWidget_virtual_populate_popup(void* fnptr, GtkAppChooserWidget* arg0, GtkMenu* arg1, GAppInfo* arg2) {
//   ((void (*)(GtkAppChooserWidget*, GtkMenu*, GAppInfo*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Application_virtual_window_added(void* fnptr, GtkApplication* arg0, GtkWindow* arg1) {
//   ((void (*)(GtkApplication*, GtkWindow*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Application_virtual_window_removed(void* fnptr, GtkApplication* arg0, GtkWindow* arg1) {
//   ((void (*)(GtkApplication*, GtkWindow*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Assistant_virtual_apply(void* fnptr, GtkAssistant* arg0) {
//   ((void (*)(GtkAssistant*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Assistant_virtual_cancel(void* fnptr, GtkAssistant* arg0) {
//   ((void (*)(GtkAssistant*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Assistant_virtual_close(void* fnptr, GtkAssistant* arg0) {
//   ((void (*)(GtkAssistant*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Assistant_virtual_prepare(void* fnptr, GtkAssistant* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkAssistant*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Buildable_virtual_add_child(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, GObject* arg2, gchar* arg3) {
//   ((void (*)(GtkBuildable*, GtkBuilder*, GObject*, gchar*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Buildable_virtual_custom_finished(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, GObject* arg2, gchar* arg3, gpointer arg4) {
//   ((void (*)(GtkBuildable*, GtkBuilder*, GObject*, gchar*, gpointer))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_Buildable_virtual_custom_tag_end(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, GObject* arg2, gchar* arg3, gpointer* arg4) {
//   ((void (*)(GtkBuildable*, GtkBuilder*, GObject*, gchar*, gpointer*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_Buildable_virtual_parser_finished(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1) {
//   ((void (*)(GtkBuildable*, GtkBuilder*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Buildable_virtual_set_buildable_property(void* fnptr, GtkBuildable* arg0, GtkBuilder* arg1, gchar* arg2, GValue* arg3) {
//   ((void (*)(GtkBuildable*, GtkBuilder*, gchar*, GValue*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Buildable_virtual_set_name(void* fnptr, GtkBuildable* arg0, gchar* arg1) {
//   ((void (*)(GtkBuildable*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Button_virtual_activate(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Button_virtual_clicked(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Button_virtual_enter(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Button_virtual_leave(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Button_virtual_pressed(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Button_virtual_released(void* fnptr, GtkButton* arg0) {
//   ((void (*)(GtkButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CSSProvider_virtual_parsing_error(void* fnptr, GtkCssProvider* arg0, GtkCssSection* arg1, GError* arg2) {
//   ((void (*)(GtkCssProvider*, GtkCssSection*, GError*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Calendar_virtual_day_selected(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_day_selected_double_click(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_month_changed(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_next_month(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_next_year(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_prev_month(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Calendar_virtual_prev_year(void* fnptr, GtkCalendar* arg0) {
//   ((void (*)(GtkCalendar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_activate(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_edit(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_expand_collapse(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_get_cell_area(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1, GdkRectangle* arg2) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*, GdkRectangle*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_get_cell_extents(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1, gint* arg2, gint* arg3, gint* arg4, gint* arg5, AtkCoordType arg6) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*, gint*, gint*, gint*, gint*, AtkCoordType))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_get_cell_position(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellAccessibleParent_virtual_update_relationset(void* fnptr, GtkCellAccessibleParent* arg0, GtkCellAccessible* arg1, AtkRelationSet* arg2) {
//   ((void (*)(GtkCellAccessibleParent*, GtkCellAccessible*, AtkRelationSet*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellAccessible_virtual_update_cache(void* fnptr, GtkCellAccessible* arg0, gboolean arg1) {
//   ((void (*)(GtkCellAccessible*, gboolean))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellAreaContext_virtual_allocate(void* fnptr, GtkCellAreaContext* arg0, gint arg1, gint arg2) {
//   ((void (*)(GtkCellAreaContext*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellAreaContext_virtual_get_preferred_height_for_width(void* fnptr, GtkCellAreaContext* arg0, gint arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkCellAreaContext*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellAreaContext_virtual_get_preferred_width_for_height(void* fnptr, GtkCellAreaContext* arg0, gint arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkCellAreaContext*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellAreaContext_virtual_reset(void* fnptr, GtkCellAreaContext* arg0) {
//   ((void (*)(GtkCellAreaContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellArea_virtual_add(void* fnptr, GtkCellArea* arg0, GtkCellRenderer* arg1) {
//   ((void (*)(GtkCellArea*, GtkCellRenderer*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellArea_virtual_apply_attributes(void* fnptr, GtkCellArea* arg0, GtkTreeModel* arg1, GtkTreeIter* arg2, gboolean arg3, gboolean arg4) {
//   ((void (*)(GtkCellArea*, GtkTreeModel*, GtkTreeIter*, gboolean, gboolean))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellArea_virtual_foreach(void* fnptr, GtkCellArea* arg0, GtkCellCallback arg1, gpointer arg2) {
//   ((void (*)(GtkCellArea*, GtkCellCallback, gpointer))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellArea_virtual_foreach_alloc(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, GdkRectangle* arg3, GdkRectangle* arg4, GtkCellAllocCallback arg5, gpointer arg6) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, GdkRectangle*, GdkRectangle*, GtkCellAllocCallback, gpointer))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_CellArea_virtual_get_preferred_height(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellArea_virtual_get_preferred_height_for_width(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, gint arg3, gint* arg4, gint* arg5) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_CellArea_virtual_get_preferred_width(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellArea_virtual_get_preferred_width_for_height(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, gint arg3, gint* arg4, gint* arg5) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_CellArea_virtual_remove(void* fnptr, GtkCellArea* arg0, GtkCellRenderer* arg1) {
//   ((void (*)(GtkCellArea*, GtkCellRenderer*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellArea_virtual_render(void* fnptr, GtkCellArea* arg0, GtkCellAreaContext* arg1, GtkWidget* arg2, cairo_t* arg3, GdkRectangle* arg4, GdkRectangle* arg5, GtkCellRendererState arg6, gboolean arg7) {
//   ((void (*)(GtkCellArea*, GtkCellAreaContext*, GtkWidget*, cairo_t*, GdkRectangle*, GdkRectangle*, GtkCellRendererState, gboolean))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
// };
// void _gotk4_gtk3_CellEditable_virtual_editing_done(void* fnptr, GtkCellEditable* arg0) {
//   ((void (*)(GtkCellEditable*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellEditable_virtual_remove_widget(void* fnptr, GtkCellEditable* arg0) {
//   ((void (*)(GtkCellEditable*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellEditable_virtual_start_editing(void* fnptr, GtkCellEditable* arg0, GdkEvent* arg1) {
//   ((void (*)(GtkCellEditable*, GdkEvent*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellLayout_virtual_add_attribute(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1, gchar* arg2, gint arg3) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*, gchar*, gint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellLayout_virtual_clear(void* fnptr, GtkCellLayout* arg0) {
//   ((void (*)(GtkCellLayout*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellLayout_virtual_clear_attributes(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellLayout_virtual_pack_end(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1, gboolean arg2) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*, gboolean))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellLayout_virtual_pack_start(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1, gboolean arg2) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*, gboolean))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellLayout_virtual_reorder(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1, gint arg2) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellLayout_virtual_set_cell_data_func(void* fnptr, GtkCellLayout* arg0, GtkCellRenderer* arg1, GtkCellLayoutDataFunc arg2, gpointer arg3, GDestroyNotify arg4) {
//   ((void (*)(GtkCellLayout*, GtkCellRenderer*, GtkCellLayoutDataFunc, gpointer, GDestroyNotify))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellRendererAccel_virtual_accel_cleared(void* fnptr, GtkCellRendererAccel* arg0, gchar* arg1) {
//   ((void (*)(GtkCellRendererAccel*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellRendererAccel_virtual_accel_edited(void* fnptr, GtkCellRendererAccel* arg0, gchar* arg1, guint arg2, GdkModifierType arg3, guint arg4) {
//   ((void (*)(GtkCellRendererAccel*, gchar*, guint, GdkModifierType, guint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellRendererText_virtual_edited(void* fnptr, GtkCellRendererText* arg0, gchar* arg1, gchar* arg2) {
//   ((void (*)(GtkCellRendererText*, gchar*, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellRendererToggle_virtual_toggled(void* fnptr, GtkCellRendererToggle* arg0, gchar* arg1) {
//   ((void (*)(GtkCellRendererToggle*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CellRenderer_virtual_editing_canceled(void* fnptr, GtkCellRenderer* arg0) {
//   ((void (*)(GtkCellRenderer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_CellRenderer_virtual_editing_started(void* fnptr, GtkCellRenderer* arg0, GtkCellEditable* arg1, gchar* arg2) {
//   ((void (*)(GtkCellRenderer*, GtkCellEditable*, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_aligned_area(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, GtkCellRendererState arg2, GdkRectangle* arg3, GdkRectangle* arg4) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, GtkCellRendererState, GdkRectangle*, GdkRectangle*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_preferred_height(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_preferred_height_for_width(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, gint arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_preferred_width(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_preferred_width_for_height(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, gint arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_CellRenderer_virtual_get_size(void* fnptr, GtkCellRenderer* arg0, GtkWidget* arg1, GdkRectangle* arg2, gint* arg3, gint* arg4, gint* arg5, gint* arg6) {
//   ((void (*)(GtkCellRenderer*, GtkWidget*, GdkRectangle*, gint*, gint*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_CellRenderer_virtual_render(void* fnptr, GtkCellRenderer* arg0, cairo_t* arg1, GtkWidget* arg2, GdkRectangle* arg3, GdkRectangle* arg4, GtkCellRendererState arg5) {
//   ((void (*)(GtkCellRenderer*, cairo_t*, GtkWidget*, GdkRectangle*, GdkRectangle*, GtkCellRendererState))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_CheckButton_virtual_draw_indicator(void* fnptr, GtkCheckButton* arg0, cairo_t* arg1) {
//   ((void (*)(GtkCheckButton*, cairo_t*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CheckMenuItem_virtual_draw_indicator(void* fnptr, GtkCheckMenuItem* arg0, cairo_t* arg1) {
//   ((void (*)(GtkCheckMenuItem*, cairo_t*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_CheckMenuItem_virtual_toggled(void* fnptr, GtkCheckMenuItem* arg0) {
//   ((void (*)(GtkCheckMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ColorButton_virtual_color_set(void* fnptr, GtkColorButton* arg0) {
//   ((void (*)(GtkColorButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ColorChooser_virtual_add_palette(void* fnptr, GtkColorChooser* arg0, GtkOrientation arg1, gint arg2, gint arg3, GdkRGBA* arg4) {
//   ((void (*)(GtkColorChooser*, GtkOrientation, gint, gint, GdkRGBA*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_ColorChooser_virtual_color_activated(void* fnptr, GtkColorChooser* arg0, GdkRGBA* arg1) {
//   ((void (*)(GtkColorChooser*, GdkRGBA*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ColorChooser_virtual_get_rgba(void* fnptr, GtkColorChooser* arg0, GdkRGBA* arg1) {
//   ((void (*)(GtkColorChooser*, GdkRGBA*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ColorChooser_virtual_set_rgba(void* fnptr, GtkColorChooser* arg0, GdkRGBA* arg1) {
//   ((void (*)(GtkColorChooser*, GdkRGBA*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ColorSelection_virtual_color_changed(void* fnptr, GtkColorSelection* arg0) {
//   ((void (*)(GtkColorSelection*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ComboBox_virtual_changed(void* fnptr, GtkComboBox* arg0) {
//   ((void (*)(GtkComboBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Container_virtual_add(void* fnptr, GtkContainer* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkContainer*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Container_virtual_check_resize(void* fnptr, GtkContainer* arg0) {
//   ((void (*)(GtkContainer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Container_virtual_forall(void* fnptr, GtkContainer* arg0, gboolean arg1, GtkCallback arg2, gpointer arg3) {
//   ((void (*)(GtkContainer*, gboolean, GtkCallback, gpointer))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Container_virtual_remove(void* fnptr, GtkContainer* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkContainer*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Container_virtual_set_focus_child(void* fnptr, GtkContainer* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkContainer*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Dialog_virtual_close(void* fnptr, GtkDialog* arg0) {
//   ((void (*)(GtkDialog*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Dialog_virtual_response(void* fnptr, GtkDialog* arg0, gint arg1) {
//   ((void (*)(GtkDialog*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Editable_virtual_changed(void* fnptr, GtkEditable* arg0) {
//   ((void (*)(GtkEditable*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Editable_virtual_delete_text(void* fnptr, GtkEditable* arg0, gint arg1, gint arg2) {
//   ((void (*)(GtkEditable*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Editable_virtual_do_delete_text(void* fnptr, GtkEditable* arg0, gint arg1, gint arg2) {
//   ((void (*)(GtkEditable*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Editable_virtual_set_position(void* fnptr, GtkEditable* arg0, gint arg1) {
//   ((void (*)(GtkEditable*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Editable_virtual_set_selection_bounds(void* fnptr, GtkEditable* arg0, gint arg1, gint arg2) {
//   ((void (*)(GtkEditable*, gint, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_EntryBuffer_virtual_deleted_text(void* fnptr, GtkEntryBuffer* arg0, guint arg1, guint arg2) {
//   ((void (*)(GtkEntryBuffer*, guint, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_EntryBuffer_virtual_inserted_text(void* fnptr, GtkEntryBuffer* arg0, guint arg1, gchar* arg2, guint arg3) {
//   ((void (*)(GtkEntryBuffer*, guint, gchar*, guint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_EntryCompletion_virtual_action_activated(void* fnptr, GtkEntryCompletion* arg0, gint arg1) {
//   ((void (*)(GtkEntryCompletion*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_EntryCompletion_virtual_no_matches(void* fnptr, GtkEntryCompletion* arg0) {
//   ((void (*)(GtkEntryCompletion*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_activate(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_backspace(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_copy_clipboard(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_cut_clipboard(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_delete_from_cursor(void* fnptr, GtkEntry* arg0, GtkDeleteType arg1, gint arg2) {
//   ((void (*)(GtkEntry*, GtkDeleteType, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Entry_virtual_get_frame_size(void* fnptr, GtkEntry* arg0, gint* arg1, gint* arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkEntry*, gint*, gint*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_Entry_virtual_get_text_area_size(void* fnptr, GtkEntry* arg0, gint* arg1, gint* arg2, gint* arg3, gint* arg4) {
//   ((void (*)(GtkEntry*, gint*, gint*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_Entry_virtual_insert_at_cursor(void* fnptr, GtkEntry* arg0, gchar* arg1) {
//   ((void (*)(GtkEntry*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Entry_virtual_insert_emoji(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_move_cursor(void* fnptr, GtkEntry* arg0, GtkMovementStep arg1, gint arg2, gboolean arg3) {
//   ((void (*)(GtkEntry*, GtkMovementStep, gint, gboolean))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Entry_virtual_paste_clipboard(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Entry_virtual_populate_popup(void* fnptr, GtkEntry* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkEntry*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Entry_virtual_toggle_overwrite(void* fnptr, GtkEntry* arg0) {
//   ((void (*)(GtkEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Expander_virtual_activate(void* fnptr, GtkExpander* arg0) {
//   ((void (*)(GtkExpander*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FileChooserButton_virtual_file_set(void* fnptr, GtkFileChooserButton* arg0) {
//   ((void (*)(GtkFileChooserButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBoxChild_virtual_activate(void* fnptr, GtkFlowBoxChild* arg0) {
//   ((void (*)(GtkFlowBoxChild*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBox_virtual_activate_cursor_child(void* fnptr, GtkFlowBox* arg0) {
//   ((void (*)(GtkFlowBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBox_virtual_child_activated(void* fnptr, GtkFlowBox* arg0, GtkFlowBoxChild* arg1) {
//   ((void (*)(GtkFlowBox*, GtkFlowBoxChild*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_FlowBox_virtual_select_all(void* fnptr, GtkFlowBox* arg0) {
//   ((void (*)(GtkFlowBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBox_virtual_selected_children_changed(void* fnptr, GtkFlowBox* arg0) {
//   ((void (*)(GtkFlowBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBox_virtual_toggle_cursor_child(void* fnptr, GtkFlowBox* arg0) {
//   ((void (*)(GtkFlowBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FlowBox_virtual_unselect_all(void* fnptr, GtkFlowBox* arg0) {
//   ((void (*)(GtkFlowBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FontButton_virtual_font_set(void* fnptr, GtkFontButton* arg0) {
//   ((void (*)(GtkFontButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_FontChooser_virtual_font_activated(void* fnptr, GtkFontChooser* arg0, gchar* arg1) {
//   ((void (*)(GtkFontChooser*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_FontChooser_virtual_set_filter_func(void* fnptr, GtkFontChooser* arg0, GtkFontFilterFunc arg1, gpointer arg2, GDestroyNotify arg3) {
//   ((void (*)(GtkFontChooser*, GtkFontFilterFunc, gpointer, GDestroyNotify))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_FontChooser_virtual_set_font_map(void* fnptr, GtkFontChooser* arg0, PangoFontMap* arg1) {
//   ((void (*)(GtkFontChooser*, PangoFontMap*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Frame_virtual_compute_child_allocation(void* fnptr, GtkFrame* arg0, GtkAllocation* arg1) {
//   ((void (*)(GtkFrame*, GtkAllocation*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_GLArea_virtual_resize(void* fnptr, GtkGLArea* arg0, int arg1, int arg2) {
//   ((void (*)(GtkGLArea*, int, int))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_HSV_virtual_changed(void* fnptr, GtkHSV* arg0) {
//   ((void (*)(GtkHSV*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_HSV_virtual_move(void* fnptr, GtkHSV* arg0, GtkDirectionType arg1) {
//   ((void (*)(GtkHSV*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_HandleBox_virtual_child_attached(void* fnptr, GtkHandleBox* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkHandleBox*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_HandleBox_virtual_child_detached(void* fnptr, GtkHandleBox* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkHandleBox*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IMContext_virtual_commit(void* fnptr, GtkIMContext* arg0, gchar* arg1) {
//   ((void (*)(GtkIMContext*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IMContext_virtual_focus_in(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_focus_out(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_get_preedit_string(void* fnptr, GtkIMContext* arg0, gchar** arg1, PangoAttrList** arg2, gint* arg3) {
//   ((void (*)(GtkIMContext*, gchar**, PangoAttrList**, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_IMContext_virtual_preedit_changed(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_preedit_end(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_preedit_start(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_reset(void* fnptr, GtkIMContext* arg0) {
//   ((void (*)(GtkIMContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IMContext_virtual_set_client_window(void* fnptr, GtkIMContext* arg0, GdkWindow* arg1) {
//   ((void (*)(GtkIMContext*, GdkWindow*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IMContext_virtual_set_cursor_location(void* fnptr, GtkIMContext* arg0, GdkRectangle* arg1) {
//   ((void (*)(GtkIMContext*, GdkRectangle*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IMContext_virtual_set_surrounding(void* fnptr, GtkIMContext* arg0, gchar* arg1, gint arg2, gint arg3) {
//   ((void (*)(GtkIMContext*, gchar*, gint, gint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_IMContext_virtual_set_use_preedit(void* fnptr, GtkIMContext* arg0, gboolean arg1) {
//   ((void (*)(GtkIMContext*, gboolean))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IconTheme_virtual_changed(void* fnptr, GtkIconTheme* arg0) {
//   ((void (*)(GtkIconTheme*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IconView_virtual_item_activated(void* fnptr, GtkIconView* arg0, GtkTreePath* arg1) {
//   ((void (*)(GtkIconView*, GtkTreePath*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_IconView_virtual_select_all(void* fnptr, GtkIconView* arg0) {
//   ((void (*)(GtkIconView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IconView_virtual_select_cursor_item(void* fnptr, GtkIconView* arg0) {
//   ((void (*)(GtkIconView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IconView_virtual_selection_changed(void* fnptr, GtkIconView* arg0) {
//   ((void (*)(GtkIconView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IconView_virtual_toggle_cursor_item(void* fnptr, GtkIconView* arg0) {
//   ((void (*)(GtkIconView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_IconView_virtual_unselect_all(void* fnptr, GtkIconView* arg0) {
//   ((void (*)(GtkIconView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_InfoBar_virtual_close(void* fnptr, GtkInfoBar* arg0) {
//   ((void (*)(GtkInfoBar*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_InfoBar_virtual_response(void* fnptr, GtkInfoBar* arg0, gint arg1) {
//   ((void (*)(GtkInfoBar*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Label_virtual_copy_clipboard(void* fnptr, GtkLabel* arg0) {
//   ((void (*)(GtkLabel*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Label_virtual_move_cursor(void* fnptr, GtkLabel* arg0, GtkMovementStep arg1, gint arg2, gboolean arg3) {
//   ((void (*)(GtkLabel*, GtkMovementStep, gint, gboolean))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Label_virtual_populate_popup(void* fnptr, GtkLabel* arg0, GtkMenu* arg1) {
//   ((void (*)(GtkLabel*, GtkMenu*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_LevelBar_virtual_offset_changed(void* fnptr, GtkLevelBar* arg0, gchar* arg1) {
//   ((void (*)(GtkLevelBar*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ListBoxRow_virtual_activate(void* fnptr, GtkListBoxRow* arg0) {
//   ((void (*)(GtkListBoxRow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ListBox_virtual_activate_cursor_row(void* fnptr, GtkListBox* arg0) {
//   ((void (*)(GtkListBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ListBox_virtual_move_cursor(void* fnptr, GtkListBox* arg0, GtkMovementStep arg1, gint arg2) {
//   ((void (*)(GtkListBox*, GtkMovementStep, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_ListBox_virtual_row_activated(void* fnptr, GtkListBox* arg0, GtkListBoxRow* arg1) {
//   ((void (*)(GtkListBox*, GtkListBoxRow*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ListBox_virtual_row_selected(void* fnptr, GtkListBox* arg0, GtkListBoxRow* arg1) {
//   ((void (*)(GtkListBox*, GtkListBoxRow*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_ListBox_virtual_select_all(void* fnptr, GtkListBox* arg0) {
//   ((void (*)(GtkListBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ListBox_virtual_selected_rows_changed(void* fnptr, GtkListBox* arg0) {
//   ((void (*)(GtkListBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ListBox_virtual_toggle_cursor_row(void* fnptr, GtkListBox* arg0) {
//   ((void (*)(GtkListBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ListBox_virtual_unselect_all(void* fnptr, GtkListBox* arg0) {
//   ((void (*)(GtkListBox*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuItem_virtual_activate(void* fnptr, GtkMenuItem* arg0) {
//   ((void (*)(GtkMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuItem_virtual_activate_item(void* fnptr, GtkMenuItem* arg0) {
//   ((void (*)(GtkMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuItem_virtual_deselect(void* fnptr, GtkMenuItem* arg0) {
//   ((void (*)(GtkMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuItem_virtual_select(void* fnptr, GtkMenuItem* arg0) {
//   ((void (*)(GtkMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuItem_virtual_set_label(void* fnptr, GtkMenuItem* arg0, gchar* arg1) {
//   ((void (*)(GtkMenuItem*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_MenuItem_virtual_toggle_size_allocate(void* fnptr, GtkMenuItem* arg0, gint arg1) {
//   ((void (*)(GtkMenuItem*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_MenuShell_virtual_activate_current(void* fnptr, GtkMenuShell* arg0, gboolean arg1) {
//   ((void (*)(GtkMenuShell*, gboolean))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_MenuShell_virtual_cancel(void* fnptr, GtkMenuShell* arg0) {
//   ((void (*)(GtkMenuShell*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuShell_virtual_deactivate(void* fnptr, GtkMenuShell* arg0) {
//   ((void (*)(GtkMenuShell*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuShell_virtual_insert(void* fnptr, GtkMenuShell* arg0, GtkWidget* arg1, gint arg2) {
//   ((void (*)(GtkMenuShell*, GtkWidget*, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_MenuShell_virtual_move_current(void* fnptr, GtkMenuShell* arg0, GtkMenuDirectionType arg1) {
//   ((void (*)(GtkMenuShell*, GtkMenuDirectionType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_MenuShell_virtual_select_item(void* fnptr, GtkMenuShell* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkMenuShell*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_MenuShell_virtual_selection_done(void* fnptr, GtkMenuShell* arg0) {
//   ((void (*)(GtkMenuShell*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_MenuToolButton_virtual_show_menu(void* fnptr, GtkMenuToolButton* arg0) {
//   ((void (*)(GtkMenuToolButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_NativeDialog_virtual_hide(void* fnptr, GtkNativeDialog* arg0) {
//   ((void (*)(GtkNativeDialog*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_NativeDialog_virtual_response(void* fnptr, GtkNativeDialog* arg0, gint arg1) {
//   ((void (*)(GtkNativeDialog*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_NativeDialog_virtual_show(void* fnptr, GtkNativeDialog* arg0) {
//   ((void (*)(GtkNativeDialog*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Notebook_virtual_move_focus_out(void* fnptr, GtkNotebook* arg0, GtkDirectionType arg1) {
//   ((void (*)(GtkNotebook*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Notebook_virtual_page_added(void* fnptr, GtkNotebook* arg0, GtkWidget* arg1, guint arg2) {
//   ((void (*)(GtkNotebook*, GtkWidget*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Notebook_virtual_page_removed(void* fnptr, GtkNotebook* arg0, GtkWidget* arg1, guint arg2) {
//   ((void (*)(GtkNotebook*, GtkWidget*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Notebook_virtual_page_reordered(void* fnptr, GtkNotebook* arg0, GtkWidget* arg1, guint arg2) {
//   ((void (*)(GtkNotebook*, GtkWidget*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Notebook_virtual_switch_page(void* fnptr, GtkNotebook* arg0, GtkWidget* arg1, guint arg2) {
//   ((void (*)(GtkNotebook*, GtkWidget*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Plug_virtual_embedded(void* fnptr, GtkPlug* arg0) {
//   ((void (*)(GtkPlug*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Popover_virtual_closed(void* fnptr, GtkPopover* arg0) {
//   ((void (*)(GtkPopover*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_PrintOperationPreview_virtual_end_preview(void* fnptr, GtkPrintOperationPreview* arg0) {
//   ((void (*)(GtkPrintOperationPreview*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_PrintOperationPreview_virtual_got_page_size(void* fnptr, GtkPrintOperationPreview* arg0, GtkPrintContext* arg1, GtkPageSetup* arg2) {
//   ((void (*)(GtkPrintOperationPreview*, GtkPrintContext*, GtkPageSetup*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_PrintOperationPreview_virtual_ready(void* fnptr, GtkPrintOperationPreview* arg0, GtkPrintContext* arg1) {
//   ((void (*)(GtkPrintOperationPreview*, GtkPrintContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperationPreview_virtual_render_page(void* fnptr, GtkPrintOperationPreview* arg0, gint arg1) {
//   ((void (*)(GtkPrintOperationPreview*, gint))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperation_virtual_begin_print(void* fnptr, GtkPrintOperation* arg0, GtkPrintContext* arg1) {
//   ((void (*)(GtkPrintOperation*, GtkPrintContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperation_virtual_custom_widget_apply(void* fnptr, GtkPrintOperation* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkPrintOperation*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperation_virtual_done(void* fnptr, GtkPrintOperation* arg0, GtkPrintOperationResult arg1) {
//   ((void (*)(GtkPrintOperation*, GtkPrintOperationResult))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperation_virtual_draw_page(void* fnptr, GtkPrintOperation* arg0, GtkPrintContext* arg1, gint arg2) {
//   ((void (*)(GtkPrintOperation*, GtkPrintContext*, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_PrintOperation_virtual_end_print(void* fnptr, GtkPrintOperation* arg0, GtkPrintContext* arg1) {
//   ((void (*)(GtkPrintOperation*, GtkPrintContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_PrintOperation_virtual_request_page_setup(void* fnptr, GtkPrintOperation* arg0, GtkPrintContext* arg1, gint arg2, GtkPageSetup* arg3) {
//   ((void (*)(GtkPrintOperation*, GtkPrintContext*, gint, GtkPageSetup*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_PrintOperation_virtual_status_changed(void* fnptr, GtkPrintOperation* arg0) {
//   ((void (*)(GtkPrintOperation*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_PrintOperation_virtual_update_custom_widget(void* fnptr, GtkPrintOperation* arg0, GtkWidget* arg1, GtkPageSetup* arg2, GtkPrintSettings* arg3) {
//   ((void (*)(GtkPrintOperation*, GtkWidget*, GtkPageSetup*, GtkPrintSettings*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_RCStyle_virtual_merge(void* fnptr, GtkRcStyle* arg0, GtkRcStyle* arg1) {
//   ((void (*)(GtkRcStyle*, GtkRcStyle*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_RadioAction_virtual_changed(void* fnptr, GtkRadioAction* arg0, GtkRadioAction* arg1) {
//   ((void (*)(GtkRadioAction*, GtkRadioAction*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_RadioButton_virtual_group_changed(void* fnptr, GtkRadioButton* arg0) {
//   ((void (*)(GtkRadioButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RadioMenuItem_virtual_group_changed(void* fnptr, GtkRadioMenuItem* arg0) {
//   ((void (*)(GtkRadioMenuItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Range_virtual_adjust_bounds(void* fnptr, GtkRange* arg0, gdouble arg1) {
//   ((void (*)(GtkRange*, gdouble))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Range_virtual_get_range_border(void* fnptr, GtkRange* arg0, GtkBorder* arg1) {
//   ((void (*)(GtkRange*, GtkBorder*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Range_virtual_get_range_size_request(void* fnptr, GtkRange* arg0, GtkOrientation arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkRange*, GtkOrientation, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Range_virtual_move_slider(void* fnptr, GtkRange* arg0, GtkScrollType arg1) {
//   ((void (*)(GtkRange*, GtkScrollType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Range_virtual_value_changed(void* fnptr, GtkRange* arg0) {
//   ((void (*)(GtkRange*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RecentChooser_virtual_add_filter(void* fnptr, GtkRecentChooser* arg0, GtkRecentFilter* arg1) {
//   ((void (*)(GtkRecentChooser*, GtkRecentFilter*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_RecentChooser_virtual_item_activated(void* fnptr, GtkRecentChooser* arg0) {
//   ((void (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RecentChooser_virtual_remove_filter(void* fnptr, GtkRecentChooser* arg0, GtkRecentFilter* arg1) {
//   ((void (*)(GtkRecentChooser*, GtkRecentFilter*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_RecentChooser_virtual_select_all(void* fnptr, GtkRecentChooser* arg0) {
//   ((void (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RecentChooser_virtual_selection_changed(void* fnptr, GtkRecentChooser* arg0) {
//   ((void (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RecentChooser_virtual_set_sort_func(void* fnptr, GtkRecentChooser* arg0, GtkRecentSortFunc arg1, gpointer arg2, GDestroyNotify arg3) {
//   ((void (*)(GtkRecentChooser*, GtkRecentSortFunc, gpointer, GDestroyNotify))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_RecentChooser_virtual_unselect_all(void* fnptr, GtkRecentChooser* arg0) {
//   ((void (*)(GtkRecentChooser*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_RecentChooser_virtual_unselect_uri(void* fnptr, GtkRecentChooser* arg0, gchar* arg1) {
//   ((void (*)(GtkRecentChooser*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_RecentManager_virtual_changed(void* fnptr, GtkRecentManager* arg0) {
//   ((void (*)(GtkRecentManager*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ScaleButton_virtual_value_changed(void* fnptr, GtkScaleButton* arg0, gdouble arg1) {
//   ((void (*)(GtkScaleButton*, gdouble))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Scale_virtual_draw_value(void* fnptr, GtkScale* arg0) {
//   ((void (*)(GtkScale*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Scale_virtual_get_layout_offsets(void* fnptr, GtkScale* arg0, gint* arg1, gint* arg2) {
//   ((void (*)(GtkScale*, gint*, gint*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_ScrolledWindow_virtual_move_focus_out(void* fnptr, GtkScrolledWindow* arg0, GtkDirectionType arg1) {
//   ((void (*)(GtkScrolledWindow*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_SearchEntry_virtual_next_match(void* fnptr, GtkSearchEntry* arg0) {
//   ((void (*)(GtkSearchEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_SearchEntry_virtual_previous_match(void* fnptr, GtkSearchEntry* arg0) {
//   ((void (*)(GtkSearchEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_SearchEntry_virtual_search_changed(void* fnptr, GtkSearchEntry* arg0) {
//   ((void (*)(GtkSearchEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_SearchEntry_virtual_stop_search(void* fnptr, GtkSearchEntry* arg0) {
//   ((void (*)(GtkSearchEntry*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ShortcutsWindow_virtual_close(void* fnptr, GtkShortcutsWindow* arg0) {
//   ((void (*)(GtkShortcutsWindow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ShortcutsWindow_virtual_search(void* fnptr, GtkShortcutsWindow* arg0) {
//   ((void (*)(GtkShortcutsWindow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Socket_virtual_plug_added(void* fnptr, GtkSocket* arg0) {
//   ((void (*)(GtkSocket*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_SpinButton_virtual_change_value(void* fnptr, GtkSpinButton* arg0, GtkScrollType arg1) {
//   ((void (*)(GtkSpinButton*, GtkScrollType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_SpinButton_virtual_value_changed(void* fnptr, GtkSpinButton* arg0) {
//   ((void (*)(GtkSpinButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_SpinButton_virtual_wrapped(void* fnptr, GtkSpinButton* arg0) {
//   ((void (*)(GtkSpinButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_StatusIcon_virtual_activate(void* fnptr, GtkStatusIcon* arg0) {
//   ((void (*)(GtkStatusIcon*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_StatusIcon_virtual_popup_menu(void* fnptr, GtkStatusIcon* arg0, guint arg1, guint32 arg2) {
//   ((void (*)(GtkStatusIcon*, guint, guint32))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Statusbar_virtual_text_popped(void* fnptr, GtkStatusbar* arg0, guint arg1, gchar* arg2) {
//   ((void (*)(GtkStatusbar*, guint, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Statusbar_virtual_text_pushed(void* fnptr, GtkStatusbar* arg0, guint arg1, gchar* arg2) {
//   ((void (*)(GtkStatusbar*, guint, gchar*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_StyleContext_virtual_changed(void* fnptr, GtkStyleContext* arg0) {
//   ((void (*)(GtkStyleContext*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Style_virtual_copy(void* fnptr, GtkStyle* arg0, GtkStyle* arg1) {
//   ((void (*)(GtkStyle*, GtkStyle*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Style_virtual_draw_arrow(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, GtkArrowType arg6, gboolean arg7, gint arg8, gint arg9, gint arg10, gint arg11) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, GtkArrowType, gboolean, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
// };
// void _gotk4_gtk3_Style_virtual_draw_box(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_box_gap(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9, GtkPositionType arg10, gint arg11, gint arg12) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
// };
// void _gotk4_gtk3_Style_virtual_draw_check(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_diamond(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_expander(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, gint arg5, gint arg6, GtkExpanderStyle arg7) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, GtkExpanderStyle))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
// };
// void _gotk4_gtk3_Style_virtual_draw_extension(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9, GtkPositionType arg10) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
// };
// void _gotk4_gtk3_Style_virtual_draw_flat_box(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_focus(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, gint arg5, gint arg6, gint arg7, gint arg8) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
// };
// void _gotk4_gtk3_Style_virtual_draw_handle(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9, GtkOrientation arg10) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkOrientation))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
// };
// void _gotk4_gtk3_Style_virtual_draw_hline(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, gint arg5, gint arg6, gint arg7) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
// };
// void _gotk4_gtk3_Style_virtual_draw_layout(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, gboolean arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, PangoLayout* arg8) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, gboolean, GtkWidget*, gchar*, gint, gint, PangoLayout*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
// };
// void _gotk4_gtk3_Style_virtual_draw_option(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_resize_grip(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, GdkWindowEdge arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, GdkWindowEdge, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_shadow(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_shadow_gap(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9, GtkPositionType arg10, gint arg11, gint arg12) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkPositionType, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
// };
// void _gotk4_gtk3_Style_virtual_draw_slider(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9, GtkOrientation arg10) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint, GtkOrientation))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
// };
// void _gotk4_gtk3_Style_virtual_draw_spinner(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, guint arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, guint, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_tab(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkShadowType arg3, GtkWidget* arg4, gchar* arg5, gint arg6, gint arg7, gint arg8, gint arg9) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkShadowType, GtkWidget*, gchar*, gint, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
// };
// void _gotk4_gtk3_Style_virtual_draw_vline(void* fnptr, GtkStyle* arg0, cairo_t* arg1, GtkStateType arg2, GtkWidget* arg3, gchar* arg4, gint arg5, gint arg6, gint arg7) {
//   ((void (*)(GtkStyle*, cairo_t*, GtkStateType, GtkWidget*, gchar*, gint, gint, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
// };
// void _gotk4_gtk3_Style_virtual_init_from_rc(void* fnptr, GtkStyle* arg0, GtkRcStyle* arg1) {
//   ((void (*)(GtkStyle*, GtkRcStyle*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Style_virtual_realize(void* fnptr, GtkStyle* arg0) {
//   ((void (*)(GtkStyle*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Style_virtual_set_background(void* fnptr, GtkStyle* arg0, GdkWindow* arg1, GtkStateType arg2) {
//   ((void (*)(GtkStyle*, GdkWindow*, GtkStateType))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Style_virtual_unrealize(void* fnptr, GtkStyle* arg0) {
//   ((void (*)(GtkStyle*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Switch_virtual_activate(void* fnptr, GtkSwitch* arg0) {
//   ((void (*)(GtkSwitch*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextBuffer_virtual_apply_tag(void* fnptr, GtkTextBuffer* arg0, GtkTextTag* arg1, GtkTextIter* arg2, GtkTextIter* arg3) {
//   ((void (*)(GtkTextBuffer*, GtkTextTag*, GtkTextIter*, GtkTextIter*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TextBuffer_virtual_begin_user_action(void* fnptr, GtkTextBuffer* arg0) {
//   ((void (*)(GtkTextBuffer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextBuffer_virtual_changed(void* fnptr, GtkTextBuffer* arg0) {
//   ((void (*)(GtkTextBuffer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextBuffer_virtual_delete_range(void* fnptr, GtkTextBuffer* arg0, GtkTextIter* arg1, GtkTextIter* arg2) {
//   ((void (*)(GtkTextBuffer*, GtkTextIter*, GtkTextIter*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextBuffer_virtual_end_user_action(void* fnptr, GtkTextBuffer* arg0) {
//   ((void (*)(GtkTextBuffer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextBuffer_virtual_insert_child_anchor(void* fnptr, GtkTextBuffer* arg0, GtkTextIter* arg1, GtkTextChildAnchor* arg2) {
//   ((void (*)(GtkTextBuffer*, GtkTextIter*, GtkTextChildAnchor*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextBuffer_virtual_insert_pixbuf(void* fnptr, GtkTextBuffer* arg0, GtkTextIter* arg1, GdkPixbuf* arg2) {
//   ((void (*)(GtkTextBuffer*, GtkTextIter*, GdkPixbuf*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextBuffer_virtual_insert_text(void* fnptr, GtkTextBuffer* arg0, GtkTextIter* arg1, gchar* arg2, gint arg3) {
//   ((void (*)(GtkTextBuffer*, GtkTextIter*, gchar*, gint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TextBuffer_virtual_mark_deleted(void* fnptr, GtkTextBuffer* arg0, GtkTextMark* arg1) {
//   ((void (*)(GtkTextBuffer*, GtkTextMark*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextBuffer_virtual_mark_set(void* fnptr, GtkTextBuffer* arg0, GtkTextIter* arg1, GtkTextMark* arg2) {
//   ((void (*)(GtkTextBuffer*, GtkTextIter*, GtkTextMark*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextBuffer_virtual_modified_changed(void* fnptr, GtkTextBuffer* arg0) {
//   ((void (*)(GtkTextBuffer*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextBuffer_virtual_paste_done(void* fnptr, GtkTextBuffer* arg0, GtkClipboard* arg1) {
//   ((void (*)(GtkTextBuffer*, GtkClipboard*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextBuffer_virtual_remove_tag(void* fnptr, GtkTextBuffer* arg0, GtkTextTag* arg1, GtkTextIter* arg2, GtkTextIter* arg3) {
//   ((void (*)(GtkTextBuffer*, GtkTextTag*, GtkTextIter*, GtkTextIter*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TextTagTable_virtual_tag_added(void* fnptr, GtkTextTagTable* arg0, GtkTextTag* arg1) {
//   ((void (*)(GtkTextTagTable*, GtkTextTag*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextTagTable_virtual_tag_changed(void* fnptr, GtkTextTagTable* arg0, GtkTextTag* arg1, gboolean arg2) {
//   ((void (*)(GtkTextTagTable*, GtkTextTag*, gboolean))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextTagTable_virtual_tag_removed(void* fnptr, GtkTextTagTable* arg0, GtkTextTag* arg1) {
//   ((void (*)(GtkTextTagTable*, GtkTextTag*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextView_virtual_backspace(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_copy_clipboard(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_cut_clipboard(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_delete_from_cursor(void* fnptr, GtkTextView* arg0, GtkDeleteType arg1, gint arg2) {
//   ((void (*)(GtkTextView*, GtkDeleteType, gint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextView_virtual_draw_layer(void* fnptr, GtkTextView* arg0, GtkTextViewLayer arg1, cairo_t* arg2) {
//   ((void (*)(GtkTextView*, GtkTextViewLayer, cairo_t*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TextView_virtual_insert_at_cursor(void* fnptr, GtkTextView* arg0, gchar* arg1) {
//   ((void (*)(GtkTextView*, gchar*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextView_virtual_insert_emoji(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_move_cursor(void* fnptr, GtkTextView* arg0, GtkMovementStep arg1, gint arg2, gboolean arg3) {
//   ((void (*)(GtkTextView*, GtkMovementStep, gint, gboolean))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TextView_virtual_paste_clipboard(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_populate_popup(void* fnptr, GtkTextView* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkTextView*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TextView_virtual_set_anchor(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TextView_virtual_toggle_overwrite(void* fnptr, GtkTextView* arg0) {
//   ((void (*)(GtkTextView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_activity(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_arrow(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_background(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_check(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_expander(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_extension(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5, GtkPositionType arg6) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkPositionType))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_focus(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_frame(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_frame_gap(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5, GtkPositionType arg6, gdouble arg7, gdouble arg8) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkPositionType, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_handle(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_icon(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, GdkPixbuf* arg2, gdouble arg3, gdouble arg4) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, GdkPixbuf*, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_icon_surface(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, cairo_surface_t* arg2, gdouble arg3, gdouble arg4) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, cairo_surface_t*, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_layout(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, PangoLayout* arg4) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, PangoLayout*))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_line(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_option(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_ThemingEngine_virtual_render_slider(void* fnptr, GtkThemingEngine* arg0, cairo_t* arg1, gdouble arg2, gdouble arg3, gdouble arg4, gdouble arg5, GtkOrientation arg6) {
//   ((void (*)(GtkThemingEngine*, cairo_t*, gdouble, gdouble, gdouble, gdouble, GtkOrientation))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_ToggleAction_virtual_toggled(void* fnptr, GtkToggleAction* arg0) {
//   ((void (*)(GtkToggleAction*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ToggleButton_virtual_toggled(void* fnptr, GtkToggleButton* arg0) {
//   ((void (*)(GtkToggleButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ToggleToolButton_virtual_toggled(void* fnptr, GtkToggleToolButton* arg0) {
//   ((void (*)(GtkToggleToolButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ToolButton_virtual_clicked(void* fnptr, GtkToolButton* arg0) {
//   ((void (*)(GtkToolButton*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ToolItem_virtual_toolbar_reconfigured(void* fnptr, GtkToolItem* arg0) {
//   ((void (*)(GtkToolItem*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_ToolShell_virtual_rebuild_menu(void* fnptr, GtkToolShell* arg0) {
//   ((void (*)(GtkToolShell*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Toolbar_virtual_orientation_changed(void* fnptr, GtkToolbar* arg0, GtkOrientation arg1) {
//   ((void (*)(GtkToolbar*, GtkOrientation))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Toolbar_virtual_style_changed(void* fnptr, GtkToolbar* arg0, GtkToolbarStyle arg1) {
//   ((void (*)(GtkToolbar*, GtkToolbarStyle))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TreeModelFilter_virtual_modify(void* fnptr, GtkTreeModelFilter* arg0, GtkTreeModel* arg1, GtkTreeIter* arg2, GValue* arg3, gint arg4) {
//   ((void (*)(GtkTreeModelFilter*, GtkTreeModel*, GtkTreeIter*, GValue*, gint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_TreeModel_virtual_get_value(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1, gint arg2, GValue* arg3) {
//   ((void (*)(GtkTreeModel*, GtkTreeIter*, gint, GValue*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TreeModel_virtual_ref_node(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   ((void (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TreeModel_virtual_row_changed(void* fnptr, GtkTreeModel* arg0, GtkTreePath* arg1, GtkTreeIter* arg2) {
//   ((void (*)(GtkTreeModel*, GtkTreePath*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeModel_virtual_row_deleted(void* fnptr, GtkTreeModel* arg0, GtkTreePath* arg1) {
//   ((void (*)(GtkTreeModel*, GtkTreePath*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TreeModel_virtual_row_has_child_toggled(void* fnptr, GtkTreeModel* arg0, GtkTreePath* arg1, GtkTreeIter* arg2) {
//   ((void (*)(GtkTreeModel*, GtkTreePath*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeModel_virtual_row_inserted(void* fnptr, GtkTreeModel* arg0, GtkTreePath* arg1, GtkTreeIter* arg2) {
//   ((void (*)(GtkTreeModel*, GtkTreePath*, GtkTreeIter*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeModel_virtual_unref_node(void* fnptr, GtkTreeModel* arg0, GtkTreeIter* arg1) {
//   ((void (*)(GtkTreeModel*, GtkTreeIter*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_TreeSelection_virtual_changed(void* fnptr, GtkTreeSelection* arg0) {
//   ((void (*)(GtkTreeSelection*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TreeSortable_virtual_set_default_sort_func(void* fnptr, GtkTreeSortable* arg0, GtkTreeIterCompareFunc arg1, gpointer arg2, GDestroyNotify arg3) {
//   ((void (*)(GtkTreeSortable*, GtkTreeIterCompareFunc, gpointer, GDestroyNotify))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_TreeSortable_virtual_set_sort_column_id(void* fnptr, GtkTreeSortable* arg0, gint arg1, GtkSortType arg2) {
//   ((void (*)(GtkTreeSortable*, gint, GtkSortType))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeSortable_virtual_set_sort_func(void* fnptr, GtkTreeSortable* arg0, gint arg1, GtkTreeIterCompareFunc arg2, gpointer arg3, GDestroyNotify arg4) {
//   ((void (*)(GtkTreeSortable*, gint, GtkTreeIterCompareFunc, gpointer, GDestroyNotify))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_TreeSortable_virtual_sort_column_changed(void* fnptr, GtkTreeSortable* arg0) {
//   ((void (*)(GtkTreeSortable*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TreeViewColumn_virtual_clicked(void* fnptr, GtkTreeViewColumn* arg0) {
//   ((void (*)(GtkTreeViewColumn*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TreeView_virtual_columns_changed(void* fnptr, GtkTreeView* arg0) {
//   ((void (*)(GtkTreeView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TreeView_virtual_cursor_changed(void* fnptr, GtkTreeView* arg0) {
//   ((void (*)(GtkTreeView*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_TreeView_virtual_row_activated(void* fnptr, GtkTreeView* arg0, GtkTreePath* arg1, GtkTreeViewColumn* arg2) {
//   ((void (*)(GtkTreeView*, GtkTreePath*, GtkTreeViewColumn*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeView_virtual_row_collapsed(void* fnptr, GtkTreeView* arg0, GtkTreeIter* arg1, GtkTreePath* arg2) {
//   ((void (*)(GtkTreeView*, GtkTreeIter*, GtkTreePath*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_TreeView_virtual_row_expanded(void* fnptr, GtkTreeView* arg0, GtkTreeIter* arg1, GtkTreePath* arg2) {
//   ((void (*)(GtkTreeView*, GtkTreeIter*, GtkTreePath*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_UIManager_virtual_actions_changed(void* fnptr, GtkUIManager* arg0) {
//   ((void (*)(GtkUIManager*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_UIManager_virtual_add_widget(void* fnptr, GtkUIManager* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkUIManager*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_UIManager_virtual_connect_proxy(void* fnptr, GtkUIManager* arg0, GtkAction* arg1, GtkWidget* arg2) {
//   ((void (*)(GtkUIManager*, GtkAction*, GtkWidget*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_UIManager_virtual_disconnect_proxy(void* fnptr, GtkUIManager* arg0, GtkAction* arg1, GtkWidget* arg2) {
//   ((void (*)(GtkUIManager*, GtkAction*, GtkWidget*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_UIManager_virtual_post_activate(void* fnptr, GtkUIManager* arg0, GtkAction* arg1) {
//   ((void (*)(GtkUIManager*, GtkAction*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_UIManager_virtual_pre_activate(void* fnptr, GtkUIManager* arg0, GtkAction* arg1) {
//   ((void (*)(GtkUIManager*, GtkAction*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_adjust_baseline_allocation(void* fnptr, GtkWidget* arg0, gint* arg1) {
//   ((void (*)(GtkWidget*, gint*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_adjust_baseline_request(void* fnptr, GtkWidget* arg0, gint* arg1, gint* arg2) {
//   ((void (*)(GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Widget_virtual_adjust_size_allocation(void* fnptr, GtkWidget* arg0, GtkOrientation arg1, gint* arg2, gint* arg3, gint* arg4, gint* arg5) {
//   ((void (*)(GtkWidget*, GtkOrientation, gint*, gint*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_Widget_virtual_adjust_size_request(void* fnptr, GtkWidget* arg0, GtkOrientation arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkWidget*, GtkOrientation, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Widget_virtual_composited_changed(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_destroy(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_direction_changed(void* fnptr, GtkWidget* arg0, GtkTextDirection arg1) {
//   ((void (*)(GtkWidget*, GtkTextDirection))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_drag_begin(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1) {
//   ((void (*)(GtkWidget*, GdkDragContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_drag_data_delete(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1) {
//   ((void (*)(GtkWidget*, GdkDragContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_drag_data_get(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, GtkSelectionData* arg2, guint arg3, guint arg4) {
//   ((void (*)(GtkWidget*, GdkDragContext*, GtkSelectionData*, guint, guint))(fnptr))(arg0, arg1, arg2, arg3, arg4);
// };
// void _gotk4_gtk3_Widget_virtual_drag_data_received(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, gint arg2, gint arg3, GtkSelectionData* arg4, guint arg5, guint arg6) {
//   ((void (*)(GtkWidget*, GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
// };
// void _gotk4_gtk3_Widget_virtual_drag_end(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1) {
//   ((void (*)(GtkWidget*, GdkDragContext*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_drag_leave(void* fnptr, GtkWidget* arg0, GdkDragContext* arg1, guint arg2) {
//   ((void (*)(GtkWidget*, GdkDragContext*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Widget_virtual_get_preferred_height(void* fnptr, GtkWidget* arg0, gint* arg1, gint* arg2) {
//   ((void (*)(GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Widget_virtual_get_preferred_height_and_baseline_for_width(void* fnptr, GtkWidget* arg0, gint arg1, gint* arg2, gint* arg3, gint* arg4, gint* arg5) {
//   ((void (*)(GtkWidget*, gint, gint*, gint*, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3, arg4, arg5);
// };
// void _gotk4_gtk3_Widget_virtual_get_preferred_height_for_width(void* fnptr, GtkWidget* arg0, gint arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Widget_virtual_get_preferred_width(void* fnptr, GtkWidget* arg0, gint* arg1, gint* arg2) {
//   ((void (*)(GtkWidget*, gint*, gint*))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Widget_virtual_get_preferred_width_for_height(void* fnptr, GtkWidget* arg0, gint arg1, gint* arg2, gint* arg3) {
//   ((void (*)(GtkWidget*, gint, gint*, gint*))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Widget_virtual_grab_focus(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_grab_notify(void* fnptr, GtkWidget* arg0, gboolean arg1) {
//   ((void (*)(GtkWidget*, gboolean))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_hide(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_hierarchy_changed(void* fnptr, GtkWidget* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkWidget*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_map(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_move_focus(void* fnptr, GtkWidget* arg0, GtkDirectionType arg1) {
//   ((void (*)(GtkWidget*, GtkDirectionType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_parent_set(void* fnptr, GtkWidget* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkWidget*, GtkWidget*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_queue_draw_region(void* fnptr, GtkWidget* arg0, cairo_region_t* arg1) {
//   ((void (*)(GtkWidget*, cairo_region_t*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_realize(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_screen_changed(void* fnptr, GtkWidget* arg0, GdkScreen* arg1) {
//   ((void (*)(GtkWidget*, GdkScreen*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_selection_get(void* fnptr, GtkWidget* arg0, GtkSelectionData* arg1, guint arg2, guint arg3) {
//   ((void (*)(GtkWidget*, GtkSelectionData*, guint, guint))(fnptr))(arg0, arg1, arg2, arg3);
// };
// void _gotk4_gtk3_Widget_virtual_selection_received(void* fnptr, GtkWidget* arg0, GtkSelectionData* arg1, guint arg2) {
//   ((void (*)(GtkWidget*, GtkSelectionData*, guint))(fnptr))(arg0, arg1, arg2);
// };
// void _gotk4_gtk3_Widget_virtual_show(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_show_all(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_size_allocate(void* fnptr, GtkWidget* arg0, GtkAllocation* arg1) {
//   ((void (*)(GtkWidget*, GtkAllocation*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_state_changed(void* fnptr, GtkWidget* arg0, GtkStateType arg1) {
//   ((void (*)(GtkWidget*, GtkStateType))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_state_flags_changed(void* fnptr, GtkWidget* arg0, GtkStateFlags arg1) {
//   ((void (*)(GtkWidget*, GtkStateFlags))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_style_set(void* fnptr, GtkWidget* arg0, GtkStyle* arg1) {
//   ((void (*)(GtkWidget*, GtkStyle*))(fnptr))(arg0, arg1);
// };
// void _gotk4_gtk3_Widget_virtual_style_updated(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_unmap(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Widget_virtual_unrealize(void* fnptr, GtkWidget* arg0) {
//   ((void (*)(GtkWidget*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Window_virtual_activate_default(void* fnptr, GtkWindow* arg0) {
//   ((void (*)(GtkWindow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Window_virtual_activate_focus(void* fnptr, GtkWindow* arg0) {
//   ((void (*)(GtkWindow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Window_virtual_keys_changed(void* fnptr, GtkWindow* arg0) {
//   ((void (*)(GtkWindow*))(fnptr))(arg0);
// };
// void _gotk4_gtk3_Window_virtual_set_focus(void* fnptr, GtkWindow* arg0, GtkWidget* arg1) {
//   ((void (*)(GtkWindow*, GtkWidget*))(fnptr))(arg0, arg1);
// };
import "C"

// GType values.
var (
	GTypeAlign                      = coreglib.Type(C.gtk_align_get_type())
	GTypeArrowPlacement             = coreglib.Type(C.gtk_arrow_placement_get_type())
	GTypeArrowType                  = coreglib.Type(C.gtk_arrow_type_get_type())
	GTypeAssistantPageType          = coreglib.Type(C.gtk_assistant_page_type_get_type())
	GTypeBaselinePosition           = coreglib.Type(C.gtk_baseline_position_get_type())
	GTypeBorderStyle                = coreglib.Type(C.gtk_border_style_get_type())
	GTypeBuilderError               = coreglib.Type(C.gtk_builder_error_get_type())
	GTypeButtonBoxStyle             = coreglib.Type(C.gtk_button_box_style_get_type())
	GTypeButtonRole                 = coreglib.Type(C.gtk_button_role_get_type())
	GTypeButtonsType                = coreglib.Type(C.gtk_buttons_type_get_type())
	GTypeCellRendererAccelMode      = coreglib.Type(C.gtk_cell_renderer_accel_mode_get_type())
	GTypeCellRendererMode           = coreglib.Type(C.gtk_cell_renderer_mode_get_type())
	GTypeCornerType                 = coreglib.Type(C.gtk_corner_type_get_type())
	GTypeCSSProviderError           = coreglib.Type(C.gtk_css_provider_error_get_type())
	GTypeCSSSectionType             = coreglib.Type(C.gtk_css_section_type_get_type())
	GTypeDeleteType                 = coreglib.Type(C.gtk_delete_type_get_type())
	GTypeDirectionType              = coreglib.Type(C.gtk_direction_type_get_type())
	GTypeDragResult                 = coreglib.Type(C.gtk_drag_result_get_type())
	GTypeEntryIconPosition          = coreglib.Type(C.gtk_entry_icon_position_get_type())
	GTypeEventSequenceState         = coreglib.Type(C.gtk_event_sequence_state_get_type())
	GTypeExpanderStyle              = coreglib.Type(C.gtk_expander_style_get_type())
	GTypeFileChooserAction          = coreglib.Type(C.gtk_file_chooser_action_get_type())
	GTypeFileChooserConfirmation    = coreglib.Type(C.gtk_file_chooser_confirmation_get_type())
	GTypeFileChooserError           = coreglib.Type(C.gtk_file_chooser_error_get_type())
	GTypeIMPreeditStyle             = coreglib.Type(C.gtk_im_preedit_style_get_type())
	GTypeIMStatusStyle              = coreglib.Type(C.gtk_im_status_style_get_type())
	GTypeIconSize                   = coreglib.Type(C.gtk_icon_size_get_type())
	GTypeIconThemeError             = coreglib.Type(C.gtk_icon_theme_error_get_type())
	GTypeIconViewDropPosition       = coreglib.Type(C.gtk_icon_view_drop_position_get_type())
	GTypeImageType                  = coreglib.Type(C.gtk_image_type_get_type())
	GTypeInputPurpose               = coreglib.Type(C.gtk_input_purpose_get_type())
	GTypeJustification              = coreglib.Type(C.gtk_justification_get_type())
	GTypeLevelBarMode               = coreglib.Type(C.gtk_level_bar_mode_get_type())
	GTypeLicense                    = coreglib.Type(C.gtk_license_get_type())
	GTypeMenuDirectionType          = coreglib.Type(C.gtk_menu_direction_type_get_type())
	GTypeMessageType                = coreglib.Type(C.gtk_message_type_get_type())
	GTypeMovementStep               = coreglib.Type(C.gtk_movement_step_get_type())
	GTypeNotebookTab                = coreglib.Type(C.gtk_notebook_tab_get_type())
	GTypeNumberUpLayout             = coreglib.Type(C.gtk_number_up_layout_get_type())
	GTypeOrientation                = coreglib.Type(C.gtk_orientation_get_type())
	GTypePackDirection              = coreglib.Type(C.gtk_pack_direction_get_type())
	GTypePackType                   = coreglib.Type(C.gtk_pack_type_get_type())
	GTypePadActionType              = coreglib.Type(C.gtk_pad_action_type_get_type())
	GTypePageOrientation            = coreglib.Type(C.gtk_page_orientation_get_type())
	GTypePageSet                    = coreglib.Type(C.gtk_page_set_get_type())
	GTypePanDirection               = coreglib.Type(C.gtk_pan_direction_get_type())
	GTypePathPriorityType           = coreglib.Type(C.gtk_path_priority_type_get_type())
	GTypePathType                   = coreglib.Type(C.gtk_path_type_get_type())
	GTypePolicyType                 = coreglib.Type(C.gtk_policy_type_get_type())
	GTypePopoverConstraint          = coreglib.Type(C.gtk_popover_constraint_get_type())
	GTypePositionType               = coreglib.Type(C.gtk_position_type_get_type())
	GTypePrintDuplex                = coreglib.Type(C.gtk_print_duplex_get_type())
	GTypePrintError                 = coreglib.Type(C.gtk_print_error_get_type())
	GTypePrintOperationAction       = coreglib.Type(C.gtk_print_operation_action_get_type())
	GTypePrintOperationResult       = coreglib.Type(C.gtk_print_operation_result_get_type())
	GTypePrintPages                 = coreglib.Type(C.gtk_print_pages_get_type())
	GTypePrintQuality               = coreglib.Type(C.gtk_print_quality_get_type())
	GTypePrintStatus                = coreglib.Type(C.gtk_print_status_get_type())
	GTypePropagationPhase           = coreglib.Type(C.gtk_propagation_phase_get_type())
	GTypeRCTokenType                = coreglib.Type(C.gtk_rc_token_type_get_type())
	GTypeRecentChooserError         = coreglib.Type(C.gtk_recent_chooser_error_get_type())
	GTypeRecentManagerError         = coreglib.Type(C.gtk_recent_manager_error_get_type())
	GTypeRecentSortType             = coreglib.Type(C.gtk_recent_sort_type_get_type())
	GTypeReliefStyle                = coreglib.Type(C.gtk_relief_style_get_type())
	GTypeResizeMode                 = coreglib.Type(C.gtk_resize_mode_get_type())
	GTypeResponseType               = coreglib.Type(C.gtk_response_type_get_type())
	GTypeRevealerTransitionType     = coreglib.Type(C.gtk_revealer_transition_type_get_type())
	GTypeScrollStep                 = coreglib.Type(C.gtk_scroll_step_get_type())
	GTypeScrollType                 = coreglib.Type(C.gtk_scroll_type_get_type())
	GTypeScrollablePolicy           = coreglib.Type(C.gtk_scrollable_policy_get_type())
	GTypeSelectionMode              = coreglib.Type(C.gtk_selection_mode_get_type())
	GTypeSensitivityType            = coreglib.Type(C.gtk_sensitivity_type_get_type())
	GTypeShadowType                 = coreglib.Type(C.gtk_shadow_type_get_type())
	GTypeShortcutType               = coreglib.Type(C.gtk_shortcut_type_get_type())
	GTypeSizeGroupMode              = coreglib.Type(C.gtk_size_group_mode_get_type())
	GTypeSizeRequestMode            = coreglib.Type(C.gtk_size_request_mode_get_type())
	GTypeSortType                   = coreglib.Type(C.gtk_sort_type_get_type())
	GTypeSpinButtonUpdatePolicy     = coreglib.Type(C.gtk_spin_button_update_policy_get_type())
	GTypeSpinType                   = coreglib.Type(C.gtk_spin_type_get_type())
	GTypeStackTransitionType        = coreglib.Type(C.gtk_stack_transition_type_get_type())
	GTypeStateType                  = coreglib.Type(C.gtk_state_type_get_type())
	GTypeTextBufferTargetInfo       = coreglib.Type(C.gtk_text_buffer_target_info_get_type())
	GTypeTextDirection              = coreglib.Type(C.gtk_text_direction_get_type())
	GTypeTextExtendSelection        = coreglib.Type(C.gtk_text_extend_selection_get_type())
	GTypeTextViewLayer              = coreglib.Type(C.gtk_text_view_layer_get_type())
	GTypeTextWindowType             = coreglib.Type(C.gtk_text_window_type_get_type())
	GTypeToolbarSpaceStyle          = coreglib.Type(C.gtk_toolbar_space_style_get_type())
	GTypeToolbarStyle               = coreglib.Type(C.gtk_toolbar_style_get_type())
	GTypeTreeViewColumnSizing       = coreglib.Type(C.gtk_tree_view_column_sizing_get_type())
	GTypeTreeViewDropPosition       = coreglib.Type(C.gtk_tree_view_drop_position_get_type())
	GTypeTreeViewGridLines          = coreglib.Type(C.gtk_tree_view_grid_lines_get_type())
	GTypeUnit                       = coreglib.Type(C.gtk_unit_get_type())
	GTypeWidgetHelpType             = coreglib.Type(C.gtk_widget_help_type_get_type())
	GTypeWindowPosition             = coreglib.Type(C.gtk_window_position_get_type())
	GTypeWindowType                 = coreglib.Type(C.gtk_window_type_get_type())
	GTypeWrapMode                   = coreglib.Type(C.gtk_wrap_mode_get_type())
	GTypeAccelFlags                 = coreglib.Type(C.gtk_accel_flags_get_type())
	GTypeApplicationInhibitFlags    = coreglib.Type(C.gtk_application_inhibit_flags_get_type())
	GTypeAttachOptions              = coreglib.Type(C.gtk_attach_options_get_type())
	GTypeCalendarDisplayOptions     = coreglib.Type(C.gtk_calendar_display_options_get_type())
	GTypeCellRendererState          = coreglib.Type(C.gtk_cell_renderer_state_get_type())
	GTypeDebugFlag                  = coreglib.Type(C.gtk_debug_flag_get_type())
	GTypeDestDefaults               = coreglib.Type(C.gtk_dest_defaults_get_type())
	GTypeDialogFlags                = coreglib.Type(C.gtk_dialog_flags_get_type())
	GTypeEventControllerScrollFlags = coreglib.Type(C.gtk_event_controller_scroll_flags_get_type())
	GTypeFileFilterFlags            = coreglib.Type(C.gtk_file_filter_flags_get_type())
	GTypeFontChooserLevel           = coreglib.Type(C.gtk_font_chooser_level_get_type())
	GTypeIconLookupFlags            = coreglib.Type(C.gtk_icon_lookup_flags_get_type())
	GTypeInputHints                 = coreglib.Type(C.gtk_input_hints_get_type())
	GTypeJunctionSides              = coreglib.Type(C.gtk_junction_sides_get_type())
	GTypePlacesOpenFlags            = coreglib.Type(C.gtk_places_open_flags_get_type())
	GTypeRCFlags                    = coreglib.Type(C.gtk_rc_flags_get_type())
	GTypeRecentFilterFlags          = coreglib.Type(C.gtk_recent_filter_flags_get_type())
	GTypeRegionFlags                = coreglib.Type(C.gtk_region_flags_get_type())
	GTypeStateFlags                 = coreglib.Type(C.gtk_state_flags_get_type())
	GTypeStyleContextPrintFlags     = coreglib.Type(C.gtk_style_context_print_flags_get_type())
	GTypeTargetFlags                = coreglib.Type(C.gtk_target_flags_get_type())
	GTypeTextSearchFlags            = coreglib.Type(C.gtk_text_search_flags_get_type())
	GTypeToolPaletteDragTargets     = coreglib.Type(C.gtk_tool_palette_drag_targets_get_type())
	GTypeTreeModelFlags             = coreglib.Type(C.gtk_tree_model_flags_get_type())
	GTypeUIManagerItemType          = coreglib.Type(C.gtk_ui_manager_item_type_get_type())
	GTypeActionable                 = coreglib.Type(C.gtk_actionable_get_type())
	GTypeActivatable                = coreglib.Type(C.gtk_activatable_get_type())
	GTypeAppChooser                 = coreglib.Type(C.gtk_app_chooser_get_type())
	GTypeBuildable                  = coreglib.Type(C.gtk_buildable_get_type())
	GTypeCellAccessibleParent       = coreglib.Type(C.gtk_cell_accessible_parent_get_type())
	GTypeCellEditable               = coreglib.Type(C.gtk_cell_editable_get_type())
	GTypeCellLayout                 = coreglib.Type(C.gtk_cell_layout_get_type())
	GTypeColorChooser               = coreglib.Type(C.gtk_color_chooser_get_type())
	GTypeEditable                   = coreglib.Type(C.gtk_editable_get_type())
	GTypeFileChooser                = coreglib.Type(C.gtk_file_chooser_get_type())
	GTypeFontChooser                = coreglib.Type(C.gtk_font_chooser_get_type())
	GTypeOrientable                 = coreglib.Type(C.gtk_orientable_get_type())
	GTypePrintOperationPreview      = coreglib.Type(C.gtk_print_operation_preview_get_type())
	GTypeRecentChooser              = coreglib.Type(C.gtk_recent_chooser_get_type())
	GTypeScrollable                 = coreglib.Type(C.gtk_scrollable_get_type())
	GTypeStyleProvider              = coreglib.Type(C.gtk_style_provider_get_type())
	GTypeToolShell                  = coreglib.Type(C.gtk_tool_shell_get_type())
	GTypeTreeDragDest               = coreglib.Type(C.gtk_tree_drag_dest_get_type())
	GTypeTreeDragSource             = coreglib.Type(C.gtk_tree_drag_source_get_type())
	GTypeTreeModel                  = coreglib.Type(C.gtk_tree_model_get_type())
	GTypeTreeSortable               = coreglib.Type(C.gtk_tree_sortable_get_type())
	GTypeAboutDialog                = coreglib.Type(C.gtk_about_dialog_get_type())
	GTypeAccelGroup                 = coreglib.Type(C.gtk_accel_group_get_type())
	GTypeAccelLabel                 = coreglib.Type(C.gtk_accel_label_get_type())
	GTypeAccelMap                   = coreglib.Type(C.gtk_accel_map_get_type())
	GTypeAccessible                 = coreglib.Type(C.gtk_accessible_get_type())
	GTypeAction                     = coreglib.Type(C.gtk_action_get_type())
	GTypeActionBar                  = coreglib.Type(C.gtk_action_bar_get_type())
	GTypeActionGroup                = coreglib.Type(C.gtk_action_group_get_type())
	GTypeAdjustment                 = coreglib.Type(C.gtk_adjustment_get_type())
	GTypeAlignment                  = coreglib.Type(C.gtk_alignment_get_type())
	GTypeAppChooserButton           = coreglib.Type(C.gtk_app_chooser_button_get_type())
	GTypeAppChooserDialog           = coreglib.Type(C.gtk_app_chooser_dialog_get_type())
	GTypeAppChooserWidget           = coreglib.Type(C.gtk_app_chooser_widget_get_type())
	GTypeApplication                = coreglib.Type(C.gtk_application_get_type())
	GTypeApplicationWindow          = coreglib.Type(C.gtk_application_window_get_type())
	GTypeArrow                      = coreglib.Type(C.gtk_arrow_get_type())
	GTypeArrowAccessible            = coreglib.Type(C.gtk_arrow_accessible_get_type())
	GTypeAspectFrame                = coreglib.Type(C.gtk_aspect_frame_get_type())
	GTypeAssistant                  = coreglib.Type(C.gtk_assistant_get_type())
	GTypeBin                        = coreglib.Type(C.gtk_bin_get_type())
	GTypeBooleanCellAccessible      = coreglib.Type(C.gtk_boolean_cell_accessible_get_type())
	GTypeBox                        = coreglib.Type(C.gtk_box_get_type())
	GTypeBuilder                    = coreglib.Type(C.gtk_builder_get_type())
	GTypeButton                     = coreglib.Type(C.gtk_button_get_type())
	GTypeButtonAccessible           = coreglib.Type(C.gtk_button_accessible_get_type())
	GTypeButtonBox                  = coreglib.Type(C.gtk_button_box_get_type())
	GTypeCalendar                   = coreglib.Type(C.gtk_calendar_get_type())
	GTypeCellAccessible             = coreglib.Type(C.gtk_cell_accessible_get_type())
	GTypeCellArea                   = coreglib.Type(C.gtk_cell_area_get_type())
	GTypeCellAreaBox                = coreglib.Type(C.gtk_cell_area_box_get_type())
	GTypeCellAreaContext            = coreglib.Type(C.gtk_cell_area_context_get_type())
	GTypeCellRenderer               = coreglib.Type(C.gtk_cell_renderer_get_type())
	GTypeCellRendererAccel          = coreglib.Type(C.gtk_cell_renderer_accel_get_type())
	GTypeCellRendererCombo          = coreglib.Type(C.gtk_cell_renderer_combo_get_type())
	GTypeCellRendererPixbuf         = coreglib.Type(C.gtk_cell_renderer_pixbuf_get_type())
	GTypeCellRendererProgress       = coreglib.Type(C.gtk_cell_renderer_progress_get_type())
	GTypeCellRendererSpin           = coreglib.Type(C.gtk_cell_renderer_spin_get_type())
	GTypeCellRendererSpinner        = coreglib.Type(C.gtk_cell_renderer_spinner_get_type())
	GTypeCellRendererText           = coreglib.Type(C.gtk_cell_renderer_text_get_type())
	GTypeCellRendererToggle         = coreglib.Type(C.gtk_cell_renderer_toggle_get_type())
	GTypeCellView                   = coreglib.Type(C.gtk_cell_view_get_type())
	GTypeCheckButton                = coreglib.Type(C.gtk_check_button_get_type())
	GTypeCheckMenuItem              = coreglib.Type(C.gtk_check_menu_item_get_type())
	GTypeCheckMenuItemAccessible    = coreglib.Type(C.gtk_check_menu_item_accessible_get_type())
	GTypeClipboard                  = coreglib.Type(C.gtk_clipboard_get_type())
	GTypeColorButton                = coreglib.Type(C.gtk_color_button_get_type())
	GTypeColorChooserDialog         = coreglib.Type(C.gtk_color_chooser_dialog_get_type())
	GTypeColorChooserWidget         = coreglib.Type(C.gtk_color_chooser_widget_get_type())
	GTypeColorSelection             = coreglib.Type(C.gtk_color_selection_get_type())
	GTypeColorSelectionDialog       = coreglib.Type(C.gtk_color_selection_dialog_get_type())
	GTypeComboBox                   = coreglib.Type(C.gtk_combo_box_get_type())
	GTypeComboBoxAccessible         = coreglib.Type(C.gtk_combo_box_accessible_get_type())
	GTypeComboBoxText               = coreglib.Type(C.gtk_combo_box_text_get_type())
	GTypeContainer                  = coreglib.Type(C.gtk_container_get_type())
	GTypeContainerAccessible        = coreglib.Type(C.gtk_container_accessible_get_type())
	GTypeContainerCellAccessible    = coreglib.Type(C.gtk_container_cell_accessible_get_type())
	GTypeCSSProvider                = coreglib.Type(C.gtk_css_provider_get_type())
	GTypeDialog                     = coreglib.Type(C.gtk_dialog_get_type())
	GTypeDrawingArea                = coreglib.Type(C.gtk_drawing_area_get_type())
	GTypeEntry                      = coreglib.Type(C.gtk_entry_get_type())
	GTypeEntryAccessible            = coreglib.Type(C.gtk_entry_accessible_get_type())
	GTypeEntryBuffer                = coreglib.Type(C.gtk_entry_buffer_get_type())
	GTypeEntryCompletion            = coreglib.Type(C.gtk_entry_completion_get_type())
	GTypeEntryIconAccessible        = coreglib.Type(C.gtk_entry_icon_accessible_get_type())
	GTypeEventBox                   = coreglib.Type(C.gtk_event_box_get_type())
	GTypeEventController            = coreglib.Type(C.gtk_event_controller_get_type())
	GTypeEventControllerKey         = coreglib.Type(C.gtk_event_controller_key_get_type())
	GTypeEventControllerMotion      = coreglib.Type(C.gtk_event_controller_motion_get_type())
	GTypeEventControllerScroll      = coreglib.Type(C.gtk_event_controller_scroll_get_type())
	GTypeExpander                   = coreglib.Type(C.gtk_expander_get_type())
	GTypeExpanderAccessible         = coreglib.Type(C.gtk_expander_accessible_get_type())
	GTypeFileChooserButton          = coreglib.Type(C.gtk_file_chooser_button_get_type())
	GTypeFileChooserDialog          = coreglib.Type(C.gtk_file_chooser_dialog_get_type())
	GTypeFileChooserNative          = coreglib.Type(C.gtk_file_chooser_native_get_type())
	GTypeFileChooserWidget          = coreglib.Type(C.gtk_file_chooser_widget_get_type())
	GTypeFileFilter                 = coreglib.Type(C.gtk_file_filter_get_type())
	GTypeFixed                      = coreglib.Type(C.gtk_fixed_get_type())
	GTypeFlowBox                    = coreglib.Type(C.gtk_flow_box_get_type())
	GTypeFlowBoxAccessible          = coreglib.Type(C.gtk_flow_box_accessible_get_type())
	GTypeFlowBoxChild               = coreglib.Type(C.gtk_flow_box_child_get_type())
	GTypeFlowBoxChildAccessible     = coreglib.Type(C.gtk_flow_box_child_accessible_get_type())
	GTypeFontButton                 = coreglib.Type(C.gtk_font_button_get_type())
	GTypeFontChooserDialog          = coreglib.Type(C.gtk_font_chooser_dialog_get_type())
	GTypeFontChooserWidget          = coreglib.Type(C.gtk_font_chooser_widget_get_type())
	GTypeFontSelection              = coreglib.Type(C.gtk_font_selection_get_type())
	GTypeFontSelectionDialog        = coreglib.Type(C.gtk_font_selection_dialog_get_type())
	GTypeFrame                      = coreglib.Type(C.gtk_frame_get_type())
	GTypeFrameAccessible            = coreglib.Type(C.gtk_frame_accessible_get_type())
	GTypeGLArea                     = coreglib.Type(C.gtk_gl_area_get_type())
	GTypeGesture                    = coreglib.Type(C.gtk_gesture_get_type())
	GTypeGestureDrag                = coreglib.Type(C.gtk_gesture_drag_get_type())
	GTypeGestureLongPress           = coreglib.Type(C.gtk_gesture_long_press_get_type())
	GTypeGestureMultiPress          = coreglib.Type(C.gtk_gesture_multi_press_get_type())
	GTypeGesturePan                 = coreglib.Type(C.gtk_gesture_pan_get_type())
	GTypeGestureRotate              = coreglib.Type(C.gtk_gesture_rotate_get_type())
	GTypeGestureSingle              = coreglib.Type(C.gtk_gesture_single_get_type())
	GTypeGestureStylus              = coreglib.Type(C.gtk_gesture_stylus_get_type())
	GTypeGestureSwipe               = coreglib.Type(C.gtk_gesture_swipe_get_type())
	GTypeGestureZoom                = coreglib.Type(C.gtk_gesture_zoom_get_type())
	GTypeGrid                       = coreglib.Type(C.gtk_grid_get_type())
	GTypeHBox                       = coreglib.Type(C.gtk_hbox_get_type())
	GTypeHButtonBox                 = coreglib.Type(C.gtk_hbutton_box_get_type())
	GTypeHPaned                     = coreglib.Type(C.gtk_hpaned_get_type())
	GTypeHSV                        = coreglib.Type(C.gtk_hsv_get_type())
	GTypeHScale                     = coreglib.Type(C.gtk_hscale_get_type())
	GTypeHScrollbar                 = coreglib.Type(C.gtk_hscrollbar_get_type())
	GTypeHSeparator                 = coreglib.Type(C.gtk_hseparator_get_type())
	GTypeHandleBox                  = coreglib.Type(C.gtk_handle_box_get_type())
	GTypeHeaderBar                  = coreglib.Type(C.gtk_header_bar_get_type())
	GTypeIMContext                  = coreglib.Type(C.gtk_im_context_get_type())
	GTypeIMContextSimple            = coreglib.Type(C.gtk_im_context_simple_get_type())
	GTypeIMMulticontext             = coreglib.Type(C.gtk_im_multicontext_get_type())
	GTypeIconFactory                = coreglib.Type(C.gtk_icon_factory_get_type())
	GTypeIconInfo                   = coreglib.Type(C.gtk_icon_info_get_type())
	GTypeIconTheme                  = coreglib.Type(C.gtk_icon_theme_get_type())
	GTypeIconView                   = coreglib.Type(C.gtk_icon_view_get_type())
	GTypeIconViewAccessible         = coreglib.Type(C.gtk_icon_view_accessible_get_type())
	GTypeImage                      = coreglib.Type(C.gtk_image_get_type())
	GTypeImageAccessible            = coreglib.Type(C.gtk_image_accessible_get_type())
	GTypeImageCellAccessible        = coreglib.Type(C.gtk_image_cell_accessible_get_type())
	GTypeImageMenuItem              = coreglib.Type(C.gtk_image_menu_item_get_type())
	GTypeInfoBar                    = coreglib.Type(C.gtk_info_bar_get_type())
	GTypeInvisible                  = coreglib.Type(C.gtk_invisible_get_type())
	GTypeLabel                      = coreglib.Type(C.gtk_label_get_type())
	GTypeLabelAccessible            = coreglib.Type(C.gtk_label_accessible_get_type())
	GTypeLayout                     = coreglib.Type(C.gtk_layout_get_type())
	GTypeLevelBar                   = coreglib.Type(C.gtk_level_bar_get_type())
	GTypeLevelBarAccessible         = coreglib.Type(C.gtk_level_bar_accessible_get_type())
	GTypeLinkButton                 = coreglib.Type(C.gtk_link_button_get_type())
	GTypeLinkButtonAccessible       = coreglib.Type(C.gtk_link_button_accessible_get_type())
	GTypeListBox                    = coreglib.Type(C.gtk_list_box_get_type())
	GTypeListBoxAccessible          = coreglib.Type(C.gtk_list_box_accessible_get_type())
	GTypeListBoxRow                 = coreglib.Type(C.gtk_list_box_row_get_type())
	GTypeListBoxRowAccessible       = coreglib.Type(C.gtk_list_box_row_accessible_get_type())
	GTypeListStore                  = coreglib.Type(C.gtk_list_store_get_type())
	GTypeLockButton                 = coreglib.Type(C.gtk_lock_button_get_type())
	GTypeLockButtonAccessible       = coreglib.Type(C.gtk_lock_button_accessible_get_type())
	GTypeMenu                       = coreglib.Type(C.gtk_menu_get_type())
	GTypeMenuAccessible             = coreglib.Type(C.gtk_menu_accessible_get_type())
	GTypeMenuBar                    = coreglib.Type(C.gtk_menu_bar_get_type())
	GTypeMenuButton                 = coreglib.Type(C.gtk_menu_button_get_type())
	GTypeMenuButtonAccessible       = coreglib.Type(C.gtk_menu_button_accessible_get_type())
	GTypeMenuItem                   = coreglib.Type(C.gtk_menu_item_get_type())
	GTypeMenuItemAccessible         = coreglib.Type(C.gtk_menu_item_accessible_get_type())
	GTypeMenuShell                  = coreglib.Type(C.gtk_menu_shell_get_type())
	GTypeMenuShellAccessible        = coreglib.Type(C.gtk_menu_shell_accessible_get_type())
	GTypeMenuToolButton             = coreglib.Type(C.gtk_menu_tool_button_get_type())
	GTypeMessageDialog              = coreglib.Type(C.gtk_message_dialog_get_type())
	GTypeMisc                       = coreglib.Type(C.gtk_misc_get_type())
	GTypeModelButton                = coreglib.Type(C.gtk_model_button_get_type())
	GTypeMountOperation             = coreglib.Type(C.gtk_mount_operation_get_type())
	GTypeNativeDialog               = coreglib.Type(C.gtk_native_dialog_get_type())
	GTypeNotebook                   = coreglib.Type(C.gtk_notebook_get_type())
	GTypeNotebookAccessible         = coreglib.Type(C.gtk_notebook_accessible_get_type())
	GTypeNotebookPageAccessible     = coreglib.Type(C.gtk_notebook_page_accessible_get_type())
	GTypeNumerableIcon              = coreglib.Type(C.gtk_numerable_icon_get_type())
	GTypeOffscreenWindow            = coreglib.Type(C.gtk_offscreen_window_get_type())
	GTypeOverlay                    = coreglib.Type(C.gtk_overlay_get_type())
	GTypePadController              = coreglib.Type(C.gtk_pad_controller_get_type())
	GTypePageSetup                  = coreglib.Type(C.gtk_page_setup_get_type())
	GTypePaned                      = coreglib.Type(C.gtk_paned_get_type())
	GTypePanedAccessible            = coreglib.Type(C.gtk_paned_accessible_get_type())
	GTypePlacesSidebar              = coreglib.Type(C.gtk_places_sidebar_get_type())
	GTypePlug                       = coreglib.Type(C.gtk_plug_get_type())
	GTypePlugAccessible             = coreglib.Type(C.gtk_plug_accessible_get_type())
	GTypePopover                    = coreglib.Type(C.gtk_popover_get_type())
	GTypePopoverAccessible          = coreglib.Type(C.gtk_popover_accessible_get_type())
	GTypePopoverMenu                = coreglib.Type(C.gtk_popover_menu_get_type())
	GTypePrintContext               = coreglib.Type(C.gtk_print_context_get_type())
	GTypePrintOperation             = coreglib.Type(C.gtk_print_operation_get_type())
	GTypePrintSettings              = coreglib.Type(C.gtk_print_settings_get_type())
	GTypeProgressBar                = coreglib.Type(C.gtk_progress_bar_get_type())
	GTypeProgressBarAccessible      = coreglib.Type(C.gtk_progress_bar_accessible_get_type())
	GTypeRadioAction                = coreglib.Type(C.gtk_radio_action_get_type())
	GTypeRadioButton                = coreglib.Type(C.gtk_radio_button_get_type())
	GTypeRadioButtonAccessible      = coreglib.Type(C.gtk_radio_button_accessible_get_type())
	GTypeRadioMenuItem              = coreglib.Type(C.gtk_radio_menu_item_get_type())
	GTypeRadioMenuItemAccessible    = coreglib.Type(C.gtk_radio_menu_item_accessible_get_type())
	GTypeRadioToolButton            = coreglib.Type(C.gtk_radio_tool_button_get_type())
	GTypeRange                      = coreglib.Type(C.gtk_range_get_type())
	GTypeRangeAccessible            = coreglib.Type(C.gtk_range_accessible_get_type())
	GTypeRCStyle                    = coreglib.Type(C.gtk_rc_style_get_type())
	GTypeRecentAction               = coreglib.Type(C.gtk_recent_action_get_type())
	GTypeRecentChooserDialog        = coreglib.Type(C.gtk_recent_chooser_dialog_get_type())
	GTypeRecentChooserMenu          = coreglib.Type(C.gtk_recent_chooser_menu_get_type())
	GTypeRecentChooserWidget        = coreglib.Type(C.gtk_recent_chooser_widget_get_type())
	GTypeRecentFilter               = coreglib.Type(C.gtk_recent_filter_get_type())
	GTypeRecentManager              = coreglib.Type(C.gtk_recent_manager_get_type())
	GTypeRendererCellAccessible     = coreglib.Type(C.gtk_renderer_cell_accessible_get_type())
	GTypeRevealer                   = coreglib.Type(C.gtk_revealer_get_type())
	GTypeScale                      = coreglib.Type(C.gtk_scale_get_type())
	GTypeScaleAccessible            = coreglib.Type(C.gtk_scale_accessible_get_type())
	GTypeScaleButton                = coreglib.Type(C.gtk_scale_button_get_type())
	GTypeScaleButtonAccessible      = coreglib.Type(C.gtk_scale_button_accessible_get_type())
	GTypeScrollbar                  = coreglib.Type(C.gtk_scrollbar_get_type())
	GTypeScrolledWindow             = coreglib.Type(C.gtk_scrolled_window_get_type())
	GTypeScrolledWindowAccessible   = coreglib.Type(C.gtk_scrolled_window_accessible_get_type())
	GTypeSearchBar                  = coreglib.Type(C.gtk_search_bar_get_type())
	GTypeSearchEntry                = coreglib.Type(C.gtk_search_entry_get_type())
	GTypeSeparator                  = coreglib.Type(C.gtk_separator_get_type())
	GTypeSeparatorMenuItem          = coreglib.Type(C.gtk_separator_menu_item_get_type())
	GTypeSeparatorToolItem          = coreglib.Type(C.gtk_separator_tool_item_get_type())
	GTypeSettings                   = coreglib.Type(C.gtk_settings_get_type())
	GTypeShortcutLabel              = coreglib.Type(C.gtk_shortcut_label_get_type())
	GTypeShortcutsGroup             = coreglib.Type(C.gtk_shortcuts_group_get_type())
	GTypeShortcutsSection           = coreglib.Type(C.gtk_shortcuts_section_get_type())
	GTypeShortcutsShortcut          = coreglib.Type(C.gtk_shortcuts_shortcut_get_type())
	GTypeShortcutsWindow            = coreglib.Type(C.gtk_shortcuts_window_get_type())
	GTypeSizeGroup                  = coreglib.Type(C.gtk_size_group_get_type())
	GTypeSocket                     = coreglib.Type(C.gtk_socket_get_type())
	GTypeSocketAccessible           = coreglib.Type(C.gtk_socket_accessible_get_type())
	GTypeSpinButton                 = coreglib.Type(C.gtk_spin_button_get_type())
	GTypeSpinButtonAccessible       = coreglib.Type(C.gtk_spin_button_accessible_get_type())
	GTypeSpinner                    = coreglib.Type(C.gtk_spinner_get_type())
	GTypeSpinnerAccessible          = coreglib.Type(C.gtk_spinner_accessible_get_type())
	GTypeStack                      = coreglib.Type(C.gtk_stack_get_type())
	GTypeStackAccessible            = coreglib.Type(C.gtk_stack_accessible_get_type())
	GTypeStackSidebar               = coreglib.Type(C.gtk_stack_sidebar_get_type())
	GTypeStackSwitcher              = coreglib.Type(C.gtk_stack_switcher_get_type())
	GTypeStatusIcon                 = coreglib.Type(C.gtk_status_icon_get_type())
	GTypeStatusbar                  = coreglib.Type(C.gtk_statusbar_get_type())
	GTypeStatusbarAccessible        = coreglib.Type(C.gtk_statusbar_accessible_get_type())
	GTypeStyle                      = coreglib.Type(C.gtk_style_get_type())
	GTypeStyleContext               = coreglib.Type(C.gtk_style_context_get_type())
	GTypeStyleProperties            = coreglib.Type(C.gtk_style_properties_get_type())
	GTypeSwitch                     = coreglib.Type(C.gtk_switch_get_type())
	GTypeSwitchAccessible           = coreglib.Type(C.gtk_switch_accessible_get_type())
	GTypeTable                      = coreglib.Type(C.gtk_table_get_type())
	GTypeTearoffMenuItem            = coreglib.Type(C.gtk_tearoff_menu_item_get_type())
	GTypeTextBuffer                 = coreglib.Type(C.gtk_text_buffer_get_type())
	GTypeTextCellAccessible         = coreglib.Type(C.gtk_text_cell_accessible_get_type())
	GTypeTextChildAnchor            = coreglib.Type(C.gtk_text_child_anchor_get_type())
	GTypeTextMark                   = coreglib.Type(C.gtk_text_mark_get_type())
	GTypeTextTag                    = coreglib.Type(C.gtk_text_tag_get_type())
	GTypeTextTagTable               = coreglib.Type(C.gtk_text_tag_table_get_type())
	GTypeTextView                   = coreglib.Type(C.gtk_text_view_get_type())
	GTypeTextViewAccessible         = coreglib.Type(C.gtk_text_view_accessible_get_type())
	GTypeThemingEngine              = coreglib.Type(C.gtk_theming_engine_get_type())
	GTypeToggleAction               = coreglib.Type(C.gtk_toggle_action_get_type())
	GTypeToggleButton               = coreglib.Type(C.gtk_toggle_button_get_type())
	GTypeToggleButtonAccessible     = coreglib.Type(C.gtk_toggle_button_accessible_get_type())
	GTypeToggleToolButton           = coreglib.Type(C.gtk_toggle_tool_button_get_type())
	GTypeToolButton                 = coreglib.Type(C.gtk_tool_button_get_type())
	GTypeToolItem                   = coreglib.Type(C.gtk_tool_item_get_type())
	GTypeToolItemGroup              = coreglib.Type(C.gtk_tool_item_group_get_type())
	GTypeToolPalette                = coreglib.Type(C.gtk_tool_palette_get_type())
	GTypeToolbar                    = coreglib.Type(C.gtk_toolbar_get_type())
	GTypeTooltip                    = coreglib.Type(C.gtk_tooltip_get_type())
	GTypeToplevelAccessible         = coreglib.Type(C.gtk_toplevel_accessible_get_type())
	GTypeTreeModelFilter            = coreglib.Type(C.gtk_tree_model_filter_get_type())
	GTypeTreeModelSort              = coreglib.Type(C.gtk_tree_model_sort_get_type())
	GTypeTreeSelection              = coreglib.Type(C.gtk_tree_selection_get_type())
	GTypeTreeStore                  = coreglib.Type(C.gtk_tree_store_get_type())
	GTypeTreeView                   = coreglib.Type(C.gtk_tree_view_get_type())
	GTypeTreeViewAccessible         = coreglib.Type(C.gtk_tree_view_accessible_get_type())
	GTypeTreeViewColumn             = coreglib.Type(C.gtk_tree_view_column_get_type())
	GTypeUIManager                  = coreglib.Type(C.gtk_ui_manager_get_type())
	GTypeVBox                       = coreglib.Type(C.gtk_vbox_get_type())
	GTypeVButtonBox                 = coreglib.Type(C.gtk_vbutton_box_get_type())
	GTypeVPaned                     = coreglib.Type(C.gtk_vpaned_get_type())
	GTypeVScale                     = coreglib.Type(C.gtk_vscale_get_type())
	GTypeVScrollbar                 = coreglib.Type(C.gtk_vscrollbar_get_type())
	GTypeVSeparator                 = coreglib.Type(C.gtk_vseparator_get_type())
	GTypeViewport                   = coreglib.Type(C.gtk_viewport_get_type())
	GTypeVolumeButton               = coreglib.Type(C.gtk_volume_button_get_type())
	GTypeWidget                     = coreglib.Type(C.gtk_widget_get_type())
	GTypeWidgetAccessible           = coreglib.Type(C.gtk_widget_accessible_get_type())
	GTypeWindow                     = coreglib.Type(C.gtk_window_get_type())
	GTypeWindowAccessible           = coreglib.Type(C.gtk_window_accessible_get_type())
	GTypeWindowGroup                = coreglib.Type(C.gtk_window_group_get_type())
	GTypeBorder                     = coreglib.Type(C.gtk_border_get_type())
	GTypeCSSSection                 = coreglib.Type(C.gtk_css_section_get_type())
	GTypeGradient                   = coreglib.Type(C.gtk_gradient_get_type())
	GTypeIconSet                    = coreglib.Type(C.gtk_icon_set_get_type())
	GTypeIconSource                 = coreglib.Type(C.gtk_icon_source_get_type())
	GTypePaperSize                  = coreglib.Type(C.gtk_paper_size_get_type())
	GTypeRecentInfo                 = coreglib.Type(C.gtk_recent_info_get_type())
	GTypeRequisition                = coreglib.Type(C.gtk_requisition_get_type())
	GTypeSelectionData              = coreglib.Type(C.gtk_selection_data_get_type())
	GTypeSymbolicColor              = coreglib.Type(C.gtk_symbolic_color_get_type())
	GTypeTargetEntry                = coreglib.Type(C.gtk_target_entry_get_type())
	GTypeTargetList                 = coreglib.Type(C.gtk_target_list_get_type())
	GTypeTextAttributes             = coreglib.Type(C.gtk_text_attributes_get_type())
	GTypeTextIter                   = coreglib.Type(C.gtk_text_iter_get_type())
	GTypeTreeIter                   = coreglib.Type(C.gtk_tree_iter_get_type())
	GTypeTreePath                   = coreglib.Type(C.gtk_tree_path_get_type())
	GTypeTreeRowReference           = coreglib.Type(C.gtk_tree_row_reference_get_type())
	GTypeWidgetPath                 = coreglib.Type(C.gtk_widget_path_get_type())
)

func init() {
	coreglib.RegisterGValueMarshalers([]coreglib.TypeMarshaler{
		coreglib.TypeMarshaler{T: GTypeAlign, F: marshalAlign},
		coreglib.TypeMarshaler{T: GTypeArrowPlacement, F: marshalArrowPlacement},
		coreglib.TypeMarshaler{T: GTypeArrowType, F: marshalArrowType},
		coreglib.TypeMarshaler{T: GTypeAssistantPageType, F: marshalAssistantPageType},
		coreglib.TypeMarshaler{T: GTypeBaselinePosition, F: marshalBaselinePosition},
		coreglib.TypeMarshaler{T: GTypeBorderStyle, F: marshalBorderStyle},
		coreglib.TypeMarshaler{T: GTypeBuilderError, F: marshalBuilderError},
		coreglib.TypeMarshaler{T: GTypeButtonBoxStyle, F: marshalButtonBoxStyle},
		coreglib.TypeMarshaler{T: GTypeButtonRole, F: marshalButtonRole},
		coreglib.TypeMarshaler{T: GTypeButtonsType, F: marshalButtonsType},
		coreglib.TypeMarshaler{T: GTypeCellRendererAccelMode, F: marshalCellRendererAccelMode},
		coreglib.TypeMarshaler{T: GTypeCellRendererMode, F: marshalCellRendererMode},
		coreglib.TypeMarshaler{T: GTypeCornerType, F: marshalCornerType},
		coreglib.TypeMarshaler{T: GTypeCSSProviderError, F: marshalCSSProviderError},
		coreglib.TypeMarshaler{T: GTypeCSSSectionType, F: marshalCSSSectionType},
		coreglib.TypeMarshaler{T: GTypeDeleteType, F: marshalDeleteType},
		coreglib.TypeMarshaler{T: GTypeDirectionType, F: marshalDirectionType},
		coreglib.TypeMarshaler{T: GTypeDragResult, F: marshalDragResult},
		coreglib.TypeMarshaler{T: GTypeEntryIconPosition, F: marshalEntryIconPosition},
		coreglib.TypeMarshaler{T: GTypeEventSequenceState, F: marshalEventSequenceState},
		coreglib.TypeMarshaler{T: GTypeExpanderStyle, F: marshalExpanderStyle},
		coreglib.TypeMarshaler{T: GTypeFileChooserAction, F: marshalFileChooserAction},
		coreglib.TypeMarshaler{T: GTypeFileChooserConfirmation, F: marshalFileChooserConfirmation},
		coreglib.TypeMarshaler{T: GTypeFileChooserError, F: marshalFileChooserError},
		coreglib.TypeMarshaler{T: GTypeIMPreeditStyle, F: marshalIMPreeditStyle},
		coreglib.TypeMarshaler{T: GTypeIMStatusStyle, F: marshalIMStatusStyle},
		coreglib.TypeMarshaler{T: GTypeIconSize, F: marshalIconSize},
		coreglib.TypeMarshaler{T: GTypeIconThemeError, F: marshalIconThemeError},
		coreglib.TypeMarshaler{T: GTypeIconViewDropPosition, F: marshalIconViewDropPosition},
		coreglib.TypeMarshaler{T: GTypeImageType, F: marshalImageType},
		coreglib.TypeMarshaler{T: GTypeInputPurpose, F: marshalInputPurpose},
		coreglib.TypeMarshaler{T: GTypeJustification, F: marshalJustification},
		coreglib.TypeMarshaler{T: GTypeLevelBarMode, F: marshalLevelBarMode},
		coreglib.TypeMarshaler{T: GTypeLicense, F: marshalLicense},
		coreglib.TypeMarshaler{T: GTypeMenuDirectionType, F: marshalMenuDirectionType},
		coreglib.TypeMarshaler{T: GTypeMessageType, F: marshalMessageType},
		coreglib.TypeMarshaler{T: GTypeMovementStep, F: marshalMovementStep},
		coreglib.TypeMarshaler{T: GTypeNotebookTab, F: marshalNotebookTab},
		coreglib.TypeMarshaler{T: GTypeNumberUpLayout, F: marshalNumberUpLayout},
		coreglib.TypeMarshaler{T: GTypeOrientation, F: marshalOrientation},
		coreglib.TypeMarshaler{T: GTypePackDirection, F: marshalPackDirection},
		coreglib.TypeMarshaler{T: GTypePackType, F: marshalPackType},
		coreglib.TypeMarshaler{T: GTypePadActionType, F: marshalPadActionType},
		coreglib.TypeMarshaler{T: GTypePageOrientation, F: marshalPageOrientation},
		coreglib.TypeMarshaler{T: GTypePageSet, F: marshalPageSet},
		coreglib.TypeMarshaler{T: GTypePanDirection, F: marshalPanDirection},
		coreglib.TypeMarshaler{T: GTypePathPriorityType, F: marshalPathPriorityType},
		coreglib.TypeMarshaler{T: GTypePathType, F: marshalPathType},
		coreglib.TypeMarshaler{T: GTypePolicyType, F: marshalPolicyType},
		coreglib.TypeMarshaler{T: GTypePopoverConstraint, F: marshalPopoverConstraint},
		coreglib.TypeMarshaler{T: GTypePositionType, F: marshalPositionType},
		coreglib.TypeMarshaler{T: GTypePrintDuplex, F: marshalPrintDuplex},
		coreglib.TypeMarshaler{T: GTypePrintError, F: marshalPrintError},
		coreglib.TypeMarshaler{T: GTypePrintOperationAction, F: marshalPrintOperationAction},
		coreglib.TypeMarshaler{T: GTypePrintOperationResult, F: marshalPrintOperationResult},
		coreglib.TypeMarshaler{T: GTypePrintPages, F: marshalPrintPages},
		coreglib.TypeMarshaler{T: GTypePrintQuality, F: marshalPrintQuality},
		coreglib.TypeMarshaler{T: GTypePrintStatus, F: marshalPrintStatus},
		coreglib.TypeMarshaler{T: GTypePropagationPhase, F: marshalPropagationPhase},
		coreglib.TypeMarshaler{T: GTypeRCTokenType, F: marshalRCTokenType},
		coreglib.TypeMarshaler{T: GTypeRecentChooserError, F: marshalRecentChooserError},
		coreglib.TypeMarshaler{T: GTypeRecentManagerError, F: marshalRecentManagerError},
		coreglib.TypeMarshaler{T: GTypeRecentSortType, F: marshalRecentSortType},
		coreglib.TypeMarshaler{T: GTypeReliefStyle, F: marshalReliefStyle},
		coreglib.TypeMarshaler{T: GTypeResizeMode, F: marshalResizeMode},
		coreglib.TypeMarshaler{T: GTypeResponseType, F: marshalResponseType},
		coreglib.TypeMarshaler{T: GTypeRevealerTransitionType, F: marshalRevealerTransitionType},
		coreglib.TypeMarshaler{T: GTypeScrollStep, F: marshalScrollStep},
		coreglib.TypeMarshaler{T: GTypeScrollType, F: marshalScrollType},
		coreglib.TypeMarshaler{T: GTypeScrollablePolicy, F: marshalScrollablePolicy},
		coreglib.TypeMarshaler{T: GTypeSelectionMode, F: marshalSelectionMode},
		coreglib.TypeMarshaler{T: GTypeSensitivityType, F: marshalSensitivityType},
		coreglib.TypeMarshaler{T: GTypeShadowType, F: marshalShadowType},
		coreglib.TypeMarshaler{T: GTypeShortcutType, F: marshalShortcutType},
		coreglib.TypeMarshaler{T: GTypeSizeGroupMode, F: marshalSizeGroupMode},
		coreglib.TypeMarshaler{T: GTypeSizeRequestMode, F: marshalSizeRequestMode},
		coreglib.TypeMarshaler{T: GTypeSortType, F: marshalSortType},
		coreglib.TypeMarshaler{T: GTypeSpinButtonUpdatePolicy, F: marshalSpinButtonUpdatePolicy},
		coreglib.TypeMarshaler{T: GTypeSpinType, F: marshalSpinType},
		coreglib.TypeMarshaler{T: GTypeStackTransitionType, F: marshalStackTransitionType},
		coreglib.TypeMarshaler{T: GTypeStateType, F: marshalStateType},
		coreglib.TypeMarshaler{T: GTypeTextBufferTargetInfo, F: marshalTextBufferTargetInfo},
		coreglib.TypeMarshaler{T: GTypeTextDirection, F: marshalTextDirection},
		coreglib.TypeMarshaler{T: GTypeTextExtendSelection, F: marshalTextExtendSelection},
		coreglib.TypeMarshaler{T: GTypeTextViewLayer, F: marshalTextViewLayer},
		coreglib.TypeMarshaler{T: GTypeTextWindowType, F: marshalTextWindowType},
		coreglib.TypeMarshaler{T: GTypeToolbarSpaceStyle, F: marshalToolbarSpaceStyle},
		coreglib.TypeMarshaler{T: GTypeToolbarStyle, F: marshalToolbarStyle},
		coreglib.TypeMarshaler{T: GTypeTreeViewColumnSizing, F: marshalTreeViewColumnSizing},
		coreglib.TypeMarshaler{T: GTypeTreeViewDropPosition, F: marshalTreeViewDropPosition},
		coreglib.TypeMarshaler{T: GTypeTreeViewGridLines, F: marshalTreeViewGridLines},
		coreglib.TypeMarshaler{T: GTypeUnit, F: marshalUnit},
		coreglib.TypeMarshaler{T: GTypeWidgetHelpType, F: marshalWidgetHelpType},
		coreglib.TypeMarshaler{T: GTypeWindowPosition, F: marshalWindowPosition},
		coreglib.TypeMarshaler{T: GTypeWindowType, F: marshalWindowType},
		coreglib.TypeMarshaler{T: GTypeWrapMode, F: marshalWrapMode},
		coreglib.TypeMarshaler{T: GTypeAccelFlags, F: marshalAccelFlags},
		coreglib.TypeMarshaler{T: GTypeApplicationInhibitFlags, F: marshalApplicationInhibitFlags},
		coreglib.TypeMarshaler{T: GTypeAttachOptions, F: marshalAttachOptions},
		coreglib.TypeMarshaler{T: GTypeCalendarDisplayOptions, F: marshalCalendarDisplayOptions},
		coreglib.TypeMarshaler{T: GTypeCellRendererState, F: marshalCellRendererState},
		coreglib.TypeMarshaler{T: GTypeDebugFlag, F: marshalDebugFlag},
		coreglib.TypeMarshaler{T: GTypeDestDefaults, F: marshalDestDefaults},
		coreglib.TypeMarshaler{T: GTypeDialogFlags, F: marshalDialogFlags},
		coreglib.TypeMarshaler{T: GTypeEventControllerScrollFlags, F: marshalEventControllerScrollFlags},
		coreglib.TypeMarshaler{T: GTypeFileFilterFlags, F: marshalFileFilterFlags},
		coreglib.TypeMarshaler{T: GTypeFontChooserLevel, F: marshalFontChooserLevel},
		coreglib.TypeMarshaler{T: GTypeIconLookupFlags, F: marshalIconLookupFlags},
		coreglib.TypeMarshaler{T: GTypeInputHints, F: marshalInputHints},
		coreglib.TypeMarshaler{T: GTypeJunctionSides, F: marshalJunctionSides},
		coreglib.TypeMarshaler{T: GTypePlacesOpenFlags, F: marshalPlacesOpenFlags},
		coreglib.TypeMarshaler{T: GTypeRCFlags, F: marshalRCFlags},
		coreglib.TypeMarshaler{T: GTypeRecentFilterFlags, F: marshalRecentFilterFlags},
		coreglib.TypeMarshaler{T: GTypeRegionFlags, F: marshalRegionFlags},
		coreglib.TypeMarshaler{T: GTypeStateFlags, F: marshalStateFlags},
		coreglib.TypeMarshaler{T: GTypeStyleContextPrintFlags, F: marshalStyleContextPrintFlags},
		coreglib.TypeMarshaler{T: GTypeTargetFlags, F: marshalTargetFlags},
		coreglib.TypeMarshaler{T: GTypeTextSearchFlags, F: marshalTextSearchFlags},
		coreglib.TypeMarshaler{T: GTypeToolPaletteDragTargets, F: marshalToolPaletteDragTargets},
		coreglib.TypeMarshaler{T: GTypeTreeModelFlags, F: marshalTreeModelFlags},
		coreglib.TypeMarshaler{T: GTypeUIManagerItemType, F: marshalUIManagerItemType},
		coreglib.TypeMarshaler{T: GTypeActionable, F: marshalActionable},
		coreglib.TypeMarshaler{T: GTypeActivatable, F: marshalActivatable},
		coreglib.TypeMarshaler{T: GTypeAppChooser, F: marshalAppChooser},
		coreglib.TypeMarshaler{T: GTypeBuildable, F: marshalBuildable},
		coreglib.TypeMarshaler{T: GTypeCellAccessibleParent, F: marshalCellAccessibleParent},
		coreglib.TypeMarshaler{T: GTypeCellEditable, F: marshalCellEditable},
		coreglib.TypeMarshaler{T: GTypeCellLayout, F: marshalCellLayout},
		coreglib.TypeMarshaler{T: GTypeColorChooser, F: marshalColorChooser},
		coreglib.TypeMarshaler{T: GTypeEditable, F: marshalEditable},
		coreglib.TypeMarshaler{T: GTypeFileChooser, F: marshalFileChooser},
		coreglib.TypeMarshaler{T: GTypeFontChooser, F: marshalFontChooser},
		coreglib.TypeMarshaler{T: GTypeOrientable, F: marshalOrientable},
		coreglib.TypeMarshaler{T: GTypePrintOperationPreview, F: marshalPrintOperationPreview},
		coreglib.TypeMarshaler{T: GTypeRecentChooser, F: marshalRecentChooser},
		coreglib.TypeMarshaler{T: GTypeScrollable, F: marshalScrollable},
		coreglib.TypeMarshaler{T: GTypeStyleProvider, F: marshalStyleProvider},
		coreglib.TypeMarshaler{T: GTypeToolShell, F: marshalToolShell},
		coreglib.TypeMarshaler{T: GTypeTreeDragDest, F: marshalTreeDragDest},
		coreglib.TypeMarshaler{T: GTypeTreeDragSource, F: marshalTreeDragSource},
		coreglib.TypeMarshaler{T: GTypeTreeModel, F: marshalTreeModel},
		coreglib.TypeMarshaler{T: GTypeTreeSortable, F: marshalTreeSortable},
		coreglib.TypeMarshaler{T: GTypeAboutDialog, F: marshalAboutDialog},
		coreglib.TypeMarshaler{T: GTypeAccelGroup, F: marshalAccelGroup},
		coreglib.TypeMarshaler{T: GTypeAccelLabel, F: marshalAccelLabel},
		coreglib.TypeMarshaler{T: GTypeAccelMap, F: marshalAccelMap},
		coreglib.TypeMarshaler{T: GTypeAccessible, F: marshalAccessible},
		coreglib.TypeMarshaler{T: GTypeAction, F: marshalAction},
		coreglib.TypeMarshaler{T: GTypeActionBar, F: marshalActionBar},
		coreglib.TypeMarshaler{T: GTypeActionGroup, F: marshalActionGroup},
		coreglib.TypeMarshaler{T: GTypeAdjustment, F: marshalAdjustment},
		coreglib.TypeMarshaler{T: GTypeAlignment, F: marshalAlignment},
		coreglib.TypeMarshaler{T: GTypeAppChooserButton, F: marshalAppChooserButton},
		coreglib.TypeMarshaler{T: GTypeAppChooserDialog, F: marshalAppChooserDialog},
		coreglib.TypeMarshaler{T: GTypeAppChooserWidget, F: marshalAppChooserWidget},
		coreglib.TypeMarshaler{T: GTypeApplication, F: marshalApplication},
		coreglib.TypeMarshaler{T: GTypeApplicationWindow, F: marshalApplicationWindow},
		coreglib.TypeMarshaler{T: GTypeArrow, F: marshalArrow},
		coreglib.TypeMarshaler{T: GTypeArrowAccessible, F: marshalArrowAccessible},
		coreglib.TypeMarshaler{T: GTypeAspectFrame, F: marshalAspectFrame},
		coreglib.TypeMarshaler{T: GTypeAssistant, F: marshalAssistant},
		coreglib.TypeMarshaler{T: GTypeBin, F: marshalBin},
		coreglib.TypeMarshaler{T: GTypeBooleanCellAccessible, F: marshalBooleanCellAccessible},
		coreglib.TypeMarshaler{T: GTypeBox, F: marshalBox},
		coreglib.TypeMarshaler{T: GTypeBuilder, F: marshalBuilder},
		coreglib.TypeMarshaler{T: GTypeButton, F: marshalButton},
		coreglib.TypeMarshaler{T: GTypeButtonAccessible, F: marshalButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeButtonBox, F: marshalButtonBox},
		coreglib.TypeMarshaler{T: GTypeCalendar, F: marshalCalendar},
		coreglib.TypeMarshaler{T: GTypeCellAccessible, F: marshalCellAccessible},
		coreglib.TypeMarshaler{T: GTypeCellArea, F: marshalCellArea},
		coreglib.TypeMarshaler{T: GTypeCellAreaBox, F: marshalCellAreaBox},
		coreglib.TypeMarshaler{T: GTypeCellAreaContext, F: marshalCellAreaContext},
		coreglib.TypeMarshaler{T: GTypeCellRenderer, F: marshalCellRenderer},
		coreglib.TypeMarshaler{T: GTypeCellRendererAccel, F: marshalCellRendererAccel},
		coreglib.TypeMarshaler{T: GTypeCellRendererCombo, F: marshalCellRendererCombo},
		coreglib.TypeMarshaler{T: GTypeCellRendererPixbuf, F: marshalCellRendererPixbuf},
		coreglib.TypeMarshaler{T: GTypeCellRendererProgress, F: marshalCellRendererProgress},
		coreglib.TypeMarshaler{T: GTypeCellRendererSpin, F: marshalCellRendererSpin},
		coreglib.TypeMarshaler{T: GTypeCellRendererSpinner, F: marshalCellRendererSpinner},
		coreglib.TypeMarshaler{T: GTypeCellRendererText, F: marshalCellRendererText},
		coreglib.TypeMarshaler{T: GTypeCellRendererToggle, F: marshalCellRendererToggle},
		coreglib.TypeMarshaler{T: GTypeCellView, F: marshalCellView},
		coreglib.TypeMarshaler{T: GTypeCheckButton, F: marshalCheckButton},
		coreglib.TypeMarshaler{T: GTypeCheckMenuItem, F: marshalCheckMenuItem},
		coreglib.TypeMarshaler{T: GTypeCheckMenuItemAccessible, F: marshalCheckMenuItemAccessible},
		coreglib.TypeMarshaler{T: GTypeClipboard, F: marshalClipboard},
		coreglib.TypeMarshaler{T: GTypeColorButton, F: marshalColorButton},
		coreglib.TypeMarshaler{T: GTypeColorChooserDialog, F: marshalColorChooserDialog},
		coreglib.TypeMarshaler{T: GTypeColorChooserWidget, F: marshalColorChooserWidget},
		coreglib.TypeMarshaler{T: GTypeColorSelection, F: marshalColorSelection},
		coreglib.TypeMarshaler{T: GTypeColorSelectionDialog, F: marshalColorSelectionDialog},
		coreglib.TypeMarshaler{T: GTypeComboBox, F: marshalComboBox},
		coreglib.TypeMarshaler{T: GTypeComboBoxAccessible, F: marshalComboBoxAccessible},
		coreglib.TypeMarshaler{T: GTypeComboBoxText, F: marshalComboBoxText},
		coreglib.TypeMarshaler{T: GTypeContainer, F: marshalContainer},
		coreglib.TypeMarshaler{T: GTypeContainerAccessible, F: marshalContainerAccessible},
		coreglib.TypeMarshaler{T: GTypeContainerCellAccessible, F: marshalContainerCellAccessible},
		coreglib.TypeMarshaler{T: GTypeCSSProvider, F: marshalCSSProvider},
		coreglib.TypeMarshaler{T: GTypeDialog, F: marshalDialog},
		coreglib.TypeMarshaler{T: GTypeDrawingArea, F: marshalDrawingArea},
		coreglib.TypeMarshaler{T: GTypeEntry, F: marshalEntry},
		coreglib.TypeMarshaler{T: GTypeEntryAccessible, F: marshalEntryAccessible},
		coreglib.TypeMarshaler{T: GTypeEntryBuffer, F: marshalEntryBuffer},
		coreglib.TypeMarshaler{T: GTypeEntryCompletion, F: marshalEntryCompletion},
		coreglib.TypeMarshaler{T: GTypeEntryIconAccessible, F: marshalEntryIconAccessible},
		coreglib.TypeMarshaler{T: GTypeEventBox, F: marshalEventBox},
		coreglib.TypeMarshaler{T: GTypeEventController, F: marshalEventController},
		coreglib.TypeMarshaler{T: GTypeEventControllerKey, F: marshalEventControllerKey},
		coreglib.TypeMarshaler{T: GTypeEventControllerMotion, F: marshalEventControllerMotion},
		coreglib.TypeMarshaler{T: GTypeEventControllerScroll, F: marshalEventControllerScroll},
		coreglib.TypeMarshaler{T: GTypeExpander, F: marshalExpander},
		coreglib.TypeMarshaler{T: GTypeExpanderAccessible, F: marshalExpanderAccessible},
		coreglib.TypeMarshaler{T: GTypeFileChooserButton, F: marshalFileChooserButton},
		coreglib.TypeMarshaler{T: GTypeFileChooserDialog, F: marshalFileChooserDialog},
		coreglib.TypeMarshaler{T: GTypeFileChooserNative, F: marshalFileChooserNative},
		coreglib.TypeMarshaler{T: GTypeFileChooserWidget, F: marshalFileChooserWidget},
		coreglib.TypeMarshaler{T: GTypeFileFilter, F: marshalFileFilter},
		coreglib.TypeMarshaler{T: GTypeFixed, F: marshalFixed},
		coreglib.TypeMarshaler{T: GTypeFlowBox, F: marshalFlowBox},
		coreglib.TypeMarshaler{T: GTypeFlowBoxAccessible, F: marshalFlowBoxAccessible},
		coreglib.TypeMarshaler{T: GTypeFlowBoxChild, F: marshalFlowBoxChild},
		coreglib.TypeMarshaler{T: GTypeFlowBoxChildAccessible, F: marshalFlowBoxChildAccessible},
		coreglib.TypeMarshaler{T: GTypeFontButton, F: marshalFontButton},
		coreglib.TypeMarshaler{T: GTypeFontChooserDialog, F: marshalFontChooserDialog},
		coreglib.TypeMarshaler{T: GTypeFontChooserWidget, F: marshalFontChooserWidget},
		coreglib.TypeMarshaler{T: GTypeFontSelection, F: marshalFontSelection},
		coreglib.TypeMarshaler{T: GTypeFontSelectionDialog, F: marshalFontSelectionDialog},
		coreglib.TypeMarshaler{T: GTypeFrame, F: marshalFrame},
		coreglib.TypeMarshaler{T: GTypeFrameAccessible, F: marshalFrameAccessible},
		coreglib.TypeMarshaler{T: GTypeGLArea, F: marshalGLArea},
		coreglib.TypeMarshaler{T: GTypeGesture, F: marshalGesture},
		coreglib.TypeMarshaler{T: GTypeGestureDrag, F: marshalGestureDrag},
		coreglib.TypeMarshaler{T: GTypeGestureLongPress, F: marshalGestureLongPress},
		coreglib.TypeMarshaler{T: GTypeGestureMultiPress, F: marshalGestureMultiPress},
		coreglib.TypeMarshaler{T: GTypeGesturePan, F: marshalGesturePan},
		coreglib.TypeMarshaler{T: GTypeGestureRotate, F: marshalGestureRotate},
		coreglib.TypeMarshaler{T: GTypeGestureSingle, F: marshalGestureSingle},
		coreglib.TypeMarshaler{T: GTypeGestureStylus, F: marshalGestureStylus},
		coreglib.TypeMarshaler{T: GTypeGestureSwipe, F: marshalGestureSwipe},
		coreglib.TypeMarshaler{T: GTypeGestureZoom, F: marshalGestureZoom},
		coreglib.TypeMarshaler{T: GTypeGrid, F: marshalGrid},
		coreglib.TypeMarshaler{T: GTypeHBox, F: marshalHBox},
		coreglib.TypeMarshaler{T: GTypeHButtonBox, F: marshalHButtonBox},
		coreglib.TypeMarshaler{T: GTypeHPaned, F: marshalHPaned},
		coreglib.TypeMarshaler{T: GTypeHSV, F: marshalHSV},
		coreglib.TypeMarshaler{T: GTypeHScale, F: marshalHScale},
		coreglib.TypeMarshaler{T: GTypeHScrollbar, F: marshalHScrollbar},
		coreglib.TypeMarshaler{T: GTypeHSeparator, F: marshalHSeparator},
		coreglib.TypeMarshaler{T: GTypeHandleBox, F: marshalHandleBox},
		coreglib.TypeMarshaler{T: GTypeHeaderBar, F: marshalHeaderBar},
		coreglib.TypeMarshaler{T: GTypeIMContext, F: marshalIMContext},
		coreglib.TypeMarshaler{T: GTypeIMContextSimple, F: marshalIMContextSimple},
		coreglib.TypeMarshaler{T: GTypeIMMulticontext, F: marshalIMMulticontext},
		coreglib.TypeMarshaler{T: GTypeIconFactory, F: marshalIconFactory},
		coreglib.TypeMarshaler{T: GTypeIconInfo, F: marshalIconInfo},
		coreglib.TypeMarshaler{T: GTypeIconTheme, F: marshalIconTheme},
		coreglib.TypeMarshaler{T: GTypeIconView, F: marshalIconView},
		coreglib.TypeMarshaler{T: GTypeIconViewAccessible, F: marshalIconViewAccessible},
		coreglib.TypeMarshaler{T: GTypeImage, F: marshalImage},
		coreglib.TypeMarshaler{T: GTypeImageAccessible, F: marshalImageAccessible},
		coreglib.TypeMarshaler{T: GTypeImageCellAccessible, F: marshalImageCellAccessible},
		coreglib.TypeMarshaler{T: GTypeImageMenuItem, F: marshalImageMenuItem},
		coreglib.TypeMarshaler{T: GTypeInfoBar, F: marshalInfoBar},
		coreglib.TypeMarshaler{T: GTypeInvisible, F: marshalInvisible},
		coreglib.TypeMarshaler{T: GTypeLabel, F: marshalLabel},
		coreglib.TypeMarshaler{T: GTypeLabelAccessible, F: marshalLabelAccessible},
		coreglib.TypeMarshaler{T: GTypeLayout, F: marshalLayout},
		coreglib.TypeMarshaler{T: GTypeLevelBar, F: marshalLevelBar},
		coreglib.TypeMarshaler{T: GTypeLevelBarAccessible, F: marshalLevelBarAccessible},
		coreglib.TypeMarshaler{T: GTypeLinkButton, F: marshalLinkButton},
		coreglib.TypeMarshaler{T: GTypeLinkButtonAccessible, F: marshalLinkButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeListBox, F: marshalListBox},
		coreglib.TypeMarshaler{T: GTypeListBoxAccessible, F: marshalListBoxAccessible},
		coreglib.TypeMarshaler{T: GTypeListBoxRow, F: marshalListBoxRow},
		coreglib.TypeMarshaler{T: GTypeListBoxRowAccessible, F: marshalListBoxRowAccessible},
		coreglib.TypeMarshaler{T: GTypeListStore, F: marshalListStore},
		coreglib.TypeMarshaler{T: GTypeLockButton, F: marshalLockButton},
		coreglib.TypeMarshaler{T: GTypeLockButtonAccessible, F: marshalLockButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeMenu, F: marshalMenu},
		coreglib.TypeMarshaler{T: GTypeMenuAccessible, F: marshalMenuAccessible},
		coreglib.TypeMarshaler{T: GTypeMenuBar, F: marshalMenuBar},
		coreglib.TypeMarshaler{T: GTypeMenuButton, F: marshalMenuButton},
		coreglib.TypeMarshaler{T: GTypeMenuButtonAccessible, F: marshalMenuButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeMenuItem, F: marshalMenuItem},
		coreglib.TypeMarshaler{T: GTypeMenuItemAccessible, F: marshalMenuItemAccessible},
		coreglib.TypeMarshaler{T: GTypeMenuShell, F: marshalMenuShell},
		coreglib.TypeMarshaler{T: GTypeMenuShellAccessible, F: marshalMenuShellAccessible},
		coreglib.TypeMarshaler{T: GTypeMenuToolButton, F: marshalMenuToolButton},
		coreglib.TypeMarshaler{T: GTypeMessageDialog, F: marshalMessageDialog},
		coreglib.TypeMarshaler{T: GTypeMisc, F: marshalMisc},
		coreglib.TypeMarshaler{T: GTypeModelButton, F: marshalModelButton},
		coreglib.TypeMarshaler{T: GTypeMountOperation, F: marshalMountOperation},
		coreglib.TypeMarshaler{T: GTypeNativeDialog, F: marshalNativeDialog},
		coreglib.TypeMarshaler{T: GTypeNotebook, F: marshalNotebook},
		coreglib.TypeMarshaler{T: GTypeNotebookAccessible, F: marshalNotebookAccessible},
		coreglib.TypeMarshaler{T: GTypeNotebookPageAccessible, F: marshalNotebookPageAccessible},
		coreglib.TypeMarshaler{T: GTypeNumerableIcon, F: marshalNumerableIcon},
		coreglib.TypeMarshaler{T: GTypeOffscreenWindow, F: marshalOffscreenWindow},
		coreglib.TypeMarshaler{T: GTypeOverlay, F: marshalOverlay},
		coreglib.TypeMarshaler{T: GTypePadController, F: marshalPadController},
		coreglib.TypeMarshaler{T: GTypePageSetup, F: marshalPageSetup},
		coreglib.TypeMarshaler{T: GTypePaned, F: marshalPaned},
		coreglib.TypeMarshaler{T: GTypePanedAccessible, F: marshalPanedAccessible},
		coreglib.TypeMarshaler{T: GTypePlacesSidebar, F: marshalPlacesSidebar},
		coreglib.TypeMarshaler{T: GTypePlug, F: marshalPlug},
		coreglib.TypeMarshaler{T: GTypePlugAccessible, F: marshalPlugAccessible},
		coreglib.TypeMarshaler{T: GTypePopover, F: marshalPopover},
		coreglib.TypeMarshaler{T: GTypePopoverAccessible, F: marshalPopoverAccessible},
		coreglib.TypeMarshaler{T: GTypePopoverMenu, F: marshalPopoverMenu},
		coreglib.TypeMarshaler{T: GTypePrintContext, F: marshalPrintContext},
		coreglib.TypeMarshaler{T: GTypePrintOperation, F: marshalPrintOperation},
		coreglib.TypeMarshaler{T: GTypePrintSettings, F: marshalPrintSettings},
		coreglib.TypeMarshaler{T: GTypeProgressBar, F: marshalProgressBar},
		coreglib.TypeMarshaler{T: GTypeProgressBarAccessible, F: marshalProgressBarAccessible},
		coreglib.TypeMarshaler{T: GTypeRadioAction, F: marshalRadioAction},
		coreglib.TypeMarshaler{T: GTypeRadioButton, F: marshalRadioButton},
		coreglib.TypeMarshaler{T: GTypeRadioButtonAccessible, F: marshalRadioButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeRadioMenuItem, F: marshalRadioMenuItem},
		coreglib.TypeMarshaler{T: GTypeRadioMenuItemAccessible, F: marshalRadioMenuItemAccessible},
		coreglib.TypeMarshaler{T: GTypeRadioToolButton, F: marshalRadioToolButton},
		coreglib.TypeMarshaler{T: GTypeRange, F: marshalRange},
		coreglib.TypeMarshaler{T: GTypeRangeAccessible, F: marshalRangeAccessible},
		coreglib.TypeMarshaler{T: GTypeRCStyle, F: marshalRCStyle},
		coreglib.TypeMarshaler{T: GTypeRecentAction, F: marshalRecentAction},
		coreglib.TypeMarshaler{T: GTypeRecentChooserDialog, F: marshalRecentChooserDialog},
		coreglib.TypeMarshaler{T: GTypeRecentChooserMenu, F: marshalRecentChooserMenu},
		coreglib.TypeMarshaler{T: GTypeRecentChooserWidget, F: marshalRecentChooserWidget},
		coreglib.TypeMarshaler{T: GTypeRecentFilter, F: marshalRecentFilter},
		coreglib.TypeMarshaler{T: GTypeRecentManager, F: marshalRecentManager},
		coreglib.TypeMarshaler{T: GTypeRendererCellAccessible, F: marshalRendererCellAccessible},
		coreglib.TypeMarshaler{T: GTypeRevealer, F: marshalRevealer},
		coreglib.TypeMarshaler{T: GTypeScale, F: marshalScale},
		coreglib.TypeMarshaler{T: GTypeScaleAccessible, F: marshalScaleAccessible},
		coreglib.TypeMarshaler{T: GTypeScaleButton, F: marshalScaleButton},
		coreglib.TypeMarshaler{T: GTypeScaleButtonAccessible, F: marshalScaleButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeScrollbar, F: marshalScrollbar},
		coreglib.TypeMarshaler{T: GTypeScrolledWindow, F: marshalScrolledWindow},
		coreglib.TypeMarshaler{T: GTypeScrolledWindowAccessible, F: marshalScrolledWindowAccessible},
		coreglib.TypeMarshaler{T: GTypeSearchBar, F: marshalSearchBar},
		coreglib.TypeMarshaler{T: GTypeSearchEntry, F: marshalSearchEntry},
		coreglib.TypeMarshaler{T: GTypeSeparator, F: marshalSeparator},
		coreglib.TypeMarshaler{T: GTypeSeparatorMenuItem, F: marshalSeparatorMenuItem},
		coreglib.TypeMarshaler{T: GTypeSeparatorToolItem, F: marshalSeparatorToolItem},
		coreglib.TypeMarshaler{T: GTypeSettings, F: marshalSettings},
		coreglib.TypeMarshaler{T: GTypeShortcutLabel, F: marshalShortcutLabel},
		coreglib.TypeMarshaler{T: GTypeShortcutsGroup, F: marshalShortcutsGroup},
		coreglib.TypeMarshaler{T: GTypeShortcutsSection, F: marshalShortcutsSection},
		coreglib.TypeMarshaler{T: GTypeShortcutsShortcut, F: marshalShortcutsShortcut},
		coreglib.TypeMarshaler{T: GTypeShortcutsWindow, F: marshalShortcutsWindow},
		coreglib.TypeMarshaler{T: GTypeSizeGroup, F: marshalSizeGroup},
		coreglib.TypeMarshaler{T: GTypeSocket, F: marshalSocket},
		coreglib.TypeMarshaler{T: GTypeSocketAccessible, F: marshalSocketAccessible},
		coreglib.TypeMarshaler{T: GTypeSpinButton, F: marshalSpinButton},
		coreglib.TypeMarshaler{T: GTypeSpinButtonAccessible, F: marshalSpinButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeSpinner, F: marshalSpinner},
		coreglib.TypeMarshaler{T: GTypeSpinnerAccessible, F: marshalSpinnerAccessible},
		coreglib.TypeMarshaler{T: GTypeStack, F: marshalStack},
		coreglib.TypeMarshaler{T: GTypeStackAccessible, F: marshalStackAccessible},
		coreglib.TypeMarshaler{T: GTypeStackSidebar, F: marshalStackSidebar},
		coreglib.TypeMarshaler{T: GTypeStackSwitcher, F: marshalStackSwitcher},
		coreglib.TypeMarshaler{T: GTypeStatusIcon, F: marshalStatusIcon},
		coreglib.TypeMarshaler{T: GTypeStatusbar, F: marshalStatusbar},
		coreglib.TypeMarshaler{T: GTypeStatusbarAccessible, F: marshalStatusbarAccessible},
		coreglib.TypeMarshaler{T: GTypeStyle, F: marshalStyle},
		coreglib.TypeMarshaler{T: GTypeStyleContext, F: marshalStyleContext},
		coreglib.TypeMarshaler{T: GTypeStyleProperties, F: marshalStyleProperties},
		coreglib.TypeMarshaler{T: GTypeSwitch, F: marshalSwitch},
		coreglib.TypeMarshaler{T: GTypeSwitchAccessible, F: marshalSwitchAccessible},
		coreglib.TypeMarshaler{T: GTypeTable, F: marshalTable},
		coreglib.TypeMarshaler{T: GTypeTearoffMenuItem, F: marshalTearoffMenuItem},
		coreglib.TypeMarshaler{T: GTypeTextBuffer, F: marshalTextBuffer},
		coreglib.TypeMarshaler{T: GTypeTextCellAccessible, F: marshalTextCellAccessible},
		coreglib.TypeMarshaler{T: GTypeTextChildAnchor, F: marshalTextChildAnchor},
		coreglib.TypeMarshaler{T: GTypeTextMark, F: marshalTextMark},
		coreglib.TypeMarshaler{T: GTypeTextTag, F: marshalTextTag},
		coreglib.TypeMarshaler{T: GTypeTextTagTable, F: marshalTextTagTable},
		coreglib.TypeMarshaler{T: GTypeTextView, F: marshalTextView},
		coreglib.TypeMarshaler{T: GTypeTextViewAccessible, F: marshalTextViewAccessible},
		coreglib.TypeMarshaler{T: GTypeThemingEngine, F: marshalThemingEngine},
		coreglib.TypeMarshaler{T: GTypeToggleAction, F: marshalToggleAction},
		coreglib.TypeMarshaler{T: GTypeToggleButton, F: marshalToggleButton},
		coreglib.TypeMarshaler{T: GTypeToggleButtonAccessible, F: marshalToggleButtonAccessible},
		coreglib.TypeMarshaler{T: GTypeToggleToolButton, F: marshalToggleToolButton},
		coreglib.TypeMarshaler{T: GTypeToolButton, F: marshalToolButton},
		coreglib.TypeMarshaler{T: GTypeToolItem, F: marshalToolItem},
		coreglib.TypeMarshaler{T: GTypeToolItemGroup, F: marshalToolItemGroup},
		coreglib.TypeMarshaler{T: GTypeToolPalette, F: marshalToolPalette},
		coreglib.TypeMarshaler{T: GTypeToolbar, F: marshalToolbar},
		coreglib.TypeMarshaler{T: GTypeTooltip, F: marshalTooltip},
		coreglib.TypeMarshaler{T: GTypeToplevelAccessible, F: marshalToplevelAccessible},
		coreglib.TypeMarshaler{T: GTypeTreeModelFilter, F: marshalTreeModelFilter},
		coreglib.TypeMarshaler{T: GTypeTreeModelSort, F: marshalTreeModelSort},
		coreglib.TypeMarshaler{T: GTypeTreeSelection, F: marshalTreeSelection},
		coreglib.TypeMarshaler{T: GTypeTreeStore, F: marshalTreeStore},
		coreglib.TypeMarshaler{T: GTypeTreeView, F: marshalTreeView},
		coreglib.TypeMarshaler{T: GTypeTreeViewAccessible, F: marshalTreeViewAccessible},
		coreglib.TypeMarshaler{T: GTypeTreeViewColumn, F: marshalTreeViewColumn},
		coreglib.TypeMarshaler{T: GTypeUIManager, F: marshalUIManager},
		coreglib.TypeMarshaler{T: GTypeVBox, F: marshalVBox},
		coreglib.TypeMarshaler{T: GTypeVButtonBox, F: marshalVButtonBox},
		coreglib.TypeMarshaler{T: GTypeVPaned, F: marshalVPaned},
		coreglib.TypeMarshaler{T: GTypeVScale, F: marshalVScale},
		coreglib.TypeMarshaler{T: GTypeVScrollbar, F: marshalVScrollbar},
		coreglib.TypeMarshaler{T: GTypeVSeparator, F: marshalVSeparator},
		coreglib.TypeMarshaler{T: GTypeViewport, F: marshalViewport},
		coreglib.TypeMarshaler{T: GTypeVolumeButton, F: marshalVolumeButton},
		coreglib.TypeMarshaler{T: GTypeWidget, F: marshalWidget},
		coreglib.TypeMarshaler{T: GTypeWidgetAccessible, F: marshalWidgetAccessible},
		coreglib.TypeMarshaler{T: GTypeWindow, F: marshalWindow},
		coreglib.TypeMarshaler{T: GTypeWindowAccessible, F: marshalWindowAccessible},
		coreglib.TypeMarshaler{T: GTypeWindowGroup, F: marshalWindowGroup},
		coreglib.TypeMarshaler{T: GTypeBorder, F: marshalBorder},
		coreglib.TypeMarshaler{T: GTypeCSSSection, F: marshalCSSSection},
		coreglib.TypeMarshaler{T: GTypeGradient, F: marshalGradient},
		coreglib.TypeMarshaler{T: GTypeIconSet, F: marshalIconSet},
		coreglib.TypeMarshaler{T: GTypeIconSource, F: marshalIconSource},
		coreglib.TypeMarshaler{T: GTypePaperSize, F: marshalPaperSize},
		coreglib.TypeMarshaler{T: GTypeRecentInfo, F: marshalRecentInfo},
		coreglib.TypeMarshaler{T: GTypeRequisition, F: marshalRequisition},
		coreglib.TypeMarshaler{T: GTypeSelectionData, F: marshalSelectionData},
		coreglib.TypeMarshaler{T: GTypeSymbolicColor, F: marshalSymbolicColor},
		coreglib.TypeMarshaler{T: GTypeTargetEntry, F: marshalTargetEntry},
		coreglib.TypeMarshaler{T: GTypeTargetList, F: marshalTargetList},
		coreglib.TypeMarshaler{T: GTypeTextAttributes, F: marshalTextAttributes},
		coreglib.TypeMarshaler{T: GTypeTextIter, F: marshalTextIter},
		coreglib.TypeMarshaler{T: GTypeTreeIter, F: marshalTreeIter},
		coreglib.TypeMarshaler{T: GTypeTreePath, F: marshalTreePath},
		coreglib.TypeMarshaler{T: GTypeTreeRowReference, F: marshalTreeRowReference},
		coreglib.TypeMarshaler{T: GTypeWidgetPath, F: marshalWidgetPath},
	})
}

// BINARY_AGE: like gtk_get_binary_age(), but from the headers used at
// application compile time, rather than from the library linked against at
// application run time.
const BINARY_AGE = 2442

// INPUT_ERROR: constant to return from a signal handler for the
// SpinButton::input signal in case of conversion failure.
const INPUT_ERROR = -1

// INTERFACE_AGE: like gtk_get_interface_age(), but from the headers used at
// application compile time, rather than from the library linked against at
// application run time.
const INTERFACE_AGE = 32

// LEVEL_BAR_OFFSET_FULL: name used for the stock full offset included by
// LevelBar.
const LEVEL_BAR_OFFSET_FULL = "full"

// LEVEL_BAR_OFFSET_HIGH: name used for the stock high offset included by
// LevelBar.
const LEVEL_BAR_OFFSET_HIGH = "high"

// LEVEL_BAR_OFFSET_LOW: name used for the stock low offset included by
// LevelBar.
const LEVEL_BAR_OFFSET_LOW = "low"

// MAJOR_VERSION: like gtk_get_major_version(), but from the headers used at
// application compile time, rather than from the library linked against at
// application run time.
const MAJOR_VERSION = 3

// MAX_COMPOSE_LEN: maximum length of sequences in compose tables.
const MAX_COMPOSE_LEN = 7

// MICRO_VERSION: like gtk_get_micro_version(), but from the headers used at
// application compile time, rather than from the library linked against at
// application run time.
const MICRO_VERSION = 42

// MINOR_VERSION: like gtk_get_minor_version(), but from the headers used at
// application compile time, rather than from the library linked against at
// application run time.
const MINOR_VERSION = 24

// PAPER_NAME_A3: name for the A3 paper size.
const PAPER_NAME_A3 = "iso_a3"

// PAPER_NAME_A4: name for the A4 paper size.
const PAPER_NAME_A4 = "iso_a4"

// PAPER_NAME_A5: name for the A5 paper size.
const PAPER_NAME_A5 = "iso_a5"

// PAPER_NAME_B5: name for the B5 paper size.
const PAPER_NAME_B5 = "iso_b5"

// PAPER_NAME_EXECUTIVE: name for the Executive paper size.
const PAPER_NAME_EXECUTIVE = "na_executive"

// PAPER_NAME_LEGAL: name for the Legal paper size.
const PAPER_NAME_LEGAL = "na_legal"

// PAPER_NAME_LETTER: name for the Letter paper size.
const PAPER_NAME_LETTER = "na_letter"
const PATH_PRIO_MASK = 15
const PRINT_SETTINGS_COLLATE = "collate"
const PRINT_SETTINGS_DEFAULT_SOURCE = "default-source"
const PRINT_SETTINGS_DITHER = "dither"
const PRINT_SETTINGS_DUPLEX = "duplex"
const PRINT_SETTINGS_FINISHINGS = "finishings"
const PRINT_SETTINGS_MEDIA_TYPE = "media-type"
const PRINT_SETTINGS_NUMBER_UP = "number-up"
const PRINT_SETTINGS_NUMBER_UP_LAYOUT = "number-up-layout"
const PRINT_SETTINGS_N_COPIES = "n-copies"
const PRINT_SETTINGS_ORIENTATION = "orientation"

// PRINT_SETTINGS_OUTPUT_BASENAME: key used by the “Print to file” printer to
// store the file name of the output without the path to the directory and the
// file extension.
const PRINT_SETTINGS_OUTPUT_BASENAME = "output-basename"
const PRINT_SETTINGS_OUTPUT_BIN = "output-bin"

// PRINT_SETTINGS_OUTPUT_DIR: key used by the “Print to file” printer to store
// the directory to which the output should be written.
const PRINT_SETTINGS_OUTPUT_DIR = "output-dir"

// PRINT_SETTINGS_OUTPUT_FILE_FORMAT: key used by the “Print to file” printer to
// store the format of the output. The supported values are “PS” and “PDF”.
const PRINT_SETTINGS_OUTPUT_FILE_FORMAT = "output-file-format"

// PRINT_SETTINGS_OUTPUT_URI: key used by the “Print to file” printer to store
// the URI to which the output should be written. GTK+ itself supports only
// “file://” URIs.
const PRINT_SETTINGS_OUTPUT_URI = "output-uri"
const PRINT_SETTINGS_PAGE_RANGES = "page-ranges"
const PRINT_SETTINGS_PAGE_SET = "page-set"
const PRINT_SETTINGS_PAPER_FORMAT = "paper-format"
const PRINT_SETTINGS_PAPER_HEIGHT = "paper-height"
const PRINT_SETTINGS_PAPER_WIDTH = "paper-width"
const PRINT_SETTINGS_PRINTER = "printer"
const PRINT_SETTINGS_PRINTER_LPI = "printer-lpi"
const PRINT_SETTINGS_PRINT_PAGES = "print-pages"
const PRINT_SETTINGS_QUALITY = "quality"
const PRINT_SETTINGS_RESOLUTION = "resolution"
const PRINT_SETTINGS_RESOLUTION_X = "resolution-x"
const PRINT_SETTINGS_RESOLUTION_Y = "resolution-y"
const PRINT_SETTINGS_REVERSE = "reverse"
const PRINT_SETTINGS_SCALE = "scale"
const PRINT_SETTINGS_USE_COLOR = "use-color"
const PRINT_SETTINGS_WIN32_DRIVER_EXTRA = "win32-driver-extra"
const PRINT_SETTINGS_WIN32_DRIVER_VERSION = "win32-driver-version"

// PRIORITY_RESIZE: use this priority for functionality related to size
// allocation.
//
// It is used internally by GTK+ to compute the sizes of widgets. This priority
// is higher than GDK_PRIORITY_REDRAW to avoid resizing a widget which was just
// redrawn.
const PRIORITY_RESIZE = 110

// STOCK_ABOUT: “About” item. ! (help-about.png)
//
// Deprecated: Use named icon &quot;help-about&quot; or the label
// &quot;_About&quot;.
const STOCK_ABOUT = "gtk-about"

// STOCK_ADD: “Add” item and icon.
//
// Deprecated: Use named icon &quot;list-add&quot; or the label
// &quot;_Add&quot;.
const STOCK_ADD = "gtk-add"

// STOCK_APPLY: “Apply” item and icon.
//
// Deprecated: Do not use an icon. Use label &quot;_Apply&quot;.
const STOCK_APPLY = "gtk-apply"

// STOCK_BOLD: “Bold” item and icon.
//
// Deprecated: Use named icon &quot;format-text-bold&quot;.
const STOCK_BOLD = "gtk-bold"

// STOCK_CANCEL: “Cancel” item and icon.
//
// Deprecated: Do not use an icon. Use label &quot;_Cancel&quot;.
const STOCK_CANCEL = "gtk-cancel"

// STOCK_CAPS_LOCK_WARNING “Caps Lock Warning” icon.
//
// Deprecated: Use named icon &quot;dialog-warning-symbolic&quot;.
const STOCK_CAPS_LOCK_WARNING = "gtk-caps-lock-warning"

// STOCK_CDROM: “CD-Rom” item and icon.
//
// Deprecated: Use named icon &quot;media-optical&quot;.
const STOCK_CDROM = "gtk-cdrom"

// STOCK_CLEAR: “Clear” item and icon.
//
// Deprecated: Use named icon &quot;edit-clear&quot;.
const STOCK_CLEAR = "gtk-clear"

// STOCK_CLOSE: “Close” item and icon.
//
// Deprecated: Use named icon &quot;window-close&quot; or the label
// &quot;_Close&quot;.
const STOCK_CLOSE = "gtk-close"

// STOCK_COLOR_PICKER: “Color Picker” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_COLOR_PICKER = "gtk-color-picker"

// STOCK_CONNECT: “Connect” icon.
//
// Deprecated: since version 3.10.
const STOCK_CONNECT = "gtk-connect"

// STOCK_CONVERT: “Convert” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_CONVERT = "gtk-convert"

// STOCK_COPY: “Copy” item and icon.
//
// Deprecated: Use the named icon &quot;edit-copy&quot; or the label
// &quot;_Copy&quot;.
const STOCK_COPY = "gtk-copy"

// STOCK_CUT: “Cut” item and icon.
//
// Deprecated: Use the named icon &quot;edit-cut&quot; or the label
// &quot;Cu_t&quot;.
const STOCK_CUT = "gtk-cut"

// STOCK_DELETE: “Delete” item and icon.
//
// Deprecated: Use the named icon &quot;edit-delete&quot; or the label
// &quot;_Delete&quot;.
const STOCK_DELETE = "gtk-delete"

// STOCK_DIALOG_AUTHENTICATION: “Authentication” item and icon.
//
// Deprecated: Use named icon &quot;dialog-password&quot;.
const STOCK_DIALOG_AUTHENTICATION = "gtk-dialog-authentication"

// STOCK_DIALOG_ERROR: “Error” item and icon.
//
// Deprecated: Use named icon &quot;dialog-error&quot;.
const STOCK_DIALOG_ERROR = "gtk-dialog-error"

// STOCK_DIALOG_INFO: “Information” item and icon.
//
// Deprecated: Use named icon &quot;dialog-information&quot;.
const STOCK_DIALOG_INFO = "gtk-dialog-info"

// STOCK_DIALOG_QUESTION: “Question” item and icon.
//
// Deprecated: Use named icon &quot;dialog-question&quot;.
const STOCK_DIALOG_QUESTION = "gtk-dialog-question"

// STOCK_DIALOG_WARNING: “Warning” item and icon.
//
// Deprecated: Use named icon &quot;dialog-warning&quot;.
const STOCK_DIALOG_WARNING = "gtk-dialog-warning"

// STOCK_DIRECTORY: “Directory” icon.
//
// Deprecated: Use named icon &quot;folder&quot;.
const STOCK_DIRECTORY = "gtk-directory"

// STOCK_DISCARD: “Discard” item.
//
// Deprecated: since version 3.10.
const STOCK_DISCARD = "gtk-discard"

// STOCK_DISCONNECT: “Disconnect” icon.
//
// Deprecated: since version 3.10.
const STOCK_DISCONNECT = "gtk-disconnect"

// STOCK_DND: “Drag-And-Drop” icon.
//
// Deprecated: since version 3.10.
const STOCK_DND = "gtk-dnd"

// STOCK_DND_MULTIPLE: “Drag-And-Drop multiple” icon.
//
// Deprecated: since version 3.10.
const STOCK_DND_MULTIPLE = "gtk-dnd-multiple"

// STOCK_EDIT: “Edit” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_EDIT = "gtk-edit"

// STOCK_EXECUTE: “Execute” item and icon.
//
// Deprecated: Use named icon &quot;system-run&quot;.
const STOCK_EXECUTE = "gtk-execute"

// STOCK_FILE: “File” item and icon.
//
// Since 3.0, this item has a label, before it only had an icon.
//
// Deprecated: Use named icon &quot;text-x-generic&quot;.
const STOCK_FILE = "gtk-file"

// STOCK_FIND: “Find” item and icon.
//
// Deprecated: Use named icon &quot;edit-find&quot;.
const STOCK_FIND = "gtk-find"

// STOCK_FIND_AND_REPLACE: “Find and Replace” item and icon.
//
// Deprecated: Use named icon &quot;edit-find-replace&quot;.
const STOCK_FIND_AND_REPLACE = "gtk-find-and-replace"

// STOCK_FLOPPY: “Floppy” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_FLOPPY = "gtk-floppy"

// STOCK_FULLSCREEN: “Fullscreen” item and icon.
//
// Deprecated: Use named icon &quot;view-fullscreen&quot;.
const STOCK_FULLSCREEN = "gtk-fullscreen"

// STOCK_GOTO_BOTTOM: “Bottom” item and icon.
//
// Deprecated: Use named icon &quot;go-bottom&quot;.
const STOCK_GOTO_BOTTOM = "gtk-goto-bottom"

// STOCK_GOTO_FIRST: “First” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;go-first&quot;.
const STOCK_GOTO_FIRST = "gtk-goto-first"

// STOCK_GOTO_LAST: “Last” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;go-last&quot;.
const STOCK_GOTO_LAST = "gtk-goto-last"

// STOCK_GOTO_TOP: “Top” item and icon.
//
// Deprecated: Use named icon &quot;go-top&quot;.
const STOCK_GOTO_TOP = "gtk-goto-top"

// STOCK_GO_BACK: “Back” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;go-previous&quot;.
const STOCK_GO_BACK = "gtk-go-back"

// STOCK_GO_DOWN: “Down” item and icon.
//
// Deprecated: Use named icon &quot;go-down&quot;.
const STOCK_GO_DOWN = "gtk-go-down"

// STOCK_GO_FORWARD: “Forward” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;go-next&quot;.
const STOCK_GO_FORWARD = "gtk-go-forward"

// STOCK_GO_UP: “Up” item and icon.
//
// Deprecated: Use named icon &quot;go-up&quot;.
const STOCK_GO_UP = "gtk-go-up"

// STOCK_HARDDISK: “Harddisk” item and icon.
//
// Deprecated: Use named icon &quot;drive-harddisk&quot;.
const STOCK_HARDDISK = "gtk-harddisk"

// STOCK_HELP: “Help” item and icon.
//
// Deprecated: Use named icon &quot;help-browser&quot;.
const STOCK_HELP = "gtk-help"

// STOCK_HOME: “Home” item and icon.
//
// Deprecated: Use named icon &quot;go-home&quot;.
const STOCK_HOME = "gtk-home"

// STOCK_INDENT: “Indent” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;format-indent-more&quot;.
const STOCK_INDENT = "gtk-indent"

// STOCK_INDEX: “Index” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_INDEX = "gtk-index"

// STOCK_INFO: “Info” item and icon.
//
// Deprecated: Use named icon &quot;dialog-information&quot;.
const STOCK_INFO = "gtk-info"

// STOCK_ITALIC: “Italic” item and icon.
//
// Deprecated: Use named icon &quot;format-text-italic&quot;.
const STOCK_ITALIC = "gtk-italic"

// STOCK_JUMP_TO: “Jump to” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;go-jump&quot;.
const STOCK_JUMP_TO = "gtk-jump-to"

// STOCK_JUSTIFY_CENTER: “Center” item and icon.
//
// Deprecated: Use named icon &quot;format-justify-center&quot;.
const STOCK_JUSTIFY_CENTER = "gtk-justify-center"

// STOCK_JUSTIFY_FILL: “Fill” item and icon.
//
// Deprecated: Use named icon &quot;format-justify-fill&quot;.
const STOCK_JUSTIFY_FILL = "gtk-justify-fill"

// STOCK_JUSTIFY_LEFT: “Left” item and icon.
//
// Deprecated: Use named icon &quot;format-justify-left&quot;.
const STOCK_JUSTIFY_LEFT = "gtk-justify-left"

// STOCK_JUSTIFY_RIGHT: “Right” item and icon.
//
// Deprecated: Use named icon &quot;format-justify-right&quot;.
const STOCK_JUSTIFY_RIGHT = "gtk-justify-right"

// STOCK_LEAVE_FULLSCREEN: “Leave Fullscreen” item and icon.
//
// Deprecated: Use named icon &quot;view-restore&quot;.
const STOCK_LEAVE_FULLSCREEN = "gtk-leave-fullscreen"

// STOCK_MEDIA_FORWARD: “Media Forward” item and icon. The icon has an RTL
// variant.
//
// Deprecated: Use named icon &quot;media-seek-forward&quot; or the label
// &quot;_Forward&quot;.
const STOCK_MEDIA_FORWARD = "gtk-media-forward"

// STOCK_MEDIA_NEXT: “Media Next” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;media-skip-forward&quot; or the label
// &quot;_Next&quot;.
const STOCK_MEDIA_NEXT = "gtk-media-next"

// STOCK_MEDIA_PAUSE: “Media Pause” item and icon.
//
// Deprecated: Use named icon &quot;media-playback-pause&quot; or the label
// &quot;P_ause&quot;.
const STOCK_MEDIA_PAUSE = "gtk-media-pause"

// STOCK_MEDIA_PLAY: “Media Play” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;media-playback-start&quot; or the label
// &quot;_Play&quot;.
const STOCK_MEDIA_PLAY = "gtk-media-play"

// STOCK_MEDIA_PREVIOUS: “Media Previous” item and icon. The icon has an RTL
// variant.
//
// Deprecated: Use named icon &quot;media-skip-backward&quot; or the label
// &quot;Pre_vious&quot;.
const STOCK_MEDIA_PREVIOUS = "gtk-media-previous"

// STOCK_MEDIA_RECORD: “Media Record” item and icon.
//
// Deprecated: Use named icon &quot;media-record&quot; or the label
// &quot;_Record&quot;.
const STOCK_MEDIA_RECORD = "gtk-media-record"

// STOCK_MEDIA_REWIND: “Media Rewind” item and icon. The icon has an RTL
// variant.
//
// Deprecated: Use named icon &quot;media-seek-backward&quot; or the label
// &quot;R_ewind&quot;.
const STOCK_MEDIA_REWIND = "gtk-media-rewind"

// STOCK_MEDIA_STOP: “Media Stop” item and icon.
//
// Deprecated: Use named icon &quot;media-playback-stop&quot; or the label
// &quot;_Stop&quot;.
const STOCK_MEDIA_STOP = "gtk-media-stop"

// STOCK_MISSING_IMAGE: “Missing image” icon.
//
// Deprecated: Use named icon &quot;image-missing&quot;.
const STOCK_MISSING_IMAGE = "gtk-missing-image"

// STOCK_NETWORK: “Network” item and icon.
//
// Deprecated: Use named icon &quot;network-workgroup&quot;.
const STOCK_NETWORK = "gtk-network"

// STOCK_NEW: “New” item and icon.
//
// Deprecated: Use named icon &quot;document-new&quot; or the label
// &quot;_New&quot;.
const STOCK_NEW = "gtk-new"

// STOCK_NO: “No” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_NO = "gtk-no"

// STOCK_OK: “OK” item and icon.
//
// Deprecated: Do not use an icon. Use label &quot;_OK&quot;.
const STOCK_OK = "gtk-ok"

// STOCK_OPEN: “Open” item and icon.
//
// Deprecated: Use named icon &quot;document-open&quot; or the label
// &quot;_Open&quot;.
const STOCK_OPEN = "gtk-open"

// STOCK_ORIENTATION_LANDSCAPE: “Landscape Orientation” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_ORIENTATION_LANDSCAPE = "gtk-orientation-landscape"

// STOCK_ORIENTATION_PORTRAIT: “Portrait Orientation” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_ORIENTATION_PORTRAIT = "gtk-orientation-portrait"

// STOCK_ORIENTATION_REVERSE_LANDSCAPE: “Reverse Landscape Orientation” item and
// icon.
//
// Deprecated: since version 3.10.
const STOCK_ORIENTATION_REVERSE_LANDSCAPE = "gtk-orientation-reverse-landscape"

// STOCK_ORIENTATION_REVERSE_PORTRAIT: “Reverse Portrait Orientation” item and
// icon.
//
// Deprecated: since version 3.10.
const STOCK_ORIENTATION_REVERSE_PORTRAIT = "gtk-orientation-reverse-portrait"

// STOCK_PAGE_SETUP: “Page Setup” item and icon.
//
// Deprecated: Use named icon &quot;document-page-setup&quot; or the label
// &quot;Page Set_up&quot;.
const STOCK_PAGE_SETUP = "gtk-page-setup"

// STOCK_PASTE: “Paste” item and icon.
//
// Deprecated: Use named icon &quot;edit-paste&quot; or the label
// &quot;_Paste&quot;.
const STOCK_PASTE = "gtk-paste"

// STOCK_PREFERENCES: “Preferences” item and icon.
//
// Deprecated: Use named icon &quot;preferences-system&quot; or the label
// &quot;_Preferences&quot;.
const STOCK_PREFERENCES = "gtk-preferences"

// STOCK_PRINT: “Print” item and icon.
//
// Deprecated: Use named icon &quot;document-print&quot; or the label
// &quot;_Print&quot;.
const STOCK_PRINT = "gtk-print"

// STOCK_PRINT_ERROR: “Print Error” icon.
//
// Deprecated: Use named icon &quot;printer-error&quot;.
const STOCK_PRINT_ERROR = "gtk-print-error"

// STOCK_PRINT_PAUSED: “Print Paused” icon.
//
// Deprecated: since version 3.10.
const STOCK_PRINT_PAUSED = "gtk-print-paused"

// STOCK_PRINT_PREVIEW: “Print Preview” item and icon.
//
// Deprecated: Use label &quot;Pre_view&quot;.
const STOCK_PRINT_PREVIEW = "gtk-print-preview"

// STOCK_PRINT_REPORT: “Print Report” icon.
//
// Deprecated: since version 3.10.
const STOCK_PRINT_REPORT = "gtk-print-report"

// STOCK_PRINT_WARNING: “Print Warning” icon.
//
// Deprecated: since version 3.10.
const STOCK_PRINT_WARNING = "gtk-print-warning"

// STOCK_PROPERTIES: “Properties” item and icon.
//
// Deprecated: Use named icon &quot;document-properties&quot; or the label
// &quot;_Properties&quot;.
const STOCK_PROPERTIES = "gtk-properties"

// STOCK_QUIT: “Quit” item and icon.
//
// Deprecated: Use named icon &quot;application-exit&quot; or the label
// &quot;_Quit&quot;.
const STOCK_QUIT = "gtk-quit"

// STOCK_REDO: “Redo” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;edit-redo&quot; or the label
// &quot;_Redo&quot;.
const STOCK_REDO = "gtk-redo"

// STOCK_REFRESH: “Refresh” item and icon.
//
// Deprecated: Use named icon &quot;view-refresh&quot; or the label
// &quot;_Refresh&quot;.
const STOCK_REFRESH = "gtk-refresh"

// STOCK_REMOVE: “Remove” item and icon.
//
// Deprecated: Use named icon &quot;list-remove&quot; or the label
// &quot;_Remove&quot;.
const STOCK_REMOVE = "gtk-remove"

// STOCK_REVERT_TO_SAVED: “Revert” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;document-revert&quot; or the label
// &quot;_Revert&quot;.
const STOCK_REVERT_TO_SAVED = "gtk-revert-to-saved"

// STOCK_SAVE: “Save” item and icon.
//
// Deprecated: Use named icon &quot;document-save&quot; or the label
// &quot;_Save&quot;.
const STOCK_SAVE = "gtk-save"

// STOCK_SAVE_AS: “Save As” item and icon.
//
// Deprecated: Use named icon &quot;document-save-as&quot; or the label
// &quot;Save _As&quot;.
const STOCK_SAVE_AS = "gtk-save-as"

// STOCK_SELECT_ALL: “Select All” item and icon.
//
// Deprecated: Use named icon &quot;edit-select-all&quot; or the label
// &quot;Select _All&quot;.
const STOCK_SELECT_ALL = "gtk-select-all"

// STOCK_SELECT_COLOR: “Color” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_SELECT_COLOR = "gtk-select-color"

// STOCK_SELECT_FONT: “Font” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_SELECT_FONT = "gtk-select-font"

// STOCK_SORT_ASCENDING: “Ascending” item and icon.
//
// Deprecated: Use named icon &quot;view-sort-ascending&quot;.
const STOCK_SORT_ASCENDING = "gtk-sort-ascending"

// STOCK_SORT_DESCENDING: “Descending” item and icon.
//
// Deprecated: Use named icon &quot;view-sort-descending&quot;.
const STOCK_SORT_DESCENDING = "gtk-sort-descending"

// STOCK_SPELL_CHECK: “Spell Check” item and icon.
//
// Deprecated: Use named icon &quot;tools-check-spelling&quot;.
const STOCK_SPELL_CHECK = "gtk-spell-check"

// STOCK_STOP: “Stop” item and icon.
//
// Deprecated: Use named icon &quot;process-stop&quot; or the label
// &quot;_Stop&quot;.
const STOCK_STOP = "gtk-stop"

// STOCK_STRIKETHROUGH: “Strikethrough” item and icon.
//
// Deprecated: Use named icon &quot;format-text-strikethrough&quot; or the label
// &quot;_Strikethrough&quot;.
const STOCK_STRIKETHROUGH = "gtk-strikethrough"

// STOCK_UNDELETE: “Undelete” item and icon. The icon has an RTL variant.
//
// Deprecated: since version 3.10.
const STOCK_UNDELETE = "gtk-undelete"

// STOCK_UNDERLINE: “Underline” item and icon.
//
// Deprecated: Use named icon &quot;format-text-underline&quot; or the label
// &quot;_Underline&quot;.
const STOCK_UNDERLINE = "gtk-underline"

// STOCK_UNDO: “Undo” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;edit-undo&quot; or the label
// &quot;_Undo&quot;.
const STOCK_UNDO = "gtk-undo"

// STOCK_UNINDENT: “Unindent” item and icon. The icon has an RTL variant.
//
// Deprecated: Use named icon &quot;format-indent-less&quot;.
const STOCK_UNINDENT = "gtk-unindent"

// STOCK_YES: “Yes” item and icon.
//
// Deprecated: since version 3.10.
const STOCK_YES = "gtk-yes"

// STOCK_ZOOM_100: “Zoom 100%” item and icon.
//
// Deprecated: Use named icon &quot;zoom-original&quot; or the label
// &quot;_Normal Size&quot;.
const STOCK_ZOOM_100 = "gtk-zoom-100"

// STOCK_ZOOM_FIT: “Zoom to Fit” item and icon.
//
// Deprecated: Use named icon &quot;zoom-fit-best&quot; or the label &quot;Best
// _Fit&quot;.
const STOCK_ZOOM_FIT = "gtk-zoom-fit"

// STOCK_ZOOM_IN: “Zoom In” item and icon.
//
// Deprecated: Use named icon &quot;zoom-in&quot; or the label &quot;Zoom
// _In&quot;.
const STOCK_ZOOM_IN = "gtk-zoom-in"

// STOCK_ZOOM_OUT: “Zoom Out” item and icon.
//
// Deprecated: Use named icon &quot;zoom-out&quot; or the label &quot;Zoom
// _Out&quot;.
const STOCK_ZOOM_OUT = "gtk-zoom-out"

// STYLE_CLASS_ACCELERATOR: CSS class to match an accelerator.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_ACCELERATOR = "accelerator"

// STYLE_CLASS_ARROW: CSS class used when rendering an arrow element.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_ARROW = "arrow"

// STYLE_CLASS_BACKGROUND: CSS class to match the window background.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_BACKGROUND = "background"

// STYLE_CLASS_BOTTOM: CSS class to indicate an area at the bottom of a widget.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_BOTTOM = "bottom"

// STYLE_CLASS_BUTTON: CSS class to match buttons.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_BUTTON = "button"

// STYLE_CLASS_CALENDAR: CSS class to match calendars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CALENDAR = "calendar"

// STYLE_CLASS_CELL: CSS class to match content rendered in cell views.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CELL = "cell"

// STYLE_CLASS_CHECK: CSS class to match check boxes.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CHECK = "check"

// STYLE_CLASS_COMBOBOX_ENTRY: CSS class to match combobox entries.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_COMBOBOX_ENTRY = "combobox-entry"

// STYLE_CLASS_CONTEXT_MENU: CSS class to match context menus.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CONTEXT_MENU = "context-menu"

// STYLE_CLASS_CSD: CSS class that gets added to windows which have client-side
// decorations.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CSD = "csd"

// STYLE_CLASS_CURSOR_HANDLE: CSS class used when rendering a drag handle for
// text selection.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_CURSOR_HANDLE = "cursor-handle"

// STYLE_CLASS_DEFAULT: CSS class to match the default widget.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_DEFAULT = "default"

// STYLE_CLASS_DESTRUCTIVE_ACTION: CSS class used when an action (usually a
// button) is one that is expected to remove or destroy something visible to the
// user.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_DESTRUCTIVE_ACTION = "destructive-action"

// STYLE_CLASS_DIM_LABEL: CSS class to match dimmed labels.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_DIM_LABEL = "dim-label"

// STYLE_CLASS_DND: CSS class for a drag-and-drop indicator.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_DND = "dnd"

// STYLE_CLASS_DOCK: CSS class defining a dock area.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_DOCK = "dock"

// STYLE_CLASS_ENTRY: CSS class to match text entries.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_ENTRY = "entry"

// STYLE_CLASS_ERROR: CSS class for an area displaying an error message, such as
// those in infobars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_ERROR = "error"

// STYLE_CLASS_EXPANDER: CSS class defining an expander, such as those in
// treeviews.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_EXPANDER = "expander"

// STYLE_CLASS_FLAT: CSS class that is added when widgets that usually have a
// frame or border (like buttons or entries) should appear without it.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_FLAT = "flat"

// STYLE_CLASS_FRAME: CSS class defining a frame delimiting content, such as
// Frame or the scrolled window frame around the scrollable area.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_FRAME = "frame"

// STYLE_CLASS_GRIP: CSS class defining a resize grip.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_GRIP = "grip"

// STYLE_CLASS_HEADER: CSS class to match a header element.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_HEADER = "header"

// STYLE_CLASS_HIGHLIGHT: CSS class defining a highlighted area, such as
// headings in assistants and calendars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_HIGHLIGHT = "highlight"

// STYLE_CLASS_HORIZONTAL: CSS class for horizontally layered widgets.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_HORIZONTAL = "horizontal"

// STYLE_CLASS_IMAGE: CSS class defining an image, such as the icon in an entry.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_IMAGE = "image"

// STYLE_CLASS_INFO: CSS class for an area displaying an informational message,
// such as those in infobars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_INFO = "info"

// STYLE_CLASS_INLINE_TOOLBAR: CSS class to match inline toolbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_INLINE_TOOLBAR = "inline-toolbar"

// STYLE_CLASS_INSERTION_CURSOR: CSS class used when rendering a drag handle for
// the insertion cursor position.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_INSERTION_CURSOR = "insertion-cursor"

// STYLE_CLASS_LABEL: CSS class to match labels.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LABEL = "label"

// STYLE_CLASS_LEFT: CSS class to indicate an area at the left of a widget.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LEFT = "left"

// STYLE_CLASS_LEVEL_BAR: CSS class used when rendering a level indicator,
// such as a battery charge level, or a password strength.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LEVEL_BAR = "level-bar"

// STYLE_CLASS_LINKED: CSS class to match a linked area, such as a box
// containing buttons belonging to the same control.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LINKED = "linked"

// STYLE_CLASS_LIST: CSS class to match lists.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LIST = "list"

// STYLE_CLASS_LIST_ROW: CSS class to match list rows.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_LIST_ROW = "list-row"

// STYLE_CLASS_MARK: CSS class defining marks in a widget, such as in scales.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MARK = "mark"

// STYLE_CLASS_MENU: CSS class to match menus.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MENU = "menu"

// STYLE_CLASS_MENUBAR: CSS class to menubars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MENUBAR = "menubar"

// STYLE_CLASS_MENUITEM: CSS class to match menu items.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MENUITEM = "menuitem"

// STYLE_CLASS_MESSAGE_DIALOG: CSS class that is added to message dialogs.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MESSAGE_DIALOG = "message-dialog"

// STYLE_CLASS_MONOSPACE: CSS class that is added to text view that should use a
// monospace font.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_MONOSPACE = "monospace"

// STYLE_CLASS_NEEDS_ATTENTION: CSS class used when an element needs the user
// attention, for instance a button in a stack switcher corresponding to a
// hidden page that changed state.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_NEEDS_ATTENTION = "needs-attention"

// STYLE_CLASS_NOTEBOOK: CSS class defining a notebook.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_NOTEBOOK = "notebook"

// STYLE_CLASS_OSD: CSS class used when rendering an OSD (On Screen Display)
// element, on top of another container.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_OSD = "osd"

// STYLE_CLASS_OVERSHOOT: CSS class that is added on the visual hints that
// happen when scrolling is attempted past the limits of a scrollable area.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_OVERSHOOT = "overshoot"

// STYLE_CLASS_PANE_SEPARATOR: CSS class for a pane separator, such as those in
// Paned.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_PANE_SEPARATOR = "pane-separator"

// STYLE_CLASS_PAPER: CSS class that is added to areas that should look like
// paper.
//
// This is used in print previews and themes are encouraged to style it as black
// text on white background.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_PAPER = "paper"

// STYLE_CLASS_POPOVER: CSS class that matches popovers.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_POPOVER = "popover"

// STYLE_CLASS_POPUP: CSS class that is added to the toplevel windows used for
// menus.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_POPUP = "popup"

// STYLE_CLASS_PRIMARY_TOOLBAR: CSS class to match primary toolbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_PRIMARY_TOOLBAR = "primary-toolbar"

// STYLE_CLASS_PROGRESSBAR: CSS class to use when rendering activity as a
// progressbar.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_PROGRESSBAR = "progressbar"

// STYLE_CLASS_PULSE: CSS class to use when rendering a pulse in an
// indeterminate progress bar.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_PULSE = "pulse"

// STYLE_CLASS_QUESTION: CSS class for an area displaying a question to the
// user, such as those in infobars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_QUESTION = "question"

// STYLE_CLASS_RADIO: CSS class to match radio buttons.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_RADIO = "radio"

// STYLE_CLASS_RAISED: CSS class to match a raised control, such as a raised
// button on a toolbar.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_RAISED = "raised"

// STYLE_CLASS_READ_ONLY: CSS class used to indicate a read-only state.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_READ_ONLY = "read-only"

// STYLE_CLASS_RIGHT: CSS class to indicate an area at the right of a widget.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_RIGHT = "right"

// STYLE_CLASS_RUBBERBAND: CSS class to match the rubberband selection
// rectangle.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_RUBBERBAND = "rubberband"

// STYLE_CLASS_SCALE: CSS class to match scale widgets.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SCALE = "scale"

// STYLE_CLASS_SCALE_HAS_MARKS_ABOVE: CSS class to match scale widgets with
// marks attached, all the marks are above for horizontal Scale. left for
// vertical Scale.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SCALE_HAS_MARKS_ABOVE = "scale-has-marks-above"

// STYLE_CLASS_SCALE_HAS_MARKS_BELOW: CSS class to match scale widgets with
// marks attached, all the marks are below for horizontal Scale, right for
// vertical Scale.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SCALE_HAS_MARKS_BELOW = "scale-has-marks-below"

// STYLE_CLASS_SCROLLBAR: CSS class to match scrollbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SCROLLBAR = "scrollbar"

// STYLE_CLASS_SCROLLBARS_JUNCTION: CSS class to match the junction area between
// an horizontal and vertical scrollbar, when they’re both shown.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SCROLLBARS_JUNCTION = "scrollbars-junction"

// STYLE_CLASS_SEPARATOR: CSS class for a separator.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SEPARATOR = "separator"

// STYLE_CLASS_SIDEBAR: CSS class defining a sidebar, such as the left side in a
// file chooser.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SIDEBAR = "sidebar"

// STYLE_CLASS_SLIDER: CSS class to match sliders.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SLIDER = "slider"

// STYLE_CLASS_SPINBUTTON: CSS class defining an spinbutton.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SPINBUTTON = "spinbutton"

// STYLE_CLASS_SPINNER: CSS class to use when rendering activity as a “spinner”.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SPINNER = "spinner"

// STYLE_CLASS_STATUSBAR: CSS class to match statusbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_STATUSBAR = "statusbar"

// STYLE_CLASS_SUBTITLE: CSS class used for the subtitle label in a titlebar in
// a toplevel window.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SUBTITLE = "subtitle"

// STYLE_CLASS_SUGGESTED_ACTION: CSS class used when an action (usually a
// button) is the primary suggested action in a specific context.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_SUGGESTED_ACTION = "suggested-action"

// STYLE_CLASS_TITLE: CSS class used for the title label in a titlebar in a
// toplevel window.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TITLE = "title"

// STYLE_CLASS_TITLEBAR: CSS class used when rendering a titlebar in a toplevel
// window.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TITLEBAR = "titlebar"

// STYLE_CLASS_TOOLBAR: CSS class to match toolbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TOOLBAR = "toolbar"

// STYLE_CLASS_TOOLTIP: CSS class to match tooltip windows.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TOOLTIP = "tooltip"

// STYLE_CLASS_TOP: CSS class to indicate an area at the top of a widget.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TOP = "top"

// STYLE_CLASS_TOUCH_SELECTION: CSS class for touch selection popups on entries
// and text views.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TOUCH_SELECTION = "touch-selection"

// STYLE_CLASS_TROUGH: CSS class to match troughs, as in scrollbars and
// progressbars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_TROUGH = "trough"

// STYLE_CLASS_UNDERSHOOT: CSS class that is added on the visual hints that
// happen where content is 'scrolled off' and can be made visible by scrolling.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_UNDERSHOOT = "undershoot"

// STYLE_CLASS_VERTICAL: CSS class for vertically layered widgets.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_VERTICAL = "vertical"

// STYLE_CLASS_VIEW: CSS class defining a view, such as iconviews or treeviews.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_VIEW = "view"

// STYLE_CLASS_WARNING: CSS class for an area displaying a warning message,
// such as those in infobars.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_WARNING = "warning"

// STYLE_CLASS_WIDE: CSS class to indicate that a UI element should be 'wide'.
// Used by Paned.
//
// Refer to individual widget documentation for used style classes.
const STYLE_CLASS_WIDE = "wide"

// STYLE_PROPERTY_BACKGROUND_COLOR: property holding the background color of
// rendered elements as a RGBA.
const STYLE_PROPERTY_BACKGROUND_COLOR = "background-color"

// STYLE_PROPERTY_BACKGROUND_IMAGE: property holding the element’s background as
// a #cairo_pattern_t.
const STYLE_PROPERTY_BACKGROUND_IMAGE = "background-image"

// STYLE_PROPERTY_BORDER_COLOR: property holding the element’s border color as a
// RGBA.
const STYLE_PROPERTY_BORDER_COLOR = "border-color"

// STYLE_PROPERTY_BORDER_RADIUS: property holding the rendered element’s border
// radius in pixels as a #gint.
const STYLE_PROPERTY_BORDER_RADIUS = "border-radius"

// STYLE_PROPERTY_BORDER_STYLE: property holding the element’s border style as a
// BorderStyle.
const STYLE_PROPERTY_BORDER_STYLE = "border-style"

// STYLE_PROPERTY_BORDER_WIDTH: property holding the rendered element’s border
// width in pixels as a Border. The border is the intermediary spacing property
// of the padding/border/margin series.
//
// gtk_render_frame() uses this property to find out the frame line width,
// so Widgets rendering frames may need to add up this padding when requesting
// size.
const STYLE_PROPERTY_BORDER_WIDTH = "border-width"

// STYLE_PROPERTY_COLOR: property holding the foreground color of rendered
// elements as a RGBA.
const STYLE_PROPERTY_COLOR = "color"

// STYLE_PROPERTY_FONT: property holding the font properties used when rendering
// text as a FontDescription.
const STYLE_PROPERTY_FONT = "font"

// STYLE_PROPERTY_MARGIN: property holding the rendered element’s margin
// as a Border. The margin is defined as the spacing between the border of
// the element and its surrounding elements. It is external to Widget's
// size allocations, and the most external spacing property of the
// padding/border/margin series.
const STYLE_PROPERTY_MARGIN = "margin"

// STYLE_PROPERTY_PADDING: property holding the rendered element’s padding as
// a Border. The padding is defined as the spacing between the inner part of
// the element border and its child. It’s the innermost spacing property of the
// padding/border/margin series.
const STYLE_PROPERTY_PADDING = "padding"

// STYLE_PROVIDER_PRIORITY_APPLICATION: priority that can be used when adding a
// StyleProvider for application-specific style information.
const STYLE_PROVIDER_PRIORITY_APPLICATION = 600

// STYLE_PROVIDER_PRIORITY_FALLBACK: priority used for default style information
// that is used in the absence of themes.
//
// Note that this is not very useful for providing default styling for custom
// style classes - themes are likely to override styling provided at this
// priority with catch-all * {...} rules.
const STYLE_PROVIDER_PRIORITY_FALLBACK = 1

// STYLE_PROVIDER_PRIORITY_SETTINGS: priority used for style information
// provided via Settings.
//
// This priority is higher than K_STYLE_PROVIDER_PRIORITY_THEME to let settings
// override themes.
const STYLE_PROVIDER_PRIORITY_SETTINGS = 400

// STYLE_PROVIDER_PRIORITY_THEME: priority used for style information provided
// by themes.
const STYLE_PROVIDER_PRIORITY_THEME = 200

// STYLE_PROVIDER_PRIORITY_USER: priority used for the style information from
// XDG_CONFIG_HOME/gtk-3.0/gtk.css.
//
// You should not use priorities higher than this, to give the user the last
// word.
const STYLE_PROVIDER_PRIORITY_USER = 800

// STYLE_REGION_COLUMN: widget region name to define a treeview column.
//
// Deprecated: Don't use regions.
const STYLE_REGION_COLUMN = "column"

// STYLE_REGION_COLUMN_HEADER: widget region name to define a treeview column
// header.
//
// Deprecated: Don't use regions.
const STYLE_REGION_COLUMN_HEADER = "column-header"

// STYLE_REGION_ROW: widget region name to define a treeview row.
//
// Deprecated: Don't use regions.
const STYLE_REGION_ROW = "row"

// STYLE_REGION_TAB: widget region name to define a notebook tab.
//
// Deprecated: Don't use regions.
const STYLE_REGION_TAB = "tab"

// TEXT_VIEW_PRIORITY_VALIDATE: priority at which the text view validates
// onscreen lines in an idle job in the background.
const TEXT_VIEW_PRIORITY_VALIDATE = 125

// TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a TreeSortable use
// the default sort function.
//
// See also gtk_tree_sortable_set_sort_column_id().
const TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID = -1

// TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID:
// GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a TreeSortable
// use no sorting.
//
// See also gtk_tree_sortable_set_sort_column_id().
const TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID = -2

// Allocation of a widget represents region which has been allocated to
// the widget by its parent. It is a subregion of its parents allocation.
// See [GtkWidget’s geometry management section][geometry-management] for more
// information.
type Allocation = gdk.Rectangle

type Stock = string

// Align controls how a widget deals with extra space in a single (x or y)
// dimension.
//
// Alignment only matters if the widget receives a “too large” allocation, for
// example if you packed the widget with the Widget:expand flag inside a Box,
// then the widget might get extra space. If you have for example a 16x16 icon
// inside a 32x32 space, the icon could be scaled and stretched, it could be
// centered, or it could be positioned to one side of the space.
//
// Note that in horizontal context GTK_ALIGN_START and GTK_ALIGN_END are
// interpreted relative to text direction.
//
// GTK_ALIGN_BASELINE support for it is optional for containers and widgets,
// and it is only supported for vertical alignment. When its not supported by a
// child or a container it is treated as GTK_ALIGN_FILL.
type Align C.gint

const (
	// AlignFill: stretch to fill all space if possible, center if no meaningful
	// way to stretch.
	AlignFill Align = iota
	// AlignStart: snap to left or top side, leaving space on right or bottom.
	AlignStart
	// AlignEnd: snap to right or bottom side, leaving space on left or top.
	AlignEnd
	// AlignCenter: center natural width of widget inside the allocation.
	AlignCenter
	// AlignBaseline: align the widget according to the baseline. Since 3.10.
	AlignBaseline
)

func marshalAlign(p uintptr) (interface{}, error) {
	return Align(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for Align.
func (a Align) String() string {
	switch a {
	case AlignFill:
		return "Fill"
	case AlignStart:
		return "Start"
	case AlignEnd:
		return "End"
	case AlignCenter:
		return "Center"
	case AlignBaseline:
		return "Baseline"
	default:
		return fmt.Sprintf("Align(%d)", a)
	}
}

// ArrowPlacement: used to specify the placement of scroll arrows in scrolling
// menus.
type ArrowPlacement C.gint

const (
	// ArrowsBoth: place one arrow on each end of the menu.
	ArrowsBoth ArrowPlacement = iota
	// ArrowsStart: place both arrows at the top of the menu.
	ArrowsStart
	// ArrowsEnd: place both arrows at the bottom of the menu.
	ArrowsEnd
)

func marshalArrowPlacement(p uintptr) (interface{}, error) {
	return ArrowPlacement(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ArrowPlacement.
func (a ArrowPlacement) String() string {
	switch a {
	case ArrowsBoth:
		return "Both"
	case ArrowsStart:
		return "Start"
	case ArrowsEnd:
		return "End"
	default:
		return fmt.Sprintf("ArrowPlacement(%d)", a)
	}
}

// ArrowType: used to indicate the direction in which an arrow should point.
type ArrowType C.gint

const (
	// ArrowUp represents an upward pointing arrow.
	ArrowUp ArrowType = iota
	// ArrowDown represents a downward pointing arrow.
	ArrowDown
	// ArrowLeft represents a left pointing arrow.
	ArrowLeft
	// ArrowRight represents a right pointing arrow.
	ArrowRight
	// ArrowNone: no arrow. Since 2.10.
	ArrowNone
)

func marshalArrowType(p uintptr) (interface{}, error) {
	return ArrowType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ArrowType.
func (a ArrowType) String() string {
	switch a {
	case ArrowUp:
		return "Up"
	case ArrowDown:
		return "Down"
	case ArrowLeft:
		return "Left"
	case ArrowRight:
		return "Right"
	case ArrowNone:
		return "None"
	default:
		return fmt.Sprintf("ArrowType(%d)", a)
	}
}

// AssistantPageType: enum for determining the page role inside the Assistant.
// It's 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 C.gint

const (
	// AssistantPageContent: page has regular contents. Both the Back and
	// forward buttons will be shown.
	AssistantPageContent AssistantPageType = iota
	// AssistantPageIntro: page contains an introduction to the assistant task.
	// Only the Forward button will be shown if there is a next page.
	AssistantPageIntro
	// AssistantPageConfirm: page lets the user confirm or deny the changes.
	// The Back and Apply buttons will be shown.
	AssistantPageConfirm
	// AssistantPageSummary: page informs the user of the changes done. Only the
	// Close button will be shown.
	AssistantPageSummary
	// AssistantPageProgress: 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.
	AssistantPageProgress
	// AssistantPageCustom: 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().
	AssistantPageCustom
)

func marshalAssistantPageType(p uintptr) (interface{}, error) {
	return AssistantPageType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for AssistantPageType.
func (a AssistantPageType) String() string {
	switch a {
	case AssistantPageContent:
		return "Content"
	case AssistantPageIntro:
		return "Intro"
	case AssistantPageConfirm:
		return "Confirm"
	case AssistantPageSummary:
		return "Summary"
	case AssistantPageProgress:
		return "Progress"
	case AssistantPageCustom:
		return "Custom"
	default:
		return fmt.Sprintf("AssistantPageType(%d)", a)
	}
}

// BaselinePosition: whenever a container has some form of natural row it may
// align children in that row along a common typographical baseline. If the
// amount of verical space in the row is taller than the total requested height
// of the baseline-aligned children then it can use a BaselinePosition to select
// where to put the baseline inside the extra availible space.
type BaselinePosition C.gint

const (
	// BaselinePositionTop: align the baseline at the top.
	BaselinePositionTop BaselinePosition = iota
	// BaselinePositionCenter: center the baseline.
	BaselinePositionCenter
	// BaselinePositionBottom: align the baseline at the bottom.
	BaselinePositionBottom
)

func marshalBaselinePosition(p uintptr) (interface{}, error) {
	return BaselinePosition(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for BaselinePosition.
func (b BaselinePosition) String() string {
	switch b {
	case BaselinePositionTop:
		return "Top"
	case BaselinePositionCenter:
		return "Center"
	case BaselinePositionBottom:
		return "Bottom"
	default:
		return fmt.Sprintf("BaselinePosition(%d)", b)
	}
}

// BorderStyle describes how the border of a UI element should be rendered.
type BorderStyle C.gint

const (
	// BorderStyleNone: no visible border.
	BorderStyleNone BorderStyle = iota
	// BorderStyleSolid: single line segment.
	BorderStyleSolid
	// BorderStyleInset looks as if the content is sunken into the canvas.
	BorderStyleInset
	// BorderStyleOutset looks as if the content is coming out of the canvas.
	BorderStyleOutset
	// BorderStyleHidden: same as GTK_BORDER_STYLE_NONE.
	BorderStyleHidden
	// BorderStyleDotted series of round dots.
	BorderStyleDotted
	// BorderStyleDashed series of square-ended dashes.
	BorderStyleDashed
	// BorderStyleDouble: two parallel lines with some space between them.
	BorderStyleDouble
	// BorderStyleGroove looks as if it were carved in the canvas.
	BorderStyleGroove
	// BorderStyleRidge looks as if it were coming out of the canvas.
	BorderStyleRidge
)

func marshalBorderStyle(p uintptr) (interface{}, error) {
	return BorderStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for BorderStyle.
func (b BorderStyle) String() string {
	switch b {
	case BorderStyleNone:
		return "None"
	case BorderStyleSolid:
		return "Solid"
	case BorderStyleInset:
		return "Inset"
	case BorderStyleOutset:
		return "Outset"
	case BorderStyleHidden:
		return "Hidden"
	case BorderStyleDotted:
		return "Dotted"
	case BorderStyleDashed:
		return "Dashed"
	case BorderStyleDouble:
		return "Double"
	case BorderStyleGroove:
		return "Groove"
	case BorderStyleRidge:
		return "Ridge"
	default:
		return fmt.Sprintf("BorderStyle(%d)", b)
	}
}

// BuilderError: error codes that identify various errors that can occur while
// using Builder.
type BuilderError C.gint

const (
	// BuilderErrorInvalidTypeFunction: type-func attribute didn’t name a
	// function that returns a #GType.
	BuilderErrorInvalidTypeFunction BuilderError = iota
	// BuilderErrorUnhandledTag: input contained a tag that Builder can’t
	// handle.
	BuilderErrorUnhandledTag
	// BuilderErrorMissingAttribute: attribute that is required by Builder was
	// missing.
	BuilderErrorMissingAttribute
	// BuilderErrorInvalidAttribute found an attribute that it doesn’t
	// understand.
	BuilderErrorInvalidAttribute
	// BuilderErrorInvalidTag found a tag that it doesn’t understand.
	BuilderErrorInvalidTag
	// BuilderErrorMissingPropertyValue: required property value was missing.
	BuilderErrorMissingPropertyValue
	// BuilderErrorInvalidValue couldn’t parse some attribute value.
	BuilderErrorInvalidValue
	// BuilderErrorVersionMismatch: input file requires a newer version of GTK+.
	BuilderErrorVersionMismatch
	// BuilderErrorDuplicateID: object id occurred twice.
	BuilderErrorDuplicateID
	// BuilderErrorObjectTypeRefused: specified object type is of the same
	// type or derived from the type of the composite class being extended with
	// builder XML.
	BuilderErrorObjectTypeRefused
	// BuilderErrorTemplateMismatch: wrong type was specified in a composite
	// class’s template XML.
	BuilderErrorTemplateMismatch
	// BuilderErrorInvalidProperty: specified property is unknown for the object
	// class.
	BuilderErrorInvalidProperty
	// BuilderErrorInvalidSignal: specified signal is unknown for the object
	// class.
	BuilderErrorInvalidSignal
	// BuilderErrorInvalidID: object id is unknown.
	BuilderErrorInvalidID
)

func marshalBuilderError(p uintptr) (interface{}, error) {
	return BuilderError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for BuilderError.
func (b BuilderError) String() string {
	switch b {
	case BuilderErrorInvalidTypeFunction:
		return "InvalidTypeFunction"
	case BuilderErrorUnhandledTag:
		return "UnhandledTag"
	case BuilderErrorMissingAttribute:
		return "MissingAttribute"
	case BuilderErrorInvalidAttribute:
		return "InvalidAttribute"
	case BuilderErrorInvalidTag:
		return "InvalidTag"
	case BuilderErrorMissingPropertyValue:
		return "MissingPropertyValue"
	case BuilderErrorInvalidValue:
		return "InvalidValue"
	case BuilderErrorVersionMismatch:
		return "VersionMismatch"
	case BuilderErrorDuplicateID:
		return "DuplicateID"
	case BuilderErrorObjectTypeRefused:
		return "ObjectTypeRefused"
	case BuilderErrorTemplateMismatch:
		return "TemplateMismatch"
	case BuilderErrorInvalidProperty:
		return "InvalidProperty"
	case BuilderErrorInvalidSignal:
		return "InvalidSignal"
	case BuilderErrorInvalidID:
		return "InvalidID"
	default:
		return fmt.Sprintf("BuilderError(%d)", b)
	}
}

func BuilderErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_builder_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// ButtonBoxStyle: used to dictate the style that a ButtonBox uses to layout the
// buttons it contains.
type ButtonBoxStyle C.gint

const (
	// ButtonboxSpread buttons are evenly spread across the box.
	ButtonboxSpread ButtonBoxStyle = 1
	// ButtonboxEdge buttons are placed at the edges of the box.
	ButtonboxEdge ButtonBoxStyle = 2
	// ButtonboxStart buttons are grouped towards the start of the box, (on the
	// left for a HBox, or the top for a VBox).
	ButtonboxStart ButtonBoxStyle = 3
	// ButtonboxEnd buttons are grouped towards the end of the box, (on the
	// right for a HBox, or the bottom for a VBox).
	ButtonboxEnd ButtonBoxStyle = 4
	// ButtonboxCenter buttons are centered in the box. Since 2.12.
	ButtonboxCenter ButtonBoxStyle = 5
	// ButtonboxExpand buttons expand to fill the box. This entails giving
	// buttons a "linked" appearance, making button sizes homogeneous,
	// and setting spacing to 0 (same as calling gtk_box_set_homogeneous() and
	// gtk_box_set_spacing() manually). Since 3.12.
	ButtonboxExpand ButtonBoxStyle = 6
)

func marshalButtonBoxStyle(p uintptr) (interface{}, error) {
	return ButtonBoxStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ButtonBoxStyle.
func (b ButtonBoxStyle) String() string {
	switch b {
	case ButtonboxSpread:
		return "Spread"
	case ButtonboxEdge:
		return "Edge"
	case ButtonboxStart:
		return "Start"
	case ButtonboxEnd:
		return "End"
	case ButtonboxCenter:
		return "Center"
	case ButtonboxExpand:
		return "Expand"
	default:
		return fmt.Sprintf("ButtonBoxStyle(%d)", b)
	}
}

// ButtonRole: role specifies the desired appearance of a ModelButton.
type ButtonRole C.gint

const (
	// ButtonRoleNormal: plain button.
	ButtonRoleNormal ButtonRole = iota
	// ButtonRoleCheck: check button.
	ButtonRoleCheck
	// ButtonRoleRadio: radio button.
	ButtonRoleRadio
)

func marshalButtonRole(p uintptr) (interface{}, error) {
	return ButtonRole(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ButtonRole.
func (b ButtonRole) String() string {
	switch b {
	case ButtonRoleNormal:
		return "Normal"
	case ButtonRoleCheck:
		return "Check"
	case ButtonRoleRadio:
		return "Radio"
	default:
		return fmt.Sprintf("ButtonRole(%d)", b)
	}
}

// ButtonsType: prebuilt sets of buttons for the dialog. If none of
// these choices are appropriate, simply use GTK_BUTTONS_NONE then call
// gtk_dialog_add_buttons().
//
// > Please note that GTK_BUTTONS_OK, GTK_BUTTONS_YES_NO > and
// GTK_BUTTONS_OK_CANCEL are discouraged by the > GNOME Human Interface
// Guidelines (http://library.gnome.org/devel/hig-book/stable/).
type ButtonsType C.gint

const (
	// ButtonsNone: no buttons at all.
	ButtonsNone ButtonsType = iota
	// ButtonsOK: OK button.
	ButtonsOK
	// ButtonsClose: close button.
	ButtonsClose
	// ButtonsCancel: cancel button.
	ButtonsCancel
	// ButtonsYesNo yes and No buttons.
	ButtonsYesNo
	// ButtonsOKCancel: OK and Cancel buttons.
	ButtonsOKCancel
)

func marshalButtonsType(p uintptr) (interface{}, error) {
	return ButtonsType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ButtonsType.
func (b ButtonsType) String() string {
	switch b {
	case ButtonsNone:
		return "None"
	case ButtonsOK:
		return "OK"
	case ButtonsClose:
		return "Close"
	case ButtonsCancel:
		return "Cancel"
	case ButtonsYesNo:
		return "YesNo"
	case ButtonsOKCancel:
		return "OKCancel"
	default:
		return fmt.Sprintf("ButtonsType(%d)", b)
	}
}

// CellRendererAccelMode determines if the edited accelerators are GTK+
// accelerators. If they are, consumed modifiers are suppressed, only
// accelerators accepted by GTK+ are allowed, and the accelerators are rendered
// in the same way as they are in menus.
type CellRendererAccelMode C.gint

const (
	// CellRendererAccelModeGTK: GTK+ accelerators mode.
	CellRendererAccelModeGTK CellRendererAccelMode = iota
	// CellRendererAccelModeOther: other accelerator mode.
	CellRendererAccelModeOther
)

func marshalCellRendererAccelMode(p uintptr) (interface{}, error) {
	return CellRendererAccelMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for CellRendererAccelMode.
func (c CellRendererAccelMode) String() string {
	switch c {
	case CellRendererAccelModeGTK:
		return "GTK"
	case CellRendererAccelModeOther:
		return "Other"
	default:
		return fmt.Sprintf("CellRendererAccelMode(%d)", c)
	}
}

// CellRendererMode identifies how the user can interact with a particular cell.
type CellRendererMode C.gint

const (
	// CellRendererModeInert: cell is just for display and cannot be interacted
	// with. Note that this doesn’t mean that eg. the row being drawn can’t be
	// selected -- just that a particular element of it cannot be individually
	// modified.
	CellRendererModeInert CellRendererMode = iota
	// CellRendererModeActivatable: cell can be clicked.
	CellRendererModeActivatable
	// CellRendererModeEditable: cell can be edited or otherwise modified.
	CellRendererModeEditable
)

func marshalCellRendererMode(p uintptr) (interface{}, error) {
	return CellRendererMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for CellRendererMode.
func (c CellRendererMode) String() string {
	switch c {
	case CellRendererModeInert:
		return "Inert"
	case CellRendererModeActivatable:
		return "Activatable"
	case CellRendererModeEditable:
		return "Editable"
	default:
		return fmt.Sprintf("CellRendererMode(%d)", c)
	}
}

// CornerType specifies which corner a child widget should be placed in when
// packed into a ScrolledWindow. This is effectively the opposite of where the
// scroll bars are placed.
type CornerType C.gint

const (
	// CornerTopLeft: place the scrollbars on the right and bottom of the widget
	// (default behaviour).
	CornerTopLeft CornerType = iota
	// CornerBottomLeft: place the scrollbars on the top and right of the
	// widget.
	CornerBottomLeft
	// CornerTopRight: place the scrollbars on the left and bottom of the
	// widget.
	CornerTopRight
	// CornerBottomRight: place the scrollbars on the top and left of the
	// widget.
	CornerBottomRight
)

func marshalCornerType(p uintptr) (interface{}, error) {
	return CornerType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for CornerType.
func (c CornerType) String() string {
	switch c {
	case CornerTopLeft:
		return "TopLeft"
	case CornerBottomLeft:
		return "BottomLeft"
	case CornerTopRight:
		return "TopRight"
	case CornerBottomRight:
		return "BottomRight"
	default:
		return fmt.Sprintf("CornerType(%d)", c)
	}
}

// CSSProviderError: error codes for GTK_CSS_PROVIDER_ERROR.
type CSSProviderError C.gint

const (
	// CSSProviderErrorFailed: failed.
	CSSProviderErrorFailed CSSProviderError = iota
	// CSSProviderErrorSyntax: syntax error.
	CSSProviderErrorSyntax
	// CSSProviderErrorImport: import error.
	CSSProviderErrorImport
	// CSSProviderErrorName: name error.
	CSSProviderErrorName
	// CSSProviderErrorDeprecated: deprecation error.
	CSSProviderErrorDeprecated
	// CSSProviderErrorUnknownValue: unknown value.
	CSSProviderErrorUnknownValue
)

func marshalCSSProviderError(p uintptr) (interface{}, error) {
	return CSSProviderError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for CSSProviderError.
func (c CSSProviderError) String() string {
	switch c {
	case CSSProviderErrorFailed:
		return "Failed"
	case CSSProviderErrorSyntax:
		return "Syntax"
	case CSSProviderErrorImport:
		return "Import"
	case CSSProviderErrorName:
		return "Name"
	case CSSProviderErrorDeprecated:
		return "Deprecated"
	case CSSProviderErrorUnknownValue:
		return "UnknownValue"
	default:
		return fmt.Sprintf("CSSProviderError(%d)", c)
	}
}

func CSSProviderErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_css_provider_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// CSSSectionType: different types of sections indicate parts of a CSS document
// as parsed by GTK’s CSS parser. They are oriented towards the CSS Grammar
// (http://www.w3.org/TR/CSS21/grammar.html), but may contain extensions.
//
// More types might be added in the future as the parser incorporates more
// features.
type CSSSectionType C.gint

const (
	// CSSSectionDocument: section describes a complete document. This section
	// time is the only one where gtk_css_section_get_parent() might return
	// NULL.
	CSSSectionDocument CSSSectionType = iota
	// CSSSectionImport: section defines an import rule.
	CSSSectionImport
	// CSSSectionColorDefinition: section defines a color. This is a GTK
	// extension to CSS.
	CSSSectionColorDefinition
	// CSSSectionBindingSet: section defines a binding set. This is a GTK
	// extension to CSS.
	CSSSectionBindingSet
	// CSSSectionRuleset: section defines a CSS ruleset.
	CSSSectionRuleset
	// CSSSectionSelector: section defines a CSS selector.
	CSSSectionSelector
	// CSSSectionDeclaration: section defines the declaration of a CSS variable.
	CSSSectionDeclaration
	// CSSSectionValue: section defines the value of a CSS declaration.
	CSSSectionValue
	// CSSSectionKeyframes: section defines keyframes. See [CSS
	// Animations](http://dev.w3.org/csswg/css3-animations/#keyframes) for
	// details. Since 3.6.
	CSSSectionKeyframes
)

func marshalCSSSectionType(p uintptr) (interface{}, error) {
	return CSSSectionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for CSSSectionType.
func (c CSSSectionType) String() string {
	switch c {
	case CSSSectionDocument:
		return "Document"
	case CSSSectionImport:
		return "Import"
	case CSSSectionColorDefinition:
		return "ColorDefinition"
	case CSSSectionBindingSet:
		return "BindingSet"
	case CSSSectionRuleset:
		return "Ruleset"
	case CSSSectionSelector:
		return "Selector"
	case CSSSectionDeclaration:
		return "Declaration"
	case CSSSectionValue:
		return "Value"
	case CSSSectionKeyframes:
		return "Keyframes"
	default:
		return fmt.Sprintf("CSSSectionType(%d)", c)
	}
}

// DeleteType: see also: Entry::delete-from-cursor.
type DeleteType C.gint

const (
	// DeleteChars: delete characters.
	DeleteChars DeleteType = iota
	// DeleteWordEnds: delete only the portion of the word to the left/right of
	// cursor if we’re in the middle of a word.
	DeleteWordEnds
	// DeleteWords: delete words.
	DeleteWords
	// DeleteDisplayLines: delete display-lines. Display-lines refers to the
	// visible lines, with respect to to the current line breaks. As opposed to
	// paragraphs, which are defined by line breaks in the input.
	DeleteDisplayLines
	// DeleteDisplayLineEnds: delete only the portion of the display-line to the
	// left/right of cursor.
	DeleteDisplayLineEnds
	// DeleteParagraphEnds: delete to the end of the paragraph. Like C-k in
	// Emacs (or its reverse).
	DeleteParagraphEnds
	// DeleteParagraphs: delete entire line. Like C-k in pico.
	DeleteParagraphs
	// DeleteWhitespace: delete only whitespace. Like M-\ in Emacs.
	DeleteWhitespace
)

func marshalDeleteType(p uintptr) (interface{}, error) {
	return DeleteType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for DeleteType.
func (d DeleteType) String() string {
	switch d {
	case DeleteChars:
		return "Chars"
	case DeleteWordEnds:
		return "WordEnds"
	case DeleteWords:
		return "Words"
	case DeleteDisplayLines:
		return "DisplayLines"
	case DeleteDisplayLineEnds:
		return "DisplayLineEnds"
	case DeleteParagraphEnds:
		return "ParagraphEnds"
	case DeleteParagraphs:
		return "Paragraphs"
	case DeleteWhitespace:
		return "Whitespace"
	default:
		return fmt.Sprintf("DeleteType(%d)", d)
	}
}

// DirectionType focus movement types.
type DirectionType C.gint

const (
	// DirTabForward: move forward.
	DirTabForward DirectionType = iota
	// DirTabBackward: move backward.
	DirTabBackward
	// DirUp: move up.
	DirUp
	// DirDown: move down.
	DirDown
	// DirLeft: move left.
	DirLeft
	// DirRight: move right.
	DirRight
)

func marshalDirectionType(p uintptr) (interface{}, error) {
	return DirectionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for DirectionType.
func (d DirectionType) String() string {
	switch d {
	case DirTabForward:
		return "TabForward"
	case DirTabBackward:
		return "TabBackward"
	case DirUp:
		return "Up"
	case DirDown:
		return "Down"
	case DirLeft:
		return "Left"
	case DirRight:
		return "Right"
	default:
		return fmt.Sprintf("DirectionType(%d)", d)
	}
}

// DragResult gives an indication why a drag operation failed. The value can by
// obtained by connecting to the Widget::drag-failed signal.
type DragResult C.gint

const (
	// DragResultSuccess: drag operation was successful.
	DragResultSuccess DragResult = iota
	// DragResultNoTarget: no suitable drag target.
	DragResultNoTarget
	// DragResultUserCancelled: user cancelled the drag operation.
	DragResultUserCancelled
	// DragResultTimeoutExpired: drag operation timed out.
	DragResultTimeoutExpired
	// DragResultGrabBroken: pointer or keyboard grab used for the drag
	// operation was broken.
	DragResultGrabBroken
	// DragResultError: drag operation failed due to some unspecified error.
	DragResultError
)

func marshalDragResult(p uintptr) (interface{}, error) {
	return DragResult(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for DragResult.
func (d DragResult) String() string {
	switch d {
	case DragResultSuccess:
		return "Success"
	case DragResultNoTarget:
		return "NoTarget"
	case DragResultUserCancelled:
		return "UserCancelled"
	case DragResultTimeoutExpired:
		return "TimeoutExpired"
	case DragResultGrabBroken:
		return "GrabBroken"
	case DragResultError:
		return "Error"
	default:
		return fmt.Sprintf("DragResult(%d)", d)
	}
}

// EntryIconPosition specifies the side of the entry at which an icon is placed.
type EntryIconPosition C.gint

const (
	// EntryIconPrimary: at the beginning of the entry (depending on the text
	// direction).
	EntryIconPrimary EntryIconPosition = iota
	// EntryIconSecondary: at the end of the entry (depending on the text
	// direction).
	EntryIconSecondary
)

func marshalEntryIconPosition(p uintptr) (interface{}, error) {
	return EntryIconPosition(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for EntryIconPosition.
func (e EntryIconPosition) String() string {
	switch e {
	case EntryIconPrimary:
		return "Primary"
	case EntryIconSecondary:
		return "Secondary"
	default:
		return fmt.Sprintf("EntryIconPosition(%d)", e)
	}
}

// EventSequenceState describes the state of a EventSequence in a Gesture.
type EventSequenceState C.gint

const (
	// EventSequenceNone: sequence is handled, but not grabbed.
	EventSequenceNone EventSequenceState = iota
	// EventSequenceClaimed: sequence is handled and grabbed.
	EventSequenceClaimed
	// EventSequenceDenied: sequence is denied.
	EventSequenceDenied
)

func marshalEventSequenceState(p uintptr) (interface{}, error) {
	return EventSequenceState(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for EventSequenceState.
func (e EventSequenceState) String() string {
	switch e {
	case EventSequenceNone:
		return "None"
	case EventSequenceClaimed:
		return "Claimed"
	case EventSequenceDenied:
		return "Denied"
	default:
		return fmt.Sprintf("EventSequenceState(%d)", e)
	}
}

// ExpanderStyle: used to specify the style of the expanders drawn by a
// TreeView.
type ExpanderStyle C.gint

const (
	// ExpanderCollapsed: style used for a collapsed subtree.
	ExpanderCollapsed ExpanderStyle = iota
	// ExpanderSemiCollapsed: intermediate style used during animation.
	ExpanderSemiCollapsed
	// ExpanderSemiExpanded: intermediate style used during animation.
	ExpanderSemiExpanded
	// ExpanderExpanded: style used for an expanded subtree.
	ExpanderExpanded
)

func marshalExpanderStyle(p uintptr) (interface{}, error) {
	return ExpanderStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ExpanderStyle.
func (e ExpanderStyle) String() string {
	switch e {
	case ExpanderCollapsed:
		return "Collapsed"
	case ExpanderSemiCollapsed:
		return "SemiCollapsed"
	case ExpanderSemiExpanded:
		return "SemiExpanded"
	case ExpanderExpanded:
		return "Expanded"
	default:
		return fmt.Sprintf("ExpanderStyle(%d)", e)
	}
}

// FileChooserAction describes whether a FileChooser is being used to open
// existing files or to save to a possibly new file.
type FileChooserAction C.gint

const (
	// FileChooserActionOpen indicates open mode. The file chooser will only let
	// the user pick an existing file.
	FileChooserActionOpen FileChooserAction = iota
	// FileChooserActionSave indicates save mode. The file chooser will let the
	// user pick an existing file, or type in a new filename.
	FileChooserActionSave
	// FileChooserActionSelectFolder indicates an Open mode for selecting
	// folders. The file chooser will let the user pick an existing folder.
	FileChooserActionSelectFolder
	// FileChooserActionCreateFolder indicates a mode for creating a new folder.
	// The file chooser will let the user name an existing or new folder.
	FileChooserActionCreateFolder
)

func marshalFileChooserAction(p uintptr) (interface{}, error) {
	return FileChooserAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for FileChooserAction.
func (f FileChooserAction) String() string {
	switch f {
	case FileChooserActionOpen:
		return "Open"
	case FileChooserActionSave:
		return "Save"
	case FileChooserActionSelectFolder:
		return "SelectFolder"
	case FileChooserActionCreateFolder:
		return "CreateFolder"
	default:
		return fmt.Sprintf("FileChooserAction(%d)", f)
	}
}

// FileChooserConfirmation: used as a return value of handlers for the
// FileChooser::confirm-overwrite signal of a FileChooser. This value determines
// whether the file chooser will present the stock confirmation dialog, accept
// the user’s choice of a filename, or let the user choose another filename.
type FileChooserConfirmation C.gint

const (
	// FileChooserConfirmationConfirm: file chooser will present its stock
	// dialog to confirm about overwriting an existing file.
	FileChooserConfirmationConfirm FileChooserConfirmation = iota
	// FileChooserConfirmationAcceptFilename: file chooser will terminate and
	// accept the user’s choice of a file name.
	FileChooserConfirmationAcceptFilename
	// FileChooserConfirmationSelectAgain: file chooser will continue running,
	// so as to let the user select another file name.
	FileChooserConfirmationSelectAgain
)

func marshalFileChooserConfirmation(p uintptr) (interface{}, error) {
	return FileChooserConfirmation(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for FileChooserConfirmation.
func (f FileChooserConfirmation) String() string {
	switch f {
	case FileChooserConfirmationConfirm:
		return "Confirm"
	case FileChooserConfirmationAcceptFilename:
		return "AcceptFilename"
	case FileChooserConfirmationSelectAgain:
		return "SelectAgain"
	default:
		return fmt.Sprintf("FileChooserConfirmation(%d)", f)
	}
}

// FileChooserError: these identify the various errors that can occur while
// calling FileChooser functions.
type FileChooserError C.gint

const (
	// FileChooserErrorNonexistent indicates that a file does not exist.
	FileChooserErrorNonexistent FileChooserError = iota
	// FileChooserErrorBadFilename indicates a malformed filename.
	FileChooserErrorBadFilename
	// FileChooserErrorAlreadyExists indicates a duplicate path (e.g. when
	// adding a bookmark).
	FileChooserErrorAlreadyExists
	// FileChooserErrorIncompleteHostname indicates an incomplete hostname (e.g.
	// "http://foo" without a slash after that).
	FileChooserErrorIncompleteHostname
)

func marshalFileChooserError(p uintptr) (interface{}, error) {
	return FileChooserError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for FileChooserError.
func (f FileChooserError) String() string {
	switch f {
	case FileChooserErrorNonexistent:
		return "Nonexistent"
	case FileChooserErrorBadFilename:
		return "BadFilename"
	case FileChooserErrorAlreadyExists:
		return "AlreadyExists"
	case FileChooserErrorIncompleteHostname:
		return "IncompleteHostname"
	default:
		return fmt.Sprintf("FileChooserError(%d)", f)
	}
}

// FileChooserErrorQuark registers an error quark for FileChooser if necessary.
//
// The function returns the following values:
//
//   - quark: error quark used for FileChooser errors.
func FileChooserErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_file_chooser_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// IMPreeditStyle: style for input method preedit. See also
// Settings:gtk-im-preedit-style
//
// Deprecated: since version 3.10.
type IMPreeditStyle C.gint

const (
	// IMPreeditNothing: deprecated.
	IMPreeditNothing IMPreeditStyle = iota
	// IMPreeditCallback: deprecated.
	IMPreeditCallback
	// IMPreeditNone: deprecated.
	IMPreeditNone
)

func marshalIMPreeditStyle(p uintptr) (interface{}, error) {
	return IMPreeditStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for IMPreeditStyle.
func (i IMPreeditStyle) String() string {
	switch i {
	case IMPreeditNothing:
		return "Nothing"
	case IMPreeditCallback:
		return "Callback"
	case IMPreeditNone:
		return "None"
	default:
		return fmt.Sprintf("IMPreeditStyle(%d)", i)
	}
}

// IMStatusStyle: style for input method status. See also
// Settings:gtk-im-status-style
//
// Deprecated: since version 3.10.
type IMStatusStyle C.gint

const (
	// IMStatusNothing: deprecated.
	IMStatusNothing IMStatusStyle = iota
	// IMStatusCallback: deprecated.
	IMStatusCallback
	// IMStatusNone: deprecated.
	IMStatusNone
)

func marshalIMStatusStyle(p uintptr) (interface{}, error) {
	return IMStatusStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for IMStatusStyle.
func (i IMStatusStyle) String() string {
	switch i {
	case IMStatusNothing:
		return "Nothing"
	case IMStatusCallback:
		return "Callback"
	case IMStatusNone:
		return "None"
	default:
		return fmt.Sprintf("IMStatusStyle(%d)", i)
	}
}

// IconSize: built-in stock icon sizes.
type IconSize C.gint

const (
	// IconSizeInvalid: invalid size.
	IconSizeInvalid IconSize = iota
	// IconSizeMenu: size appropriate for menus (16px).
	IconSizeMenu
	// IconSizeSmallToolbar: size appropriate for small toolbars (16px).
	IconSizeSmallToolbar
	// IconSizeLargeToolbar: size appropriate for large toolbars (24px).
	IconSizeLargeToolbar
	// IconSizeButton: size appropriate for buttons (16px).
	IconSizeButton
	// IconSizeDND: size appropriate for drag and drop (32px).
	IconSizeDND
	// IconSizeDialog: size appropriate for dialogs (48px).
	IconSizeDialog
)

func marshalIconSize(p uintptr) (interface{}, error) {
	return IconSize(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for IconSize.
func (i IconSize) String() string {
	switch i {
	case IconSizeInvalid:
		return "Invalid"
	case IconSizeMenu:
		return "Menu"
	case IconSizeSmallToolbar:
		return "SmallToolbar"
	case IconSizeLargeToolbar:
		return "LargeToolbar"
	case IconSizeButton:
		return "Button"
	case IconSizeDND:
		return "DND"
	case IconSizeDialog:
		return "Dialog"
	default:
		return fmt.Sprintf("IconSize(%d)", i)
	}
}

// IconSizeFromName looks up the icon size associated with name.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - name to look up.
//
// The function returns the following values:
//
//   - gint: icon size (IconSize).
func IconSizeFromName(name string) int {
	var _arg1 *C.gchar      // out
	var _cret C.GtkIconSize // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_icon_size_from_name(_arg1)
	runtime.KeepAlive(name)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IconSizeGetName gets the canonical name of the given icon size. The returned
// string is statically allocated and should not be freed.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - size: IconSize.
//
// The function returns the following values:
//
//   - utf8: name of the given icon size.
func IconSizeGetName(size int) string {
	var _arg1 C.GtkIconSize // out
	var _cret *C.gchar      // in

	_arg1 = C.GtkIconSize(size)

	_cret = C.gtk_icon_size_get_name(_arg1)
	runtime.KeepAlive(size)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// IconSizeLookup obtains the pixel size of a semantic icon size size:
// K_ICON_SIZE_MENU, K_ICON_SIZE_BUTTON, etc. This function isn’t normally
// needed, gtk_icon_theme_load_icon() is the usual way to get an icon
// for rendering, then just look at the size of the rendered pixbuf.
// The rendered pixbuf may not even correspond to the width/height returned by
// gtk_icon_size_lookup(), because themes are free to render the pixbuf however
// they like, including changing the usual size.
//
// The function takes the following parameters:
//
//   - size: icon size (IconSize).
//
// The function returns the following values:
//
//   - width (optional): location to store icon width.
//   - height (optional): location to store icon height.
//   - ok: TRUE if size was a valid size.
func IconSizeLookup(size int) (width, height int, ok bool) {
	var _arg1 C.GtkIconSize // out
	var _arg2 C.gint        // in
	var _arg3 C.gint        // in
	var _cret C.gboolean    // in

	_arg1 = C.GtkIconSize(size)

	_cret = C.gtk_icon_size_lookup(_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(size)

	var _width int  // out
	var _height int // out
	var _ok bool    // out

	_width = int(_arg2)
	_height = int(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _width, _height, _ok
}

// IconSizeLookupForSettings obtains the pixel size of a semantic icon size,
// possibly modified by user preferences for a particular Settings. Normally
// size would be K_ICON_SIZE_MENU, K_ICON_SIZE_BUTTON, etc. This function isn’t
// normally needed, gtk_widget_render_icon_pixbuf() is the usual way to get
// an icon for rendering, then just look at the size of the rendered pixbuf.
// The rendered pixbuf may not even correspond to the width/height returned by
// gtk_icon_size_lookup(), because themes are free to render the pixbuf however
// they like, including changing the usual size.
//
// Deprecated: Use gtk_icon_size_lookup() instead.
//
// The function takes the following parameters:
//
//   - settings object, used to determine which set of user preferences to used.
//   - size: icon size (IconSize).
//
// The function returns the following values:
//
//   - width (optional): location to store icon width.
//   - height (optional): location to store icon height.
//   - ok: TRUE if size was a valid size.
func IconSizeLookupForSettings(settings *Settings, size int) (width, height int, ok bool) {
	var _arg1 *C.GtkSettings // out
	var _arg2 C.GtkIconSize  // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in
	var _cret C.gboolean     // in

	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_icon_size_lookup_for_settings(_arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(size)

	var _width int  // out
	var _height int // out
	var _ok bool    // out

	_width = int(_arg3)
	_height = int(_arg4)
	if _cret != 0 {
		_ok = true
	}

	return _width, _height, _ok
}

// IconSizeRegister registers a new icon size, along the same lines as
// K_ICON_SIZE_MENU, etc. Returns the integer value for the size.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - name of the icon size.
//   - width: icon width.
//   - height: icon height.
//
// The function returns the following values:
//
//   - gint: integer value representing the size (IconSize).
func IconSizeRegister(name string, width, height int) int {
	var _arg1 *C.gchar      // out
	var _arg2 C.gint        // out
	var _arg3 C.gint        // out
	var _cret C.GtkIconSize // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(width)
	_arg3 = C.gint(height)

	_cret = C.gtk_icon_size_register(_arg1, _arg2, _arg3)
	runtime.KeepAlive(name)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IconSizeRegisterAlias registers alias as another name for target. So calling
// gtk_icon_size_from_name() with alias as argument will return target.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - alias for target.
//   - target: existing icon size (IconSize).
func IconSizeRegisterAlias(alias string, target int) {
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(alias)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkIconSize(target)

	C.gtk_icon_size_register_alias(_arg1, _arg2)
	runtime.KeepAlive(alias)
	runtime.KeepAlive(target)
}

// IconThemeError: error codes for GtkIconTheme operations.
type IconThemeError C.gint

const (
	// IconThemeNotFound: icon specified does not exist in the theme.
	IconThemeNotFound IconThemeError = iota
	// IconThemeFailed: unspecified error occurred.
	IconThemeFailed
)

func marshalIconThemeError(p uintptr) (interface{}, error) {
	return IconThemeError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for IconThemeError.
func (i IconThemeError) String() string {
	switch i {
	case IconThemeNotFound:
		return "NotFound"
	case IconThemeFailed:
		return "Failed"
	default:
		return fmt.Sprintf("IconThemeError(%d)", i)
	}
}

func IconThemeErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_icon_theme_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// IconViewDropPosition: enum for determining where a dropped item goes.
type IconViewDropPosition C.gint

const (
	// IconViewNoDrop: no drop possible.
	IconViewNoDrop IconViewDropPosition = iota
	// IconViewDropInto: dropped item replaces the item.
	IconViewDropInto
	// IconViewDropLeft: droppped item is inserted to the left.
	IconViewDropLeft
	// IconViewDropRight: dropped item is inserted to the right.
	IconViewDropRight
	// IconViewDropAbove: dropped item is inserted above.
	IconViewDropAbove
	// IconViewDropBelow: dropped item is inserted below.
	IconViewDropBelow
)

func marshalIconViewDropPosition(p uintptr) (interface{}, error) {
	return IconViewDropPosition(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for IconViewDropPosition.
func (i IconViewDropPosition) String() string {
	switch i {
	case IconViewNoDrop:
		return "NoDrop"
	case IconViewDropInto:
		return "DropInto"
	case IconViewDropLeft:
		return "DropLeft"
	case IconViewDropRight:
		return "DropRight"
	case IconViewDropAbove:
		return "DropAbove"
	case IconViewDropBelow:
		return "DropBelow"
	default:
		return fmt.Sprintf("IconViewDropPosition(%d)", i)
	}
}

// ImageType describes the image data representation used by a Image.
// If you want to get the image from the widget, you can only get the
// currently-stored representation. e.g. if the gtk_image_get_storage_type()
// returns K_IMAGE_PIXBUF, then you can call gtk_image_get_pixbuf() but not
// gtk_image_get_stock(). For empty images, you can request any storage type
// (call any of the "get" functions), but they will all return NULL values.
type ImageType C.gint

const (
	// ImageEmpty: there is no image displayed by the widget.
	ImageEmpty ImageType = iota
	// ImagePixbuf: widget contains a Pixbuf.
	ImagePixbuf
	// ImageStock: widget contains a [stock item name][gtkstock].
	ImageStock
	// ImageIconSet: widget contains a IconSet.
	ImageIconSet
	// ImageAnimation: widget contains a PixbufAnimation.
	ImageAnimation
	// ImageIconName: widget contains a named icon. This image type was added in
	// GTK+ 2.6.
	ImageIconName
	// ImageGIcon: widget contains a #GIcon. This image type was added in GTK+
	// 2.14.
	ImageGIcon
	// ImageSurface: widget contains a #cairo_surface_t. This image type was
	// added in GTK+ 3.10.
	ImageSurface
)

func marshalImageType(p uintptr) (interface{}, error) {
	return ImageType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ImageType.
func (i ImageType) String() string {
	switch i {
	case ImageEmpty:
		return "Empty"
	case ImagePixbuf:
		return "Pixbuf"
	case ImageStock:
		return "Stock"
	case ImageIconSet:
		return "IconSet"
	case ImageAnimation:
		return "Animation"
	case ImageIconName:
		return "IconName"
	case ImageGIcon:
		return "GIcon"
	case ImageSurface:
		return "Surface"
	default:
		return fmt.Sprintf("ImageType(%d)", i)
	}
}

// InputPurpose describes primary purpose of the input widget. This information
// is useful for on-screen keyboards and similar input methods to decide which
// keys should be presented to the user.
//
// Note that the purpose is not meant to impose a totally strict rule about
// allowed characters, and does not replace input validation. It is fine for an
// on-screen keyboard to let the user override the character set restriction
// that is expressed by the purpose. The application is expected to validate the
// entry contents, even if it specified a purpose.
//
// The difference between GTK_INPUT_PURPOSE_DIGITS and GTK_INPUT_PURPOSE_NUMBER
// is that the former accepts only digits while the latter also some punctuation
// (like commas or points, plus, minus) and “e” or “E” as in 3.14E+000.
//
// This enumeration may be extended in the future; input methods should
// interpret unknown values as “free form”.
type InputPurpose C.gint

const (
	// InputPurposeFreeForm: allow any character.
	InputPurposeFreeForm InputPurpose = iota
	// InputPurposeAlpha: allow only alphabetic characters.
	InputPurposeAlpha
	// InputPurposeDigits: allow only digits.
	InputPurposeDigits
	// InputPurposeNumber: edited field expects numbers.
	InputPurposeNumber
	// InputPurposePhone: edited field expects phone number.
	InputPurposePhone
	// InputPurposeURL: edited field expects URL.
	InputPurposeURL
	// InputPurposeEmail: edited field expects email address.
	InputPurposeEmail
	// InputPurposeName: edited field expects the name of a person.
	InputPurposeName
	// InputPurposePassword: like GTK_INPUT_PURPOSE_FREE_FORM, but characters
	// are hidden.
	InputPurposePassword
	// InputPurposePIN: like GTK_INPUT_PURPOSE_DIGITS, but characters are
	// hidden.
	InputPurposePIN
	// InputPurposeTerminal: allow any character, in addition to control codes.
	InputPurposeTerminal
)

func marshalInputPurpose(p uintptr) (interface{}, error) {
	return InputPurpose(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for InputPurpose.
func (i InputPurpose) String() string {
	switch i {
	case InputPurposeFreeForm:
		return "FreeForm"
	case InputPurposeAlpha:
		return "Alpha"
	case InputPurposeDigits:
		return "Digits"
	case InputPurposeNumber:
		return "Number"
	case InputPurposePhone:
		return "Phone"
	case InputPurposeURL:
		return "URL"
	case InputPurposeEmail:
		return "Email"
	case InputPurposeName:
		return "Name"
	case InputPurposePassword:
		return "Password"
	case InputPurposePIN:
		return "PIN"
	case InputPurposeTerminal:
		return "Terminal"
	default:
		return fmt.Sprintf("InputPurpose(%d)", i)
	}
}

// Justification: used for justifying the text inside a Label widget. (See also
// Alignment).
type Justification C.gint

const (
	// JustifyLeft: text is placed at the left edge of the label.
	JustifyLeft Justification = iota
	// JustifyRight: text is placed at the right edge of the label.
	JustifyRight
	// JustifyCenter: text is placed in the center of the label.
	JustifyCenter
	// JustifyFill: text is placed is distributed across the label.
	JustifyFill
)

func marshalJustification(p uintptr) (interface{}, error) {
	return Justification(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for Justification.
func (j Justification) String() string {
	switch j {
	case JustifyLeft:
		return "Left"
	case JustifyRight:
		return "Right"
	case JustifyCenter:
		return "Center"
	case JustifyFill:
		return "Fill"
	default:
		return fmt.Sprintf("Justification(%d)", j)
	}
}

// LevelBarMode describes how LevelBar contents should be rendered. Note that
// this enumeration could be extended with additional modes in the future.
type LevelBarMode C.gint

const (
	// LevelBarModeContinuous: bar has a continuous mode.
	LevelBarModeContinuous LevelBarMode = iota
	// LevelBarModeDiscrete: bar has a discrete mode.
	LevelBarModeDiscrete
)

func marshalLevelBarMode(p uintptr) (interface{}, error) {
	return LevelBarMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for LevelBarMode.
func (l LevelBarMode) String() string {
	switch l {
	case LevelBarModeContinuous:
		return "Continuous"
	case LevelBarModeDiscrete:
		return "Discrete"
	default:
		return fmt.Sprintf("LevelBarMode(%d)", l)
	}
}

// License: type of license for an application.
//
// This enumeration can be expanded at later date.
type License C.gint

const (
	// LicenseUnknown: no license specified.
	LicenseUnknown License = iota
	// LicenseCustom: license text is going to be specified by the developer.
	LicenseCustom
	// LicenseGPL20: GNU General Public License, version 2.0 or later.
	LicenseGPL20
	// LicenseGPL30: GNU General Public License, version 3.0 or later.
	LicenseGPL30
	// LicenseLGPL21: GNU Lesser General Public License, version 2.1 or later.
	LicenseLGPL21
	// LicenseLGPL30: GNU Lesser General Public License, version 3.0 or later.
	LicenseLGPL30
	// LicenseBSD: BSD standard license.
	LicenseBSD
	// LicenseMITX11: MIT/X11 standard license.
	LicenseMITX11
	// LicenseArtistic: artistic License, version 2.0.
	LicenseArtistic
	// LicenseGPL20_Only: GNU General Public License, version 2.0 only. Since
	// 3.12.
	LicenseGPL20_Only
	// LicenseGPL30_Only: GNU General Public License, version 3.0 only. Since
	// 3.12.
	LicenseGPL30_Only
	// LicenseLGPL21_Only: GNU Lesser General Public License, version 2.1 only.
	// Since 3.12.
	LicenseLGPL21_Only
	// LicenseLGPL30_Only: GNU Lesser General Public License, version 3.0 only.
	// Since 3.12.
	LicenseLGPL30_Only
	// LicenseAGPL30: GNU Affero General Public License, version 3.0 or later.
	// Since: 3.22.
	LicenseAGPL30
	// LicenseAGPL30_Only: GNU Affero General Public License, version 3.0 only.
	// Since: 3.22.27.
	LicenseAGPL30_Only
	// LicenseBSD3: 3-clause BSD licence. Since: 3.24.20.
	LicenseBSD3
	// LicenseApache20: apache License, version 2.0. Since: 3.24.20.
	LicenseApache20
	// LicenseMPL20: mozilla Public License, version 2.0. Since: 3.24.20.
	LicenseMPL20
)

func marshalLicense(p uintptr) (interface{}, error) {
	return License(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for License.
func (l License) String() string {
	switch l {
	case LicenseUnknown:
		return "Unknown"
	case LicenseCustom:
		return "Custom"
	case LicenseGPL20:
		return "GPL20"
	case LicenseGPL30:
		return "GPL30"
	case LicenseLGPL21:
		return "LGPL21"
	case LicenseLGPL30:
		return "LGPL30"
	case LicenseBSD:
		return "BSD"
	case LicenseMITX11:
		return "MITX11"
	case LicenseArtistic:
		return "Artistic"
	case LicenseGPL20_Only:
		return "GPL20_Only"
	case LicenseGPL30_Only:
		return "GPL30_Only"
	case LicenseLGPL21_Only:
		return "LGPL21_Only"
	case LicenseLGPL30_Only:
		return "LGPL30_Only"
	case LicenseAGPL30:
		return "AGPL30"
	case LicenseAGPL30_Only:
		return "AGPL30_Only"
	case LicenseBSD3:
		return "BSD3"
	case LicenseApache20:
		return "Apache20"
	case LicenseMPL20:
		return "MPL20"
	default:
		return fmt.Sprintf("License(%d)", l)
	}
}

// MenuDirectionType: enumeration representing directional movements within a
// menu.
type MenuDirectionType C.gint

const (
	// MenuDirParent: to the parent menu shell.
	MenuDirParent MenuDirectionType = iota
	// MenuDirChild: to the submenu, if any, associated with the item.
	MenuDirChild
	// MenuDirNext: to the next menu item.
	MenuDirNext
	// MenuDirPrev: to the previous menu item.
	MenuDirPrev
)

func marshalMenuDirectionType(p uintptr) (interface{}, error) {
	return MenuDirectionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for MenuDirectionType.
func (m MenuDirectionType) String() string {
	switch m {
	case MenuDirParent:
		return "Parent"
	case MenuDirChild:
		return "Child"
	case MenuDirNext:
		return "Next"
	case MenuDirPrev:
		return "Prev"
	default:
		return fmt.Sprintf("MenuDirectionType(%d)", m)
	}
}

// MessageType: type of message being displayed in the dialog.
type MessageType C.gint

const (
	// MessageInfo: informational message.
	MessageInfo MessageType = iota
	// MessageWarning: non-fatal warning message.
	MessageWarning
	// MessageQuestion: question requiring a choice.
	MessageQuestion
	// MessageError: fatal error message.
	MessageError
	// MessageOther: none of the above.
	MessageOther
)

func marshalMessageType(p uintptr) (interface{}, error) {
	return MessageType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for MessageType.
func (m MessageType) String() string {
	switch m {
	case MessageInfo:
		return "Info"
	case MessageWarning:
		return "Warning"
	case MessageQuestion:
		return "Question"
	case MessageError:
		return "Error"
	case MessageOther:
		return "Other"
	default:
		return fmt.Sprintf("MessageType(%d)", m)
	}
}

type MovementStep C.gint

const (
	// MovementLogicalPositions: move forward or back by graphemes.
	MovementLogicalPositions MovementStep = iota
	// MovementVisualPositions: move left or right by graphemes.
	MovementVisualPositions
	// MovementWords: move forward or back by words.
	MovementWords
	// MovementDisplayLines: move up or down lines (wrapped lines).
	MovementDisplayLines
	// MovementDisplayLineEnds: move to either end of a line.
	MovementDisplayLineEnds
	// MovementParagraphs: move up or down paragraphs (newline-ended lines).
	MovementParagraphs
	// MovementParagraphEnds: move to either end of a paragraph.
	MovementParagraphEnds
	// MovementPages: move by pages.
	MovementPages
	// MovementBufferEnds: move to ends of the buffer.
	MovementBufferEnds
	// MovementHorizontalPages: move horizontally by pages.
	MovementHorizontalPages
)

func marshalMovementStep(p uintptr) (interface{}, error) {
	return MovementStep(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for MovementStep.
func (m MovementStep) String() string {
	switch m {
	case MovementLogicalPositions:
		return "LogicalPositions"
	case MovementVisualPositions:
		return "VisualPositions"
	case MovementWords:
		return "Words"
	case MovementDisplayLines:
		return "DisplayLines"
	case MovementDisplayLineEnds:
		return "DisplayLineEnds"
	case MovementParagraphs:
		return "Paragraphs"
	case MovementParagraphEnds:
		return "ParagraphEnds"
	case MovementPages:
		return "Pages"
	case MovementBufferEnds:
		return "BufferEnds"
	case MovementHorizontalPages:
		return "HorizontalPages"
	default:
		return fmt.Sprintf("MovementStep(%d)", m)
	}
}

type NotebookTab C.gint

const (
	NotebookTabFirst NotebookTab = iota
	NotebookTabLast
)

func marshalNotebookTab(p uintptr) (interface{}, error) {
	return NotebookTab(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for NotebookTab.
func (n NotebookTab) String() string {
	switch n {
	case NotebookTabFirst:
		return "First"
	case NotebookTabLast:
		return "Last"
	default:
		return fmt.Sprintf("NotebookTab(%d)", n)
	}
}

// NumberUpLayout: used to determine the layout of pages on a sheet when
// printing multiple pages per sheet.
type NumberUpLayout C.gint

const (
	// NumberUpLayoutLeftToRightTopToBottom: ! (layout-lrtb.png).
	NumberUpLayoutLeftToRightTopToBottom NumberUpLayout = iota
	// NumberUpLayoutLeftToRightBottomToTop: ! (layout-lrbt.png).
	NumberUpLayoutLeftToRightBottomToTop
	// NumberUpLayoutRightToLeftTopToBottom: ! (layout-rltb.png).
	NumberUpLayoutRightToLeftTopToBottom
	// NumberUpLayoutRightToLeftBottomToTop: ! (layout-rlbt.png).
	NumberUpLayoutRightToLeftBottomToTop
	// NumberUpLayoutTopToBottomLeftToRight: ! (layout-tblr.png).
	NumberUpLayoutTopToBottomLeftToRight
	// NumberUpLayoutTopToBottomRightToLeft: ! (layout-tbrl.png).
	NumberUpLayoutTopToBottomRightToLeft
	// NumberUpLayoutBottomToTopLeftToRight: ! (layout-btlr.png).
	NumberUpLayoutBottomToTopLeftToRight
	// NumberUpLayoutBottomToTopRightToLeft: ! (layout-btrl.png).
	NumberUpLayoutBottomToTopRightToLeft
)

func marshalNumberUpLayout(p uintptr) (interface{}, error) {
	return NumberUpLayout(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for NumberUpLayout.
func (n NumberUpLayout) String() string {
	switch n {
	case NumberUpLayoutLeftToRightTopToBottom:
		return "Lrtb"
	case NumberUpLayoutLeftToRightBottomToTop:
		return "Lrbt"
	case NumberUpLayoutRightToLeftTopToBottom:
		return "Rltb"
	case NumberUpLayoutRightToLeftBottomToTop:
		return "Rlbt"
	case NumberUpLayoutTopToBottomLeftToRight:
		return "Tblr"
	case NumberUpLayoutTopToBottomRightToLeft:
		return "Tbrl"
	case NumberUpLayoutBottomToTopLeftToRight:
		return "Btlr"
	case NumberUpLayoutBottomToTopRightToLeft:
		return "Btrl"
	default:
		return fmt.Sprintf("NumberUpLayout(%d)", n)
	}
}

// Orientation represents the orientation of widgets and other objects which
// can be switched between horizontal and vertical orientation on the fly,
// like Toolbar or GesturePan.
type Orientation C.gint

const (
	// OrientationHorizontal: element is in horizontal orientation.
	OrientationHorizontal Orientation = iota
	// OrientationVertical: element is in vertical orientation.
	OrientationVertical
)

func marshalOrientation(p uintptr) (interface{}, error) {
	return Orientation(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for Orientation.
func (o Orientation) String() string {
	switch o {
	case OrientationHorizontal:
		return "Horizontal"
	case OrientationVertical:
		return "Vertical"
	default:
		return fmt.Sprintf("Orientation(%d)", o)
	}
}

// PackDirection determines how widgets should be packed inside menubars and
// menuitems contained in menubars.
type PackDirection C.gint

const (
	// PackDirectionLTR widgets are packed left-to-right.
	PackDirectionLTR PackDirection = iota
	// PackDirectionRTL widgets are packed right-to-left.
	PackDirectionRTL
	// PackDirectionTtb widgets are packed top-to-bottom.
	PackDirectionTtb
	// PackDirectionBtt widgets are packed bottom-to-top.
	PackDirectionBtt
)

func marshalPackDirection(p uintptr) (interface{}, error) {
	return PackDirection(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PackDirection.
func (p PackDirection) String() string {
	switch p {
	case PackDirectionLTR:
		return "LTR"
	case PackDirectionRTL:
		return "RTL"
	case PackDirectionTtb:
		return "Ttb"
	case PackDirectionBtt:
		return "Btt"
	default:
		return fmt.Sprintf("PackDirection(%d)", p)
	}
}

// PackType represents the packing location Box children. (See: VBox, HBox,
// and ButtonBox).
type PackType C.gint

const (
	// PackStart: child is packed into the start of the box.
	PackStart PackType = iota
	// PackEnd: child is packed into the end of the box.
	PackEnd
)

func marshalPackType(p uintptr) (interface{}, error) {
	return PackType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PackType.
func (p PackType) String() string {
	switch p {
	case PackStart:
		return "Start"
	case PackEnd:
		return "End"
	default:
		return fmt.Sprintf("PackType(%d)", p)
	}
}

// PadActionType: type of a pad action.
type PadActionType C.gint

const (
	// PadActionButton: action is triggered by a pad button.
	PadActionButton PadActionType = iota
	// PadActionRing: action is triggered by a pad ring.
	PadActionRing
	// PadActionStrip: action is triggered by a pad strip.
	PadActionStrip
)

func marshalPadActionType(p uintptr) (interface{}, error) {
	return PadActionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PadActionType.
func (p PadActionType) String() string {
	switch p {
	case PadActionButton:
		return "Button"
	case PadActionRing:
		return "Ring"
	case PadActionStrip:
		return "Strip"
	default:
		return fmt.Sprintf("PadActionType(%d)", p)
	}
}

// PageOrientation: see also gtk_print_settings_set_orientation().
type PageOrientation C.gint

const (
	// PageOrientationPortrait: portrait mode.
	PageOrientationPortrait PageOrientation = iota
	// PageOrientationLandscape: landscape mode.
	PageOrientationLandscape
	// PageOrientationReversePortrait: reverse portrait mode.
	PageOrientationReversePortrait
	// PageOrientationReverseLandscape: reverse landscape mode.
	PageOrientationReverseLandscape
)

func marshalPageOrientation(p uintptr) (interface{}, error) {
	return PageOrientation(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PageOrientation.
func (p PageOrientation) String() string {
	switch p {
	case PageOrientationPortrait:
		return "Portrait"
	case PageOrientationLandscape:
		return "Landscape"
	case PageOrientationReversePortrait:
		return "ReversePortrait"
	case PageOrientationReverseLandscape:
		return "ReverseLandscape"
	default:
		return fmt.Sprintf("PageOrientation(%d)", p)
	}
}

// PageSet: see also gtk_print_job_set_page_set().
type PageSet C.gint

const (
	// PageSetAll: all pages.
	PageSetAll PageSet = iota
	// PageSetEven: even pages.
	PageSetEven
	// PageSetOdd: odd pages.
	PageSetOdd
)

func marshalPageSet(p uintptr) (interface{}, error) {
	return PageSet(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PageSet.
func (p PageSet) String() string {
	switch p {
	case PageSetAll:
		return "All"
	case PageSetEven:
		return "Even"
	case PageSetOdd:
		return "Odd"
	default:
		return fmt.Sprintf("PageSet(%d)", p)
	}
}

// PanDirection describes the panning direction of a GesturePan.
type PanDirection C.gint

const (
	// PanDirectionLeft: panned towards the left.
	PanDirectionLeft PanDirection = iota
	// PanDirectionRight: panned towards the right.
	PanDirectionRight
	// PanDirectionUp: panned upwards.
	PanDirectionUp
	// PanDirectionDown: panned downwards.
	PanDirectionDown
)

func marshalPanDirection(p uintptr) (interface{}, error) {
	return PanDirection(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PanDirection.
func (p PanDirection) String() string {
	switch p {
	case PanDirectionLeft:
		return "Left"
	case PanDirectionRight:
		return "Right"
	case PanDirectionUp:
		return "Up"
	case PanDirectionDown:
		return "Down"
	default:
		return fmt.Sprintf("PanDirection(%d)", p)
	}
}

// PathPriorityType priorities for path lookups. See also
// gtk_binding_set_add_path().
//
// Deprecated: since version 3.0.
type PathPriorityType C.gint

const (
	// PathPrioLowest: deprecated.
	PathPrioLowest PathPriorityType = 0
	// PathPrioGTK: deprecated.
	PathPrioGTK PathPriorityType = 4
	// PathPrioApplication: deprecated.
	PathPrioApplication PathPriorityType = 8
	// PathPrioTheme: deprecated.
	PathPrioTheme PathPriorityType = 10
	// PathPrioRC: deprecated.
	PathPrioRC PathPriorityType = 12
	// PathPrioHighest: deprecated.
	PathPrioHighest PathPriorityType = 15
)

func marshalPathPriorityType(p uintptr) (interface{}, error) {
	return PathPriorityType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PathPriorityType.
func (p PathPriorityType) String() string {
	switch p {
	case PathPrioLowest:
		return "Lowest"
	case PathPrioGTK:
		return "GTK"
	case PathPrioApplication:
		return "Application"
	case PathPrioTheme:
		return "Theme"
	case PathPrioRC:
		return "RC"
	case PathPrioHighest:
		return "Highest"
	default:
		return fmt.Sprintf("PathPriorityType(%d)", p)
	}
}

// PathType: widget path types. See also gtk_binding_set_add_path().
//
// Deprecated: since version 3.0.
type PathType C.gint

const (
	// PathWidget: deprecated.
	PathWidget PathType = iota
	// PathWidgetClass: deprecated.
	PathWidgetClass
	// PathClass: deprecated.
	PathClass
)

func marshalPathType(p uintptr) (interface{}, error) {
	return PathType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PathType.
func (p PathType) String() string {
	switch p {
	case PathWidget:
		return "Widget"
	case PathWidgetClass:
		return "WidgetClass"
	case PathClass:
		return "Class"
	default:
		return fmt.Sprintf("PathType(%d)", p)
	}
}

// PolicyType determines how the size should be computed to achieve the one of
// the visibility mode for the scrollbars.
type PolicyType C.gint

const (
	// PolicyAlways: scrollbar is always visible. The view size is independent
	// of the content.
	PolicyAlways PolicyType = iota
	// PolicyAutomatic: scrollbar will appear and disappear as necessary.
	// For example, when all of a TreeView can not be seen.
	PolicyAutomatic
	// PolicyNever: scrollbar should never appear. In this mode the content
	// determines the size.
	PolicyNever
	// PolicyExternal: don't show a scrollbar, but don't force the size to
	// follow the content. This can be used e.g. to make multiple scrolled
	// windows share a scrollbar. Since: 3.16.
	PolicyExternal
)

func marshalPolicyType(p uintptr) (interface{}, error) {
	return PolicyType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PolicyType.
func (p PolicyType) String() string {
	switch p {
	case PolicyAlways:
		return "Always"
	case PolicyAutomatic:
		return "Automatic"
	case PolicyNever:
		return "Never"
	case PolicyExternal:
		return "External"
	default:
		return fmt.Sprintf("PolicyType(%d)", p)
	}
}

// PopoverConstraint describes constraints to positioning of popovers. More
// values may be added to this enumeration in the future.
type PopoverConstraint C.gint

const (
	// PopoverConstraintNone: don't constrain the popover position beyond what
	// is imposed by the implementation.
	PopoverConstraintNone PopoverConstraint = iota
	// PopoverConstraintWindow: constrain the popover to the boundaries of the
	// window that it is attached to.
	PopoverConstraintWindow
)

func marshalPopoverConstraint(p uintptr) (interface{}, error) {
	return PopoverConstraint(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PopoverConstraint.
func (p PopoverConstraint) String() string {
	switch p {
	case PopoverConstraintNone:
		return "None"
	case PopoverConstraintWindow:
		return "Window"
	default:
		return fmt.Sprintf("PopoverConstraint(%d)", p)
	}
}

// PositionType describes which edge of a widget a certain feature is positioned
// at, e.g. the tabs of a Notebook, the handle of a HandleBox or the label of a
// Scale.
type PositionType C.gint

const (
	// PosLeft: feature is at the left edge.
	PosLeft PositionType = iota
	// PosRight: feature is at the right edge.
	PosRight
	// PosTop: feature is at the top edge.
	PosTop
	// PosBottom: feature is at the bottom edge.
	PosBottom
)

func marshalPositionType(p uintptr) (interface{}, error) {
	return PositionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PositionType.
func (p PositionType) String() string {
	switch p {
	case PosLeft:
		return "Left"
	case PosRight:
		return "Right"
	case PosTop:
		return "Top"
	case PosBottom:
		return "Bottom"
	default:
		return fmt.Sprintf("PositionType(%d)", p)
	}
}

// PrintDuplex: see also gtk_print_settings_set_duplex().
type PrintDuplex C.gint

const (
	// PrintDuplexSimplex: no duplex.
	PrintDuplexSimplex PrintDuplex = iota
	// PrintDuplexHorizontal: horizontal duplex.
	PrintDuplexHorizontal
	// PrintDuplexVertical: vertical duplex.
	PrintDuplexVertical
)

func marshalPrintDuplex(p uintptr) (interface{}, error) {
	return PrintDuplex(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintDuplex.
func (p PrintDuplex) String() string {
	switch p {
	case PrintDuplexSimplex:
		return "Simplex"
	case PrintDuplexHorizontal:
		return "Horizontal"
	case PrintDuplexVertical:
		return "Vertical"
	default:
		return fmt.Sprintf("PrintDuplex(%d)", p)
	}
}

// PrintError: error codes that identify various errors that can occur while
// using the GTK+ printing support.
type PrintError C.gint

const (
	// PrintErrorGeneral: unspecified error occurred.
	PrintErrorGeneral PrintError = iota
	// PrintErrorInternalError: internal error occurred.
	PrintErrorInternalError
	// PrintErrorNOMEM: memory allocation failed.
	PrintErrorNOMEM
	// PrintErrorInvalidFile: error occurred while loading a page setup or paper
	// size from a key file.
	PrintErrorInvalidFile
)

func marshalPrintError(p uintptr) (interface{}, error) {
	return PrintError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintError.
func (p PrintError) String() string {
	switch p {
	case PrintErrorGeneral:
		return "General"
	case PrintErrorInternalError:
		return "InternalError"
	case PrintErrorNOMEM:
		return "NOMEM"
	case PrintErrorInvalidFile:
		return "InvalidFile"
	default:
		return fmt.Sprintf("PrintError(%d)", p)
	}
}

// PrintErrorQuark registers an error quark for PrintOperation if necessary.
//
// The function returns the following values:
//
//   - quark: error quark used for PrintOperation errors.
func PrintErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_print_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// PrintOperationAction: action parameter to gtk_print_operation_run()
// determines what action the print operation should perform.
type PrintOperationAction C.gint

const (
	// PrintOperationActionPrintDialog: show the print dialog.
	PrintOperationActionPrintDialog PrintOperationAction = iota
	// PrintOperationActionPrint: start to print without showing the print
	// dialog, based on the current print settings.
	PrintOperationActionPrint
	// PrintOperationActionPreview: show the print preview.
	PrintOperationActionPreview
	// PrintOperationActionExport: export to a file. This requires the
	// export-filename property to be set.
	PrintOperationActionExport
)

func marshalPrintOperationAction(p uintptr) (interface{}, error) {
	return PrintOperationAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintOperationAction.
func (p PrintOperationAction) String() string {
	switch p {
	case PrintOperationActionPrintDialog:
		return "PrintDialog"
	case PrintOperationActionPrint:
		return "Print"
	case PrintOperationActionPreview:
		return "Preview"
	case PrintOperationActionExport:
		return "Export"
	default:
		return fmt.Sprintf("PrintOperationAction(%d)", p)
	}
}

// PrintOperationResult: value of this type is returned by
// gtk_print_operation_run().
type PrintOperationResult C.gint

const (
	// PrintOperationResultError: error has occurred.
	PrintOperationResultError PrintOperationResult = iota
	// PrintOperationResultApply: print settings should be stored.
	PrintOperationResultApply
	// PrintOperationResultCancel: print operation has been canceled, the print
	// settings should not be stored.
	PrintOperationResultCancel
	// PrintOperationResultInProgress: print operation is not complete yet.
	// This value will only be returned when running asynchronously.
	PrintOperationResultInProgress
)

func marshalPrintOperationResult(p uintptr) (interface{}, error) {
	return PrintOperationResult(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintOperationResult.
func (p PrintOperationResult) String() string {
	switch p {
	case PrintOperationResultError:
		return "Error"
	case PrintOperationResultApply:
		return "Apply"
	case PrintOperationResultCancel:
		return "Cancel"
	case PrintOperationResultInProgress:
		return "InProgress"
	default:
		return fmt.Sprintf("PrintOperationResult(%d)", p)
	}
}

// PrintPages: see also gtk_print_job_set_pages().
type PrintPages C.gint

const (
	// PrintPagesAll: all pages.
	PrintPagesAll PrintPages = iota
	// PrintPagesCurrent: current page.
	PrintPagesCurrent
	// PrintPagesRanges: range of pages.
	PrintPagesRanges
	// PrintPagesSelection: selected pages.
	PrintPagesSelection
)

func marshalPrintPages(p uintptr) (interface{}, error) {
	return PrintPages(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintPages.
func (p PrintPages) String() string {
	switch p {
	case PrintPagesAll:
		return "All"
	case PrintPagesCurrent:
		return "Current"
	case PrintPagesRanges:
		return "Ranges"
	case PrintPagesSelection:
		return "Selection"
	default:
		return fmt.Sprintf("PrintPages(%d)", p)
	}
}

// PrintQuality: see also gtk_print_settings_set_quality().
type PrintQuality C.gint

const (
	// PrintQualityLow: low quality.
	PrintQualityLow PrintQuality = iota
	// PrintQualityNormal: normal quality.
	PrintQualityNormal
	// PrintQualityHigh: high quality.
	PrintQualityHigh
	// PrintQualityDraft: draft quality.
	PrintQualityDraft
)

func marshalPrintQuality(p uintptr) (interface{}, error) {
	return PrintQuality(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintQuality.
func (p PrintQuality) String() string {
	switch p {
	case PrintQualityLow:
		return "Low"
	case PrintQualityNormal:
		return "Normal"
	case PrintQualityHigh:
		return "High"
	case PrintQualityDraft:
		return "Draft"
	default:
		return fmt.Sprintf("PrintQuality(%d)", p)
	}
}

// PrintStatus status gives a rough indication of the completion of a running
// print operation.
type PrintStatus C.gint

const (
	// PrintStatusInitial: printing has not started yet; this status is set
	// initially, and while the print dialog is shown.
	PrintStatusInitial PrintStatus = iota
	// PrintStatusPreparing: this status is set while the begin-print signal is
	// emitted and during pagination.
	PrintStatusPreparing
	// PrintStatusGeneratingData: this status is set while the pages are being
	// rendered.
	PrintStatusGeneratingData
	// PrintStatusSendingData: print job is being sent off to the printer.
	PrintStatusSendingData
	// PrintStatusPending: print job has been sent to the printer, but is not
	// printed for some reason, e.g. the printer may be stopped.
	PrintStatusPending
	// PrintStatusPendingIssue: some problem has occurred during printing, e.g.
	// a paper jam.
	PrintStatusPendingIssue
	// PrintStatusPrinting: printer is processing the print job.
	PrintStatusPrinting
	// PrintStatusFinished: printing has been completed successfully.
	PrintStatusFinished
	// PrintStatusFinishedAborted: printing has been aborted.
	PrintStatusFinishedAborted
)

func marshalPrintStatus(p uintptr) (interface{}, error) {
	return PrintStatus(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PrintStatus.
func (p PrintStatus) String() string {
	switch p {
	case PrintStatusInitial:
		return "Initial"
	case PrintStatusPreparing:
		return "Preparing"
	case PrintStatusGeneratingData:
		return "GeneratingData"
	case PrintStatusSendingData:
		return "SendingData"
	case PrintStatusPending:
		return "Pending"
	case PrintStatusPendingIssue:
		return "PendingIssue"
	case PrintStatusPrinting:
		return "Printing"
	case PrintStatusFinished:
		return "Finished"
	case PrintStatusFinishedAborted:
		return "FinishedAborted"
	default:
		return fmt.Sprintf("PrintStatus(%d)", p)
	}
}

// PropagationPhase describes the stage at which events are fed into a
// EventController.
type PropagationPhase C.gint

const (
	// PhaseNone events are not delivered automatically. Those can be manually
	// fed through gtk_event_controller_handle_event(). This should only be used
	// when full control about when, or whether the controller handles the event
	// is needed.
	PhaseNone PropagationPhase = iota
	// PhaseCapture events are delivered in the capture phase. The capture phase
	// happens before the bubble phase, runs from the toplevel down to the event
	// widget. This option should only be used on containers that might possibly
	// handle events before their children do.
	PhaseCapture
	// PhaseBubble events are delivered in the bubble phase. The bubble phase
	// happens after the capture phase, and before the default handlers are run.
	// This phase runs from the event widget, up to the toplevel.
	PhaseBubble
	// PhaseTarget events are delivered in the default widget event handlers,
	// note that widget implementations must chain up on button, motion,
	// touch and grab broken handlers for controllers in this phase to be run.
	PhaseTarget
)

func marshalPropagationPhase(p uintptr) (interface{}, error) {
	return PropagationPhase(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for PropagationPhase.
func (p PropagationPhase) String() string {
	switch p {
	case PhaseNone:
		return "None"
	case PhaseCapture:
		return "Capture"
	case PhaseBubble:
		return "Bubble"
	case PhaseTarget:
		return "Target"
	default:
		return fmt.Sprintf("PropagationPhase(%d)", p)
	}
}

// RCTokenType enumeration represents the tokens in the RC file. It is exposed
// so that theme engines can reuse these tokens when parsing the theme-engine
// specific portions of a RC file.
//
// Deprecated: Use CssProvider instead.
type RCTokenType C.gint

const (
	// RCTokenInvalid: deprecated.
	RCTokenInvalid RCTokenType = 270
	// RCTokenInclude: deprecated.
	RCTokenInclude RCTokenType = 271
	// RCTokenNormal: deprecated.
	RCTokenNormal RCTokenType = 272
	// RCTokenActive: deprecated.
	RCTokenActive RCTokenType = 273
	// RCTokenPrelight: deprecated.
	RCTokenPrelight RCTokenType = 274
	// RCTokenSelected: deprecated.
	RCTokenSelected RCTokenType = 275
	// RCTokenInsensitive: deprecated.
	RCTokenInsensitive RCTokenType = 276
	// RCTokenFg: deprecated.
	RCTokenFg RCTokenType = 277
	// RCTokenBg: deprecated.
	RCTokenBg RCTokenType = 278
	// RCTokenText: deprecated.
	RCTokenText RCTokenType = 279
	// RCTokenBase: deprecated.
	RCTokenBase RCTokenType = 280
	// RCTokenXthickness: deprecated.
	RCTokenXthickness RCTokenType = 281
	// RCTokenYthickness: deprecated.
	RCTokenYthickness RCTokenType = 282
	// RCTokenFont: deprecated.
	RCTokenFont RCTokenType = 283
	// RCTokenFontset: deprecated.
	RCTokenFontset RCTokenType = 284
	// RCTokenFontName: deprecated.
	RCTokenFontName RCTokenType = 285
	// RCTokenBgPixmap: deprecated.
	RCTokenBgPixmap RCTokenType = 286
	// RCTokenPixmapPath: deprecated.
	RCTokenPixmapPath RCTokenType = 287
	// RCTokenStyle: deprecated.
	RCTokenStyle RCTokenType = 288
	// RCTokenBinding: deprecated.
	RCTokenBinding RCTokenType = 289
	// RCTokenBind: deprecated.
	RCTokenBind RCTokenType = 290
	// RCTokenWidget: deprecated.
	RCTokenWidget RCTokenType = 291
	// RCTokenWidgetClass: deprecated.
	RCTokenWidgetClass RCTokenType = 292
	// RCTokenClass: deprecated.
	RCTokenClass RCTokenType = 293
	// RCTokenLowest: deprecated.
	RCTokenLowest RCTokenType = 294
	// RCTokenGTK: deprecated.
	RCTokenGTK RCTokenType = 295
	// RCTokenApplication: deprecated.
	RCTokenApplication RCTokenType = 296
	// RCTokenTheme: deprecated.
	RCTokenTheme RCTokenType = 297
	// RCTokenRC: deprecated.
	RCTokenRC RCTokenType = 298
	// RCTokenHighest: deprecated.
	RCTokenHighest RCTokenType = 299
	// RCTokenEngine: deprecated.
	RCTokenEngine RCTokenType = 300
	// RCTokenModulePath: deprecated.
	RCTokenModulePath RCTokenType = 301
	// RCTokenIMModulePath: deprecated.
	RCTokenIMModulePath RCTokenType = 302
	// RCTokenIMModuleFile: deprecated.
	RCTokenIMModuleFile RCTokenType = 303
	// RCTokenStock: deprecated.
	RCTokenStock RCTokenType = 304
	// RCTokenLTR: deprecated.
	RCTokenLTR RCTokenType = 305
	// RCTokenRTL: deprecated.
	RCTokenRTL RCTokenType = 306
	// RCTokenColor: deprecated.
	RCTokenColor RCTokenType = 307
	// RCTokenUnbind: deprecated.
	RCTokenUnbind RCTokenType = 308
	// RCTokenLast: deprecated.
	RCTokenLast RCTokenType = 309
)

func marshalRCTokenType(p uintptr) (interface{}, error) {
	return RCTokenType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for RCTokenType.
func (r RCTokenType) String() string {
	switch r {
	case RCTokenInvalid:
		return "Invalid"
	case RCTokenInclude:
		return "Include"
	case RCTokenNormal:
		return "Normal"
	case RCTokenActive:
		return "Active"
	case RCTokenPrelight:
		return "Prelight"
	case RCTokenSelected:
		return "Selected"
	case RCTokenInsensitive:
		return "Insensitive"
	case RCTokenFg:
		return "Fg"
	case RCTokenBg:
		return "Bg"
	case RCTokenText:
		return "Text"
	case RCTokenBase:
		return "Base"
	case RCTokenXthickness:
		return "Xthickness"
	case RCTokenYthickness:
		return "Ythickness"
	case RCTokenFont:
		return "Font"
	case RCTokenFontset:
		return "Fontset"
	case RCTokenFontName:
		return "FontName"
	case RCTokenBgPixmap:
		return "BgPixmap"
	case RCTokenPixmapPath:
		return "PixmapPath"
	case RCTokenStyle:
		return "Style"
	case RCTokenBinding:
		return "Binding"
	case RCTokenBind:
		return "Bind"
	case RCTokenWidget:
		return "Widget"
	case RCTokenWidgetClass:
		return "WidgetClass"
	case RCTokenClass:
		return "Class"
	case RCTokenLowest:
		return "Lowest"
	case RCTokenGTK:
		return "GTK"
	case RCTokenApplication:
		return "Application"
	case RCTokenTheme:
		return "Theme"
	case RCTokenRC:
		return "RC"
	case RCTokenHighest:
		return "Highest"
	case RCTokenEngine:
		return "Engine"
	case RCTokenModulePath:
		return "ModulePath"
	case RCTokenIMModulePath:
		return "IMModulePath"
	case RCTokenIMModuleFile:
		return "IMModuleFile"
	case RCTokenStock:
		return "Stock"
	case RCTokenLTR:
		return "LTR"
	case RCTokenRTL:
		return "RTL"
	case RCTokenColor:
		return "Color"
	case RCTokenUnbind:
		return "Unbind"
	case RCTokenLast:
		return "Last"
	default:
		return fmt.Sprintf("RCTokenType(%d)", r)
	}
}

// RecentChooserError: these identify the various errors that can occur while
// calling RecentChooser functions.
type RecentChooserError C.gint

const (
	// RecentChooserErrorNotFound indicates that a file does not exist.
	RecentChooserErrorNotFound RecentChooserError = iota
	// RecentChooserErrorInvalidURI indicates a malformed URI.
	RecentChooserErrorInvalidURI
)

func marshalRecentChooserError(p uintptr) (interface{}, error) {
	return RecentChooserError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for RecentChooserError.
func (r RecentChooserError) String() string {
	switch r {
	case RecentChooserErrorNotFound:
		return "NotFound"
	case RecentChooserErrorInvalidURI:
		return "InvalidURI"
	default:
		return fmt.Sprintf("RecentChooserError(%d)", r)
	}
}

func RecentChooserErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_recent_chooser_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// RecentManagerError: error codes for RecentManager operations.
type RecentManagerError C.gint

const (
	// RecentManagerErrorNotFound: URI specified does not exists in the recently
	// used resources list.
	RecentManagerErrorNotFound RecentManagerError = iota
	// RecentManagerErrorInvalidURI: URI specified is not valid.
	RecentManagerErrorInvalidURI
	// RecentManagerErrorInvalidEncoding: supplied string is not UTF-8 encoded.
	RecentManagerErrorInvalidEncoding
	// RecentManagerErrorNotRegistered: no application has registered the
	// specified item.
	RecentManagerErrorNotRegistered
	// RecentManagerErrorRead: failure while reading the recently used resources
	// file.
	RecentManagerErrorRead
	// RecentManagerErrorWrite: failure while writing the recently used
	// resources file.
	RecentManagerErrorWrite
	// RecentManagerErrorUnknown: unspecified error.
	RecentManagerErrorUnknown
)

func marshalRecentManagerError(p uintptr) (interface{}, error) {
	return RecentManagerError(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for RecentManagerError.
func (r RecentManagerError) String() string {
	switch r {
	case RecentManagerErrorNotFound:
		return "NotFound"
	case RecentManagerErrorInvalidURI:
		return "InvalidURI"
	case RecentManagerErrorInvalidEncoding:
		return "InvalidEncoding"
	case RecentManagerErrorNotRegistered:
		return "NotRegistered"
	case RecentManagerErrorRead:
		return "Read"
	case RecentManagerErrorWrite:
		return "Write"
	case RecentManagerErrorUnknown:
		return "Unknown"
	default:
		return fmt.Sprintf("RecentManagerError(%d)", r)
	}
}

func RecentManagerErrorQuark() glib.Quark {
	var _cret C.GQuark // in

	_cret = C.gtk_recent_manager_error_quark()

	var _quark glib.Quark // out

	_quark = glib.Quark(_cret)

	return _quark
}

// RecentSortType: used to specify the sorting method to be applyed to the
// recently used resource list.
type RecentSortType C.gint

const (
	// RecentSortNone: do not sort the returned list of recently used resources.
	RecentSortNone RecentSortType = iota
	// RecentSortMru: sort the returned list with the most recently used items
	// first.
	RecentSortMru
	// RecentSortLru: sort the returned list with the least recently used items
	// first.
	RecentSortLru
	// RecentSortCustom: sort the returned list using a custom sorting function
	// passed using gtk_recent_chooser_set_sort_func().
	RecentSortCustom
)

func marshalRecentSortType(p uintptr) (interface{}, error) {
	return RecentSortType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for RecentSortType.
func (r RecentSortType) String() string {
	switch r {
	case RecentSortNone:
		return "None"
	case RecentSortMru:
		return "Mru"
	case RecentSortLru:
		return "Lru"
	case RecentSortCustom:
		return "Custom"
	default:
		return fmt.Sprintf("RecentSortType(%d)", r)
	}
}

// ReliefStyle: indicated the relief to be drawn around a Button.
type ReliefStyle C.gint

const (
	// ReliefNormal: draw a normal relief.
	ReliefNormal ReliefStyle = iota
	// ReliefHalf: half relief. Deprecated in 3.14, does the same as
	// GTK_RELIEF_NORMAL.
	ReliefHalf
	// ReliefNone: no relief.
	ReliefNone
)

func marshalReliefStyle(p uintptr) (interface{}, error) {
	return ReliefStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ReliefStyle.
func (r ReliefStyle) String() string {
	switch r {
	case ReliefNormal:
		return "Normal"
	case ReliefHalf:
		return "Half"
	case ReliefNone:
		return "None"
	default:
		return fmt.Sprintf("ReliefStyle(%d)", r)
	}
}

type ResizeMode C.gint

const (
	// ResizeParent pass resize request to the parent.
	ResizeParent ResizeMode = iota
	// ResizeQueue: queue resizes on this widget.
	ResizeQueue
	// ResizeImmediate: resize immediately. Deprecated.
	ResizeImmediate
)

func marshalResizeMode(p uintptr) (interface{}, error) {
	return ResizeMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ResizeMode.
func (r ResizeMode) String() string {
	switch r {
	case ResizeParent:
		return "Parent"
	case ResizeQueue:
		return "Queue"
	case ResizeImmediate:
		return "Immediate"
	default:
		return fmt.Sprintf("ResizeMode(%d)", r)
	}
}

// ResponseType: predefined values for use as response ids in
// gtk_dialog_add_button(). All predefined values are negative; GTK+ leaves
// values of 0 or greater for application-defined response ids.
type ResponseType C.gint

const (
	// ResponseNone: returned if an action widget has no response id, or if the
	// dialog gets programmatically hidden or destroyed.
	ResponseNone ResponseType = -1
	// ResponseReject: generic response id, not used by GTK+ dialogs.
	ResponseReject ResponseType = -2
	// ResponseAccept: generic response id, not used by GTK+ dialogs.
	ResponseAccept ResponseType = -3
	// ResponseDeleteEvent: returned if the dialog is deleted.
	ResponseDeleteEvent ResponseType = -4
	// ResponseOK: returned by OK buttons in GTK+ dialogs.
	ResponseOK ResponseType = -5
	// ResponseCancel: returned by Cancel buttons in GTK+ dialogs.
	ResponseCancel ResponseType = -6
	// ResponseClose: returned by Close buttons in GTK+ dialogs.
	ResponseClose ResponseType = -7
	// ResponseYes: returned by Yes buttons in GTK+ dialogs.
	ResponseYes ResponseType = -8
	// ResponseNo: returned by No buttons in GTK+ dialogs.
	ResponseNo ResponseType = -9
	// ResponseApply: returned by Apply buttons in GTK+ dialogs.
	ResponseApply ResponseType = -10
	// ResponseHelp: returned by Help buttons in GTK+ dialogs.
	ResponseHelp ResponseType = -11
)

func marshalResponseType(p uintptr) (interface{}, error) {
	return ResponseType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ResponseType.
func (r ResponseType) String() string {
	switch r {
	case ResponseNone:
		return "None"
	case ResponseReject:
		return "Reject"
	case ResponseAccept:
		return "Accept"
	case ResponseDeleteEvent:
		return "DeleteEvent"
	case ResponseOK:
		return "OK"
	case ResponseCancel:
		return "Cancel"
	case ResponseClose:
		return "Close"
	case ResponseYes:
		return "Yes"
	case ResponseNo:
		return "No"
	case ResponseApply:
		return "Apply"
	case ResponseHelp:
		return "Help"
	default:
		return fmt.Sprintf("ResponseType(%d)", r)
	}
}

// RevealerTransitionType: these enumeration values describe the possible
// transitions when the child of a Revealer widget is shown or hidden.
type RevealerTransitionType C.gint

const (
	// RevealerTransitionTypeNone: no transition.
	RevealerTransitionTypeNone RevealerTransitionType = iota
	// RevealerTransitionTypeCrossfade: fade in.
	RevealerTransitionTypeCrossfade
	// RevealerTransitionTypeSlideRight: slide in from the left.
	RevealerTransitionTypeSlideRight
	// RevealerTransitionTypeSlideLeft: slide in from the right.
	RevealerTransitionTypeSlideLeft
	// RevealerTransitionTypeSlideUp: slide in from the bottom.
	RevealerTransitionTypeSlideUp
	// RevealerTransitionTypeSlideDown: slide in from the top.
	RevealerTransitionTypeSlideDown
)

func marshalRevealerTransitionType(p uintptr) (interface{}, error) {
	return RevealerTransitionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for RevealerTransitionType.
func (r RevealerTransitionType) String() string {
	switch r {
	case RevealerTransitionTypeNone:
		return "None"
	case RevealerTransitionTypeCrossfade:
		return "Crossfade"
	case RevealerTransitionTypeSlideRight:
		return "SlideRight"
	case RevealerTransitionTypeSlideLeft:
		return "SlideLeft"
	case RevealerTransitionTypeSlideUp:
		return "SlideUp"
	case RevealerTransitionTypeSlideDown:
		return "SlideDown"
	default:
		return fmt.Sprintf("RevealerTransitionType(%d)", r)
	}
}

type ScrollStep C.gint

const (
	// ScrollSteps: scroll in steps.
	ScrollSteps ScrollStep = iota
	// ScrollPages: scroll by pages.
	ScrollPages
	// ScrollEnds: scroll to ends.
	ScrollEnds
	// ScrollHorizontalSteps: scroll in horizontal steps.
	ScrollHorizontalSteps
	// ScrollHorizontalPages: scroll by horizontal pages.
	ScrollHorizontalPages
	// ScrollHorizontalEnds: scroll to the horizontal ends.
	ScrollHorizontalEnds
)

func marshalScrollStep(p uintptr) (interface{}, error) {
	return ScrollStep(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ScrollStep.
func (s ScrollStep) String() string {
	switch s {
	case ScrollSteps:
		return "Steps"
	case ScrollPages:
		return "Pages"
	case ScrollEnds:
		return "Ends"
	case ScrollHorizontalSteps:
		return "HorizontalSteps"
	case ScrollHorizontalPages:
		return "HorizontalPages"
	case ScrollHorizontalEnds:
		return "HorizontalEnds"
	default:
		return fmt.Sprintf("ScrollStep(%d)", s)
	}
}

// ScrollType: scrolling types.
type ScrollType C.gint

const (
	// ScrollNone: no scrolling.
	ScrollNone ScrollType = iota
	// ScrollJump: jump to new location.
	ScrollJump
	// ScrollStepBackward: step backward.
	ScrollStepBackward
	// ScrollStepForward: step forward.
	ScrollStepForward
	// ScrollPageBackward: page backward.
	ScrollPageBackward
	// ScrollPageForward: page forward.
	ScrollPageForward
	// ScrollStepUp: step up.
	ScrollStepUp
	// ScrollStepDown: step down.
	ScrollStepDown
	// ScrollPageUp: page up.
	ScrollPageUp
	// ScrollPageDown: page down.
	ScrollPageDown
	// ScrollStepLeft: step to the left.
	ScrollStepLeft
	// ScrollStepRight: step to the right.
	ScrollStepRight
	// ScrollPageLeft: page to the left.
	ScrollPageLeft
	// ScrollPageRight: page to the right.
	ScrollPageRight
	// ScrollStart: scroll to start.
	ScrollStart
	// ScrollEnd: scroll to end.
	ScrollEnd
)

func marshalScrollType(p uintptr) (interface{}, error) {
	return ScrollType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ScrollType.
func (s ScrollType) String() string {
	switch s {
	case ScrollNone:
		return "None"
	case ScrollJump:
		return "Jump"
	case ScrollStepBackward:
		return "StepBackward"
	case ScrollStepForward:
		return "StepForward"
	case ScrollPageBackward:
		return "PageBackward"
	case ScrollPageForward:
		return "PageForward"
	case ScrollStepUp:
		return "StepUp"
	case ScrollStepDown:
		return "StepDown"
	case ScrollPageUp:
		return "PageUp"
	case ScrollPageDown:
		return "PageDown"
	case ScrollStepLeft:
		return "StepLeft"
	case ScrollStepRight:
		return "StepRight"
	case ScrollPageLeft:
		return "PageLeft"
	case ScrollPageRight:
		return "PageRight"
	case ScrollStart:
		return "Start"
	case ScrollEnd:
		return "End"
	default:
		return fmt.Sprintf("ScrollType(%d)", s)
	}
}

// ScrollablePolicy defines the policy to be used in a scrollable widget when
// updating the scrolled window adjustments in a given orientation.
type ScrollablePolicy C.gint

const (
	// ScrollMinimum: scrollable adjustments are based on the minimum size.
	ScrollMinimum ScrollablePolicy = iota
	// ScrollNatural: scrollable adjustments are based on the natural size.
	ScrollNatural
)

func marshalScrollablePolicy(p uintptr) (interface{}, error) {
	return ScrollablePolicy(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ScrollablePolicy.
func (s ScrollablePolicy) String() string {
	switch s {
	case ScrollMinimum:
		return "Minimum"
	case ScrollNatural:
		return "Natural"
	default:
		return fmt.Sprintf("ScrollablePolicy(%d)", s)
	}
}

// SelectionMode: used to control what selections users are allowed to make.
type SelectionMode C.gint

const (
	// SelectionNone: no selection is possible.
	SelectionNone SelectionMode = iota
	// SelectionSingle: zero or one element may be selected.
	SelectionSingle
	// SelectionBrowse: exactly one element is selected. In some circumstances,
	// such as initially or during a search operation, it’s possible for no
	// element to be selected with GTK_SELECTION_BROWSE. What is really enforced
	// is that the user can’t deselect a currently selected element except by
	// selecting another element.
	SelectionBrowse
	// SelectionMultiple: any number of elements may be selected. The Ctrl key
	// may be used to enlarge the selection, and Shift key to select between the
	// focus and the child pointed to. Some widgets may also allow Click-drag to
	// select a range of elements.
	SelectionMultiple
)

func marshalSelectionMode(p uintptr) (interface{}, error) {
	return SelectionMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SelectionMode.
func (s SelectionMode) String() string {
	switch s {
	case SelectionNone:
		return "None"
	case SelectionSingle:
		return "Single"
	case SelectionBrowse:
		return "Browse"
	case SelectionMultiple:
		return "Multiple"
	default:
		return fmt.Sprintf("SelectionMode(%d)", s)
	}
}

// SensitivityType determines how GTK+ handles the sensitivity of stepper arrows
// at the end of range widgets.
type SensitivityType C.gint

const (
	// SensitivityAuto: arrow is made insensitive if the thumb is at the end.
	SensitivityAuto SensitivityType = iota
	// SensitivityOn: arrow is always sensitive.
	SensitivityOn
	// SensitivityOff: arrow is always insensitive.
	SensitivityOff
)

func marshalSensitivityType(p uintptr) (interface{}, error) {
	return SensitivityType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SensitivityType.
func (s SensitivityType) String() string {
	switch s {
	case SensitivityAuto:
		return "Auto"
	case SensitivityOn:
		return "On"
	case SensitivityOff:
		return "Off"
	default:
		return fmt.Sprintf("SensitivityType(%d)", s)
	}
}

// ShadowType: used to change the appearance of an outline typically provided by
// a Frame.
//
// Note that many themes do not differentiate the appearance of the various
// shadow types: Either their is no visible shadow (GTK_SHADOW_NONE), or there
// is (any other value).
type ShadowType C.gint

const (
	// ShadowNone: no outline.
	ShadowNone ShadowType = iota
	// ShadowIn: outline is bevelled inwards.
	ShadowIn
	// ShadowOut: outline is bevelled outwards like a button.
	ShadowOut
	// ShadowEtchedIn: outline has a sunken 3d appearance.
	ShadowEtchedIn
	// ShadowEtchedOut: outline has a raised 3d appearance.
	ShadowEtchedOut
)

func marshalShadowType(p uintptr) (interface{}, error) {
	return ShadowType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ShadowType.
func (s ShadowType) String() string {
	switch s {
	case ShadowNone:
		return "None"
	case ShadowIn:
		return "In"
	case ShadowOut:
		return "Out"
	case ShadowEtchedIn:
		return "EtchedIn"
	case ShadowEtchedOut:
		return "EtchedOut"
	default:
		return fmt.Sprintf("ShadowType(%d)", s)
	}
}

// ShortcutType specifies the kind of shortcut that is being described. More
// values may be added to this enumeration over time.
type ShortcutType C.gint

const (
	// ShortcutAccelerator: shortcut is a keyboard accelerator. The
	// ShortcutsShortcut:accelerator property will be used.
	ShortcutAccelerator ShortcutType = iota
	// ShortcutGesturePinch: shortcut is a pinch gesture. GTK+ provides an icon
	// and subtitle.
	ShortcutGesturePinch
	// ShortcutGestureStretch: shortcut is a stretch gesture. GTK+ provides an
	// icon and subtitle.
	ShortcutGestureStretch
	// ShortcutGestureRotateClockwise: shortcut is a clockwise rotation gesture.
	// GTK+ provides an icon and subtitle.
	ShortcutGestureRotateClockwise
	// ShortcutGestureRotateCounterclockwise: shortcut is a counterclockwise
	// rotation gesture. GTK+ provides an icon and subtitle.
	ShortcutGestureRotateCounterclockwise
	// ShortcutGestureTwoFingerSwipeLeft: shortcut is a two-finger swipe
	// gesture. GTK+ provides an icon and subtitle.
	ShortcutGestureTwoFingerSwipeLeft
	// ShortcutGestureTwoFingerSwipeRight: shortcut is a two-finger swipe
	// gesture. GTK+ provides an icon and subtitle.
	ShortcutGestureTwoFingerSwipeRight
	// ShortcutGesture: shortcut is a gesture. The ShortcutsShortcut:icon
	// property will be used.
	ShortcutGesture
)

func marshalShortcutType(p uintptr) (interface{}, error) {
	return ShortcutType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ShortcutType.
func (s ShortcutType) String() string {
	switch s {
	case ShortcutAccelerator:
		return "Accelerator"
	case ShortcutGesturePinch:
		return "GesturePinch"
	case ShortcutGestureStretch:
		return "GestureStretch"
	case ShortcutGestureRotateClockwise:
		return "GestureRotateClockwise"
	case ShortcutGestureRotateCounterclockwise:
		return "GestureRotateCounterclockwise"
	case ShortcutGestureTwoFingerSwipeLeft:
		return "GestureTwoFingerSwipeLeft"
	case ShortcutGestureTwoFingerSwipeRight:
		return "GestureTwoFingerSwipeRight"
	case ShortcutGesture:
		return "Gesture"
	default:
		return fmt.Sprintf("ShortcutType(%d)", s)
	}
}

// SizeGroupMode: mode of the size group determines the directions in which the
// size group affects the requested sizes of its component widgets.
type SizeGroupMode C.gint

const (
	// SizeGroupNone: group has no effect.
	SizeGroupNone SizeGroupMode = iota
	// SizeGroupHorizontal: group affects horizontal requisition.
	SizeGroupHorizontal
	// SizeGroupVertical: group affects vertical requisition.
	SizeGroupVertical
	// SizeGroupBoth: group affects both horizontal and vertical requisition.
	SizeGroupBoth
)

func marshalSizeGroupMode(p uintptr) (interface{}, error) {
	return SizeGroupMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SizeGroupMode.
func (s SizeGroupMode) String() string {
	switch s {
	case SizeGroupNone:
		return "None"
	case SizeGroupHorizontal:
		return "Horizontal"
	case SizeGroupVertical:
		return "Vertical"
	case SizeGroupBoth:
		return "Both"
	default:
		return fmt.Sprintf("SizeGroupMode(%d)", s)
	}
}

// SizeRequestMode specifies a preference for height-for-width or
// width-for-height geometry management.
type SizeRequestMode C.gint

const (
	// SizeRequestHeightForWidth: prefer height-for-width geometry management.
	SizeRequestHeightForWidth SizeRequestMode = iota
	// SizeRequestWidthForHeight: prefer width-for-height geometry management.
	SizeRequestWidthForHeight
	// SizeRequestConstantSize: don’t trade height-for-width or
	// width-for-height.
	SizeRequestConstantSize
)

func marshalSizeRequestMode(p uintptr) (interface{}, error) {
	return SizeRequestMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SizeRequestMode.
func (s SizeRequestMode) String() string {
	switch s {
	case SizeRequestHeightForWidth:
		return "HeightForWidth"
	case SizeRequestWidthForHeight:
		return "WidthForHeight"
	case SizeRequestConstantSize:
		return "ConstantSize"
	default:
		return fmt.Sprintf("SizeRequestMode(%d)", s)
	}
}

// SortType determines the direction of a sort.
type SortType C.gint

const (
	// SortAscending: sorting is in ascending order.
	SortAscending SortType = iota
	// SortDescending: sorting is in descending order.
	SortDescending
)

func marshalSortType(p uintptr) (interface{}, error) {
	return SortType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SortType.
func (s SortType) String() string {
	switch s {
	case SortAscending:
		return "Ascending"
	case SortDescending:
		return "Descending"
	default:
		return fmt.Sprintf("SortType(%d)", s)
	}
}

// SpinButtonUpdatePolicy: spin button update policy determines whether the spin
// button displays values even if they are outside the bounds of its adjustment.
// See gtk_spin_button_set_update_policy().
type SpinButtonUpdatePolicy C.gint

const (
	// UpdateAlways: when refreshing your SpinButton, the value is always
	// displayed.
	UpdateAlways SpinButtonUpdatePolicy = iota
	// UpdateIfValid: when refreshing your SpinButton, the value is only
	// displayed if it is valid within the bounds of the spin button's
	// adjustment.
	UpdateIfValid
)

func marshalSpinButtonUpdatePolicy(p uintptr) (interface{}, error) {
	return SpinButtonUpdatePolicy(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SpinButtonUpdatePolicy.
func (s SpinButtonUpdatePolicy) String() string {
	switch s {
	case UpdateAlways:
		return "Always"
	case UpdateIfValid:
		return "IfValid"
	default:
		return fmt.Sprintf("SpinButtonUpdatePolicy(%d)", s)
	}
}

// SpinType values of the GtkSpinType enumeration are used to specify the change
// to make in gtk_spin_button_spin().
type SpinType C.gint

const (
	// SpinStepForward: increment by the adjustments step increment.
	SpinStepForward SpinType = iota
	// SpinStepBackward: decrement by the adjustments step increment.
	SpinStepBackward
	// SpinPageForward: increment by the adjustments page increment.
	SpinPageForward
	// SpinPageBackward: decrement by the adjustments page increment.
	SpinPageBackward
	// SpinHome: go to the adjustments lower bound.
	SpinHome
	// SpinEnd: go to the adjustments upper bound.
	SpinEnd
	// SpinUserDefined: change by a specified amount.
	SpinUserDefined
)

func marshalSpinType(p uintptr) (interface{}, error) {
	return SpinType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for SpinType.
func (s SpinType) String() string {
	switch s {
	case SpinStepForward:
		return "StepForward"
	case SpinStepBackward:
		return "StepBackward"
	case SpinPageForward:
		return "PageForward"
	case SpinPageBackward:
		return "PageBackward"
	case SpinHome:
		return "Home"
	case SpinEnd:
		return "End"
	case SpinUserDefined:
		return "UserDefined"
	default:
		return fmt.Sprintf("SpinType(%d)", s)
	}
}

// StackTransitionType: these enumeration values describe the possible
// transitions between pages in a Stack widget.
//
// New values may be added to this enumeration over time.
type StackTransitionType C.gint

const (
	// StackTransitionTypeNone: no transition.
	StackTransitionTypeNone StackTransitionType = iota
	// StackTransitionTypeCrossfade: cross-fade.
	StackTransitionTypeCrossfade
	// StackTransitionTypeSlideRight: slide from left to right.
	StackTransitionTypeSlideRight
	// StackTransitionTypeSlideLeft: slide from right to left.
	StackTransitionTypeSlideLeft
	// StackTransitionTypeSlideUp: slide from bottom up.
	StackTransitionTypeSlideUp
	// StackTransitionTypeSlideDown: slide from top down.
	StackTransitionTypeSlideDown
	// StackTransitionTypeSlideLeftRight: slide from left or right according to
	// the children order.
	StackTransitionTypeSlideLeftRight
	// StackTransitionTypeSlideUpDown: slide from top down or bottom up
	// according to the order.
	StackTransitionTypeSlideUpDown
	// StackTransitionTypeOverUp: cover the old page by sliding up. Since 3.12.
	StackTransitionTypeOverUp
	// StackTransitionTypeOverDown: cover the old page by sliding down. Since:
	// 3.12.
	StackTransitionTypeOverDown
	// StackTransitionTypeOverLeft: cover the old page by sliding to the left.
	// Since: 3.12.
	StackTransitionTypeOverLeft
	// StackTransitionTypeOverRight: cover the old page by sliding to the right.
	// Since: 3.12.
	StackTransitionTypeOverRight
	// StackTransitionTypeUnderUp: uncover the new page by sliding up. Since
	// 3.12.
	StackTransitionTypeUnderUp
	// StackTransitionTypeUnderDown: uncover the new page by sliding down.
	// Since: 3.12.
	StackTransitionTypeUnderDown
	// StackTransitionTypeUnderLeft: uncover the new page by sliding to the
	// left. Since: 3.12.
	StackTransitionTypeUnderLeft
	// StackTransitionTypeUnderRight: uncover the new page by sliding to the
	// right. Since: 3.12.
	StackTransitionTypeUnderRight
	// StackTransitionTypeOverUpDown: cover the old page sliding up or uncover
	// the new page sliding down, according to order. Since: 3.12.
	StackTransitionTypeOverUpDown
	// StackTransitionTypeOverDownUp: cover the old page sliding down or uncover
	// the new page sliding up, according to order. Since: 3.14.
	StackTransitionTypeOverDownUp
	// StackTransitionTypeOverLeftRight: cover the old page sliding left or
	// uncover the new page sliding right, according to order. Since: 3.14.
	StackTransitionTypeOverLeftRight
	// StackTransitionTypeOverRightLeft: cover the old page sliding right or
	// uncover the new page sliding left, according to order. Since: 3.14.
	StackTransitionTypeOverRightLeft
)

func marshalStackTransitionType(p uintptr) (interface{}, error) {
	return StackTransitionType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for StackTransitionType.
func (s StackTransitionType) String() string {
	switch s {
	case StackTransitionTypeNone:
		return "None"
	case StackTransitionTypeCrossfade:
		return "Crossfade"
	case StackTransitionTypeSlideRight:
		return "SlideRight"
	case StackTransitionTypeSlideLeft:
		return "SlideLeft"
	case StackTransitionTypeSlideUp:
		return "SlideUp"
	case StackTransitionTypeSlideDown:
		return "SlideDown"
	case StackTransitionTypeSlideLeftRight:
		return "SlideLeftRight"
	case StackTransitionTypeSlideUpDown:
		return "SlideUpDown"
	case StackTransitionTypeOverUp:
		return "OverUp"
	case StackTransitionTypeOverDown:
		return "OverDown"
	case StackTransitionTypeOverLeft:
		return "OverLeft"
	case StackTransitionTypeOverRight:
		return "OverRight"
	case StackTransitionTypeUnderUp:
		return "UnderUp"
	case StackTransitionTypeUnderDown:
		return "UnderDown"
	case StackTransitionTypeUnderLeft:
		return "UnderLeft"
	case StackTransitionTypeUnderRight:
		return "UnderRight"
	case StackTransitionTypeOverUpDown:
		return "OverUpDown"
	case StackTransitionTypeOverDownUp:
		return "OverDownUp"
	case StackTransitionTypeOverLeftRight:
		return "OverLeftRight"
	case StackTransitionTypeOverRightLeft:
		return "OverRightLeft"
	default:
		return fmt.Sprintf("StackTransitionType(%d)", s)
	}
}

// StateType: this type indicates the current state of a widget; the state
// determines how the widget is drawn. The StateType enumeration is also used to
// identify different colors in a Style for drawing, so states can be used for
// subparts of a widget as well as entire widgets.
//
// Deprecated: All APIs that are using this enumeration have been deprecated in
// favor of alternatives using StateFlags.
type StateType C.gint

const (
	// StateNormal: state during normal operation.
	StateNormal StateType = iota
	// StateActive: state of a currently active widget, such as a depressed
	// button.
	StateActive
	// StatePrelight: state indicating that the mouse pointer is over the widget
	// and the widget will respond to mouse clicks.
	StatePrelight
	// StateSelected: state of a selected item, such the selected row in a list.
	StateSelected
	// StateInsensitive: state indicating that the widget is unresponsive to
	// user actions.
	StateInsensitive
	// StateInconsistent: widget is inconsistent, such as checkbuttons or
	// radiobuttons that aren’t either set to TRUE nor FALSE, or buttons
	// requiring the user attention.
	StateInconsistent
	// StateFocused: widget has the keyboard focus.
	StateFocused
)

func marshalStateType(p uintptr) (interface{}, error) {
	return StateType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for StateType.
func (s StateType) String() string {
	switch s {
	case StateNormal:
		return "Normal"
	case StateActive:
		return "Active"
	case StatePrelight:
		return "Prelight"
	case StateSelected:
		return "Selected"
	case StateInsensitive:
		return "Insensitive"
	case StateInconsistent:
		return "Inconsistent"
	case StateFocused:
		return "Focused"
	default:
		return fmt.Sprintf("StateType(%d)", s)
	}
}

// TextBufferTargetInfo: these values are used as “info” for the targets
// contained in the lists returned by gtk_text_buffer_get_copy_target_list() and
// gtk_text_buffer_get_paste_target_list().
//
// The values counts down from -1 to avoid clashes with application added drag
// destinations which usually start at 0.
type TextBufferTargetInfo C.gint

const (
	// TextBufferTargetInfoBufferContents: buffer contents.
	TextBufferTargetInfoBufferContents TextBufferTargetInfo = -1
	// TextBufferTargetInfoRichText: rich text.
	TextBufferTargetInfoRichText TextBufferTargetInfo = -2
	// TextBufferTargetInfoText: text.
	TextBufferTargetInfoText TextBufferTargetInfo = -3
)

func marshalTextBufferTargetInfo(p uintptr) (interface{}, error) {
	return TextBufferTargetInfo(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TextBufferTargetInfo.
func (t TextBufferTargetInfo) String() string {
	switch t {
	case TextBufferTargetInfoBufferContents:
		return "BufferContents"
	case TextBufferTargetInfoRichText:
		return "RichText"
	case TextBufferTargetInfoText:
		return "Text"
	default:
		return fmt.Sprintf("TextBufferTargetInfo(%d)", t)
	}
}

// TextDirection: reading directions for text.
type TextDirection C.gint

const (
	// TextDirNone: no direction.
	TextDirNone TextDirection = iota
	// TextDirLTR: left to right text direction.
	TextDirLTR
	// TextDirRTL: right to left text direction.
	TextDirRTL
)

func marshalTextDirection(p uintptr) (interface{}, error) {
	return TextDirection(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TextDirection.
func (t TextDirection) String() string {
	switch t {
	case TextDirNone:
		return "None"
	case TextDirLTR:
		return "LTR"
	case TextDirRTL:
		return "RTL"
	default:
		return fmt.Sprintf("TextDirection(%d)", t)
	}
}

// TextExtendSelection: granularity types that extend the text selection.
// Use the TextView::extend-selection signal to customize the selection.
type TextExtendSelection C.gint

const (
	// TextExtendSelectionWord selects the current word. It is triggered by a
	// double-click for example.
	TextExtendSelectionWord TextExtendSelection = iota
	// TextExtendSelectionLine selects the current line. It is triggered by a
	// triple-click for example.
	TextExtendSelectionLine
)

func marshalTextExtendSelection(p uintptr) (interface{}, error) {
	return TextExtendSelection(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TextExtendSelection.
func (t TextExtendSelection) String() string {
	switch t {
	case TextExtendSelectionWord:
		return "Word"
	case TextExtendSelectionLine:
		return "Line"
	default:
		return fmt.Sprintf("TextExtendSelection(%d)", t)
	}
}

// TextViewLayer: used to reference the layers of TextView for the purpose of
// customized drawing with the ::draw_layer vfunc.
type TextViewLayer C.gint

const (
	// TextViewLayerBelow: old deprecated layer, use
	// GTK_TEXT_VIEW_LAYER_BELOW_TEXT instead.
	TextViewLayerBelow TextViewLayer = iota
	// TextViewLayerAbove: old deprecated layer, use
	// GTK_TEXT_VIEW_LAYER_ABOVE_TEXT instead.
	TextViewLayerAbove
	// TextViewLayerBelowText: layer rendered below the text (but above the
	// background). Since: 3.20.
	TextViewLayerBelowText
	// TextViewLayerAboveText: layer rendered above the text. Since: 3.20.
	TextViewLayerAboveText
)

func marshalTextViewLayer(p uintptr) (interface{}, error) {
	return TextViewLayer(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TextViewLayer.
func (t TextViewLayer) String() string {
	switch t {
	case TextViewLayerBelow:
		return "Below"
	case TextViewLayerAbove:
		return "Above"
	case TextViewLayerBelowText:
		return "BelowText"
	case TextViewLayerAboveText:
		return "AboveText"
	default:
		return fmt.Sprintf("TextViewLayer(%d)", t)
	}
}

// TextWindowType: used to reference the parts of TextView.
type TextWindowType C.gint

const (
	// TextWindowPrivate: invalid value, used as a marker.
	TextWindowPrivate TextWindowType = iota
	// TextWindowWidget: window that floats over scrolling areas.
	TextWindowWidget
	// TextWindowText: scrollable text window.
	TextWindowText
	// TextWindowLeft: left side border window.
	TextWindowLeft
	// TextWindowRight: right side border window.
	TextWindowRight
	// TextWindowTop: top border window.
	TextWindowTop
	// TextWindowBottom: bottom border window.
	TextWindowBottom
)

func marshalTextWindowType(p uintptr) (interface{}, error) {
	return TextWindowType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TextWindowType.
func (t TextWindowType) String() string {
	switch t {
	case TextWindowPrivate:
		return "Private"
	case TextWindowWidget:
		return "Widget"
	case TextWindowText:
		return "Text"
	case TextWindowLeft:
		return "Left"
	case TextWindowRight:
		return "Right"
	case TextWindowTop:
		return "Top"
	case TextWindowBottom:
		return "Bottom"
	default:
		return fmt.Sprintf("TextWindowType(%d)", t)
	}
}

// ToolbarSpaceStyle: whether spacers are vertical lines or just blank.
//
// Deprecated: since version 3.20.
type ToolbarSpaceStyle C.gint

const (
	// ToolbarSpaceEmpty: use blank spacers.
	ToolbarSpaceEmpty ToolbarSpaceStyle = iota
	// ToolbarSpaceLine: use vertical lines for spacers.
	ToolbarSpaceLine
)

func marshalToolbarSpaceStyle(p uintptr) (interface{}, error) {
	return ToolbarSpaceStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ToolbarSpaceStyle.
func (t ToolbarSpaceStyle) String() string {
	switch t {
	case ToolbarSpaceEmpty:
		return "Empty"
	case ToolbarSpaceLine:
		return "Line"
	default:
		return fmt.Sprintf("ToolbarSpaceStyle(%d)", t)
	}
}

// ToolbarStyle: used to customize the appearance of a Toolbar. Note that
// setting the toolbar style overrides the user’s preferences for the
// default toolbar style. Note that if the button has only a label set and
// GTK_TOOLBAR_ICONS is used, the label will be visible, and vice versa.
type ToolbarStyle C.gint

const (
	// ToolbarIcons buttons display only icons in the toolbar.
	ToolbarIcons ToolbarStyle = iota
	// ToolbarText buttons display only text labels in the toolbar.
	ToolbarText
	// ToolbarBoth buttons display text and icons in the toolbar.
	ToolbarBoth
	// ToolbarBothHoriz buttons display icons and text alongside each other,
	// rather than vertically stacked.
	ToolbarBothHoriz
)

func marshalToolbarStyle(p uintptr) (interface{}, error) {
	return ToolbarStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for ToolbarStyle.
func (t ToolbarStyle) String() string {
	switch t {
	case ToolbarIcons:
		return "Icons"
	case ToolbarText:
		return "Text"
	case ToolbarBoth:
		return "Both"
	case ToolbarBothHoriz:
		return "BothHoriz"
	default:
		return fmt.Sprintf("ToolbarStyle(%d)", t)
	}
}

// TreeViewColumnSizing: sizing method the column uses to determine its width.
// Please note that GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large
// views, and can make columns appear choppy.
type TreeViewColumnSizing C.gint

const (
	// TreeViewColumnGrowOnly columns only get bigger in reaction to changes in
	// the model.
	TreeViewColumnGrowOnly TreeViewColumnSizing = iota
	// TreeViewColumnAutosize columns resize to be the optimal size everytime
	// the model changes.
	TreeViewColumnAutosize
	// TreeViewColumnFixed columns are a fixed numbers of pixels wide.
	TreeViewColumnFixed
)

func marshalTreeViewColumnSizing(p uintptr) (interface{}, error) {
	return TreeViewColumnSizing(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TreeViewColumnSizing.
func (t TreeViewColumnSizing) String() string {
	switch t {
	case TreeViewColumnGrowOnly:
		return "GrowOnly"
	case TreeViewColumnAutosize:
		return "Autosize"
	case TreeViewColumnFixed:
		return "Fixed"
	default:
		return fmt.Sprintf("TreeViewColumnSizing(%d)", t)
	}
}

// TreeViewDropPosition: enum for determining where a dropped row goes.
type TreeViewDropPosition C.gint

const (
	// TreeViewDropBefore: dropped row is inserted before.
	TreeViewDropBefore TreeViewDropPosition = iota
	// TreeViewDropAfter: dropped row is inserted after.
	TreeViewDropAfter
	// TreeViewDropIntoOrBefore: dropped row becomes a child or is inserted
	// before.
	TreeViewDropIntoOrBefore
	// TreeViewDropIntoOrAfter: dropped row becomes a child or is inserted
	// after.
	TreeViewDropIntoOrAfter
)

func marshalTreeViewDropPosition(p uintptr) (interface{}, error) {
	return TreeViewDropPosition(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TreeViewDropPosition.
func (t TreeViewDropPosition) String() string {
	switch t {
	case TreeViewDropBefore:
		return "Before"
	case TreeViewDropAfter:
		return "After"
	case TreeViewDropIntoOrBefore:
		return "IntoOrBefore"
	case TreeViewDropIntoOrAfter:
		return "IntoOrAfter"
	default:
		return fmt.Sprintf("TreeViewDropPosition(%d)", t)
	}
}

// TreeViewGridLines: used to indicate which grid lines to draw in a tree view.
type TreeViewGridLines C.gint

const (
	// TreeViewGridLinesNone: no grid lines.
	TreeViewGridLinesNone TreeViewGridLines = iota
	// TreeViewGridLinesHorizontal: horizontal grid lines.
	TreeViewGridLinesHorizontal
	// TreeViewGridLinesVertical: vertical grid lines.
	TreeViewGridLinesVertical
	// TreeViewGridLinesBoth: horizontal and vertical grid lines.
	TreeViewGridLinesBoth
)

func marshalTreeViewGridLines(p uintptr) (interface{}, error) {
	return TreeViewGridLines(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for TreeViewGridLines.
func (t TreeViewGridLines) String() string {
	switch t {
	case TreeViewGridLinesNone:
		return "None"
	case TreeViewGridLinesHorizontal:
		return "Horizontal"
	case TreeViewGridLinesVertical:
		return "Vertical"
	case TreeViewGridLinesBoth:
		return "Both"
	default:
		return fmt.Sprintf("TreeViewGridLines(%d)", t)
	}
}

// Unit: see also gtk_print_settings_set_paper_width().
type Unit C.gint

const (
	// UnitNone: no units.
	UnitNone Unit = iota
	// UnitPoints dimensions in points.
	UnitPoints
	// UnitInch dimensions in inches.
	UnitInch
	// UnitMm dimensions in millimeters.
	UnitMm
)

func marshalUnit(p uintptr) (interface{}, error) {
	return Unit(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for Unit.
func (u Unit) String() string {
	switch u {
	case UnitNone:
		return "None"
	case UnitPoints:
		return "Points"
	case UnitInch:
		return "Inch"
	case UnitMm:
		return "Mm"
	default:
		return fmt.Sprintf("Unit(%d)", u)
	}
}

// WidgetHelpType kinds of widget-specific help. Used by the ::show-help signal.
type WidgetHelpType C.gint

const (
	// WidgetHelpTooltip: tooltip.
	WidgetHelpTooltip WidgetHelpType = iota
	// WidgetHelpWhatsThis what’s this.
	WidgetHelpWhatsThis
)

func marshalWidgetHelpType(p uintptr) (interface{}, error) {
	return WidgetHelpType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for WidgetHelpType.
func (w WidgetHelpType) String() string {
	switch w {
	case WidgetHelpTooltip:
		return "Tooltip"
	case WidgetHelpWhatsThis:
		return "WhatsThis"
	default:
		return fmt.Sprintf("WidgetHelpType(%d)", w)
	}
}

// WindowPosition: window placement can be influenced using this enumeration.
// Note that using K_WIN_POS_CENTER_ALWAYS is almost always a bad idea. It won’t
// necessarily work well with all window managers or on all windowing systems.
type WindowPosition C.gint

const (
	// WinPosNone: no influence is made on placement.
	WinPosNone WindowPosition = iota
	// WinPosCenter windows should be placed in the center of the screen.
	WinPosCenter
	// WinPosMouse windows should be placed at the current mouse position.
	WinPosMouse
	// WinPosCenterAlways: keep window centered as it changes size, etc.
	WinPosCenterAlways
	// WinPosCenterOnParent: center the window on its transient parent (see
	// gtk_window_set_transient_for()).
	WinPosCenterOnParent
)

func marshalWindowPosition(p uintptr) (interface{}, error) {
	return WindowPosition(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for WindowPosition.
func (w WindowPosition) String() string {
	switch w {
	case WinPosNone:
		return "None"
	case WinPosCenter:
		return "Center"
	case WinPosMouse:
		return "Mouse"
	case WinPosCenterAlways:
		return "CenterAlways"
	case WinPosCenterOnParent:
		return "CenterOnParent"
	default:
		return fmt.Sprintf("WindowPosition(%d)", w)
	}
}

// WindowType can be one of these types. Most things you’d consider a “window”
// should have type K_WINDOW_TOPLEVEL; windows with this type are managed by the
// window manager and have a frame by default (call gtk_window_set_decorated()
// to toggle the frame). Windows with type K_WINDOW_POPUP are ignored by
// the window manager; window manager keybindings won’t work on them,
// the window manager won’t decorate the window with a frame, many
// GTK+ features that rely on the window manager will not work (e.g.
// resize grips and maximization/minimization). K_WINDOW_POPUP is used to
// implement widgets such as Menu or tooltips that you normally don’t think
// of as windows per se. Nearly all windows should be K_WINDOW_TOPLEVEL.
// In particular, do not use K_WINDOW_POPUP just to turn off the window borders;
// use gtk_window_set_decorated() for that.
type WindowType C.gint

const (
	// WindowToplevel: regular window, such as a dialog.
	WindowToplevel WindowType = iota
	// WindowPopup: special window such as a tooltip.
	WindowPopup
)

func marshalWindowType(p uintptr) (interface{}, error) {
	return WindowType(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for WindowType.
func (w WindowType) String() string {
	switch w {
	case WindowToplevel:
		return "Toplevel"
	case WindowPopup:
		return "Popup"
	default:
		return fmt.Sprintf("WindowType(%d)", w)
	}
}

// WrapMode describes a type of line wrapping.
type WrapMode C.gint

const (
	// WrapNone: do not wrap lines; just make the text area wider.
	WrapNone WrapMode = iota
	// WrapChar: wrap text, breaking lines anywhere the cursor can appear
	// (between characters, usually - if you want to be technical, between
	// graphemes, see pango_get_log_attrs()).
	WrapChar
	// WrapWord: wrap text, breaking lines in between words.
	WrapWord
	// WrapWordChar: wrap text, breaking lines in between words, or if that is
	// not enough, also between graphemes.
	WrapWordChar
)

func marshalWrapMode(p uintptr) (interface{}, error) {
	return WrapMode(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for WrapMode.
func (w WrapMode) String() string {
	switch w {
	case WrapNone:
		return "None"
	case WrapChar:
		return "Char"
	case WrapWord:
		return "Word"
	case WrapWordChar:
		return "WordChar"
	default:
		return fmt.Sprintf("WrapMode(%d)", w)
	}
}

// AccelFlags: accelerator flags used with gtk_accel_group_connect().
type AccelFlags C.guint

const (
	// AccelVisible: accelerator is visible.
	AccelVisible AccelFlags = 0b1
	// AccelLocked: accelerator not removable.
	AccelLocked AccelFlags = 0b10
	// AccelMask: mask.
	AccelMask AccelFlags = 0b111
)

func marshalAccelFlags(p uintptr) (interface{}, error) {
	return AccelFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for AccelFlags.
func (a AccelFlags) String() string {
	if a == 0 {
		return "AccelFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(34)

	for a != 0 {
		next := a & (a - 1)
		bit := a - next

		switch bit {
		case AccelVisible:
			builder.WriteString("Visible|")
		case AccelLocked:
			builder.WriteString("Locked|")
		case AccelMask:
			builder.WriteString("Mask|")
		default:
			builder.WriteString(fmt.Sprintf("AccelFlags(0b%b)|", bit))
		}

		a = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if a contains other.
func (a AccelFlags) Has(other AccelFlags) bool {
	return (a & other) == other
}

// ApplicationInhibitFlags types of user actions that may be blocked by
// gtk_application_inhibit().
type ApplicationInhibitFlags C.guint

const (
	// ApplicationInhibitLogout: inhibit ending the user session by logging out
	// or by shutting down the computer.
	ApplicationInhibitLogout ApplicationInhibitFlags = 0b1
	// ApplicationInhibitSwitch: inhibit user switching.
	ApplicationInhibitSwitch ApplicationInhibitFlags = 0b10
	// ApplicationInhibitSuspend: inhibit suspending the session or computer.
	ApplicationInhibitSuspend ApplicationInhibitFlags = 0b100
	// ApplicationInhibitIdle: inhibit the session being marked as idle (and
	// possibly locked).
	ApplicationInhibitIdle ApplicationInhibitFlags = 0b1000
)

func marshalApplicationInhibitFlags(p uintptr) (interface{}, error) {
	return ApplicationInhibitFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for ApplicationInhibitFlags.
func (a ApplicationInhibitFlags) String() string {
	if a == 0 {
		return "ApplicationInhibitFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(98)

	for a != 0 {
		next := a & (a - 1)
		bit := a - next

		switch bit {
		case ApplicationInhibitLogout:
			builder.WriteString("Logout|")
		case ApplicationInhibitSwitch:
			builder.WriteString("Switch|")
		case ApplicationInhibitSuspend:
			builder.WriteString("Suspend|")
		case ApplicationInhibitIdle:
			builder.WriteString("Idle|")
		default:
			builder.WriteString(fmt.Sprintf("ApplicationInhibitFlags(0b%b)|", bit))
		}

		a = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if a contains other.
func (a ApplicationInhibitFlags) Has(other ApplicationInhibitFlags) bool {
	return (a & other) == other
}

// AttachOptions denotes the expansion properties that a widget will have when
// it (or its parent) is resized.
type AttachOptions C.guint

const (
	// Expand: widget should expand to take up any extra space in its container
	// that has been allocated.
	Expand AttachOptions = 0b1
	// Shrink: widget should shrink as and when possible.
	Shrink AttachOptions = 0b10
	// Fill: widget should fill the space allocated to it.
	Fill AttachOptions = 0b100
)

func marshalAttachOptions(p uintptr) (interface{}, error) {
	return AttachOptions(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for AttachOptions.
func (a AttachOptions) String() string {
	if a == 0 {
		return "AttachOptions(0)"
	}

	var builder strings.Builder
	builder.Grow(18)

	for a != 0 {
		next := a & (a - 1)
		bit := a - next

		switch bit {
		case Expand:
			builder.WriteString("Expand|")
		case Shrink:
			builder.WriteString("Shrink|")
		case Fill:
			builder.WriteString("Fill|")
		default:
			builder.WriteString(fmt.Sprintf("AttachOptions(0b%b)|", bit))
		}

		a = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if a contains other.
func (a AttachOptions) Has(other AttachOptions) bool {
	return (a & other) == other
}

// CalendarDisplayOptions: these options can be used to influence the display
// and behaviour of a Calendar.
type CalendarDisplayOptions C.guint

const (
	// CalendarShowHeading specifies that the month and year should be
	// displayed.
	CalendarShowHeading CalendarDisplayOptions = 0b1
	// CalendarShowDayNames specifies that three letter day descriptions should
	// be present.
	CalendarShowDayNames CalendarDisplayOptions = 0b10
	// CalendarNoMonthChange prevents the user from switching months with the
	// calendar.
	CalendarNoMonthChange CalendarDisplayOptions = 0b100
	// CalendarShowWeekNumbers displays each week numbers of the current year,
	// down the left side of the calendar.
	CalendarShowWeekNumbers CalendarDisplayOptions = 0b1000
	// CalendarShowDetails: just show an indicator, not the full details text
	// when details are provided. See gtk_calendar_set_detail_func().
	CalendarShowDetails CalendarDisplayOptions = 0b100000
)

func marshalCalendarDisplayOptions(p uintptr) (interface{}, error) {
	return CalendarDisplayOptions(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for CalendarDisplayOptions.
func (c CalendarDisplayOptions) String() string {
	if c == 0 {
		return "CalendarDisplayOptions(0)"
	}

	var builder strings.Builder
	builder.Grow(106)

	for c != 0 {
		next := c & (c - 1)
		bit := c - next

		switch bit {
		case CalendarShowHeading:
			builder.WriteString("ShowHeading|")
		case CalendarShowDayNames:
			builder.WriteString("ShowDayNames|")
		case CalendarNoMonthChange:
			builder.WriteString("NoMonthChange|")
		case CalendarShowWeekNumbers:
			builder.WriteString("ShowWeekNumbers|")
		case CalendarShowDetails:
			builder.WriteString("ShowDetails|")
		default:
			builder.WriteString(fmt.Sprintf("CalendarDisplayOptions(0b%b)|", bit))
		}

		c = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if c contains other.
func (c CalendarDisplayOptions) Has(other CalendarDisplayOptions) bool {
	return (c & other) == other
}

// CellRendererState tells how a cell is to be rendered.
type CellRendererState C.guint

const (
	// CellRendererSelected: cell is currently selected, and probably has a
	// selection colored background to render to.
	CellRendererSelected CellRendererState = 0b1
	// CellRendererPrelit: mouse is hovering over the cell.
	CellRendererPrelit CellRendererState = 0b10
	// CellRendererInsensitive: cell is drawn in an insensitive manner.
	CellRendererInsensitive CellRendererState = 0b100
	// CellRendererSorted: cell is in a sorted row.
	CellRendererSorted CellRendererState = 0b1000
	// CellRendererFocused: cell is in the focus row.
	CellRendererFocused CellRendererState = 0b10000
	// CellRendererExpandable: cell is in a row that can be expanded. Since 3.4.
	CellRendererExpandable CellRendererState = 0b100000
	// CellRendererExpanded: cell is in a row that is expanded. Since 3.4.
	CellRendererExpanded CellRendererState = 0b1000000
)

func marshalCellRendererState(p uintptr) (interface{}, error) {
	return CellRendererState(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for CellRendererState.
func (c CellRendererState) String() string {
	if c == 0 {
		return "CellRendererState(0)"
	}

	var builder strings.Builder
	builder.Grow(146)

	for c != 0 {
		next := c & (c - 1)
		bit := c - next

		switch bit {
		case CellRendererSelected:
			builder.WriteString("Selected|")
		case CellRendererPrelit:
			builder.WriteString("Prelit|")
		case CellRendererInsensitive:
			builder.WriteString("Insensitive|")
		case CellRendererSorted:
			builder.WriteString("Sorted|")
		case CellRendererFocused:
			builder.WriteString("Focused|")
		case CellRendererExpandable:
			builder.WriteString("Expandable|")
		case CellRendererExpanded:
			builder.WriteString("Expanded|")
		default:
			builder.WriteString(fmt.Sprintf("CellRendererState(0b%b)|", bit))
		}

		c = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if c contains other.
func (c CellRendererState) Has(other CellRendererState) bool {
	return (c & other) == other
}

type DebugFlag C.guint

const (
	DebugMisc         DebugFlag = 0b1
	DebugPlugsocket   DebugFlag = 0b10
	DebugText         DebugFlag = 0b100
	DebugTree         DebugFlag = 0b1000
	DebugUpdates      DebugFlag = 0b10000
	DebugKeybindings  DebugFlag = 0b100000
	DebugMultihead    DebugFlag = 0b1000000
	DebugModules      DebugFlag = 0b10000000
	DebugGeometry     DebugFlag = 0b100000000
	DebugIcontheme    DebugFlag = 0b1000000000
	DebugPrinting     DebugFlag = 0b10000000000
	DebugBuilder      DebugFlag = 0b100000000000
	DebugSizeRequest  DebugFlag = 0b1000000000000
	DebugNoCSSCache   DebugFlag = 0b10000000000000
	DebugBaselines    DebugFlag = 0b100000000000000
	DebugPixelCache   DebugFlag = 0b1000000000000000
	DebugNoPixelCache DebugFlag = 0b10000000000000000
	DebugInteractive  DebugFlag = 0b100000000000000000
	DebugTouchscreen  DebugFlag = 0b1000000000000000000
	DebugActions      DebugFlag = 0b10000000000000000000
	DebugResize       DebugFlag = 0b100000000000000000000
	DebugLayout       DebugFlag = 0b1000000000000000000000
)

func marshalDebugFlag(p uintptr) (interface{}, error) {
	return DebugFlag(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for DebugFlag.
func (d DebugFlag) String() string {
	if d == 0 {
		return "DebugFlag(0)"
	}

	var builder strings.Builder
	builder.Grow(256)

	for d != 0 {
		next := d & (d - 1)
		bit := d - next

		switch bit {
		case DebugMisc:
			builder.WriteString("Misc|")
		case DebugPlugsocket:
			builder.WriteString("Plugsocket|")
		case DebugText:
			builder.WriteString("Text|")
		case DebugTree:
			builder.WriteString("Tree|")
		case DebugUpdates:
			builder.WriteString("Updates|")
		case DebugKeybindings:
			builder.WriteString("Keybindings|")
		case DebugMultihead:
			builder.WriteString("Multihead|")
		case DebugModules:
			builder.WriteString("Modules|")
		case DebugGeometry:
			builder.WriteString("Geometry|")
		case DebugIcontheme:
			builder.WriteString("Icontheme|")
		case DebugPrinting:
			builder.WriteString("Printing|")
		case DebugBuilder:
			builder.WriteString("Builder|")
		case DebugSizeRequest:
			builder.WriteString("SizeRequest|")
		case DebugNoCSSCache:
			builder.WriteString("NoCSSCache|")
		case DebugBaselines:
			builder.WriteString("Baselines|")
		case DebugPixelCache:
			builder.WriteString("PixelCache|")
		case DebugNoPixelCache:
			builder.WriteString("NoPixelCache|")
		case DebugInteractive:
			builder.WriteString("Interactive|")
		case DebugTouchscreen:
			builder.WriteString("Touchscreen|")
		case DebugActions:
			builder.WriteString("Actions|")
		case DebugResize:
			builder.WriteString("Resize|")
		case DebugLayout:
			builder.WriteString("Layout|")
		default:
			builder.WriteString(fmt.Sprintf("DebugFlag(0b%b)|", bit))
		}

		d = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if d contains other.
func (d DebugFlag) Has(other DebugFlag) bool {
	return (d & other) == other
}

// DestDefaults enumeration specifies the various types of action that will be
// taken on behalf of the user for a drag destination site.
type DestDefaults C.guint

const (
	// DestDefaultMotion: if set for a widget, GTK+, during a drag over
	// this widget will check if the drag matches this widget’s list of
	// possible targets and actions. GTK+ will then call gdk_drag_status() as
	// appropriate.
	DestDefaultMotion DestDefaults = 0b1
	// DestDefaultHighlight: if set for a widget, GTK+ will draw a highlight
	// on this widget as long as a drag is over this widget and the widget drag
	// format and action are acceptable.
	DestDefaultHighlight DestDefaults = 0b10
	// DestDefaultDrop: if set for a widget, when a drop occurs, GTK+ will
	// will check if the drag matches this widget’s list of possible targets
	// and actions. If so, GTK+ will call gtk_drag_get_data() on behalf of
	// the widget. Whether or not the drop is successful, GTK+ will call
	// gtk_drag_finish(). If the action was a move, then if the drag was
	// successful, then TRUE will be passed for the delete parameter to
	// gtk_drag_finish().
	DestDefaultDrop DestDefaults = 0b100
	// DestDefaultAll: if set, specifies that all default actions should be
	// taken.
	DestDefaultAll DestDefaults = 0b111
)

func marshalDestDefaults(p uintptr) (interface{}, error) {
	return DestDefaults(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for DestDefaults.
func (d DestDefaults) String() string {
	if d == 0 {
		return "DestDefaults(0)"
	}

	var builder strings.Builder
	builder.Grow(69)

	for d != 0 {
		next := d & (d - 1)
		bit := d - next

		switch bit {
		case DestDefaultMotion:
			builder.WriteString("Motion|")
		case DestDefaultHighlight:
			builder.WriteString("Highlight|")
		case DestDefaultDrop:
			builder.WriteString("Drop|")
		case DestDefaultAll:
			builder.WriteString("All|")
		default:
			builder.WriteString(fmt.Sprintf("DestDefaults(0b%b)|", bit))
		}

		d = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if d contains other.
func (d DestDefaults) Has(other DestDefaults) bool {
	return (d & other) == other
}

// DialogFlags flags used to influence dialog construction.
type DialogFlags C.guint

const (
	// DialogModal: make the constructed dialog modal, see
	// gtk_window_set_modal().
	DialogModal DialogFlags = 0b1
	// DialogDestroyWithParent: destroy the dialog when its parent is destroyed,
	// see gtk_window_set_destroy_with_parent().
	DialogDestroyWithParent DialogFlags = 0b10
	// DialogUseHeaderBar: create dialog with actions in header bar instead of
	// action area. Since 3.12.
	DialogUseHeaderBar DialogFlags = 0b100
)

func marshalDialogFlags(p uintptr) (interface{}, error) {
	return DialogFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for DialogFlags.
func (d DialogFlags) String() string {
	if d == 0 {
		return "DialogFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(54)

	for d != 0 {
		next := d & (d - 1)
		bit := d - next

		switch bit {
		case DialogModal:
			builder.WriteString("Modal|")
		case DialogDestroyWithParent:
			builder.WriteString("DestroyWithParent|")
		case DialogUseHeaderBar:
			builder.WriteString("UseHeaderBar|")
		default:
			builder.WriteString(fmt.Sprintf("DialogFlags(0b%b)|", bit))
		}

		d = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if d contains other.
func (d DialogFlags) Has(other DialogFlags) bool {
	return (d & other) == other
}

// EventControllerScrollFlags describes the behavior of a EventControllerScroll.
type EventControllerScrollFlags C.guint

const (
	// EventControllerScrollNone: don't emit scroll.
	EventControllerScrollNone EventControllerScrollFlags = 0b0
	// EventControllerScrollVertical: emit scroll with vertical deltas.
	EventControllerScrollVertical EventControllerScrollFlags = 0b1
	// EventControllerScrollHorizontal: emit scroll with horizontal deltas.
	EventControllerScrollHorizontal EventControllerScrollFlags = 0b10
	// EventControllerScrollDiscrete: only emit deltas that are multiples of 1.
	EventControllerScrollDiscrete EventControllerScrollFlags = 0b100
	// EventControllerScrollKinetic: emit EventControllerScroll::decelerate
	// after continuous scroll finishes.
	EventControllerScrollKinetic EventControllerScrollFlags = 0b1000
	// EventControllerScrollBothAxes: emit scroll on both axes.
	EventControllerScrollBothAxes EventControllerScrollFlags = 0b11
)

func marshalEventControllerScrollFlags(p uintptr) (interface{}, error) {
	return EventControllerScrollFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for EventControllerScrollFlags.
func (e EventControllerScrollFlags) String() string {
	if e == 0 {
		return "EventControllerScrollFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(176)

	for e != 0 {
		next := e & (e - 1)
		bit := e - next

		switch bit {
		case EventControllerScrollNone:
			builder.WriteString("None|")
		case EventControllerScrollVertical:
			builder.WriteString("Vertical|")
		case EventControllerScrollHorizontal:
			builder.WriteString("Horizontal|")
		case EventControllerScrollDiscrete:
			builder.WriteString("Discrete|")
		case EventControllerScrollKinetic:
			builder.WriteString("Kinetic|")
		case EventControllerScrollBothAxes:
			builder.WriteString("BothAxes|")
		default:
			builder.WriteString(fmt.Sprintf("EventControllerScrollFlags(0b%b)|", bit))
		}

		e = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if e contains other.
func (e EventControllerScrollFlags) Has(other EventControllerScrollFlags) bool {
	return (e & other) == other
}

// FileFilterFlags: these flags indicate what parts of a FileFilterInfo struct
// are filled or need to be filled.
type FileFilterFlags C.guint

const (
	// FileFilterFilename: filename of the file being tested.
	FileFilterFilename FileFilterFlags = 0b1
	// FileFilterURI: URI for the file being tested.
	FileFilterURI FileFilterFlags = 0b10
	// FileFilterDisplayName: string that will be used to display the file in
	// the file chooser.
	FileFilterDisplayName FileFilterFlags = 0b100
	// FileFilterMIMEType: mime type of the file.
	FileFilterMIMEType FileFilterFlags = 0b1000
)

func marshalFileFilterFlags(p uintptr) (interface{}, error) {
	return FileFilterFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for FileFilterFlags.
func (f FileFilterFlags) String() string {
	if f == 0 {
		return "FileFilterFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(73)

	for f != 0 {
		next := f & (f - 1)
		bit := f - next

		switch bit {
		case FileFilterFilename:
			builder.WriteString("Filename|")
		case FileFilterURI:
			builder.WriteString("URI|")
		case FileFilterDisplayName:
			builder.WriteString("DisplayName|")
		case FileFilterMIMEType:
			builder.WriteString("MIMEType|")
		default:
			builder.WriteString(fmt.Sprintf("FileFilterFlags(0b%b)|", bit))
		}

		f = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if f contains other.
func (f FileFilterFlags) Has(other FileFilterFlags) bool {
	return (f & other) == other
}

// FontChooserLevel: this enumeration specifies the granularity of font
// selection that is desired in a font chooser.
//
// This enumeration may be extended in the future; applications should ignore
// unknown values.
type FontChooserLevel C.guint

const (
	// FontChooserLevelFamily: allow selecting a font family.
	FontChooserLevelFamily FontChooserLevel = 0b0
	// FontChooserLevelStyle: allow selecting a specific font face.
	FontChooserLevelStyle FontChooserLevel = 0b1
	// FontChooserLevelSize: allow selecting a specific font size.
	FontChooserLevelSize       FontChooserLevel = 0b10
	FontChooserLevelVariations FontChooserLevel = 0b100
	// FontChooserLevelFeatures: allow selecting specific OpenType font
	// features.
	FontChooserLevelFeatures FontChooserLevel = 0b1000
)

func marshalFontChooserLevel(p uintptr) (interface{}, error) {
	return FontChooserLevel(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for FontChooserLevel.
func (f FontChooserLevel) String() string {
	if f == 0 {
		return "FontChooserLevel(0)"
	}

	var builder strings.Builder
	builder.Grow(117)

	for f != 0 {
		next := f & (f - 1)
		bit := f - next

		switch bit {
		case FontChooserLevelFamily:
			builder.WriteString("Family|")
		case FontChooserLevelStyle:
			builder.WriteString("Style|")
		case FontChooserLevelSize:
			builder.WriteString("Size|")
		case FontChooserLevelVariations:
			builder.WriteString("Variations|")
		case FontChooserLevelFeatures:
			builder.WriteString("Features|")
		default:
			builder.WriteString(fmt.Sprintf("FontChooserLevel(0b%b)|", bit))
		}

		f = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if f contains other.
func (f FontChooserLevel) Has(other FontChooserLevel) bool {
	return (f & other) == other
}

// IconLookupFlags: used to specify options for gtk_icon_theme_lookup_icon().
type IconLookupFlags C.guint

const (
	// IconLookupNoSVG: never get SVG icons, even if gdk-pixbuf supports them.
	// Cannot be used together with GTK_ICON_LOOKUP_FORCE_SVG.
	IconLookupNoSVG IconLookupFlags = 0b1
	// IconLookupForceSVG: get SVG icons, even if gdk-pixbuf doesn’t support
	// them. Cannot be used together with GTK_ICON_LOOKUP_NO_SVG.
	IconLookupForceSVG IconLookupFlags = 0b10
	// IconLookupUseBuiltin: when passed to gtk_icon_theme_lookup_icon()
	// includes builtin icons as well as files. For a builtin icon,
	// gtk_icon_info_get_filename() is NULL and you need to call
	// gtk_icon_info_get_builtin_pixbuf().
	IconLookupUseBuiltin IconLookupFlags = 0b100
	// IconLookupGenericFallback: try to shorten icon name at '-' characters
	// before looking at inherited themes. This flag is only supported in
	// functions that take a single icon name. For more general fallback,
	// see gtk_icon_theme_choose_icon(). Since 2.12.
	IconLookupGenericFallback IconLookupFlags = 0b1000
	// IconLookupForceSize always get the icon scaled to the requested size.
	// Since 2.14.
	IconLookupForceSize IconLookupFlags = 0b10000
	// IconLookupForceRegular: try to always load regular icons, even when
	// symbolic icon names are given. Since 3.14.
	IconLookupForceRegular IconLookupFlags = 0b100000
	// IconLookupForceSymbolic: try to always load symbolic icons, even when
	// regular icon names are given. Since 3.14.
	IconLookupForceSymbolic IconLookupFlags = 0b1000000
	// IconLookupDirLTR: try to load a variant of the icon for left-to-right
	// text direction. Since 3.14.
	IconLookupDirLTR IconLookupFlags = 0b10000000
	// IconLookupDirRTL: try to load a variant of the icon for right-to-left
	// text direction. Since 3.14.
	IconLookupDirRTL IconLookupFlags = 0b100000000
)

func marshalIconLookupFlags(p uintptr) (interface{}, error) {
	return IconLookupFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for IconLookupFlags.
func (i IconLookupFlags) String() string {
	if i == 0 {
		return "IconLookupFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(182)

	for i != 0 {
		next := i & (i - 1)
		bit := i - next

		switch bit {
		case IconLookupNoSVG:
			builder.WriteString("NoSVG|")
		case IconLookupForceSVG:
			builder.WriteString("ForceSVG|")
		case IconLookupUseBuiltin:
			builder.WriteString("UseBuiltin|")
		case IconLookupGenericFallback:
			builder.WriteString("GenericFallback|")
		case IconLookupForceSize:
			builder.WriteString("ForceSize|")
		case IconLookupForceRegular:
			builder.WriteString("ForceRegular|")
		case IconLookupForceSymbolic:
			builder.WriteString("ForceSymbolic|")
		case IconLookupDirLTR:
			builder.WriteString("DirLTR|")
		case IconLookupDirRTL:
			builder.WriteString("DirRTL|")
		default:
			builder.WriteString(fmt.Sprintf("IconLookupFlags(0b%b)|", bit))
		}

		i = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if i contains other.
func (i IconLookupFlags) Has(other IconLookupFlags) bool {
	return (i & other) == other
}

// InputHints describes hints that might be taken into account by input methods
// or applications. Note that input methods may already tailor their behaviour
// according to the InputPurpose of the entry.
//
// Some common sense is expected when using these flags - mixing
// GTK_INPUT_HINT_LOWERCASE with any of the uppercase hints makes no sense.
//
// This enumeration may be extended in the future; input methods should ignore
// unknown values.
type InputHints C.guint

const (
	// InputHintNone: no special behaviour suggested.
	InputHintNone InputHints = 0b0
	// InputHintSpellcheck: suggest checking for typos.
	InputHintSpellcheck InputHints = 0b1
	// InputHintNoSpellcheck: suggest not checking for typos.
	InputHintNoSpellcheck InputHints = 0b10
	// InputHintWordCompletion: suggest word completion.
	InputHintWordCompletion InputHints = 0b100
	// InputHintLowercase: suggest to convert all text to lowercase.
	InputHintLowercase InputHints = 0b1000
	// InputHintUppercaseChars: suggest to capitalize all text.
	InputHintUppercaseChars InputHints = 0b10000
	// InputHintUppercaseWords: suggest to capitalize the first character of
	// each word.
	InputHintUppercaseWords InputHints = 0b100000
	// InputHintUppercaseSentences: suggest to capitalize the first word of each
	// sentence.
	InputHintUppercaseSentences InputHints = 0b1000000
	// InputHintInhibitOSK: suggest to not show an onscreen keyboard (e.g for a
	// calculator that already has all the keys).
	InputHintInhibitOSK InputHints = 0b10000000
	// InputHintVerticalWriting: text is vertical. Since 3.18.
	InputHintVerticalWriting InputHints = 0b100000000
	// InputHintEmoji: suggest offering Emoji support. Since 3.22.20.
	InputHintEmoji InputHints = 0b1000000000
	// InputHintNoEmoji: suggest not offering Emoji support. Since 3.22.20.
	InputHintNoEmoji InputHints = 0b10000000000
)

func marshalInputHints(p uintptr) (interface{}, error) {
	return InputHints(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for InputHints.
func (i InputHints) String() string {
	if i == 0 {
		return "InputHints(0)"
	}

	var builder strings.Builder
	builder.Grow(251)

	for i != 0 {
		next := i & (i - 1)
		bit := i - next

		switch bit {
		case InputHintNone:
			builder.WriteString("None|")
		case InputHintSpellcheck:
			builder.WriteString("Spellcheck|")
		case InputHintNoSpellcheck:
			builder.WriteString("NoSpellcheck|")
		case InputHintWordCompletion:
			builder.WriteString("WordCompletion|")
		case InputHintLowercase:
			builder.WriteString("Lowercase|")
		case InputHintUppercaseChars:
			builder.WriteString("UppercaseChars|")
		case InputHintUppercaseWords:
			builder.WriteString("UppercaseWords|")
		case InputHintUppercaseSentences:
			builder.WriteString("UppercaseSentences|")
		case InputHintInhibitOSK:
			builder.WriteString("InhibitOSK|")
		case InputHintVerticalWriting:
			builder.WriteString("VerticalWriting|")
		case InputHintEmoji:
			builder.WriteString("Emoji|")
		case InputHintNoEmoji:
			builder.WriteString("NoEmoji|")
		default:
			builder.WriteString(fmt.Sprintf("InputHints(0b%b)|", bit))
		}

		i = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if i contains other.
func (i InputHints) Has(other InputHints) bool {
	return (i & other) == other
}

// JunctionSides describes how a rendered element connects to adjacent elements.
type JunctionSides C.guint

const (
	// JunctionNone: no junctions.
	JunctionNone JunctionSides = 0b0
	// JunctionCornerTopleft: element connects on the top-left corner.
	JunctionCornerTopleft JunctionSides = 0b1
	// JunctionCornerTopright: element connects on the top-right corner.
	JunctionCornerTopright JunctionSides = 0b10
	// JunctionCornerBottomleft: element connects on the bottom-left corner.
	JunctionCornerBottomleft JunctionSides = 0b100
	// JunctionCornerBottomright: element connects on the bottom-right corner.
	JunctionCornerBottomright JunctionSides = 0b1000
	// JunctionTop: element connects on the top side.
	JunctionTop JunctionSides = 0b11
	// JunctionBottom: element connects on the bottom side.
	JunctionBottom JunctionSides = 0b1100
	// JunctionLeft: element connects on the left side.
	JunctionLeft JunctionSides = 0b101
	// JunctionRight: element connects on the right side.
	JunctionRight JunctionSides = 0b1010
)

func marshalJunctionSides(p uintptr) (interface{}, error) {
	return JunctionSides(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for JunctionSides.
func (j JunctionSides) String() string {
	if j == 0 {
		return "JunctionSides(0)"
	}

	var builder strings.Builder
	builder.Grow(162)

	for j != 0 {
		next := j & (j - 1)
		bit := j - next

		switch bit {
		case JunctionNone:
			builder.WriteString("None|")
		case JunctionCornerTopleft:
			builder.WriteString("CornerTopleft|")
		case JunctionCornerTopright:
			builder.WriteString("CornerTopright|")
		case JunctionCornerBottomleft:
			builder.WriteString("CornerBottomleft|")
		case JunctionCornerBottomright:
			builder.WriteString("CornerBottomright|")
		case JunctionTop:
			builder.WriteString("Top|")
		case JunctionBottom:
			builder.WriteString("Bottom|")
		case JunctionLeft:
			builder.WriteString("Left|")
		case JunctionRight:
			builder.WriteString("Right|")
		default:
			builder.WriteString(fmt.Sprintf("JunctionSides(0b%b)|", bit))
		}

		j = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if j contains other.
func (j JunctionSides) Has(other JunctionSides) bool {
	return (j & other) == other
}

// PlacesOpenFlags: these flags serve two purposes. First, the application can
// call gtk_places_sidebar_set_open_flags() using these flags as a bitmask.
// This tells the sidebar that the application is able to open folders selected
// from the sidebar in various ways, for example, in new tabs or in new windows
// in addition to the normal mode.
//
// Second, when one of these values gets passed back to the application in the
// PlacesSidebar::open-location signal, it means that the application should
// open the selected location in the normal way, in a new tab, or in a new
// window. The sidebar takes care of determining the desired way to open the
// location, based on the modifier keys that the user is pressing at the time
// the selection is made.
//
// If the application never calls gtk_places_sidebar_set_open_flags(),
// then the sidebar will only use K_PLACES_OPEN_NORMAL in the
// PlacesSidebar::open-location signal. This is the default mode of operation.
type PlacesOpenFlags C.guint

const (
	// PlacesOpenNormal: this is the default mode that PlacesSidebar uses if
	// no other flags are specified. It indicates that the calling application
	// should open the selected location in the normal way, for example,
	// in the folder view beside the sidebar.
	PlacesOpenNormal PlacesOpenFlags = 0b1
	// PlacesOpenNewTab: when passed to gtk_places_sidebar_set_open_flags(),
	// this indicates that the application can open folders selected
	// from the sidebar in new tabs. This value will be passed to the
	// PlacesSidebar::open-location signal when the user selects that a location
	// be opened in a new tab instead of in the standard fashion.
	PlacesOpenNewTab PlacesOpenFlags = 0b10
	// PlacesOpenNewWindow: similar to GTK_PLACES_OPEN_NEW_TAB, but indicates
	// that the application can open folders in new windows.
	PlacesOpenNewWindow PlacesOpenFlags = 0b100
)

func marshalPlacesOpenFlags(p uintptr) (interface{}, error) {
	return PlacesOpenFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for PlacesOpenFlags.
func (p PlacesOpenFlags) String() string {
	if p == 0 {
		return "PlacesOpenFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(53)

	for p != 0 {
		next := p & (p - 1)
		bit := p - next

		switch bit {
		case PlacesOpenNormal:
			builder.WriteString("Normal|")
		case PlacesOpenNewTab:
			builder.WriteString("NewTab|")
		case PlacesOpenNewWindow:
			builder.WriteString("NewWindow|")
		default:
			builder.WriteString(fmt.Sprintf("PlacesOpenFlags(0b%b)|", bit))
		}

		p = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if p contains other.
func (p PlacesOpenFlags) Has(other PlacesOpenFlags) bool {
	return (p & other) == other
}

// RCFlags: deprecated.
type RCFlags C.guint

const (
	// RCFg: deprecated.
	RCFg RCFlags = 0b1
	// RCBg: deprecated.
	RCBg RCFlags = 0b10
	// RCText: deprecated.
	RCText RCFlags = 0b100
	// RCBase: deprecated.
	RCBase RCFlags = 0b1000
)

func marshalRCFlags(p uintptr) (interface{}, error) {
	return RCFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for RCFlags.
func (r RCFlags) String() string {
	if r == 0 {
		return "RCFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(23)

	for r != 0 {
		next := r & (r - 1)
		bit := r - next

		switch bit {
		case RCFg:
			builder.WriteString("Fg|")
		case RCBg:
			builder.WriteString("Bg|")
		case RCText:
			builder.WriteString("Text|")
		case RCBase:
			builder.WriteString("Base|")
		default:
			builder.WriteString(fmt.Sprintf("RCFlags(0b%b)|", bit))
		}

		r = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if r contains other.
func (r RCFlags) Has(other RCFlags) bool {
	return (r & other) == other
}

// RecentFilterFlags: these flags indicate what parts of a RecentFilterInfo
// struct are filled or need to be filled.
type RecentFilterFlags C.guint

const (
	// RecentFilterURI: URI of the file being tested.
	RecentFilterURI RecentFilterFlags = 0b1
	// RecentFilterDisplayName: string that will be used to display the file in
	// the recent chooser.
	RecentFilterDisplayName RecentFilterFlags = 0b10
	// RecentFilterMIMEType: mime type of the file.
	RecentFilterMIMEType RecentFilterFlags = 0b100
	// RecentFilterApplication: list of applications that have registered the
	// file.
	RecentFilterApplication RecentFilterFlags = 0b1000
	// RecentFilterGroup groups to which the file belongs to.
	RecentFilterGroup RecentFilterFlags = 0b10000
	// RecentFilterAge: number of days elapsed since the file has been
	// registered.
	RecentFilterAge RecentFilterFlags = 0b100000
)

func marshalRecentFilterFlags(p uintptr) (interface{}, error) {
	return RecentFilterFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for RecentFilterFlags.
func (r RecentFilterFlags) String() string {
	if r == 0 {
		return "RecentFilterFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(118)

	for r != 0 {
		next := r & (r - 1)
		bit := r - next

		switch bit {
		case RecentFilterURI:
			builder.WriteString("URI|")
		case RecentFilterDisplayName:
			builder.WriteString("DisplayName|")
		case RecentFilterMIMEType:
			builder.WriteString("MIMEType|")
		case RecentFilterApplication:
			builder.WriteString("Application|")
		case RecentFilterGroup:
			builder.WriteString("Group|")
		case RecentFilterAge:
			builder.WriteString("Age|")
		default:
			builder.WriteString(fmt.Sprintf("RecentFilterFlags(0b%b)|", bit))
		}

		r = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if r contains other.
func (r RecentFilterFlags) Has(other RecentFilterFlags) bool {
	return (r & other) == other
}

// RegionFlags describes a region within a widget.
type RegionFlags C.guint

const (
	// RegionEven: region has an even number within a set.
	RegionEven RegionFlags = 0b1
	// RegionOdd: region has an odd number within a set.
	RegionOdd RegionFlags = 0b10
	// RegionFirst: region is the first one within a set.
	RegionFirst RegionFlags = 0b100
	// RegionLast: region is the last one within a set.
	RegionLast RegionFlags = 0b1000
	// RegionOnly: region is the only one within a set.
	RegionOnly RegionFlags = 0b10000
	// RegionSorted: region is part of a sorted area.
	RegionSorted RegionFlags = 0b100000
)

func marshalRegionFlags(p uintptr) (interface{}, error) {
	return RegionFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for RegionFlags.
func (r RegionFlags) String() string {
	if r == 0 {
		return "RegionFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(67)

	for r != 0 {
		next := r & (r - 1)
		bit := r - next

		switch bit {
		case RegionEven:
			builder.WriteString("Even|")
		case RegionOdd:
			builder.WriteString("Odd|")
		case RegionFirst:
			builder.WriteString("First|")
		case RegionLast:
			builder.WriteString("Last|")
		case RegionOnly:
			builder.WriteString("Only|")
		case RegionSorted:
			builder.WriteString("Sorted|")
		default:
			builder.WriteString(fmt.Sprintf("RegionFlags(0b%b)|", bit))
		}

		r = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if r contains other.
func (r RegionFlags) Has(other RegionFlags) bool {
	return (r & other) == other
}

// StateFlags describes a widget state. Widget states are used to match the
// widget against CSS pseudo-classes. Note that GTK extends the regular CSS
// classes and sometimes uses different names.
type StateFlags C.guint

const (
	// StateFlagNormal: state during normal operation.
	StateFlagNormal StateFlags = 0b0
	// StateFlagActive: widget is active.
	StateFlagActive StateFlags = 0b1
	// StateFlagPrelight: widget has a mouse pointer over it.
	StateFlagPrelight StateFlags = 0b10
	// StateFlagSelected: widget is selected.
	StateFlagSelected StateFlags = 0b100
	// StateFlagInsensitive: widget is insensitive.
	StateFlagInsensitive StateFlags = 0b1000
	// StateFlagInconsistent: widget is inconsistent.
	StateFlagInconsistent StateFlags = 0b10000
	// StateFlagFocused: widget has the keyboard focus.
	StateFlagFocused StateFlags = 0b100000
	// StateFlagBackdrop: widget is in a background toplevel window.
	StateFlagBackdrop StateFlags = 0b1000000
	// StateFlagDirLTR: widget is in left-to-right text direction. Since 3.8.
	StateFlagDirLTR StateFlags = 0b10000000
	// StateFlagDirRTL: widget is in right-to-left text direction. Since 3.8.
	StateFlagDirRTL StateFlags = 0b100000000
	// StateFlagLink: widget is a link. Since 3.12.
	StateFlagLink StateFlags = 0b1000000000
	// StateFlagVisited: location the widget points to has already been visited.
	// Since 3.12.
	StateFlagVisited StateFlags = 0b10000000000
	// StateFlagChecked: widget is checked. Since 3.14.
	StateFlagChecked StateFlags = 0b100000000000
	// StateFlagDropActive: widget is highlighted as a drop target for DND.
	// Since 3.20.
	StateFlagDropActive StateFlags = 0b1000000000000
)

func marshalStateFlags(p uintptr) (interface{}, error) {
	return StateFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for StateFlags.
func (s StateFlags) String() string {
	if s == 0 {
		return "StateFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(245)

	for s != 0 {
		next := s & (s - 1)
		bit := s - next

		switch bit {
		case StateFlagNormal:
			builder.WriteString("Normal|")
		case StateFlagActive:
			builder.WriteString("Active|")
		case StateFlagPrelight:
			builder.WriteString("Prelight|")
		case StateFlagSelected:
			builder.WriteString("Selected|")
		case StateFlagInsensitive:
			builder.WriteString("Insensitive|")
		case StateFlagInconsistent:
			builder.WriteString("Inconsistent|")
		case StateFlagFocused:
			builder.WriteString("Focused|")
		case StateFlagBackdrop:
			builder.WriteString("Backdrop|")
		case StateFlagDirLTR:
			builder.WriteString("DirLTR|")
		case StateFlagDirRTL:
			builder.WriteString("DirRTL|")
		case StateFlagLink:
			builder.WriteString("Link|")
		case StateFlagVisited:
			builder.WriteString("Visited|")
		case StateFlagChecked:
			builder.WriteString("Checked|")
		case StateFlagDropActive:
			builder.WriteString("DropActive|")
		default:
			builder.WriteString(fmt.Sprintf("StateFlags(0b%b)|", bit))
		}

		s = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if s contains other.
func (s StateFlags) Has(other StateFlags) bool {
	return (s & other) == other
}

// StyleContextPrintFlags flags that modify the behavior of
// gtk_style_context_to_string(). New values may be added to this enumeration.
type StyleContextPrintFlags C.guint

const (
	StyleContextPrintNone StyleContextPrintFlags = 0b0
	// StyleContextPrintRecurse: print the entire tree of CSS nodes starting at
	// the style context's node.
	StyleContextPrintRecurse StyleContextPrintFlags = 0b1
	// StyleContextPrintShowStyle: show the values of the CSS properties for
	// each node.
	StyleContextPrintShowStyle StyleContextPrintFlags = 0b10
)

func marshalStyleContextPrintFlags(p uintptr) (interface{}, error) {
	return StyleContextPrintFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for StyleContextPrintFlags.
func (s StyleContextPrintFlags) String() string {
	if s == 0 {
		return "StyleContextPrintFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(73)

	for s != 0 {
		next := s & (s - 1)
		bit := s - next

		switch bit {
		case StyleContextPrintNone:
			builder.WriteString("None|")
		case StyleContextPrintRecurse:
			builder.WriteString("Recurse|")
		case StyleContextPrintShowStyle:
			builder.WriteString("ShowStyle|")
		default:
			builder.WriteString(fmt.Sprintf("StyleContextPrintFlags(0b%b)|", bit))
		}

		s = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if s contains other.
func (s StyleContextPrintFlags) Has(other StyleContextPrintFlags) bool {
	return (s & other) == other
}

// TargetFlags enumeration is used to specify constraints on a TargetEntry.
type TargetFlags C.guint

const (
	// TargetSameApp: if this is set, the target will only be selected for drags
	// within a single application.
	TargetSameApp TargetFlags = 0b1
	// TargetSameWidget: if this is set, the target will only be selected for
	// drags within a single widget.
	TargetSameWidget TargetFlags = 0b10
	// TargetOtherApp: if this is set, the target will not be selected for drags
	// within a single application.
	TargetOtherApp TargetFlags = 0b100
	// TargetOtherWidget: if this is set, the target will not be selected for
	// drags withing a single widget.
	TargetOtherWidget TargetFlags = 0b1000
)

func marshalTargetFlags(p uintptr) (interface{}, error) {
	return TargetFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for TargetFlags.
func (t TargetFlags) String() string {
	if t == 0 {
		return "TargetFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(63)

	for t != 0 {
		next := t & (t - 1)
		bit := t - next

		switch bit {
		case TargetSameApp:
			builder.WriteString("SameApp|")
		case TargetSameWidget:
			builder.WriteString("SameWidget|")
		case TargetOtherApp:
			builder.WriteString("OtherApp|")
		case TargetOtherWidget:
			builder.WriteString("OtherWidget|")
		default:
			builder.WriteString(fmt.Sprintf("TargetFlags(0b%b)|", bit))
		}

		t = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if t contains other.
func (t TargetFlags) Has(other TargetFlags) bool {
	return (t & other) == other
}

// TextSearchFlags flags affecting how a search is done.
//
// If neither K_TEXT_SEARCH_VISIBLE_ONLY nor K_TEXT_SEARCH_TEXT_ONLY are
// enabled, the match must be exact; the special 0xFFFC character will match
// embedded pixbufs or child widgets.
type TextSearchFlags C.guint

const (
	// TextSearchVisibleOnly: search only visible data. A search match may have
	// invisible text interspersed.
	TextSearchVisibleOnly TextSearchFlags = 0b1
	// TextSearchTextOnly: search only text. A match may have pixbufs or child
	// widgets mixed inside the matched range.
	TextSearchTextOnly TextSearchFlags = 0b10
	// TextSearchCaseInsensitive: text will be matched regardless of what case
	// it is in.
	TextSearchCaseInsensitive TextSearchFlags = 0b100
)

func marshalTextSearchFlags(p uintptr) (interface{}, error) {
	return TextSearchFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for TextSearchFlags.
func (t TextSearchFlags) String() string {
	if t == 0 {
		return "TextSearchFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(66)

	for t != 0 {
		next := t & (t - 1)
		bit := t - next

		switch bit {
		case TextSearchVisibleOnly:
			builder.WriteString("VisibleOnly|")
		case TextSearchTextOnly:
			builder.WriteString("TextOnly|")
		case TextSearchCaseInsensitive:
			builder.WriteString("CaseInsensitive|")
		default:
			builder.WriteString(fmt.Sprintf("TextSearchFlags(0b%b)|", bit))
		}

		t = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if t contains other.
func (t TextSearchFlags) Has(other TextSearchFlags) bool {
	return (t & other) == other
}

// ToolPaletteDragTargets flags used to specify the supported drag targets.
type ToolPaletteDragTargets C.guint

const (
	// ToolPaletteDragItems: support drag of items.
	ToolPaletteDragItems ToolPaletteDragTargets = 0b1
	// ToolPaletteDragGroups: support drag of groups.
	ToolPaletteDragGroups ToolPaletteDragTargets = 0b10
)

func marshalToolPaletteDragTargets(p uintptr) (interface{}, error) {
	return ToolPaletteDragTargets(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for ToolPaletteDragTargets.
func (t ToolPaletteDragTargets) String() string {
	if t == 0 {
		return "ToolPaletteDragTargets(0)"
	}

	var builder strings.Builder
	builder.Grow(42)

	for t != 0 {
		next := t & (t - 1)
		bit := t - next

		switch bit {
		case ToolPaletteDragItems:
			builder.WriteString("Items|")
		case ToolPaletteDragGroups:
			builder.WriteString("Groups|")
		default:
			builder.WriteString(fmt.Sprintf("ToolPaletteDragTargets(0b%b)|", bit))
		}

		t = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if t contains other.
func (t ToolPaletteDragTargets) Has(other ToolPaletteDragTargets) bool {
	return (t & other) == other
}

// TreeModelFlags: these flags indicate various properties of a TreeModel.
//
// They are returned by gtk_tree_model_get_flags(), and must be static
// for the lifetime of the object. A more complete description of
// K_TREE_MODEL_ITERS_PERSIST can be found in the overview of this section.
type TreeModelFlags C.guint

const (
	// TreeModelItersPersist iterators survive all signals emitted by the tree.
	TreeModelItersPersist TreeModelFlags = 0b1
	// TreeModelListOnly: model is a list only, and never has children.
	TreeModelListOnly TreeModelFlags = 0b10
)

func marshalTreeModelFlags(p uintptr) (interface{}, error) {
	return TreeModelFlags(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for TreeModelFlags.
func (t TreeModelFlags) String() string {
	if t == 0 {
		return "TreeModelFlags(0)"
	}

	var builder strings.Builder
	builder.Grow(39)

	for t != 0 {
		next := t & (t - 1)
		bit := t - next

		switch bit {
		case TreeModelItersPersist:
			builder.WriteString("ItersPersist|")
		case TreeModelListOnly:
			builder.WriteString("ListOnly|")
		default:
			builder.WriteString(fmt.Sprintf("TreeModelFlags(0b%b)|", bit))
		}

		t = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if t contains other.
func (t TreeModelFlags) Has(other TreeModelFlags) bool {
	return (t & other) == other
}

// UIManagerItemType: these enumeration values are used by
// gtk_ui_manager_add_ui() to determine what UI element to create.
//
// Deprecated: since version 3.10.
type UIManagerItemType C.guint

const (
	// UiManagerAuto: pick the type of the UI element according to context.
	UiManagerAuto UIManagerItemType = 0b0
	// UiManagerMenubar: create a menubar.
	UiManagerMenubar UIManagerItemType = 0b1
	// UiManagerMenu: create a menu.
	UiManagerMenu UIManagerItemType = 0b10
	// UiManagerToolbar: create a toolbar.
	UiManagerToolbar UIManagerItemType = 0b100
	// UiManagerPlaceholder: insert a placeholder.
	UiManagerPlaceholder UIManagerItemType = 0b1000
	// UiManagerPopup: create a popup menu.
	UiManagerPopup UIManagerItemType = 0b10000
	// UiManagerMenuitem: create a menuitem.
	UiManagerMenuitem UIManagerItemType = 0b100000
	// UiManagerToolitem: create a toolitem.
	UiManagerToolitem UIManagerItemType = 0b1000000
	// UiManagerSeparator: create a separator.
	UiManagerSeparator UIManagerItemType = 0b10000000
	// UiManagerAccelerator: install an accelerator.
	UiManagerAccelerator UIManagerItemType = 0b100000000
	// UiManagerPopupWithAccels: same as GTK_UI_MANAGER_POPUP, but the actions’
	// accelerators are shown.
	UiManagerPopupWithAccels UIManagerItemType = 0b1000000000
)

func marshalUIManagerItemType(p uintptr) (interface{}, error) {
	return UIManagerItemType(coreglib.ValueFromNative(unsafe.Pointer(p)).Flags()), nil
}

// String returns the names in string for UIManagerItemType.
func (u UIManagerItemType) String() string {
	if u == 0 {
		return "UIManagerItemType(0)"
	}

	var builder strings.Builder
	builder.Grow(198)

	for u != 0 {
		next := u & (u - 1)
		bit := u - next

		switch bit {
		case UiManagerAuto:
			builder.WriteString("Auto|")
		case UiManagerMenubar:
			builder.WriteString("Menubar|")
		case UiManagerMenu:
			builder.WriteString("Menu|")
		case UiManagerToolbar:
			builder.WriteString("Toolbar|")
		case UiManagerPlaceholder:
			builder.WriteString("Placeholder|")
		case UiManagerPopup:
			builder.WriteString("Popup|")
		case UiManagerMenuitem:
			builder.WriteString("Menuitem|")
		case UiManagerToolitem:
			builder.WriteString("Toolitem|")
		case UiManagerSeparator:
			builder.WriteString("Separator|")
		case UiManagerAccelerator:
			builder.WriteString("Accelerator|")
		case UiManagerPopupWithAccels:
			builder.WriteString("PopupWithAccels|")
		default:
			builder.WriteString(fmt.Sprintf("UIManagerItemType(0b%b)|", bit))
		}

		u = next
	}

	return strings.TrimSuffix(builder.String(), "|")
}

// Has returns true if u contains other.
func (u UIManagerItemType) Has(other UIManagerItemType) bool {
	return (u & other) == other
}

// AssistantPageFunc: function used by gtk_assistant_set_forward_page_func()
// to know which is the next page given a current one. 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.
type AssistantPageFunc func(currentPage int) (gint int)

// CalendarDetailFunc: this kind of functions provide Pango markup with detail
// information for the specified day. Examples for such details are holidays or
// appointments. The function returns NULL when no information is available.
type CalendarDetailFunc func(calendar *Calendar, year, month, day uint) (utf8 string)

// Callback: type of the callback functions used for e.g. iterating over the
// children of a container, see gtk_container_foreach().
type Callback func(widget Widgetter)

// CellAllocCallback: type of the callback functions used for iterating
// over the cell renderers and their allocated areas inside a CellArea,
// see gtk_cell_area_foreach_alloc().
type CellAllocCallback func(renderer CellRendererer, cellArea, cellBackground *gdk.Rectangle) (ok bool)

// CellCallback: type of the callback functions used for iterating over the cell
// renderers of a CellArea, see gtk_cell_area_foreach().
type CellCallback func(renderer CellRendererer) (ok bool)

// CellLayoutDataFunc: function which should set the value of cell_layout’s cell
// renderer(s) as appropriate.
type CellLayoutDataFunc func(cellLayout CellLayouter, cell CellRendererer, treeModel TreeModeller, iter *TreeIter)

// ClipboardImageReceivedFunc: function to be called when the results of
// gtk_clipboard_request_image() are received, or when the request fails.
type ClipboardImageReceivedFunc func(clipboard *Clipboard, pixbuf *gdkpixbuf.Pixbuf)

// ClipboardReceivedFunc: function to be called when the results of
// gtk_clipboard_request_contents() are received, or when the request fails.
type ClipboardReceivedFunc func(clipboard *Clipboard, selectionData *SelectionData)

// ClipboardTextReceivedFunc: function to be called when the results of
// gtk_clipboard_request_text() are received, or when the request fails.
type ClipboardTextReceivedFunc func(clipboard *Clipboard, text string)

// ClipboardURIReceivedFunc: function to be called when the results of
// gtk_clipboard_request_uris() are received, or when the request fails.
type ClipboardURIReceivedFunc func(clipboard *Clipboard, uris []string)

// EntryCompletionMatchFunc: function which decides whether the row indicated
// by iter matches a given key, and should be displayed as a possible completion
// for key. Note that key is normalized and case-folded (see g_utf8_normalize()
// and g_utf8_casefold()). If this is not appropriate, match functions
// have access to the unmodified key via gtk_entry_get_text (GTK_ENTRY
// (gtk_entry_completion_get_entry ())).
type EntryCompletionMatchFunc func(completion *EntryCompletion, key string, iter *TreeIter) (ok bool)

// FileFilterFunc: type of function that is used with custom filters, see
// gtk_file_filter_add_custom().
type FileFilterFunc func(filterInfo *FileFilterInfo) (ok bool)

// FlowBoxCreateWidgetFunc: called for flow boxes that are bound to a Model with
// gtk_flow_box_bind_model() for each item that gets added to the model.
type FlowBoxCreateWidgetFunc func(item *coreglib.Object) (widget Widgetter)

// FlowBoxFilterFunc: function that will be called whenrever a child changes or
// is added. It lets you control if the child should be visible or not.
type FlowBoxFilterFunc func(child *FlowBoxChild) (ok bool)

// FlowBoxForEachFunc: function used by gtk_flow_box_selected_foreach().
// It will be called on every selected child of the box.
type FlowBoxForEachFunc func(box *FlowBox, child *FlowBoxChild)

// FlowBoxSortFunc: function to compare two children to determine which should
// come first.
type FlowBoxSortFunc func(child1, child2 *FlowBoxChild) (gint int)

// FontFilterFunc: type of function that is used for deciding what fonts get
// shown in a FontChooser. See gtk_font_chooser_set_filter_func().
type FontFilterFunc func(family pango.FontFamilier, face pango.FontFacer) (ok bool)

// IconViewForEachFunc: function used by gtk_icon_view_selected_foreach() to map
// all selected rows. It will be called on every selected row in the view.
type IconViewForEachFunc func(iconView *IconView, path *TreePath)

// KeySnoopFunc: key snooper functions are called before normal event delivery.
// They can be used to implement custom key event handling.
type KeySnoopFunc func(grabWidget Widgetter, event *gdk.EventKey) (gint int)

// ListBoxCreateWidgetFunc: called for list boxes that are bound to a Model with
// gtk_list_box_bind_model() for each item that gets added to the model.
//
// Versions of GTK+ prior to 3.18 called gtk_widget_show_all() on the rows
// created by the GtkListBoxCreateWidgetFunc, but this forced all widgets
// inside the row to be shown, and is no longer the case. Applications should be
// updated to show the desired row widgets.
type ListBoxCreateWidgetFunc func(item *coreglib.Object) (widget Widgetter)

// ListBoxFilterFunc will be called whenever the row changes or is added and
// lets you control if the row should be visible or not.
type ListBoxFilterFunc func(row *ListBoxRow) (ok bool)

// ListBoxForEachFunc: function used by gtk_list_box_selected_foreach().
// It will be called on every selected child of the box.
type ListBoxForEachFunc func(box *ListBox, row *ListBoxRow)

// ListBoxSortFunc: compare two rows to determine which should be first.
type ListBoxSortFunc func(row1, row2 *ListBoxRow) (gint int)

// ListBoxUpdateHeaderFunc: whenever row changes or which row is before row
// changes this is called, which lets you update the header on row. You may
// remove or set a new one via gtk_list_box_row_set_header() or just change the
// state of the current header widget.
type ListBoxUpdateHeaderFunc func(row, before *ListBoxRow)

// PageSetupDoneFunc: type of function that is passed to
// gtk_print_run_page_setup_dialog_async().
//
// This function will be called when the page setup dialog is dismissed,
// and also serves as destroy notify for data.
type PageSetupDoneFunc func(pageSetup *PageSetup)

type PrintSettingsFunc func(key, value string)

// RecentFilterFunc: type of function that is used with custom filters,
// see gtk_recent_filter_add_custom().
type RecentFilterFunc func(filterInfo *RecentFilterInfo) (ok bool)

type RecentSortFunc func(a, b *RecentInfo) (gint int)

// TextBufferDeserializeFunc: function that is called to deserialize rich text
// that has been serialized with gtk_text_buffer_serialize(), and insert it at
// iter.
type TextBufferDeserializeFunc func(registerBuffer, contentBuffer *TextBuffer, iter *TextIter, data []byte, createTags bool) (_goerr error)

// TextBufferSerializeFunc: function that is called to serialize the content of
// a text buffer. It must return the serialized form of the content.
type TextBufferSerializeFunc func(registerBuffer, contentBuffer *TextBuffer, start, end *TextIter) (guint8s []byte)

type TextCharPredicate func(ch uint32) (ok bool)

type TextTagTableForEach func(tag *TextTag)

// TickCallback: callback type for adding a function to update animations.
// See gtk_widget_add_tick_callback().
type TickCallback func(widget Widgetter, frameClock gdk.FrameClocker) (ok bool)

// TranslateFunc: function used to translate messages in e.g. IconFactory and
// ActionGroup.
//
// Deprecated: since version 3.10.
type TranslateFunc func(path string) (utf8 string)

// TreeCellDataFunc: function to set the properties of a cell instead of just
// using the straight mapping between the cell and the model. This is useful
// for customizing the cell renderer. For example, a function might get an
// integer from the tree_model, and render it to the “text” attribute of
// “cell” by converting it to its written equivalent. This is set by calling
// gtk_tree_view_column_set_cell_data_func().
type TreeCellDataFunc func(treeColumn *TreeViewColumn, cell CellRendererer, treeModel TreeModeller, iter *TreeIter)

type TreeDestroyCountFunc func(treeView *TreeView, path *TreePath, children int)

// TreeIterCompareFunc should return a negative integer, zero, or a positive
// integer if a sorts before b, a sorts with b, or a sorts after b respectively.
// If two iters compare as equal, their order in the sorted model is
// undefined. In order to ensure that the TreeSortable behaves as expected,
// the GtkTreeIterCompareFunc must define a partial order on the model, i.e.
// it must be reflexive, antisymmetric and transitive.
//
// For example, if model is a product catalogue, then a compare function for the
// “price” column could be one which returns price_of(a) - price_of(b).
type TreeIterCompareFunc func(model TreeModeller, a, b *TreeIter) (gint int)

// TreeModelFilterModifyFunc: function which calculates display values from raw
// values in the model. It must fill value with the display value for the column
// column in the row indicated by iter.
//
// Since this function is called for each data access, it’s not a particularly
// efficient operation.
type TreeModelFilterModifyFunc func(model TreeModeller, iter *TreeIter, column int) (value coreglib.Value)

// TreeModelFilterVisibleFunc: function which decides whether the row indicated
// by iter is visible.
type TreeModelFilterVisibleFunc func(model TreeModeller, iter *TreeIter) (ok bool)

// TreeModelForEachFunc: type of the callback passed to gtk_tree_model_foreach()
// to iterate over the rows in a tree model.
type TreeModelForEachFunc func(model TreeModeller, path *TreePath, iter *TreeIter) (ok bool)

// TreeSelectionForEachFunc: function used by
// gtk_tree_selection_selected_foreach() to map all selected rows. It will be
// called on every selected row in the view.
type TreeSelectionForEachFunc func(model TreeModeller, path *TreePath, iter *TreeIter)

// TreeSelectionFunc: function used by gtk_tree_selection_set_select_function()
// to filter whether or not a row may be selected. It is called whenever a row's
// state might change. A return value of TRUE indicates to selection that it is
// okay to change the selection.
type TreeSelectionFunc func(selection *TreeSelection, model TreeModeller, path *TreePath, pathCurrentlySelected bool) (ok bool)

// TreeViewColumnDropFunc: function type for determining whether column can be
// dropped in a particular spot (as determined by prev_column and next_column).
// In left to right locales, prev_column is on the left of the potential
// drop spot, and next_column is on the right. In right to left mode, this is
// reversed. This function should return TRUE if the spot is a valid drop spot.
// Please note that returning TRUE does not actually indicate that the column
// drop was made, but is meant only to indicate a possible drop spot to the
// user.
type TreeViewColumnDropFunc func(treeView *TreeView, column, prevColumn, nextColumn *TreeViewColumn) (ok bool)

// TreeViewMappingFunc: function used for gtk_tree_view_map_expanded_rows().
type TreeViewMappingFunc func(treeView *TreeView, path *TreePath)

// TreeViewRowSeparatorFunc: function type for determining whether the row
// pointed to by iter should be rendered as a separator. A common way to
// implement this is to have a boolean column in the model, whose values the
// TreeViewRowSeparatorFunc returns.
type TreeViewRowSeparatorFunc func(model TreeModeller, iter *TreeIter) (ok bool)

// TreeViewSearchEqualFunc: function used for checking whether a row in model
// matches a search key string entered by the user. Note the return value is
// reversed from what you would normally expect, though it has some similarity
// to strcmp() returning 0 for equal strings.
type TreeViewSearchEqualFunc func(model TreeModeller, column int, key string, iter *TreeIter) (ok bool)

type TreeViewSearchPositionFunc func(treeView *TreeView, searchDialog Widgetter)

// AccelGroupsActivate finds the first accelerator in any AccelGroup attached to
// object that matches accel_key and accel_mods, and activates that accelerator.
//
// The function takes the following parameters:
//
//   - object usually a Window, on which to activate the accelerator.
//   - accelKey: accelerator keyval from a key event.
//   - accelMods: keyboard state mask from a key event.
//
// The function returns the following values:
//
//   - ok: TRUE if an accelerator was activated and handled this keypress.
func AccelGroupsActivate(object *coreglib.Object, accelKey uint, accelMods gdk.ModifierType) bool {
	var _arg1 *C.GObject        // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg1 = (*C.GObject)(unsafe.Pointer(object.Native()))
	_arg2 = C.guint(accelKey)
	_arg3 = C.GdkModifierType(accelMods)

	_cret = C.gtk_accel_groups_activate(_arg1, _arg2, _arg3)
	runtime.KeepAlive(object)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AccelGroupsFromObject gets a list of all accel groups which are attached to
// object.
//
// The function takes the following parameters:
//
//   - object usually a Window.
//
// The function returns the following values:
//
//   - sList: list of all accel groups which are attached to object.
func AccelGroupsFromObject(object *coreglib.Object) []*AccelGroup {
	var _arg1 *C.GObject // out
	var _cret *C.GSList  // in

	_arg1 = (*C.GObject)(unsafe.Pointer(object.Native()))

	_cret = C.gtk_accel_groups_from_object(_arg1)
	runtime.KeepAlive(object)

	var _sList []*AccelGroup // out

	_sList = make([]*AccelGroup, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkAccelGroup)(v)
		var dst *AccelGroup // out
		dst = wrapAccelGroup(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// AcceleratorGetDefaultModMask gets the modifier mask.
//
// The modifier mask determines which modifiers are considered significant for
// keyboard accelerators. See gtk_accelerator_set_default_mod_mask().
//
// The function returns the following values:
//
//   - modifierType: default accelerator modifier mask.
func AcceleratorGetDefaultModMask() gdk.ModifierType {
	var _cret C.GdkModifierType // in

	_cret = C.gtk_accelerator_get_default_mod_mask()

	var _modifierType gdk.ModifierType // out

	_modifierType = gdk.ModifierType(_cret)

	return _modifierType
}

// AcceleratorGetLabel converts an accelerator keyval and modifier mask into a
// string which can be used to represent the accelerator to the user.
//
// The function takes the following parameters:
//
//   - acceleratorKey: accelerator keyval.
//   - acceleratorMods: accelerator modifier mask.
//
// The function returns the following values:
//
//   - utf8: newly-allocated string representing the accelerator.
func AcceleratorGetLabel(acceleratorKey uint, acceleratorMods gdk.ModifierType) string {
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _cret *C.gchar          // in

	_arg1 = C.guint(acceleratorKey)
	_arg2 = C.GdkModifierType(acceleratorMods)

	_cret = C.gtk_accelerator_get_label(_arg1, _arg2)
	runtime.KeepAlive(acceleratorKey)
	runtime.KeepAlive(acceleratorMods)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// AcceleratorGetLabelWithKeycode converts an accelerator keyval and modifier
// mask into a (possibly translated) string that can be displayed to a user,
// similarly to gtk_accelerator_get_label(), but handling keycodes.
//
// This is only useful for system-level components, applications should use
// gtk_accelerator_parse() instead.
//
// The function takes the following parameters:
//
//   - display (optional) or NULL to use the default display.
//   - acceleratorKey: accelerator keyval.
//   - keycode: accelerator keycode.
//   - acceleratorMods: accelerator modifier mask.
//
// The function returns the following values:
//
//   - utf8: newly-allocated string representing the accelerator.
func AcceleratorGetLabelWithKeycode(display *gdk.Display, acceleratorKey, keycode uint, acceleratorMods gdk.ModifierType) string {
	var _arg1 *C.GdkDisplay     // out
	var _arg2 C.guint           // out
	var _arg3 C.guint           // out
	var _arg4 C.GdkModifierType // out
	var _cret *C.gchar          // in

	if display != nil {
		_arg1 = (*C.GdkDisplay)(unsafe.Pointer(coreglib.InternObject(display).Native()))
	}
	_arg2 = C.guint(acceleratorKey)
	_arg3 = C.guint(keycode)
	_arg4 = C.GdkModifierType(acceleratorMods)

	_cret = C.gtk_accelerator_get_label_with_keycode(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(display)
	runtime.KeepAlive(acceleratorKey)
	runtime.KeepAlive(keycode)
	runtime.KeepAlive(acceleratorMods)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// AcceleratorName converts an accelerator keyval and modifier mask into a
// string parseable by gtk_accelerator_parse(). For example, if you pass in
// K_KEY_q and K_CONTROL_MASK, this function returns “<Control>q”.
//
// If you need to display accelerators in the user interface, see
// gtk_accelerator_get_label().
//
// The function takes the following parameters:
//
//   - acceleratorKey: accelerator keyval.
//   - acceleratorMods: accelerator modifier mask.
//
// The function returns the following values:
//
//   - utf8: newly-allocated accelerator name.
func AcceleratorName(acceleratorKey uint, acceleratorMods gdk.ModifierType) string {
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _cret *C.gchar          // in

	_arg1 = C.guint(acceleratorKey)
	_arg2 = C.GdkModifierType(acceleratorMods)

	_cret = C.gtk_accelerator_name(_arg1, _arg2)
	runtime.KeepAlive(acceleratorKey)
	runtime.KeepAlive(acceleratorMods)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// AcceleratorNameWithKeycode converts an accelerator keyval and modifier mask
// into a string parseable by gtk_accelerator_parse_with_keycode(), similarly
// to gtk_accelerator_name() but handling keycodes. This is only useful for
// system-level components, applications should use gtk_accelerator_parse()
// instead.
//
// The function takes the following parameters:
//
//   - display (optional) or NULL to use the default display.
//   - acceleratorKey: accelerator keyval.
//   - keycode: accelerator keycode.
//   - acceleratorMods: accelerator modifier mask.
//
// The function returns the following values:
//
//   - utf8: newly allocated accelerator name.
func AcceleratorNameWithKeycode(display *gdk.Display, acceleratorKey, keycode uint, acceleratorMods gdk.ModifierType) string {
	var _arg1 *C.GdkDisplay     // out
	var _arg2 C.guint           // out
	var _arg3 C.guint           // out
	var _arg4 C.GdkModifierType // out
	var _cret *C.gchar          // in

	if display != nil {
		_arg1 = (*C.GdkDisplay)(unsafe.Pointer(coreglib.InternObject(display).Native()))
	}
	_arg2 = C.guint(acceleratorKey)
	_arg3 = C.guint(keycode)
	_arg4 = C.GdkModifierType(acceleratorMods)

	_cret = C.gtk_accelerator_name_with_keycode(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(display)
	runtime.KeepAlive(acceleratorKey)
	runtime.KeepAlive(keycode)
	runtime.KeepAlive(acceleratorMods)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// AcceleratorParse parses a string representing an accelerator. The format
// looks like “<Control>a” or “<Shift><Alt>F1” or “<Release>z” (the last one is
// for key release).
//
// The parser is fairly liberal and allows lower or upper case, and also
// abbreviations such as “<Ctl>” and “<Ctrl>”. Key names are parsed using
// gdk_keyval_from_name(). For character keys the name is not the symbol, but
// the lowercase name, e.g. one would use “<Ctrl>minus” instead of “<Ctrl>-”.
//
// If the parse fails, accelerator_key and accelerator_mods will be set to 0
// (zero).
//
// The function takes the following parameters:
//
//   - accelerator: string representing an accelerator.
//
// The function returns the following values:
//
//   - acceleratorKey (optional): return location for accelerator keyval,
//     or NULL.
//   - acceleratorMods (optional): return location for accelerator modifier
//     mask, NULL.
func AcceleratorParse(accelerator string) (uint, gdk.ModifierType) {
	var _arg1 *C.gchar          // out
	var _arg2 C.guint           // in
	var _arg3 C.GdkModifierType // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accelerator_parse(_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(accelerator)

	var _acceleratorKey uint              // out
	var _acceleratorMods gdk.ModifierType // out

	_acceleratorKey = uint(_arg2)
	_acceleratorMods = gdk.ModifierType(_arg3)

	return _acceleratorKey, _acceleratorMods
}

// AcceleratorParseWithKeycode parses a string representing an accelerator,
// similarly to gtk_accelerator_parse() but handles keycodes as well.
// This is only useful for system-level components, applications should use
// gtk_accelerator_parse() instead.
//
// If accelerator_codes is given and the result stored in it is non-NULL,
// the result must be freed with g_free().
//
// If a keycode is present in the accelerator and no accelerator_codes is given,
// the parse will fail.
//
// If the parse fails, accelerator_key, accelerator_mods and accelerator_codes
// will be set to 0 (zero).
//
// The function takes the following parameters:
//
//   - accelerator: string representing an accelerator.
//
// The function returns the following values:
//
//   - acceleratorKey (optional): return location for accelerator keyval,
//     or NULL.
//   - acceleratorCodes (optional): return location for accelerator keycodes,
//     or NULL.
//   - acceleratorMods (optional): return location for accelerator modifier
//     mask, NULL.
func AcceleratorParseWithKeycode(accelerator string) (uint, []uint, gdk.ModifierType) {
	var _arg1 *C.gchar          // out
	var _arg2 C.guint           // in
	var _arg3 *C.guint          // in
	var _arg4 C.GdkModifierType // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accelerator_parse_with_keycode(_arg1, &_arg2, &_arg3, &_arg4)
	runtime.KeepAlive(accelerator)

	var _acceleratorKey uint              // out
	var _acceleratorCodes []uint          // out
	var _acceleratorMods gdk.ModifierType // out

	_acceleratorKey = uint(_arg2)
	if _arg3 != nil {
		defer C.free(unsafe.Pointer(_arg3))
		{
			var i int
			var z C.guint
			for p := _arg3; *p != z; p = &unsafe.Slice(p, 2)[1] {
				i++
			}

			src := unsafe.Slice(_arg3, i)
			_acceleratorCodes = make([]uint, i)
			for i := range src {
				_acceleratorCodes[i] = uint(src[i])
			}
		}
	}
	_acceleratorMods = gdk.ModifierType(_arg4)

	return _acceleratorKey, _acceleratorCodes, _acceleratorMods
}

// AcceleratorSetDefaultModMask sets the modifiers that will be considered
// significant for keyboard accelerators. The default mod mask depends on the
// GDK backend in use, but will typically include K_CONTROL_MASK | K_SHIFT_MASK
// | K_MOD1_MASK | K_SUPER_MASK | K_HYPER_MASK | K_META_MASK. In other words,
// Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default
// be ignored by AccelGroup.
//
// You must include at least the three modifiers Control, Shift and Alt in any
// value you pass to this function.
//
// The default mod mask should be changed on application startup, before using
// any accelerator groups.
//
// The function takes the following parameters:
//
//   - defaultModMask: accelerator modifier mask.
func AcceleratorSetDefaultModMask(defaultModMask gdk.ModifierType) {
	var _arg1 C.GdkModifierType // out

	_arg1 = C.GdkModifierType(defaultModMask)

	C.gtk_accelerator_set_default_mod_mask(_arg1)
	runtime.KeepAlive(defaultModMask)
}

// AcceleratorValid determines whether a given keyval and modifier mask
// constitute a valid keyboard accelerator. For example, the K_KEY_a keyval plus
// K_CONTROL_MASK is valid - this is a “Ctrl+a” accelerator. But, you can't,
// for instance, use the K_KEY_Control_L keyval as an accelerator.
//
// The function takes the following parameters:
//
//   - keyval: GDK keyval.
//   - modifiers: modifier mask.
//
// The function returns the following values:
//
//   - ok: TRUE if the accelerator is valid.
func AcceleratorValid(keyval uint, modifiers gdk.ModifierType) bool {
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg1 = C.guint(keyval)
	_arg2 = C.GdkModifierType(modifiers)

	_cret = C.gtk_accelerator_valid(_arg1, _arg2)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AlternativeDialogButtonOrder returns TRUE if dialogs are expected
// to use an alternative button order on the screen screen. See
// gtk_dialog_set_alternative_button_order() for more details about alternative
// button order.
//
// If you need to use this function, you should probably connect to the
// ::notify:gtk-alternative-button-order signal on the Settings object
// associated to screen, in order to be notified if the button order setting
// changes.
//
// Deprecated: Deprecated.
//
// The function takes the following parameters:
//
//   - screen (optional) or NULL to use the default screen.
//
// The function returns the following values:
//
//   - ok: whether the alternative button order should be used.
func AlternativeDialogButtonOrder(screen *gdk.Screen) bool {
	var _arg1 *C.GdkScreen // out
	var _cret C.gboolean   // in

	if screen != nil {
		_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	}

	_cret = C.gtk_alternative_dialog_button_order(_arg1)
	runtime.KeepAlive(screen)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BindingsActivate: find a key binding matching keyval and modifiers and
// activate the binding on object.
//
// The function takes the following parameters:
//
//   - object to activate when binding found.
//   - keyval: key value of the binding.
//   - modifiers: key modifier of the binding.
//
// The function returns the following values:
//
//   - ok: TRUE if a binding was found and activated.
func BindingsActivate(object *coreglib.Object, keyval uint, modifiers gdk.ModifierType) bool {
	var _arg1 *C.GObject        // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg1 = (*C.GObject)(unsafe.Pointer(object.Native()))
	_arg2 = C.guint(keyval)
	_arg3 = C.GdkModifierType(modifiers)

	_cret = C.gtk_bindings_activate(_arg1, _arg2, _arg3)
	runtime.KeepAlive(object)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BindingsActivateEvent looks up key bindings for object to find one matching
// event, and if one was found, activate it.
//
// The function takes the following parameters:
//
//   - object (generally must be a widget).
//   - event: EventKey.
//
// The function returns the following values:
//
//   - ok: TRUE if a matching key binding was found.
func BindingsActivateEvent(object *coreglib.Object, event *gdk.EventKey) bool {
	var _arg1 *C.GObject     // out
	var _arg2 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg1 = (*C.GObject)(unsafe.Pointer(object.Native()))
	_arg2 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_bindings_activate_event(_arg1, _arg2)
	runtime.KeepAlive(object)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CairoShouldDrawWindow: this function is supposed to be called in Widget::draw
// implementations for widgets that support multiple windows. cr must be
// untransformed from invoking of the draw function. This function will return
// TRUE if the contents of the given window are supposed to be drawn and FALSE
// otherwise. Note that when the drawing was not initiated by the windowing
// system this function will return TRUE for all windows, so you need to draw
// the bottommost window first. Also, do not use “else if” statements to check
// which window should be drawn.
//
// The function takes the following parameters:
//
//   - cr: cairo context.
//   - window to check. window may not be an input-only window.
//
// The function returns the following values:
//
//   - ok: TRUE if window should be drawn.
func CairoShouldDrawWindow(cr *cairo.Context, window gdk.Windower) bool {
	var _arg1 *C.cairo_t   // out
	var _arg2 *C.GdkWindow // out
	var _cret C.gboolean   // in

	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_cairo_should_draw_window(_arg1, _arg2)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CairoTransformToWindow transforms the given cairo context cr that from
// widget-relative coordinates to window-relative coordinates. If the widget’s
// window is not an ancestor of window, no modification will be applied.
//
// This is the inverse to the transformation GTK applies when preparing an
// expose event to be emitted with the Widget::draw signal. It is intended to
// help porting multiwindow widgets from GTK+ 2 to the rendering architecture of
// GTK+ 3.
//
// The function takes the following parameters:
//
//   - cr: cairo context to transform.
//   - widget the context is currently centered for.
//   - window to transform the context to.
func CairoTransformToWindow(cr *cairo.Context, widget Widgetter, window gdk.Windower) {
	var _arg1 *C.cairo_t   // out
	var _arg2 *C.GtkWidget // out
	var _arg3 *C.GdkWindow // out

	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_cairo_transform_to_window(_arg1, _arg2, _arg3)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(window)
}

// CheckVersion checks that the GTK+ library in use is compatible with the
// given version. Generally you would pass in the constants K_MAJOR_VERSION,
// K_MINOR_VERSION, K_MICRO_VERSION as the three arguments to this function;
// that produces a check that the library in use is compatible with the version
// of GTK+ the application or module was compiled against.
//
// Compatibility is defined by two things: first the
// version of the running library is newer than the version
// required_major.required_minor.required_micro. Second the
// running library must be binary compatible with the version
// required_major.required_minor.required_micro (same major version.)
//
// This function is primarily for GTK+ modules; the module can call this
// function to check that it wasn’t loaded into an incompatible version of GTK+.
// However, such a check isn’t completely reliable, since the module may
// be linked against an old version of GTK+ and calling the old version of
// gtk_check_version(), but still get loaded into an application using a newer
// version of GTK+.
//
// The function takes the following parameters:
//
//   - requiredMajor: required major version.
//   - requiredMinor: required minor version.
//   - requiredMicro: required micro version.
//
// The function returns the following values:
//
//   - utf8 (optional): NULL if the GTK+ library is compatible with the given
//     version, or a string describing the version mismatch. The returned string
//     is owned by GTK+ and should not be modified or freed.
func CheckVersion(requiredMajor, requiredMinor, requiredMicro uint) string {
	var _arg1 C.guint  // out
	var _arg2 C.guint  // out
	var _arg3 C.guint  // out
	var _cret *C.gchar // in

	_arg1 = C.guint(requiredMajor)
	_arg2 = C.guint(requiredMinor)
	_arg3 = C.guint(requiredMicro)

	_cret = C.gtk_check_version(_arg1, _arg2, _arg3)
	runtime.KeepAlive(requiredMajor)
	runtime.KeepAlive(requiredMinor)
	runtime.KeepAlive(requiredMicro)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// DeviceGrabAdd adds a GTK+ grab on device, so all the events on device and
// its associated pointer or keyboard (if any) are delivered to widget. If the
// block_others parameter is TRUE, any other devices will be unable to interact
// with widget during the grab.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - device to grab on.
//   - blockOthers: TRUE to prevent other devices to interact with widget.
func DeviceGrabAdd(widget Widgetter, device gdk.Devicer, blockOthers bool) {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.GdkDevice // out
	var _arg3 C.gboolean   // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))
	if blockOthers {
		_arg3 = C.TRUE
	}

	C.gtk_device_grab_add(_arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)
	runtime.KeepAlive(blockOthers)
}

// DeviceGrabRemove removes a device grab from the given widget.
//
// You have to pair calls to gtk_device_grab_add() and gtk_device_grab_remove().
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - device: Device.
func DeviceGrabRemove(widget Widgetter, device gdk.Devicer) {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.GdkDevice // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	C.gtk_device_grab_remove(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)
}

// DisableSetlocale prevents gtk_init(), gtk_init_check(), gtk_init_with_args()
// and gtk_parse_args() from automatically calling setlocale (LC_ALL, "").
// You would want to use this function if you wanted to set the locale for your
// program to something other than the user’s locale, or if you wanted to set
// different values for different locale categories.
//
// Most programs should not need to call this function.
func DisableSetlocale() {
	C.gtk_disable_setlocale()
}

// DistributeNaturalAllocation distributes extra_space to child sizes by
// bringing smaller children up to natural size first.
//
// The remaining space will be added to the minimum_size member of the
// GtkRequestedSize struct. If all sizes reach their natural size then the
// remaining space is returned.
//
// The function takes the following parameters:
//
//   - extraSpace: extra space to redistribute among children after subtracting
//     minimum sizes and any child padding from the overall allocation.
//   - nRequestedSizes: number of requests to fit into the allocation.
//   - sizes: array of structs with a client pointer and a minimum/natural size
//     in the orientation of the allocation.
//
// The function returns the following values:
//
//   - gint: remainder of extra_space after redistributing space to sizes.
func DistributeNaturalAllocation(extraSpace int, nRequestedSizes uint, sizes *RequestedSize) int {
	var _arg1 C.gint              // out
	var _arg2 C.guint             // out
	var _arg3 *C.GtkRequestedSize // out
	var _cret C.gint              // in

	_arg1 = C.gint(extraSpace)
	_arg2 = C.guint(nRequestedSizes)
	_arg3 = (*C.GtkRequestedSize)(gextras.StructNative(unsafe.Pointer(sizes)))

	_cret = C.gtk_distribute_natural_allocation(_arg1, _arg2, _arg3)
	runtime.KeepAlive(extraSpace)
	runtime.KeepAlive(nRequestedSizes)
	runtime.KeepAlive(sizes)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// DragCancel cancels an ongoing drag operation on the source side.
//
// If you want to be able to cancel a drag operation in this way, you need
// to keep a pointer to the drag context, either from an explicit call to
// gtk_drag_begin_with_coordinates(), or by connecting to Widget::drag-begin.
//
// If context does not refer to an ongoing drag operation, this function does
// nothing.
//
// If a drag is cancelled in this way, the result argument of
// Widget::drag-failed is set to GTK_DRAG_RESULT_ERROR.
//
// The function takes the following parameters:
//
//   - context as e.g. returned by gtk_drag_begin_with_coordinates().
func DragCancel(context *gdk.DragContext) {
	var _arg1 *C.GdkDragContext // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_drag_cancel(_arg1)
	runtime.KeepAlive(context)
}

// DragFinish informs the drag source that the drop is finished, and that the
// data of the drag will no longer be required.
//
// The function takes the following parameters:
//
//   - context: drag context.
//   - success: flag indicating whether the drop was successful.
//   - del: flag indicating whether the source should delete the original data.
//     (This should be TRUE for a move).
//   - time_: timestamp from the Widget::drag-drop signal.
func DragFinish(context *gdk.DragContext, success, del bool, time_ uint32) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 C.gboolean        // out
	var _arg3 C.gboolean        // out
	var _arg4 C.guint32         // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if success {
		_arg2 = C.TRUE
	}
	if del {
		_arg3 = C.TRUE
	}
	_arg4 = C.guint32(time_)

	C.gtk_drag_finish(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(success)
	runtime.KeepAlive(del)
	runtime.KeepAlive(time_)
}

// DragGetSourceWidget determines the source widget for a drag.
//
// The function takes the following parameters:
//
//   - context: (destination side) drag context.
//
// The function returns the following values:
//
//   - widget (optional): if the drag is occurring within a single application,
//     a pointer to the source widget. Otherwise, NULL.
func DragGetSourceWidget(context *gdk.DragContext) Widgetter {
	var _arg1 *C.GdkDragContext // out
	var _cret *C.GtkWidget      // in

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_drag_get_source_widget(_arg1)
	runtime.KeepAlive(context)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// DragSetIconDefault sets the icon for a particular drag to the default icon.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
func DragSetIconDefault(context *gdk.DragContext) {
	var _arg1 *C.GdkDragContext // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_drag_set_icon_default(_arg1)
	runtime.KeepAlive(context)
}

// DragSetIconGIcon sets the icon for a given drag from the given icon. See the
// documentation for gtk_drag_set_icon_name() for more details about using icons
// in drag and drop.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
//   - icon: #GIcon.
//   - hotX: x offset of the hotspot within the icon.
//   - hotY: y offset of the hotspot within the icon.
func DragSetIconGIcon(context *gdk.DragContext, icon gio.Iconner, hotX, hotY int) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 *C.GIcon          // out
	var _arg3 C.gint            // out
	var _arg4 C.gint            // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	_arg3 = C.gint(hotX)
	_arg4 = C.gint(hotY)

	C.gtk_drag_set_icon_gicon(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(icon)
	runtime.KeepAlive(hotX)
	runtime.KeepAlive(hotY)
}

// DragSetIconName sets the icon for a given drag from a named themed icon.
// See the docs for IconTheme for more details. Note that the size of the
// icon depends on the icon theme (the icon is loaded at the symbolic size
// K_ICON_SIZE_DND), thus hot_x and hot_y have to be used with care.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
//   - iconName: name of icon to use.
//   - hotX: x offset of the hotspot within the icon.
//   - hotY: y offset of the hotspot within the icon.
func DragSetIconName(context *gdk.DragContext, iconName string, hotX, hotY int) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 *C.gchar          // out
	var _arg3 C.gint            // out
	var _arg4 C.gint            // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(hotX)
	_arg4 = C.gint(hotY)

	C.gtk_drag_set_icon_name(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(hotX)
	runtime.KeepAlive(hotY)
}

// DragSetIconPixbuf sets pixbuf as the icon for a given drag.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
//   - pixbuf to use as the drag icon.
//   - hotX: x offset within widget of the hotspot.
//   - hotY: y offset within widget of the hotspot.
func DragSetIconPixbuf(context *gdk.DragContext, pixbuf *gdkpixbuf.Pixbuf, hotX, hotY int) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 *C.GdkPixbuf      // out
	var _arg3 C.gint            // out
	var _arg4 C.gint            // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	_arg3 = C.gint(hotX)
	_arg4 = C.gint(hotY)

	C.gtk_drag_set_icon_pixbuf(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(pixbuf)
	runtime.KeepAlive(hotX)
	runtime.KeepAlive(hotY)
}

// DragSetIconStock sets the icon for a given drag from a stock ID.
//
// Deprecated: Use gtk_drag_set_icon_name() instead.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
//   - stockId: ID of the stock icon to use for the drag.
//   - hotX: x offset within the icon of the hotspot.
//   - hotY: y offset within the icon of the hotspot.
func DragSetIconStock(context *gdk.DragContext, stockId string, hotX, hotY int) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 *C.gchar          // out
	var _arg3 C.gint            // out
	var _arg4 C.gint            // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(hotX)
	_arg4 = C.gint(hotY)

	C.gtk_drag_set_icon_stock(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(hotX)
	runtime.KeepAlive(hotY)
}

// DragSetIconSurface sets surface as the icon for a given drag. GTK+ retains
// references for the arguments, and will release them when they are no longer
// needed.
//
// To position the surface relative to the mouse, use
// cairo_surface_set_device_offset() on surface. The mouse cursor will be
// positioned at the (0,0) coordinate of the surface.
//
// The function takes the following parameters:
//
//   - context for a drag (This must be called with a context for the source
//     side of a drag).
//   - surface to use as icon.
func DragSetIconSurface(context *gdk.DragContext, surface *cairo.Surface) {
	var _arg1 *C.GdkDragContext  // out
	var _arg2 *C.cairo_surface_t // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_surface_t)(unsafe.Pointer(surface.Native()))

	C.gtk_drag_set_icon_surface(_arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(surface)
}

// DragSetIconWidget changes the icon for drag operation to a given widget.
// GTK+ will not destroy the widget, so if you don’t want it to persist,
// you should connect to the “drag-end” signal and destroy it yourself.
//
// The function takes the following parameters:
//
//   - context for a drag. (This must be called with a context for the source
//     side of a drag).
//   - widget to use as an icon.
//   - hotX: x offset within widget of the hotspot.
//   - hotY: y offset within widget of the hotspot.
func DragSetIconWidget(context *gdk.DragContext, widget Widgetter, hotX, hotY int) {
	var _arg1 *C.GdkDragContext // out
	var _arg2 *C.GtkWidget      // out
	var _arg3 C.gint            // out
	var _arg4 C.gint            // out

	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = C.gint(hotX)
	_arg4 = C.gint(hotY)

	C.gtk_drag_set_icon_widget(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(hotX)
	runtime.KeepAlive(hotY)
}

// DrawInsertionCursor draws a text caret on cr at location. This is not a style
// function but merely a convenience function for drawing the standard cursor
// shape.
//
// Deprecated: Use gtk_render_insertion_cursor() instead.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - cr: cairo context to draw to.
//   - location where to draw the cursor (location->width is ignored).
//   - isPrimary: if the cursor should be the primary cursor color.
//   - direction: whether the cursor is left-to-right or right-to-left. Should
//     never be K_TEXT_DIR_NONE.
//   - drawArrow: TRUE to draw a directional arrow on the cursor. Should be
//     FALSE unless the cursor is split.
func DrawInsertionCursor(widget Widgetter, cr *cairo.Context, location *gdk.Rectangle, isPrimary bool, direction TextDirection, drawArrow bool) {
	var _arg1 *C.GtkWidget       // out
	var _arg2 *C.cairo_t         // out
	var _arg3 *C.GdkRectangle    // out
	var _arg4 C.gboolean         // out
	var _arg5 C.GtkTextDirection // out
	var _arg6 C.gboolean         // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(location)))
	if isPrimary {
		_arg4 = C.TRUE
	}
	_arg5 = C.GtkTextDirection(direction)
	if drawArrow {
		_arg6 = C.TRUE
	}

	C.gtk_draw_insertion_cursor(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(location)
	runtime.KeepAlive(isPrimary)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(drawArrow)
}

// EventsPending checks if any events are pending.
//
// This can be used to update the UI and invoke timeouts etc. while doing some
// time intensive computation.
//
// Updating the UI during a long computation
//
//	// computation going on...
//
//	while (gtk_events_pending ())
//	  gtk_main_iteration ();
//
//	// ...computation continued.
//
// The function returns the following values:
//
//   - ok: TRUE if any events are pending, FALSE otherwise.
func EventsPending() bool {
	var _cret C.gboolean // in

	_cret = C.gtk_events_pending()

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// False: analogical to gtk_true(), this function does nothing but always
// returns FALSE.
//
// The function returns the following values:
//
//   - ok: FALSE.
func False() bool {
	var _cret C.gboolean // in

	_cret = C.gtk_false()

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// GetBinaryAge returns the binary age as passed to libtool when building the
// GTK+ library the process is running against. If libtool means nothing to you,
// don't worry about it.
//
// The function returns the following values:
//
//   - guint: binary age of the GTK+ library.
func GetBinaryAge() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_binary_age()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetCurrentEvent obtains a copy of the event currently being processed by
// GTK+.
//
// For example, if you are handling a Button::clicked signal, the current event
// will be the EventButton that triggered the ::clicked signal.
//
// The function returns the following values:
//
//   - event (optional): copy of the current event, or NULL if there is no
//     current event. The returned event must be freed with gdk_event_free().
func GetCurrentEvent() *gdk.Event {
	var _cret *C.GdkEvent // in

	_cret = C.gtk_get_current_event()

	var _event *gdk.Event // out

	if _cret != nil {
		{
			v := (*gdk.Event)(gextras.NewStructNative(unsafe.Pointer(_cret)))
			_event = v
		}
	}

	return _event
}

// GetCurrentEventDevice: if there is a current event and it has a device,
// return that device, otherwise return NULL.
//
// The function returns the following values:
//
//   - device (optional) or NULL.
func GetCurrentEventDevice() gdk.Devicer {
	var _cret *C.GdkDevice // in

	_cret = C.gtk_get_current_event_device()

	var _device gdk.Devicer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Devicer)
				return ok
			})
			rv, ok := casted.(gdk.Devicer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Devicer")
			}
			_device = rv
		}
	}

	return _device
}

// GetCurrentEventState: if there is a current event and it has a state field,
// place that state field in state and return TRUE, otherwise return FALSE.
//
// The function returns the following values:
//
//   - state: location to store the state of the current event.
//   - ok: TRUE if there was a current event and it had a state field.
func GetCurrentEventState() (gdk.ModifierType, bool) {
	var _arg1 C.GdkModifierType // in
	var _cret C.gboolean        // in

	_cret = C.gtk_get_current_event_state(&_arg1)

	var _state gdk.ModifierType // out
	var _ok bool                // out

	_state = gdk.ModifierType(_arg1)
	if _cret != 0 {
		_ok = true
	}

	return _state, _ok
}

// GetCurrentEventTime: if there is a current event and it has a timestamp,
// return that timestamp, otherwise return GDK_CURRENT_TIME.
//
// The function returns the following values:
//
//   - guint32: timestamp from the current event, or GDK_CURRENT_TIME.
func GetCurrentEventTime() uint32 {
	var _cret C.guint32 // in

	_cret = C.gtk_get_current_event_time()

	var _guint32 uint32 // out

	_guint32 = uint32(_cret)

	return _guint32
}

// GetDebugFlags returns the GTK+ debug flags.
//
// This function is intended for GTK+ modules that want to adjust their debug
// output based on GTK+ debug flags.
//
// The function returns the following values:
//
//   - guint: GTK+ debug flags.
func GetDebugFlags() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_debug_flags()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetDefaultLanguage returns the Language for the default language currently
// in effect. (Note that this can change over the life of an application.)
// The default language is derived from the current locale. It determines, for
// example, whether GTK+ uses the right-to-left or left-to-right text direction.
//
// This function is equivalent to pango_language_get_default(). See that
// function for details.
//
// The function returns the following values:
//
//   - language: default language as a Language, must not be freed.
func GetDefaultLanguage() *pango.Language {
	var _cret *C.PangoLanguage // in

	_cret = C.gtk_get_default_language()

	var _language *pango.Language // out

	_language = (*pango.Language)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _language
}

// GetEventWidget: if event is NULL or the event was not associated with any
// widget, returns NULL, otherwise returns the widget that received the event
// originally.
//
// The function takes the following parameters:
//
//   - event: Event.
//
// The function returns the following values:
//
//   - widget (optional) that originally received event, or NULL.
func GetEventWidget(event *gdk.Event) Widgetter {
	var _arg1 *C.GdkEvent  // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_get_event_widget(_arg1)
	runtime.KeepAlive(event)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// GetInterfaceAge returns the interface age as passed to libtool when building
// the GTK+ library the process is running against. If libtool means nothing to
// you, don't worry about it.
//
// The function returns the following values:
//
//   - guint: interface age of the GTK+ library.
func GetInterfaceAge() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_interface_age()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetLocaleDirection: get the direction of the current locale. This is the
// expected reading direction for text and UI.
//
// This function depends on the current locale being set with setlocale()
// and will default to setting the GTK_TEXT_DIR_LTR direction otherwise.
// GTK_TEXT_DIR_NONE will never be returned.
//
// GTK+ sets the default text direction according to the locale during
// gtk_init(), and you should normally use gtk_widget_get_direction() or
// gtk_widget_get_default_direction() to obtain the current direcion.
//
// This function is only needed rare cases when the locale is changed after
// GTK+ has already been initialized. In this case, you can use it to update the
// default text direction as follows:
//
//	setlocale (LC_ALL, new_locale);
//	direction = gtk_get_locale_direction ();
//	gtk_widget_set_default_direction (direction);.
//
// The function returns the following values:
//
//   - textDirection of the current locale.
func GetLocaleDirection() TextDirection {
	var _cret C.GtkTextDirection // in

	_cret = C.gtk_get_locale_direction()

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// GetMajorVersion returns the major version number of the GTK+ library. (e.g.
// in GTK+ version 3.1.5 this is 3.)
//
// This function is in the library, so it represents the GTK+ library your code
// is running against. Contrast with the K_MAJOR_VERSION macro, which represents
// the major version of the GTK+ headers you have included when compiling your
// code.
//
// The function returns the following values:
//
//   - guint: major version number of the GTK+ library.
func GetMajorVersion() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_major_version()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetMicroVersion returns the micro version number of the GTK+ library. (e.g.
// in GTK+ version 3.1.5 this is 5.)
//
// This function is in the library, so it represents the GTK+ library your
// code is are running against. Contrast with the K_MICRO_VERSION macro,
// which represents the micro version of the GTK+ headers you have included when
// compiling your code.
//
// The function returns the following values:
//
//   - guint: micro version number of the GTK+ library.
func GetMicroVersion() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_micro_version()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetMinorVersion returns the minor version number of the GTK+ library. (e.g.
// in GTK+ version 3.1.5 this is 1.)
//
// This function is in the library, so it represents the GTK+ library your
// code is are running against. Contrast with the K_MINOR_VERSION macro,
// which represents the minor version of the GTK+ headers you have included when
// compiling your code.
//
// The function returns the following values:
//
//   - guint: minor version number of the GTK+ library.
func GetMinorVersion() uint {
	var _cret C.guint // in

	_cret = C.gtk_get_minor_version()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// GetOptionGroup returns a Group for the commandline arguments recognized by
// GTK+ and GDK.
//
// You should add this group to your Context with g_option_context_add_group(),
// if you are using g_option_context_parse() to parse your commandline
// arguments.
//
// The function takes the following parameters:
//
//   - openDefaultDisplay: whether to open the default display when parsing the
//     commandline arguments.
//
// The function returns the following values:
//
//   - optionGroup for the commandline arguments recognized by GTK+.
func GetOptionGroup(openDefaultDisplay bool) *glib.OptionGroup {
	var _arg1 C.gboolean      // out
	var _cret *C.GOptionGroup // in

	if openDefaultDisplay {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_get_option_group(_arg1)
	runtime.KeepAlive(openDefaultDisplay)

	var _optionGroup *glib.OptionGroup // out

	_optionGroup = (*glib.OptionGroup)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_optionGroup)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_option_group_unref((*C.GOptionGroup)(intern.C))
		},
	)

	return _optionGroup
}

// GrabGetCurrent queries the current grab of the default window group.
//
// The function returns the following values:
//
//   - widget (optional) which currently has the grab or NULL if no grab is
//     active.
func GrabGetCurrent() Widgetter {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_grab_get_current()

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// KeySnooperRemove removes the key snooper function with the given id.
//
// Deprecated: Key snooping should not be done. Events should be handled by
// widgets.
//
// The function takes the following parameters:
//
//   - snooperHandlerId identifies the key snooper to remove.
func KeySnooperRemove(snooperHandlerId uint) {
	var _arg1 C.guint // out

	_arg1 = C.guint(snooperHandlerId)

	C.gtk_key_snooper_remove(_arg1)
	runtime.KeepAlive(snooperHandlerId)
}

// Main runs the main loop until gtk_main_quit() is called.
//
// You can nest calls to gtk_main(). In that case gtk_main_quit() will make the
// innermost invocation of the main loop return.
func Main() {
	C.gtk_main()
}

// MainDoEvent processes a single GDK event.
//
// This is public only to allow filtering of events between GDK and GTK+.
// You will not usually need to call this function directly.
//
// While you should not call this function directly, you might want to know
// how exactly events are handled. So here is what this function does with the
// event:
//
// 1. Compress enter/leave notify events. If the event passed build an
// enter/leave pair together with the next event (peeked from GDK), both events
// are thrown away. This is to avoid a backlog of (de-)highlighting widgets
// crossed by the pointer.
//
// 2. Find the widget which got the event. If the widget can’t be determined the
// event is thrown away unless it belongs to a INCR transaction.
//
// 3. Then the event is pushed onto a stack so you can query the currently
// handled event with gtk_get_current_event().
//
// 4. The event is sent to a widget. If a grab is active all events for widgets
// that are not in the contained in the grab widget are sent to the latter
// with a few exceptions: - Deletion and destruction events are still sent to
// the event widget for obvious reasons. - Events which directly relate to the
// visual representation of the event widget. - Leave events are delivered to
// the event widget if there was an enter event delivered to it before without
// the paired leave event. - Drag events are not redirected because it is
// unclear what the semantics of that would be. Another point of interest might
// be that all key events are first passed through the key snooper functions if
// there are any. Read the description of gtk_key_snooper_install() if you need
// this feature.
//
// 5. After finishing the delivery the event is popped from the event stack.
//
// The function takes the following parameters:
//
//   - event to process (normally passed by GDK).
func MainDoEvent(event *gdk.Event) {
	var _arg1 *C.GdkEvent // out

	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	C.gtk_main_do_event(_arg1)
	runtime.KeepAlive(event)
}

// MainIteration runs a single iteration of the mainloop.
//
// If no events are waiting to be processed GTK+ will block until the next event
// is noticed. If you don’t want to block look at gtk_main_iteration_do() or
// check if any events are pending with gtk_events_pending() first.
//
// The function returns the following values:
//
//   - ok: TRUE if gtk_main_quit() has been called for the innermost mainloop.
func MainIteration() bool {
	var _cret C.gboolean // in

	_cret = C.gtk_main_iteration()

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MainIterationDo runs a single iteration of the mainloop. If no events are
// available either return or block depending on the value of blocking.
//
// The function takes the following parameters:
//
//   - blocking: TRUE if you want GTK+ to block if no events are pending.
//
// The function returns the following values:
//
//   - ok: TRUE if gtk_main_quit() has been called for the innermost mainloop.
func MainIterationDo(blocking bool) bool {
	var _arg1 C.gboolean // out
	var _cret C.gboolean // in

	if blocking {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_main_iteration_do(_arg1)
	runtime.KeepAlive(blocking)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MainLevel asks for the current nesting level of the main loop.
//
// The function returns the following values:
//
//   - guint: nesting level of the current invocation of the main loop.
func MainLevel() uint {
	var _cret C.guint // in

	_cret = C.gtk_main_level()

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// MainQuit makes the innermost invocation of the main loop return when it
// regains control.
func MainQuit() {
	C.gtk_main_quit()
}

// PaintArrow draws an arrow in the given rectangle on cr using the given
// parameters. arrow_type determines the direction of the arrow.
//
// Deprecated: Use gtk_render_arrow() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - arrowType: type of arrow to draw.
//   - fill: TRUE if the arrow tip should be filled.
//   - x origin of the rectangle to draw the arrow in.
//   - y origin of the rectangle to draw the arrow in.
//   - width of the rectangle to draw the arrow in.
//   - height of the rectangle to draw the arrow in.
func PaintArrow(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, arrowType ArrowType, fill bool, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.GtkArrowType  // out
	var _arg8 C.gboolean      // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out
	var _arg11 C.gint         // out
	var _arg12 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.GtkArrowType(arrowType)
	if fill {
		_arg8 = C.TRUE
	}
	_arg9 = C.gint(x)
	_arg10 = C.gint(y)
	_arg11 = C.gint(width)
	_arg12 = C.gint(height)

	C.gtk_paint_arrow(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(arrowType)
	runtime.KeepAlive(fill)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintBox draws a box on cr with the given parameters.
//
// Deprecated: Use gtk_render_frame() and gtk_render_background() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the box.
//   - y origin of the box.
//   - width of the box.
//   - height of the box.
func PaintBox(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_box(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintBoxGap draws a box in cr using the given style and state and shadow
// type, leaving a gap in one side.
//
// Deprecated: Use gtk_render_frame_gap() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle.
//   - y origin of the rectangle.
//   - width of the rectangle.
//   - height: width of the rectangle.
//   - gapSide: side in which to leave the gap.
//   - gapX: starting position of the gap.
//   - gapWidth: width of the gap.
func PaintBoxGap(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int) {
	var _arg1 *C.GtkStyle        // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkShadowType    // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.gint            // out
	var _arg11 C.GtkPositionType // out
	var _arg12 C.gint            // out
	var _arg13 C.gint            // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)
	_arg11 = C.GtkPositionType(gapSide)
	_arg12 = C.gint(gapX)
	_arg13 = C.gint(gapWidth)

	C.gtk_paint_box_gap(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(gapX)
	runtime.KeepAlive(gapWidth)
}

// PaintCheck draws a check button indicator in the given rectangle on cr with
// the given parameters.
//
// Deprecated: Use gtk_render_check() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle to draw the check in.
//   - y origin of the rectangle to draw the check in.
//   - width of the rectangle to draw the check in.
//   - height of the rectangle to draw the check in.
func PaintCheck(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_check(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintDiamond draws a diamond in the given rectangle on window using the given
// parameters.
//
// Deprecated: Use cairo instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle to draw the diamond in.
//   - y origin of the rectangle to draw the diamond in.
//   - width of the rectangle to draw the diamond in.
//   - height of the rectangle to draw the diamond in.
func PaintDiamond(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_diamond(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintExpander draws an expander as used in TreeView. x and y specify
// the center the expander. The size of the expander is determined by the
// “expander-size” style property of widget. (If widget is not specified or
// doesn’t have an “expander-size” property, an unspecified default size will
// be used, since the caller doesn't have sufficient information to position the
// expander, this is likely not useful.) The expander is expander_size pixels
// tall in the collapsed position and expander_size pixels wide in the expanded
// position.
//
// Deprecated: Use gtk_render_expander() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x position to draw the expander at.
//   - y position to draw the expander at.
//   - expanderStyle: style to draw the expander in; determines whether the
//     expander is collapsed, expanded, or in an intermediate state.
func PaintExpander(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y int, expanderStyle ExpanderStyle) {
	var _arg1 *C.GtkStyle        // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.GtkStateType     // out
	var _arg4 *C.GtkWidget       // out
	var _arg5 *C.gchar           // out
	var _arg6 C.gint             // out
	var _arg7 C.gint             // out
	var _arg8 C.GtkExpanderStyle // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.GtkExpanderStyle(expanderStyle)

	C.gtk_paint_expander(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(expanderStyle)
}

// PaintExtension draws an extension, i.e. a notebook tab.
//
// Deprecated: Use gtk_render_extension() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the extension.
//   - y origin of the extension.
//   - width of the extension.
//   - height: width of the extension.
//   - gapSide: side on to which the extension is attached.
func PaintExtension(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType) {
	var _arg1 *C.GtkStyle        // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkShadowType    // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.gint            // out
	var _arg11 C.GtkPositionType // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)
	_arg11 = C.GtkPositionType(gapSide)

	C.gtk_paint_extension(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
}

// PaintFlatBox draws a flat box on cr with the given parameters.
//
// Deprecated: Use gtk_render_frame() and gtk_render_background() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the box.
//   - y origin of the box.
//   - width of the box.
//   - height of the box.
func PaintFlatBox(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_flat_box(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintFocus draws a focus indicator around the given rectangle on cr using the
// given style.
//
// Deprecated: Use gtk_render_focus() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle around which to draw a focus indicator.
//   - y origin of the rectangle around which to draw a focus indicator.
//   - width of the rectangle around which to draw a focus indicator.
//   - height of the rectangle around which to draw a focus indicator.
func PaintFocus(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle    // out
	var _arg2 *C.cairo_t     // out
	var _arg3 C.GtkStateType // out
	var _arg4 *C.GtkWidget   // out
	var _arg5 *C.gchar       // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out
	var _arg9 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C.gtk_paint_focus(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintHandle draws a handle as used in HandleBox and Paned.
//
// Deprecated: Use gtk_render_handle() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the handle.
//   - y origin of the handle.
//   - width: with of the handle.
//   - height of the handle.
//   - orientation of the handle.
func PaintHandle(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation) {
	var _arg1 *C.GtkStyle       // out
	var _arg2 *C.cairo_t        // out
	var _arg3 C.GtkStateType    // out
	var _arg4 C.GtkShadowType   // out
	var _arg5 *C.GtkWidget      // out
	var _arg6 *C.gchar          // out
	var _arg7 C.gint            // out
	var _arg8 C.gint            // out
	var _arg9 C.gint            // out
	var _arg10 C.gint           // out
	var _arg11 C.GtkOrientation // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)
	_arg11 = C.GtkOrientation(orientation)

	C.gtk_paint_handle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// PaintHline draws a horizontal line from (x1, y) to (x2, y) in cr using the
// given style and state.
//
// Deprecated: Use gtk_render_line() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #caio_t.
//   - stateType: state.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x1: starting x coordinate.
//   - x2: ending x coordinate.
//   - y coordinate.
func PaintHline(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x1, x2, y int) {
	var _arg1 *C.GtkStyle    // out
	var _arg2 *C.cairo_t     // out
	var _arg3 C.GtkStateType // out
	var _arg4 *C.GtkWidget   // out
	var _arg5 *C.gchar       // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.gint(x1)
	_arg7 = C.gint(x2)
	_arg8 = C.gint(y)

	C.gtk_paint_hline(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(x2)
	runtime.KeepAlive(y)
}

// PaintLayout draws a layout on cr using the given parameters.
//
// Deprecated: Use gtk_render_layout() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - useText: whether to use the text or foreground graphics context of style.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin.
//   - y origin.
//   - layout to draw.
func PaintLayout(style *Style, cr *cairo.Context, stateType StateType, useText bool, widget Widgetter, detail string, x, y int, layout *pango.Layout) {
	var _arg1 *C.GtkStyle    // out
	var _arg2 *C.cairo_t     // out
	var _arg3 C.GtkStateType // out
	var _arg4 C.gboolean     // out
	var _arg5 *C.GtkWidget   // out
	var _arg6 *C.gchar       // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out
	var _arg9 *C.PangoLayout // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if useText {
		_arg4 = C.TRUE
	}
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = (*C.PangoLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	C.gtk_paint_layout(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(useText)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(layout)
}

// PaintOption draws a radio button indicator in the given rectangle on cr with
// the given parameters.
//
// Deprecated: Use gtk_render_option() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle to draw the option in.
//   - y origin of the rectangle to draw the option in.
//   - width of the rectangle to draw the option in.
//   - height of the rectangle to draw the option in.
func PaintOption(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_option(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintResizeGrip draws a resize grip in the given rectangle on cr using the
// given parameters.
//
// Deprecated: Use gtk_render_handle() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - edge in which to draw the resize grip.
//   - x origin of the rectangle in which to draw the resize grip.
//   - y origin of the rectangle in which to draw the resize grip.
//   - width of the rectangle in which to draw the resize grip.
//   - height of the rectangle in which to draw the resize grip.
func PaintResizeGrip(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, edge gdk.WindowEdge, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.GdkWindowEdge // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.GdkWindowEdge(edge)
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_resize_grip(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(edge)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintShadow draws a shadow around the given rectangle in cr using the given
// style and state and shadow type.
//
// Deprecated: Use gtk_render_frame() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle.
//   - y origin of the rectangle.
//   - width of the rectangle.
//   - height: width of the rectangle.
func PaintShadow(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_shadow(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintShadowGap draws a shadow around the given rectangle in cr using the
// given style and state and shadow type, leaving a gap in one side.
//
// Deprecated: Use gtk_render_frame_gap() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle.
//   - y origin of the rectangle.
//   - width of the rectangle.
//   - height: width of the rectangle.
//   - gapSide: side in which to leave the gap.
//   - gapX: starting position of the gap.
//   - gapWidth: width of the gap.
func PaintShadowGap(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int) {
	var _arg1 *C.GtkStyle        // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkShadowType    // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.gint            // out
	var _arg11 C.GtkPositionType // out
	var _arg12 C.gint            // out
	var _arg13 C.gint            // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)
	_arg11 = C.GtkPositionType(gapSide)
	_arg12 = C.gint(gapX)
	_arg13 = C.gint(gapWidth)

	C.gtk_paint_shadow_gap(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(gapX)
	runtime.KeepAlive(gapWidth)
}

// PaintSlider draws a slider in the given rectangle on cr using the given style
// and orientation.
//
// Deprecated: Use gtk_render_slider() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: shadow.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle in which to draw a slider.
//   - y origin of the rectangle in which to draw a slider.
//   - width of the rectangle in which to draw a slider.
//   - height of the rectangle in which to draw a slider.
//   - orientation to be used.
func PaintSlider(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation) {
	var _arg1 *C.GtkStyle       // out
	var _arg2 *C.cairo_t        // out
	var _arg3 C.GtkStateType    // out
	var _arg4 C.GtkShadowType   // out
	var _arg5 *C.GtkWidget      // out
	var _arg6 *C.gchar          // out
	var _arg7 C.gint            // out
	var _arg8 C.gint            // out
	var _arg9 C.gint            // out
	var _arg10 C.gint           // out
	var _arg11 C.GtkOrientation // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)
	_arg11 = C.GtkOrientation(orientation)

	C.gtk_paint_slider(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// PaintSpinner draws a spinner on window using the given parameters.
//
// Deprecated: Use gtk_render_icon() and the StyleContext you are drawing
// instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - widget (optional) (may be NULL).
//   - detail (optional): style detail (may be NULL).
//   - step: nth step.
//   - x origin of the rectangle in which to draw the spinner.
//   - y origin of the rectangle in which to draw the spinner.
//   - width of the rectangle in which to draw the spinner.
//   - height of the rectangle in which to draw the spinner.
func PaintSpinner(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, step uint, x, y, width, height int) {
	var _arg1 *C.GtkStyle    // out
	var _arg2 *C.cairo_t     // out
	var _arg3 C.GtkStateType // out
	var _arg4 *C.GtkWidget   // out
	var _arg5 *C.gchar       // out
	var _arg6 C.guint        // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out
	var _arg9 C.gint         // out
	var _arg10 C.gint        // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.guint(step)
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_spinner(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(step)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintTab draws an option menu tab (i.e. the up and down pointing arrows) in
// the given rectangle on cr using the given parameters.
//
// Deprecated: Use cairo instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - shadowType: type of shadow to draw.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - x origin of the rectangle to draw the tab in.
//   - y origin of the rectangle to draw the tab in.
//   - width of the rectangle to draw the tab in.
//   - height of the rectangle to draw the tab in.
func PaintTab(style *Style, cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	var _arg1 *C.GtkStyle     // out
	var _arg2 *C.cairo_t      // out
	var _arg3 C.GtkStateType  // out
	var _arg4 C.GtkShadowType // out
	var _arg5 *C.GtkWidget    // out
	var _arg6 *C.gchar        // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.GtkShadowType(shadowType)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}
	_arg7 = C.gint(x)
	_arg8 = C.gint(y)
	_arg9 = C.gint(width)
	_arg10 = C.gint(height)

	C.gtk_paint_tab(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// PaintVline draws a vertical line from (x, y1_) to (x, y2_) in cr using the
// given style and state.
//
// Deprecated: Use gtk_render_line() instead.
//
// The function takes the following parameters:
//
//   - style: Style.
//   - cr: #cairo_t.
//   - stateType: state.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//   - y1: starting y coordinate.
//   - y2: ending y coordinate.
//   - x coordinate.
func PaintVline(style *Style, cr *cairo.Context, stateType StateType, widget Widgetter, detail string, y1, y2, x int) {
	var _arg1 *C.GtkStyle    // out
	var _arg2 *C.cairo_t     // out
	var _arg3 C.GtkStateType // out
	var _arg4 *C.GtkWidget   // out
	var _arg5 *C.gchar       // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out

	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.GtkStateType(stateType)
	if widget != nil {
		_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg5))
	}
	_arg6 = C.gint(y1)
	_arg7 = C.gint(y2)
	_arg8 = C.gint(x)

	C.gtk_paint_vline(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(y1)
	runtime.KeepAlive(y2)
	runtime.KeepAlive(x)
}

// PrintRunPageSetupDialog runs a page setup dialog, letting the user modify
// the values from page_setup. If the user cancels the dialog, the returned
// PageSetup is identical to the passed in page_setup, otherwise it contains the
// modifications done in the dialog.
//
// Note that this function may use a recursive mainloop to show the page setup
// dialog. See gtk_print_run_page_setup_dialog_async() if this is a problem.
//
// The function takes the following parameters:
//
//   - parent (optional): transient parent.
//   - pageSetup (optional): existing PageSetup.
//   - settings: PrintSettings.
//
// The function returns the following values:
//
//   - pageSetup: new PageSetup.
func PrintRunPageSetupDialog(parent *Window, pageSetup *PageSetup, settings *PrintSettings) *PageSetup {
	var _arg1 *C.GtkWindow        // out
	var _arg2 *C.GtkPageSetup     // out
	var _arg3 *C.GtkPrintSettings // out
	var _cret *C.GtkPageSetup     // in

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	if pageSetup != nil {
		_arg2 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(pageSetup).Native()))
	}
	_arg3 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_run_page_setup_dialog(_arg1, _arg2, _arg3)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(pageSetup)
	runtime.KeepAlive(settings)

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _pageSetup
}

// PrintRunPageSetupDialogAsync runs a page setup dialog, letting the user
// modify the values from page_setup.
//
// In contrast to gtk_print_run_page_setup_dialog(), this function returns
// after showing the page setup dialog on platforms that support this, and calls
// done_cb from a signal handler for the ::response signal of the dialog.
//
// The function takes the following parameters:
//
//   - parent (optional): transient parent, or NULL.
//   - pageSetup (optional): existing PageSetup, or NULL.
//   - settings: PrintSettings.
//   - doneCb: function to call when the user saves the modified page setup.
func PrintRunPageSetupDialogAsync(parent *Window, pageSetup *PageSetup, settings *PrintSettings, doneCb PageSetupDoneFunc) {
	var _arg1 *C.GtkWindow           // out
	var _arg2 *C.GtkPageSetup        // out
	var _arg3 *C.GtkPrintSettings    // out
	var _arg4 C.GtkPageSetupDoneFunc // out
	var _arg5 C.gpointer

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	if pageSetup != nil {
		_arg2 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(pageSetup).Native()))
	}
	_arg3 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg4 = (*[0]byte)(C._gotk4_gtk3_PageSetupDoneFunc)
	_arg5 = C.gpointer(gbox.AssignOnce(doneCb))

	C.gtk_print_run_page_setup_dialog_async(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(pageSetup)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(doneCb)
}

// PropagateEvent sends an event to a widget, propagating the event to parent
// widgets if the event remains unhandled.
//
// Events received by GTK+ from GDK normally begin in gtk_main_do_event().
// Depending on the type of event, existence of modal dialogs, grabs, etc.,
// the event may be propagated; if so, this function is used.
//
// gtk_propagate_event() calls gtk_widget_event() on each widget it decides
// to send the event to. So gtk_widget_event() is the lowest-level function;
// it simply emits the Widget::event and possibly an event-specific signal on a
// widget. gtk_propagate_event() is a bit higher-level, and gtk_main_do_event()
// is the highest level.
//
// All that said, you most likely don’t want to use any of these functions;
// synthesizing events is rarely needed. There are almost certainly better
// ways to achieve your goals. For example, use gdk_window_invalidate_rect() or
// gtk_widget_queue_draw() instead of making up expose events.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - event: event.
func PropagateEvent(widget Widgetter, event *gdk.Event) {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.GdkEvent  // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	C.gtk_propagate_event(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)
}

// RCAddDefaultFile adds a file to the list of files to be parsed at the end of
// gtk_init().
//
// Deprecated: Use StyleContext with a custom StyleProvider instead.
//
// The function takes the following parameters:
//
//   - filename: pathname to the file. If filename is not absolute, it is
//     searched in the current directory.
func RCAddDefaultFile(filename string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_rc_add_default_file(_arg1)
	runtime.KeepAlive(filename)
}

// RCFindModuleInPath searches for a theme engine in the GTK+ search path.
// This function is not useful for applications and should not be used.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - moduleFile: name of a theme engine.
//
// The function returns the following values:
//
//   - filename: filename, if found (must be freed with g_free()), otherwise
//     NULL.
func RCFindModuleInPath(moduleFile string) string {
	var _arg1 *C.gchar // out
	var _cret *C.gchar // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(moduleFile)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_rc_find_module_in_path(_arg1)
	runtime.KeepAlive(moduleFile)

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _filename
}

// RCFindPixmapInPath looks up a file in pixmap path for the specified Settings.
// If the file is not found, it outputs a warning message using g_warning() and
// returns NULL.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - settings: Settings.
//   - scanner: scanner used to get line number information for the warning
//     message, or NULL.
//   - pixmapFile: name of the pixmap file to locate.
//
// The function returns the following values:
//
//   - filename: filename.
func RCFindPixmapInPath(settings *Settings, scanner *glib.Scanner, pixmapFile string) string {
	var _arg1 *C.GtkSettings // out
	var _arg2 *C.GScanner    // out
	var _arg3 *C.gchar       // out
	var _cret *C.gchar       // in

	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg2 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(pixmapFile)))
	defer C.free(unsafe.Pointer(_arg3))

	_cret = C.gtk_rc_find_pixmap_in_path(_arg1, _arg2, _arg3)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(scanner)
	runtime.KeepAlive(pixmapFile)

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _filename
}

// RCGetDefaultFiles retrieves the current list of RC files that will be parsed
// at the end of gtk_init().
//
// Deprecated: Use StyleContext instead.
//
// The function returns the following values:
//
//   - filenames: A NULL-terminated array of filenames. This memory is owned by
//     GTK+ and must not be freed by the application. If you want to store this
//     information, you should make a copy.
func RCGetDefaultFiles() []string {
	var _cret **C.gchar // in

	_cret = C.gtk_rc_get_default_files()

	var _filenames []string // out

	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_filenames = make([]string, i)
		for i := range src {
			_filenames[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}

	return _filenames
}

// RCGetIMModuleFile obtains the path to the IM modules file. See the
// documentation of the GTK_IM_MODULE_FILE environment variable for more
// details.
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - filename: newly-allocated string containing the name of the file listing
//     the IM modules available for loading.
func RCGetIMModuleFile() string {
	var _cret *C.gchar // in

	_cret = C.gtk_rc_get_im_module_file()

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _filename
}

// RCGetIMModulePath obtains the path in which to look for IM modules. See the
// documentation of the GTK_PATH environment variable for more details about
// looking up modules. This function is useful solely for utilities supplied
// with GTK+ and should not be used by applications under normal circumstances.
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - filename: newly-allocated string containing the path in which to look for
//     IM modules.
func RCGetIMModulePath() string {
	var _cret *C.gchar // in

	_cret = C.gtk_rc_get_im_module_path()

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _filename
}

// RCGetModuleDir returns a directory in which GTK+ looks for theme engines.
// For full information about the search for theme engines, see the docs for
// GTK_PATH in [Running GTK+ Applications][gtk-running].
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - filename: directory. (Must be freed with g_free()).
func RCGetModuleDir() string {
	var _cret *C.gchar // in

	_cret = C.gtk_rc_get_module_dir()

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _filename
}

// RCGetStyle finds all matching RC styles for a given widget, composites them
// together, and then creates a Style representing the composite appearance.
// (GTK+ actually keeps a cache of previously created styles, so a new style may
// not be created.)
//
// Deprecated: Use StyleContext instead.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - style: resulting style. No refcount is added to the returned style, so if
//     you want to save this style around, you should add a reference yourself.
func RCGetStyle(widget Widgetter) *Style {
	var _arg1 *C.GtkWidget // out
	var _cret *C.GtkStyle  // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_rc_get_style(_arg1)
	runtime.KeepAlive(widget)

	var _style *Style // out

	_style = wrapStyle(coreglib.Take(unsafe.Pointer(_cret)))

	return _style
}

// RCGetStyleByPaths creates up a Style from styles defined in a RC file by
// providing the raw components used in matching. This function may be useful
// when creating pseudo-widgets that should be themed like widgets but don’t
// actually have corresponding GTK+ widgets. An example of this would be items
// inside a GNOME canvas widget.
//
// The action of gtk_rc_get_style() is similar to:
//
//	gtk_widget_path (widget, NULL, &path, NULL);
//	gtk_widget_class_path (widget, NULL, &class_path, NULL);
//	gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
//	                           path, class_path,
//	                           G_OBJECT_TYPE (widget));
//
// Deprecated: Use StyleContext instead.
//
// The function takes the following parameters:
//
//   - settings Settings object.
//   - widgetPath (optional): widget path to use when looking up the style,
//     or NULL if no matching against the widget path should be done.
//   - classPath (optional) class path to use when looking up the style,
//     or NULL if no matching against the class path should be done.
//   - typ: type that will be used along with parent types of this type when
//     matching against class styles, or TYPE_NONE.
//
// The function returns the following values:
//
//   - style (optional) created by matching with the supplied paths, or NULL
//     if nothing matching was specified and the default style should be used.
//     The returned value is owned by GTK+ as part of an internal cache,
//     so you must call g_object_ref() on the returned value if you want to keep
//     a reference to it.
func RCGetStyleByPaths(settings *Settings, widgetPath, classPath string, typ coreglib.Type) *Style {
	var _arg1 *C.GtkSettings // out
	var _arg2 *C.char        // out
	var _arg3 *C.char        // out
	var _arg4 C.GType        // out
	var _cret *C.GtkStyle    // in

	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	if widgetPath != "" {
		_arg2 = (*C.char)(unsafe.Pointer(C.CString(widgetPath)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if classPath != "" {
		_arg3 = (*C.char)(unsafe.Pointer(C.CString(classPath)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	_arg4 = C.GType(typ)

	_cret = C.gtk_rc_get_style_by_paths(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(widgetPath)
	runtime.KeepAlive(classPath)
	runtime.KeepAlive(typ)

	var _style *Style // out

	if _cret != nil {
		_style = wrapStyle(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _style
}

// RCGetThemeDir returns the standard directory in which themes should be
// installed. (GTK+ does not actually use this directory itself.)
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - utf8: directory (must be freed with g_free()).
func RCGetThemeDir() string {
	var _cret *C.gchar // in

	_cret = C.gtk_rc_get_theme_dir()

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// RCParse parses a given resource file.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - filename of a file to parse. If filename is not absolute, it is searched
//     in the current directory.
func RCParse(filename string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_rc_parse(_arg1)
	runtime.KeepAlive(filename)
}

// RCParseColor parses a color in the format expected in a RC file.
//
// Note that theme engines should use gtk_rc_parse_color_full() in order to
// support symbolic colors.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - scanner: #GScanner.
//
// The function returns the following values:
//
//   - color: pointer to a Color in which to store the result.
//   - guint: G_TOKEN_NONE if parsing succeeded, otherwise the token that was
//     expected but not found.
func RCParseColor(scanner *glib.Scanner) (*gdk.Color, uint) {
	var _arg1 *C.GScanner // out
	var _arg2 C.GdkColor  // in
	var _cret C.guint     // in

	_arg1 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))

	_cret = C.gtk_rc_parse_color(_arg1, &_arg2)
	runtime.KeepAlive(scanner)

	var _color *gdk.Color // out
	var _guint uint       // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	_guint = uint(_cret)

	return _color, _guint
}

// RCParseColorFull parses a color in the format expected in a RC file. If style
// is not NULL, it will be consulted to resolve references to symbolic colors.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - scanner: #GScanner.
//   - style (optional) or NULL.
//
// The function returns the following values:
//
//   - color: pointer to a Color in which to store the result.
//   - guint: G_TOKEN_NONE if parsing succeeded, otherwise the token that was
//     expected but not found.
func RCParseColorFull(scanner *glib.Scanner, style *RCStyle) (*gdk.Color, uint) {
	var _arg1 *C.GScanner   // out
	var _arg2 *C.GtkRcStyle // out
	var _arg3 C.GdkColor    // in
	var _cret C.guint       // in

	_arg1 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))
	if style != nil {
		_arg2 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	}

	_cret = C.gtk_rc_parse_color_full(_arg1, _arg2, &_arg3)
	runtime.KeepAlive(scanner)
	runtime.KeepAlive(style)

	var _color *gdk.Color // out
	var _guint uint       // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))
	_guint = uint(_cret)

	return _color, _guint
}

// RCParsePriority parses a PathPriorityType variable from the format expected
// in a RC file.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - scanner (must be initialized for parsing an RC file).
//   - priority: pointer to PathPriorityType variable in which to store the
//     result.
//
// The function returns the following values:
//
//   - guint: G_TOKEN_NONE if parsing succeeded, otherwise the token that was
//     expected but not found.
func RCParsePriority(scanner *glib.Scanner, priority *PathPriorityType) uint {
	var _arg1 *C.GScanner            // out
	var _arg2 *C.GtkPathPriorityType // out
	var _cret C.guint                // in

	_arg1 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))
	_arg2 = (*C.GtkPathPriorityType)(unsafe.Pointer(priority))

	_cret = C.gtk_rc_parse_priority(_arg1, _arg2)
	runtime.KeepAlive(scanner)
	runtime.KeepAlive(priority)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// RCParseState parses a StateType variable from the format expected in a RC
// file.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - scanner (must be initialized for parsing an RC file).
//
// The function returns the following values:
//
//   - state: pointer to a StateType variable in which to store the result.
//   - guint: G_TOKEN_NONE if parsing succeeded, otherwise the token that was
//     expected but not found.
func RCParseState(scanner *glib.Scanner) (StateType, uint) {
	var _arg1 *C.GScanner    // out
	var _arg2 C.GtkStateType // in
	var _cret C.guint        // in

	_arg1 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))

	_cret = C.gtk_rc_parse_state(_arg1, &_arg2)
	runtime.KeepAlive(scanner)

	var _state StateType // out
	var _guint uint      // out

	_state = StateType(_arg2)
	_guint = uint(_cret)

	return _state, _guint
}

// RCParseString parses resource information directly from a string.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - rcString: string to parse.
func RCParseString(rcString string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(rcString)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_rc_parse_string(_arg1)
	runtime.KeepAlive(rcString)
}

// RCReparseAll: if the modification time on any previously read file for the
// default Settings has changed, discard all style information and then reread
// all previously read RC files.
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the files were reread.
func RCReparseAll() bool {
	var _cret C.gboolean // in

	_cret = C.gtk_rc_reparse_all()

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RCReparseAllForSettings: if the modification time on any previously read file
// for the given Settings has changed, discard all style information and then
// reread all previously read RC files.
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - settings: Settings.
//   - forceLoad: load whether or not anything changed.
//
// The function returns the following values:
//
//   - ok: TRUE if the files were reread.
func RCReparseAllForSettings(settings *Settings, forceLoad bool) bool {
	var _arg1 *C.GtkSettings // out
	var _arg2 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	if forceLoad {
		_arg2 = C.TRUE
	}

	_cret = C.gtk_rc_reparse_all_for_settings(_arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(forceLoad)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RCResetStyles: this function recomputes the styles for all widgets that use
// a particular Settings object. (There is one Settings object per Screen,
// see gtk_settings_get_for_screen()); It is useful when some global parameter
// has changed that affects the appearance of all widgets, because when a widget
// gets a new style, it will both redraw and recompute any cached information
// about its appearance. As an example, it is used when the default font size
// set by the operating system changes. Note that this function doesn’t affect
// widgets that have a style set explicitly on them with gtk_widget_set_style().
//
// Deprecated: Use CssProvider instead.
//
// The function takes the following parameters:
//
//   - settings: Settings.
func RCResetStyles(settings *Settings) {
	var _arg1 *C.GtkSettings // out

	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	C.gtk_rc_reset_styles(_arg1)
	runtime.KeepAlive(settings)
}

// RCSetDefaultFiles sets the list of files that GTK+ will read at the end of
// gtk_init().
//
// Deprecated: Use StyleContext with a custom StyleProvider instead.
//
// The function takes the following parameters:
//
//   - filenames: a NULL-terminated list of filenames.
func RCSetDefaultFiles(filenames []string) {
	var _arg1 **C.gchar // out

	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(filenames) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(filenames)+1)
			var zero *C.gchar
			out[len(filenames)] = zero
			for i := range filenames {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(filenames[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_rc_set_default_files(_arg1)
	runtime.KeepAlive(filenames)
}

// RenderActivity renders an activity indicator (such as in Spinner). The state
// GTK_STATE_FLAG_CHECKED determines whether there is activity going on.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderActivity(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_activity(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderArrow renders an arrow pointing to angle.
//
// Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
//
// ! (arrows.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - angle: arrow angle from 0 to 2 * G_PI, being 0 the arrow pointing to the
//     north.
//   - x: x origin of the render area.
//   - y: y origin of the render area.
//   - size: square side for render area.
func RenderArrow(context *StyleContext, cr *cairo.Context, angle, x, y, size float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(angle)
	_arg4 = C.gdouble(x)
	_arg5 = C.gdouble(y)
	_arg6 = C.gdouble(size)

	C.gtk_render_arrow(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(angle)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(size)
}

// RenderBackground renders the background of an element.
//
// Typical background rendering, showing the effect of background-image,
// border-width and border-radius:
//
// ! (background.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderBackground(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_background(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderBackgroundGetClip returns the area that will be affected (i.e. drawn
// to) when calling gtk_render_background() for the given context and rectangle.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
//
// The function returns the following values:
//
//   - outClip: return location for the clip.
func RenderBackgroundGetClip(context *StyleContext, x, y, width, height float64) *gdk.Rectangle {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 C.gdouble          // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.GdkRectangle     // in

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C.gtk_render_background_get_clip(_arg1, _arg2, _arg3, _arg4, _arg5, &_arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)

	var _outClip *gdk.Rectangle // out

	_outClip = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg6))))

	return _outClip
}

// RenderCheck renders a checkmark (as in a CheckButton).
//
// The GTK_STATE_FLAG_CHECKED state determines whether the check is on or off,
// and GTK_STATE_FLAG_INCONSISTENT determines whether it should be marked as
// undefined.
//
// Typical checkmark rendering:
//
// ! (checks.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderCheck(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_check(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderExpander renders an expander (as used in TreeView and Expander) in
// the area defined by x, y, width, height. The state GTK_STATE_FLAG_CHECKED
// determines whether the expander is collapsed or expanded.
//
// Typical expander rendering:
//
// ! (expanders.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderExpander(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_expander(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderExtension renders a extension (as in a Notebook tab) in the rectangle
// defined by x, y, width, height. The side where the extension connects to is
// defined by gap_side.
//
// Typical extension rendering:
//
// ! (extensions.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
//   - gapSide: side where the gap is.
func RenderExtension(context *StyleContext, cr *cairo.Context, x, y, width, height float64, gapSide PositionType) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out
	var _arg7 C.GtkPositionType  // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)
	_arg7 = C.GtkPositionType(gapSide)

	C.gtk_render_extension(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
}

// RenderFocus renders a focus indicator on the rectangle determined by x, y,
// width, height.
//
// Typical focus rendering:
//
// ! (focus.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderFocus(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_focus(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderFrame renders a frame around the rectangle defined by x, y, width,
// height.
//
// Examples of frame rendering, showing the effect of border-image,
// border-color, border-width, border-radius and junctions:
//
// ! (frames.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderFrame(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_frame(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderFrameGap renders a frame around the rectangle defined by (x, y,
// width, height), leaving a gap on one side. xy0_gap and xy1_gap will mean X
// coordinates for GTK_POS_TOP and GTK_POS_BOTTOM gap sides, and Y coordinates
// for GTK_POS_LEFT and GTK_POS_RIGHT.
//
// Typical rendering of a frame with a gap:
//
// ! (frame-gap.png)
//
// Deprecated: Use gtk_render_frame() instead. Themes can create gaps by
// omitting borders via CSS.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
//   - gapSide: side where the gap is.
//   - xy0Gap: initial coordinate (X or Y depending on gap_side) for the gap.
//   - xy1Gap: end coordinate (X or Y depending on gap_side) for the gap.
func RenderFrameGap(context *StyleContext, cr *cairo.Context, x, y, width, height float64, gapSide PositionType, xy0Gap, xy1Gap float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out
	var _arg7 C.GtkPositionType  // out
	var _arg8 C.gdouble          // out
	var _arg9 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)
	_arg7 = C.GtkPositionType(gapSide)
	_arg8 = C.gdouble(xy0Gap)
	_arg9 = C.gdouble(xy1Gap)

	C.gtk_render_frame_gap(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(xy0Gap)
	runtime.KeepAlive(xy1Gap)
}

// RenderHandle renders a handle (as in HandleBox, Paned and Window’s resize
// grip), in the rectangle determined by x, y, width, height.
//
// Handles rendered for the paned and grip classes:
//
// ! (handles.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderHandle(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_handle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderIcon renders the icon in pixbuf at the specified x and y coordinates.
//
// This function will render the icon in pixbuf at exactly its size, regardless
// of scaling factors, which may not be appropriate when drawing on displays
// with high pixel densities.
//
// You probably want to use gtk_render_icon_surface() instead, if you already
// have a Cairo surface.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - pixbuf containing the icon to draw.
//   - x: x position for the pixbuf.
//   - y: y position for the pixbuf.
func RenderIcon(context *StyleContext, cr *cairo.Context, pixbuf *gdkpixbuf.Pixbuf, x, y float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 *C.GdkPixbuf       // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	_arg4 = C.gdouble(x)
	_arg5 = C.gdouble(y)

	C.gtk_render_icon(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(pixbuf)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// RenderIconPixbuf renders the icon specified by source at the given size,
// returning the result in a pixbuf.
//
// Deprecated: Use gtk_icon_theme_load_icon() instead.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - source specifying the icon to render.
//   - size (IconSize) to render the icon at. A size of (GtkIconSize) -1 means
//     render at the size of the source and don’t scale.
//
// The function returns the following values:
//
//   - pixbuf: newly-created Pixbuf containing the rendered icon.
func RenderIconPixbuf(context *StyleContext, source *IconSource, size int) *gdkpixbuf.Pixbuf {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.GtkIconSource   // out
	var _arg3 C.GtkIconSize      // out
	var _cret *C.GdkPixbuf       // in

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg3 = C.GtkIconSize(size)

	_cret = C.gtk_render_icon_pixbuf(_arg1, _arg2, _arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(source)
	runtime.KeepAlive(size)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// RenderIconSurface renders the icon in surface at the specified x and y
// coordinates.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - surface containing the icon to draw.
//   - x: x position for the icon.
//   - y: y position for the incon.
func RenderIconSurface(context *StyleContext, cr *cairo.Context, surface *cairo.Surface, x, y float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 *C.cairo_surface_t // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = (*C.cairo_surface_t)(unsafe.Pointer(surface.Native()))
	_arg4 = C.gdouble(x)
	_arg5 = C.gdouble(y)

	C.gtk_render_icon_surface(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(surface)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// RenderInsertionCursor draws a text caret on cr at the specified index of
// layout.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin.
//   - y: y origin.
//   - layout of the text.
//   - index in the Layout.
//   - direction of the text.
func RenderInsertionCursor(context *StyleContext, cr *cairo.Context, x, y float64, layout *pango.Layout, index int, direction pango.Direction) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 *C.PangoLayout     // out
	var _arg6 C.int              // out
	var _arg7 C.PangoDirection   // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = (*C.PangoLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	_arg6 = C.int(index)
	_arg7 = C.PangoDirection(direction)

	C.gtk_render_insertion_cursor(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(index)
	runtime.KeepAlive(direction)
}

// RenderLayout renders layout on the coordinates x, y.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin.
//   - y: y origin.
//   - layout to render.
func RenderLayout(context *StyleContext, cr *cairo.Context, x, y float64, layout *pango.Layout) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 *C.PangoLayout     // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = (*C.PangoLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	C.gtk_render_layout(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(layout)
}

// RenderLine renders a line from (x0, y0) to (x1, y1).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x0: x coordinate for the origin of the line.
//   - y0: y coordinate for the origin of the line.
//   - x1: x coordinate for the end of the line.
//   - y1: y coordinate for the end of the line.
func RenderLine(context *StyleContext, cr *cairo.Context, x0, y0, x1, y1 float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x0)
	_arg4 = C.gdouble(y0)
	_arg5 = C.gdouble(x1)
	_arg6 = C.gdouble(y1)

	C.gtk_render_line(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x0)
	runtime.KeepAlive(y0)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(y1)
}

// RenderOption renders an option mark (as in a RadioButton), the
// GTK_STATE_FLAG_CHECKED state will determine whether the option is on or off,
// and GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.
//
// Typical option mark rendering:
//
// ! (options.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
func RenderOption(context *StyleContext, cr *cairo.Context, x, y, width, height float64) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)

	C.gtk_render_option(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// RenderSlider renders a slider (as in Scale) in the rectangle defined by x,
// y, width, height. orientation defines whether the slider is vertical or
// horizontal.
//
// Typical slider rendering:
//
// ! (sliders.png).
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - cr: #cairo_t.
//   - x: x origin of the rectangle.
//   - y: y origin of the rectangle.
//   - width: rectangle width.
//   - height: rectangle height.
//   - orientation of the slider.
func RenderSlider(context *StyleContext, cr *cairo.Context, x, y, width, height float64, orientation Orientation) {
	var _arg1 *C.GtkStyleContext // out
	var _arg2 *C.cairo_t         // out
	var _arg3 C.gdouble          // out
	var _arg4 C.gdouble          // out
	var _arg5 C.gdouble          // out
	var _arg6 C.gdouble          // out
	var _arg7 C.GtkOrientation   // out

	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(width)
	_arg6 = C.gdouble(height)
	_arg7 = C.GtkOrientation(orientation)

	C.gtk_render_slider(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// RGBToHSV converts a color from RGB space to HSV.
//
// Input values must be in the [0.0, 1.0] range; output values will be in the
// same range.
//
// The function takes the following parameters:
//
//   - r: red.
//   - g: green.
//   - b: blue.
//
// The function returns the following values:
//
//   - h: return value for the hue component.
//   - s: return value for the saturation component.
//   - v: return value for the value component.
func RGBToHSV(r, g, b float64) (h, s, v float64) {
	var _arg1 C.gdouble // out
	var _arg2 C.gdouble // out
	var _arg3 C.gdouble // out
	var _arg4 C.gdouble // in
	var _arg5 C.gdouble // in
	var _arg6 C.gdouble // in

	_arg1 = C.gdouble(r)
	_arg2 = C.gdouble(g)
	_arg3 = C.gdouble(b)

	C.gtk_rgb_to_hsv(_arg1, _arg2, _arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(r)
	runtime.KeepAlive(g)
	runtime.KeepAlive(b)

	var _h float64 // out
	var _s float64 // out
	var _v float64 // out

	_h = float64(_arg4)
	_s = float64(_arg5)
	_v = float64(_arg6)

	return _h, _s, _v
}

// SelectionRemoveAll removes all handlers and unsets ownership of all
// selections for a widget. Called when widget is being destroyed. This function
// will not generally be called by applications.
//
// The function takes the following parameters:
//
//   - widget: Widget.
func SelectionRemoveAll(widget Widgetter) {
	var _arg1 *C.GtkWidget // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_selection_remove_all(_arg1)
	runtime.KeepAlive(widget)
}

// SetDebugFlags sets the GTK+ debug flags.
func SetDebugFlags(flags uint) {
	var _arg1 C.guint // out

	_arg1 = C.guint(flags)

	C.gtk_set_debug_flags(_arg1)
	runtime.KeepAlive(flags)
}

// ShowURI: convenience function for launching the default application to show
// the uri. Like gtk_show_uri_on_window(), but takes a screen as transient
// parent instead of a window.
//
// Note that this function is deprecated as it does not pass the necessary
// information for helpers to parent their dialog properly, when run from
// sandboxed applications for example.
//
// Deprecated: Use gtk_show_uri_on_window() instead.
//
// The function takes the following parameters:
//
//   - screen (optional) to show the uri on or NULL for the default screen.
//   - uri to show.
//   - timestamp to prevent focus stealing.
func ShowURI(screen *gdk.Screen, uri string, timestamp uint32) error {
	var _arg1 *C.GdkScreen // out
	var _arg2 *C.gchar     // out
	var _arg3 C.guint32    // out
	var _cerr *C.GError    // in

	if screen != nil {
		_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.guint32(timestamp)

	C.gtk_show_uri(_arg1, _arg2, _arg3, &_cerr)
	runtime.KeepAlive(screen)
	runtime.KeepAlive(uri)
	runtime.KeepAlive(timestamp)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// ShowURIOnWindow: this is a convenience function for launching the default
// application to show the uri. The uri must be of a form understood by GIO
// (i.e. you need to install gvfs to get support for uri schemes such as http://
// or ftp://, as only local files are handled by GIO itself). Typical examples
// are
//
// - file:///home/gnome/pict.jpg
//
// - http://www.gnome.org
//
// - mailto:megnome.org
//
// Ideally the timestamp is taken from the event triggering the gtk_show_uri()
// call. If timestamp is not known you can take GDK_CURRENT_TIME.
//
// This is the recommended call to be used as it passes information necessary
// for sandbox helpers to parent their dialogs properly.
//
// The function takes the following parameters:
//
//   - parent (optional) window.
//   - uri to show.
//   - timestamp to prevent focus stealing.
func ShowURIOnWindow(parent *Window, uri string, timestamp uint32) error {
	var _arg1 *C.GtkWindow // out
	var _arg2 *C.char      // out
	var _arg3 C.guint32    // out
	var _cerr *C.GError    // in

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	_arg2 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.guint32(timestamp)

	C.gtk_show_uri_on_window(_arg1, _arg2, _arg3, &_cerr)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(uri)
	runtime.KeepAlive(timestamp)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// StockAdd registers each of the stock items in items. If an item already
// exists with the same stock ID as one of the items, the old item gets
// replaced. The stock items are copied, so GTK+ does not hold any pointer
// into items and items can be freed. Use gtk_stock_add_static() if items is
// persistent and GTK+ need not copy the array.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - items or array of items.
func StockAdd(items []StockItem) {
	var _arg1 *C.GtkStockItem // out
	var _arg2 C.guint

	_arg2 = (C.guint)(len(items))
	_arg1 = (*C.GtkStockItem)(C.calloc(C.size_t(len(items)), C.size_t(C.sizeof_GtkStockItem)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkStockItem)(_arg1), len(items))
		for i := range items {
			out[i] = *(*C.GtkStockItem)(gextras.StructNative(unsafe.Pointer((&items[i]))))
		}
	}

	C.gtk_stock_add(_arg1, _arg2)
	runtime.KeepAlive(items)
}

// StockAddStatic: same as gtk_stock_add(), but doesn’t copy items, so items
// must persist until application exit.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - items or array of StockItem.
func StockAddStatic(items []StockItem) {
	var _arg1 *C.GtkStockItem // out
	var _arg2 C.guint

	_arg2 = (C.guint)(len(items))
	_arg1 = (*C.GtkStockItem)(C.calloc(C.size_t(len(items)), C.size_t(C.sizeof_GtkStockItem)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkStockItem)(_arg1), len(items))
		for i := range items {
			out[i] = *(*C.GtkStockItem)(gextras.StructNative(unsafe.Pointer((&items[i]))))
		}
	}

	C.gtk_stock_add_static(_arg1, _arg2)
	runtime.KeepAlive(items)
}

// StockListIDs retrieves a list of all known stock IDs added to a
// IconFactory or registered with gtk_stock_add(). The list must be freed with
// g_slist_free(), and each string in the list must be freed with g_free().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - sList: list of known stock IDs.
func StockListIDs() []string {
	var _cret *C.GSList // in

	_cret = C.gtk_stock_list_ids()

	var _sList []string // out

	_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		defer C.free(unsafe.Pointer(src))
		_sList = append(_sList, dst)
	})

	return _sList
}

// StockLookup fills item with the registered values for stock_id, returning
// TRUE if stock_id was known.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - stockId: stock item name.
//
// The function returns the following values:
//
//   - item: stock item to initialize with values.
//   - ok: TRUE if item was initialized.
func StockLookup(stockId string) (*StockItem, bool) {
	var _arg1 *C.gchar       // out
	var _arg2 C.GtkStockItem // in
	var _cret C.gboolean     // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_stock_lookup(_arg1, &_arg2)
	runtime.KeepAlive(stockId)

	var _item *StockItem // out
	var _ok bool         // out

	_item = (*StockItem)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _item, _ok
}

// StockSetTranslateFunc sets a function to be used for translating the label of
// a stock item.
//
// If no function is registered for a translation domain, g_dgettext() is used.
//
// The function is used for all stock items whose translation_domain matches
// domain. Note that it is possible to use strings different from the actual
// gettext translation domain of your application for this, as long as your
// TranslateFunc uses the correct domain when calling dgettext(). This can be
// useful, e.g. when dealing with message contexts:
//
//	GtkStockItem items[] = {
//	 { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
//	 { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
//	};
//
//	gchar *
//	my_translate_func (const gchar *msgid,
//	                   gpointer     data)
//	{
//	  gchar *msgctxt = data;
//
//	  return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
//	}
//
//	...
//
//	gtk_stock_add (items, G_N_ELEMENTS (items));
//	gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items");
//	gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - domain: translation domain for which func shall be used.
//   - fn: TranslateFunc.
func StockSetTranslateFunc(domain string, fn TranslateFunc) {
	var _arg1 *C.gchar           // out
	var _arg2 C.GtkTranslateFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(domain)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*[0]byte)(C._gotk4_gtk3_TranslateFunc)
	_arg3 = C.gpointer(gbox.Assign(fn))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_stock_set_translate_func(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(domain)
	runtime.KeepAlive(fn)
}

// TargetTableNewFromList: this function creates an TargetEntry array that
// contains the same targets as the passed list. The returned table is newly
// allocated and should be freed using gtk_target_table_free() when no longer
// needed.
//
// The function takes the following parameters:
//
//   - list: TargetList.
//
// The function returns the following values:
//
//   - targetEntrys: new table.
func TargetTableNewFromList(list *TargetList) []TargetEntry {
	var _arg1 *C.GtkTargetList  // out
	var _cret *C.GtkTargetEntry // in
	var _arg2 C.gint            // in

	_arg1 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))

	_cret = C.gtk_target_table_new_from_list(_arg1, &_arg2)
	runtime.KeepAlive(list)

	var _targetEntrys []TargetEntry // out

	defer C.free(unsafe.Pointer(_cret))
	{
		src := unsafe.Slice((*C.GtkTargetEntry)(_cret), _arg2)
		_targetEntrys = make([]TargetEntry, _arg2)
		for i := 0; i < int(_arg2); i++ {
			_targetEntrys[i] = *(*TargetEntry)(gextras.NewStructNative(unsafe.Pointer((&src[i]))))
			runtime.SetFinalizer(
				gextras.StructIntern(unsafe.Pointer(&_targetEntrys[i])),
				func(intern *struct{ C unsafe.Pointer }) {
					C.gtk_target_entry_free((*C.GtkTargetEntry)(intern.C))
				},
			)
		}
	}

	return _targetEntrys
}

// TestCreateSimpleWindow: create a simple window with window title
// window_title and text contents dialog_text. The window will quit any running
// gtk_main()-loop when destroyed, and it will automatically be destroyed upon
// test function teardown.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - windowTitle: title of the window to be displayed.
//   - dialogText: text inside the window to be displayed.
//
// The function returns the following values:
//
//   - widget pointer to the newly created GtkWindow.
func TestCreateSimpleWindow(windowTitle, dialogText string) Widgetter {
	var _arg1 *C.gchar     // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(windowTitle)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(dialogText)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_test_create_simple_window(_arg1, _arg2)
	runtime.KeepAlive(windowTitle)
	runtime.KeepAlive(dialogText)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// TestFindLabel: this function will search widget and all its descendants for a
// GtkLabel widget with a text string matching label_pattern. The label_pattern
// may contain asterisks “*” and question marks “?” as placeholders,
// g_pattern_match() is used for the matching. Note that locales other than "C“
// tend to alter (translate” label strings, so this function is genrally only
// useful in test programs with predetermined locales, see gtk_test_init() for
// more details.
//
// The function takes the following parameters:
//
//   - widget: valid label or container widget.
//   - labelPattern: shell-glob pattern to match a label string.
//
// The function returns the following values:
//
//   - ret: gtkLabel widget if any is found.
func TestFindLabel(widget Widgetter, labelPattern string) Widgetter {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(labelPattern)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_test_find_label(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(labelPattern)

	var _ret Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_ret = rv
	}

	return _ret
}

// TestFindSibling: this function will search siblings of base_widget and
// siblings of its ancestors for all widgets matching widget_type. Of the
// matching widgets, the one that is geometrically closest to base_widget will
// be returned. The general purpose of this function is to find the most likely
// “action” widget, relative to another labeling widget. Such as finding a
// button or text entry widget, given its corresponding label widget.
//
// The function takes the following parameters:
//
//   - baseWidget: valid widget, part of a widget hierarchy.
//   - widgetType: type of a aearched for sibling widget.
//
// The function returns the following values:
//
//   - widget of type widget_type if any is found.
func TestFindSibling(baseWidget Widgetter, widgetType coreglib.Type) Widgetter {
	var _arg1 *C.GtkWidget // out
	var _arg2 C.GType      // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(baseWidget).Native()))
	_arg2 = C.GType(widgetType)

	_cret = C.gtk_test_find_sibling(_arg1, _arg2)
	runtime.KeepAlive(baseWidget)
	runtime.KeepAlive(widgetType)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// TestFindWidget: this function will search the descendants of widget for
// a widget of type widget_type that has a label matching label_pattern
// next to it. This is most useful for automated GUI testing, e.g. to find
// the “OK” button in a dialog and synthesize clicks on it. However see
// gtk_test_find_label(), gtk_test_find_sibling() and gtk_test_widget_click()
// for possible caveats involving the search of such widgets and synthesizing
// widget events.
//
// The function takes the following parameters:
//
//   - widget: container widget, usually a GtkWindow.
//   - labelPattern: shell-glob pattern to match a label string.
//   - widgetType: type of a aearched for label sibling widget.
//
// The function returns the following values:
//
//   - ret (optional): valid widget if any is found or NULL.
func TestFindWidget(widget Widgetter, labelPattern string, widgetType coreglib.Type) Widgetter {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.gchar     // out
	var _arg3 C.GType      // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(labelPattern)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.GType(widgetType)

	_cret = C.gtk_test_find_widget(_arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(labelPattern)
	runtime.KeepAlive(widgetType)

	var _ret Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_ret = rv
		}
	}

	return _ret
}

// TestListAllTypes: return the type ids that have been registered after calling
// gtk_test_register_all_types().
//
// The function returns the following values:
//
//   - gTypes: 0-terminated array of type ids.
func TestListAllTypes() []coreglib.Type {
	var _cret *C.GType // in
	var _arg1 C.guint  // in

	_cret = C.gtk_test_list_all_types(&_arg1)

	var _gTypes []coreglib.Type // out

	{
		src := unsafe.Slice((*C.GType)(_cret), _arg1)
		_gTypes = make([]coreglib.Type, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_gTypes[i] = coreglib.Type(src[i])
		}
	}

	return _gTypes
}

// TestRegisterAllTypes: force registration of all core Gtk+ and Gdk
// object types. This allowes to refer to any of those object types via
// g_type_from_name() after calling this function.
func TestRegisterAllTypes() {
	C.gtk_test_register_all_types()
}

// TestSliderGetValue: retrive the literal adjustment value for GtkRange based
// widgets and spin buttons. Note that the value returned by this function is
// anything between the lower and upper bounds of the adjustment belonging to
// widget, and is not a percentage as passed in to gtk_test_slider_set_perc().
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - widget: valid widget pointer.
//
// The function returns the following values:
//
//   - gdouble: gtk_adjustment_get_value (adjustment) for an adjustment
//     belonging to widget.
func TestSliderGetValue(widget Widgetter) float64 {
	var _arg1 *C.GtkWidget // out
	var _cret C.double     // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_test_slider_get_value(_arg1)
	runtime.KeepAlive(widget)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// TestSliderSetPerc: this function will adjust the slider position of all
// GtkRange based widgets, such as scrollbars or scales, it’ll also adjust spin
// buttons. The adjustment value of these widgets is set to a value between the
// lower and upper limits, according to the percentage argument.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - widget: valid widget pointer.
//   - percentage: value between 0 and 100.
func TestSliderSetPerc(widget Widgetter, percentage float64) {
	var _arg1 *C.GtkWidget // out
	var _arg2 C.double     // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.double(percentage)

	C.gtk_test_slider_set_perc(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(percentage)
}

// TestSpinButtonClick: this function will generate a button click in the
// upwards or downwards spin button arrow areas, usually leading to an increase
// or decrease of spin button’s value.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - spinner: valid GtkSpinButton widget.
//   - button: number of the pointer button for the event, usually 1, 2 or 3.
//   - upwards: TRUE for upwards arrow click, FALSE for downwards arrow click.
//
// The function returns the following values:
//
//   - ok: whether all actions neccessary for the button click simulation were
//     carried out successfully.
func TestSpinButtonClick(spinner *SpinButton, button uint, upwards bool) bool {
	var _arg1 *C.GtkSpinButton // out
	var _arg2 C.guint          // out
	var _arg3 C.gboolean       // out
	var _cret C.gboolean       // in

	_arg1 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinner).Native()))
	_arg2 = C.guint(button)
	if upwards {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_test_spin_button_click(_arg1, _arg2, _arg3)
	runtime.KeepAlive(spinner)
	runtime.KeepAlive(button)
	runtime.KeepAlive(upwards)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TestTextGet: retrive the text string of widget if it is a GtkLabel,
// GtkEditable (entry and text widgets) or GtkTextView.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - widget: valid widget pointer.
//
// The function returns the following values:
//
//   - utf8: new 0-terminated C string, needs to be released with g_free().
func TestTextGet(widget Widgetter) string {
	var _arg1 *C.GtkWidget // out
	var _cret *C.gchar     // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_test_text_get(_arg1)
	runtime.KeepAlive(widget)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// TestTextSet: set the text string of widget to string if it is a GtkLabel,
// GtkEditable (entry and text widgets) or GtkTextView.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - widget: valid widget pointer.
//   - str: 0-terminated C string.
func TestTextSet(widget Widgetter, str string) {
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.gchar     // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_test_text_set(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(str)
}

// TestWidgetClick: this function will generate a button click (button press and
// button release event) in the middle of the first GdkWindow found that belongs
// to widget. For windowless widgets like Button (which returns FALSE from
// gtk_widget_get_has_window()), this will often be an input-only event window.
// For other widgets, this is usually widget->window. Certain caveats should be
// considered when using this function, in particular because the mouse pointer
// is warped to the button click location, see gdk_test_simulate_button() for
// details.
//
// Deprecated: This testing infrastructure is phased out in favor of reftests.
//
// The function takes the following parameters:
//
//   - widget: widget to generate a button click on.
//   - button: number of the pointer button for the event, usually 1, 2 or 3.
//   - modifiers: keyboard modifiers the event is setup with.
//
// The function returns the following values:
//
//   - ok: whether all actions neccessary for the button click simulation were
//     carried out successfully.
func TestWidgetClick(widget Widgetter, button uint, modifiers gdk.ModifierType) bool {
	var _arg1 *C.GtkWidget      // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.guint(button)
	_arg3 = C.GdkModifierType(modifiers)

	_cret = C.gtk_test_widget_click(_arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(button)
	runtime.KeepAlive(modifiers)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TestWidgetSendKey: this function will generate keyboard press and
// release events in the middle of the first GdkWindow found that belongs
// to widget. For windowless widgets like Button (which returns FALSE from
// gtk_widget_get_has_window()), this will often be an input-only event window.
// For other widgets, this is usually widget->window. Certain caveats should be
// considered when using this function, in particular because the mouse pointer
// is warped to the key press location, see gdk_test_simulate_key() for details.
//
// The function takes the following parameters:
//
//   - widget: widget to generate a key press and release on.
//   - keyval: gdk keyboard value.
//   - modifiers: keyboard modifiers the event is setup with.
//
// The function returns the following values:
//
//   - ok: whether all actions neccessary for the key event simulation were
//     carried out successfully.
func TestWidgetSendKey(widget Widgetter, keyval uint, modifiers gdk.ModifierType) bool {
	var _arg1 *C.GtkWidget      // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.guint(keyval)
	_arg3 = C.GdkModifierType(modifiers)

	_cret = C.gtk_test_widget_send_key(_arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TestWidgetWaitForDraw enters the main loop and waits for widget to be
// “drawn”. In this context that means it waits for the frame clock of widget to
// have run a full styling, layout and drawing cycle.
//
// This function is intended to be used for syncing with actions that depend on
// widget relayouting or on interaction with the display server.
//
// The function takes the following parameters:
//
//   - widget to wait for.
func TestWidgetWaitForDraw(widget Widgetter) {
	var _arg1 *C.GtkWidget // out

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_test_widget_wait_for_draw(_arg1)
	runtime.KeepAlive(widget)
}

// TreeGetRowDragData obtains a tree_model and path from selection data of
// target type GTK_TREE_MODEL_ROW. Normally called from a drag_data_received
// handler. This function can only be used if selection_data originates from
// the same process that’s calling this function, because a pointer to the
// tree model is being passed around. If you aren’t in the same process, then
// you'll get memory corruption. In the TreeDragDest drag_data_received handler,
// you can assume that selection data of type GTK_TREE_MODEL_ROW is in from the
// current process. The returned path must be freed with gtk_tree_path_free().
//
// The function takes the following parameters:
//
//   - selectionData: SelectionData.
//
// The function returns the following values:
//
//   - treeModel (optional): TreeModel.
//   - path (optional): row in tree_model.
//   - ok: TRUE if selection_data had target type GTK_TREE_MODEL_ROW and is
//     otherwise valid.
func TreeGetRowDragData(selectionData *SelectionData) (*TreeModel, *TreePath, bool) {
	var _arg1 *C.GtkSelectionData // out
	var _arg2 *C.GtkTreeModel     // in
	var _arg3 *C.GtkTreePath      // in
	var _cret C.gboolean          // in

	_arg1 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_tree_get_row_drag_data(_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(selectionData)

	var _treeModel *TreeModel // out
	var _path *TreePath       // out
	var _ok bool              // out

	if _arg2 != nil {
		_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_arg2)))
	}
	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _cret != 0 {
		_ok = true
	}

	return _treeModel, _path, _ok
}

// TreeSetRowDragData sets selection data of target type GTK_TREE_MODEL_ROW.
// Normally used in a drag_data_get handler.
//
// The function takes the following parameters:
//
//   - selectionData: some SelectionData.
//   - treeModel: TreeModel.
//   - path: row in tree_model.
//
// The function returns the following values:
//
//   - ok: TRUE if the SelectionData had the proper target type to allow us to
//     set a tree row.
func TreeSetRowDragData(selectionData *SelectionData, treeModel TreeModeller, path *TreePath) bool {
	var _arg1 *C.GtkSelectionData // out
	var _arg2 *C.GtkTreeModel     // out
	var _arg3 *C.GtkTreePath      // out
	var _cret C.gboolean          // in

	_arg1 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg2 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg3 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_set_row_drag_data(_arg1, _arg2, _arg3)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// True: all this function does it to return TRUE.
//
// This can be useful for example if you want to inhibit the deletion of a
// window. Of course you should not do this as the user expects a reaction from
// clicking the close icon of the window...
//
// A persistent window
//
//	#include <gtk/gtk.h>
//
//	int
//	main (int argc, char **argv)
//	{
//	  GtkWidget *win, *but;
//	  const char *text = "Close yourself. I mean it!";
//
//	  gtk_init (&argc, &argv);
//
//	  win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	  g_signal_connect (win,
//	                    "delete-event",
//	                    G_CALLBACK (gtk_true),
//	                    NULL);
//	  g_signal_connect (win, "destroy",
//	                    G_CALLBACK (gtk_main_quit),
//	                    NULL);
//
//	  but = gtk_button_new_with_label (text);
//	  g_signal_connect_swapped (but, "clicked",
//	                            G_CALLBACK (gtk_object_destroy),
//	                            win);
//	  gtk_container_add (GTK_CONTAINER (win), but);
//
//	  gtk_widget_show_all (win);
//
//	  gtk_main ();
//
//	  return 0;
//	}.
//
// The function returns the following values:
//
//   - ok: TRUE.
func True() bool {
	var _cret C.gboolean // in

	_cret = C.gtk_true()

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Actionable: this interface provides a convenient way of associating widgets
// with actions on a ApplicationWindow or Application.
//
// It primarily consists of two properties: Actionable:action-name and
// Actionable:action-target. There are also some convenience APIs for setting
// these properties.
//
// The action will be looked up in action groups that are found among the
// widgets ancestors. Most commonly, these will be the actions with the
// “win.” or “app.” prefix that are associated with the ApplicationWindow
// or Application, but other action groups that are added with
// gtk_widget_insert_action_group() will be consulted as well.
//
// Actionable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Actionable struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Actionable)(nil)
)

// Actionabler describes Actionable's interface methods.
type Actionabler interface {
	coreglib.Objector

	// ActionName gets the action name for actionable.
	ActionName() string
	// ActionTargetValue gets the current target value of actionable.
	ActionTargetValue() *glib.Variant
	// SetActionName specifies the name of the action with which this widget
	// should be associated.
	SetActionName(actionName string)
	// SetActionTargetValue sets the target value of an actionable widget.
	SetActionTargetValue(targetValue *glib.Variant)
	// SetDetailedActionName sets the action-name and associated string target
	// value of an actionable widget.
	SetDetailedActionName(detailedActionName string)
}

var _ Actionabler = (*Actionable)(nil)

func wrapActionable(obj *coreglib.Object) *Actionable {
	return &Actionable{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalActionable(p uintptr) (interface{}, error) {
	return wrapActionable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ActionName gets the action name for actionable.
//
// See gtk_actionable_set_action_name() for more information.
//
// The function returns the following values:
//
//   - utf8 (optional): action name, or NULL if none is set.
func (actionable *Actionable) ActionName() string {
	var _arg0 *C.GtkActionable // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))

	_cret = C.gtk_actionable_get_action_name(_arg0)
	runtime.KeepAlive(actionable)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// ActionTargetValue gets the current target value of actionable.
//
// See gtk_actionable_set_action_target_value() for more information.
//
// The function returns the following values:
//
//   - variant: current target value.
func (actionable *Actionable) ActionTargetValue() *glib.Variant {
	var _arg0 *C.GtkActionable // out
	var _cret *C.GVariant      // in

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))

	_cret = C.gtk_actionable_get_action_target_value(_arg0)
	runtime.KeepAlive(actionable)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// SetActionName specifies the name of the action with which this widget should
// be associated. If action_name is NULL then the widget will be unassociated
// from any previous action.
//
// Usually this function is used when the widget is located (or will be located)
// within the hierarchy of a ApplicationWindow.
//
// Names are of the form “win.save” or “app.quit” for actions on the containing
// ApplicationWindow or its associated Application, respectively. This is the
// same form used for actions in the #GMenu associated with the window.
//
// The function takes the following parameters:
//
//   - actionName (optional): action name, or NULL.
func (actionable *Actionable) SetActionName(actionName string) {
	var _arg0 *C.GtkActionable // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))
	if actionName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_actionable_set_action_name(_arg0, _arg1)
	runtime.KeepAlive(actionable)
	runtime.KeepAlive(actionName)
}

// SetActionTargetValue sets the target value of an actionable widget.
//
// If target_value is NULL then the target value is unset.
//
// The target value has two purposes. First, it is used as the parameter to
// activation of the action associated with the Actionable widget. Second,
// it is used to determine if the widget should be rendered as “active” — the
// widget is active if the state is equal to the given target.
//
// Consider the example of associating a set of buttons with a #GAction with
// string state in a typical “radio button” situation. Each button will be
// associated with the same action, but with a different target value for that
// action. Clicking on a particular button will activate the action with the
// target of that button, which will typically cause the action’s state to
// change to that value. Since the action’s state is now equal to the target
// value of the button, the button will now be rendered as active (and the other
// buttons, with different targets, rendered inactive).
//
// The function takes the following parameters:
//
//   - targetValue (optional) to set as the target value, or NULL.
func (actionable *Actionable) SetActionTargetValue(targetValue *glib.Variant) {
	var _arg0 *C.GtkActionable // out
	var _arg1 *C.GVariant      // out

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))
	if targetValue != nil {
		_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(targetValue)))
	}

	C.gtk_actionable_set_action_target_value(_arg0, _arg1)
	runtime.KeepAlive(actionable)
	runtime.KeepAlive(targetValue)
}

// SetDetailedActionName sets the action-name and associated string target value
// of an actionable widget.
//
// detailed_action_name is a string in the format accepted by
// g_action_parse_detailed_name().
//
// (Note that prior to version 3.22.25, this function is only usable for actions
// with a simple "s" target, and detailed_action_name must be of the form
// "action::target" where action is the action name and target is the string to
// use as the target.).
//
// The function takes the following parameters:
//
//   - detailedActionName: detailed action name.
func (actionable *Actionable) SetDetailedActionName(detailedActionName string) {
	var _arg0 *C.GtkActionable // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(detailedActionName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_actionable_set_detailed_action_name(_arg0, _arg1)
	runtime.KeepAlive(actionable)
	runtime.KeepAlive(detailedActionName)
}

// actionName gets the action name for actionable.
//
// See gtk_actionable_set_action_name() for more information.
//
// The function returns the following values:
//
//   - utf8 (optional): action name, or NULL if none is set.
func (actionable *Actionable) actionName() string {
	gclass := (*C.GtkActionableInterface)(coreglib.PeekParentClass(actionable))
	fnarg := gclass.get_action_name

	var _arg0 *C.GtkActionable // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))

	_cret = C._gotk4_gtk3_Actionable_virtual_get_action_name(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(actionable)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// actionTargetValue gets the current target value of actionable.
//
// See gtk_actionable_set_action_target_value() for more information.
//
// The function returns the following values:
//
//   - variant: current target value.
func (actionable *Actionable) actionTargetValue() *glib.Variant {
	gclass := (*C.GtkActionableInterface)(coreglib.PeekParentClass(actionable))
	fnarg := gclass.get_action_target_value

	var _arg0 *C.GtkActionable // out
	var _cret *C.GVariant      // in

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))

	_cret = C._gotk4_gtk3_Actionable_virtual_get_action_target_value(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(actionable)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// setActionName specifies the name of the action with which this widget should
// be associated. If action_name is NULL then the widget will be unassociated
// from any previous action.
//
// Usually this function is used when the widget is located (or will be located)
// within the hierarchy of a ApplicationWindow.
//
// Names are of the form “win.save” or “app.quit” for actions on the containing
// ApplicationWindow or its associated Application, respectively. This is the
// same form used for actions in the #GMenu associated with the window.
//
// The function takes the following parameters:
//
//   - actionName (optional): action name, or NULL.
func (actionable *Actionable) setActionName(actionName string) {
	gclass := (*C.GtkActionableInterface)(coreglib.PeekParentClass(actionable))
	fnarg := gclass.set_action_name

	var _arg0 *C.GtkActionable // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))
	if actionName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C._gotk4_gtk3_Actionable_virtual_set_action_name(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(actionable)
	runtime.KeepAlive(actionName)
}

// setActionTargetValue sets the target value of an actionable widget.
//
// If target_value is NULL then the target value is unset.
//
// The target value has two purposes. First, it is used as the parameter to
// activation of the action associated with the Actionable widget. Second,
// it is used to determine if the widget should be rendered as “active” — the
// widget is active if the state is equal to the given target.
//
// Consider the example of associating a set of buttons with a #GAction with
// string state in a typical “radio button” situation. Each button will be
// associated with the same action, but with a different target value for that
// action. Clicking on a particular button will activate the action with the
// target of that button, which will typically cause the action’s state to
// change to that value. Since the action’s state is now equal to the target
// value of the button, the button will now be rendered as active (and the other
// buttons, with different targets, rendered inactive).
//
// The function takes the following parameters:
//
//   - targetValue (optional) to set as the target value, or NULL.
func (actionable *Actionable) setActionTargetValue(targetValue *glib.Variant) {
	gclass := (*C.GtkActionableInterface)(coreglib.PeekParentClass(actionable))
	fnarg := gclass.set_action_target_value

	var _arg0 *C.GtkActionable // out
	var _arg1 *C.GVariant      // out

	_arg0 = (*C.GtkActionable)(unsafe.Pointer(coreglib.InternObject(actionable).Native()))
	if targetValue != nil {
		_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(targetValue)))
	}

	C._gotk4_gtk3_Actionable_virtual_set_action_target_value(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(actionable)
	runtime.KeepAlive(targetValue)
}

// Activatable widgets can be connected to a Action and reflects the state of
// its action. A Activatable can also provide feedback through its action,
// as they are responsible for activating their related actions.
//
// # Implementing GtkActivatable
//
// When extending a class that is already Activatable; it is only
// necessary to implement the Activatable->sync_action_properties()
// and Activatable->update() methods and chain up to the parent
// implementation, however when introducing a new Activatable class;
// the Activatable:related-action and Activatable:use-action-appearance
// properties need to be handled by the implementor. Handling these properties
// is mostly a matter of installing the action pointer and boolean flag on
// your instance, and calling gtk_activatable_do_set_related_action() and
// gtk_activatable_sync_action_properties() at the appropriate times.
//
// # A class fragment implementing Activatable
//
//	enum {
//	...
//
//	PROP_ACTIVATABLE_RELATED_ACTION,
//	PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
//	}
//
//	struct _FooBarPrivate
//	{
//
//	  ...
//
//	  GtkAction      *action;
//	  gboolean        use_action_appearance;
//	};
//
//	...
//
//	static void foo_bar_activatable_interface_init         (GtkActivatableIface  *iface);
//	static void foo_bar_activatable_update                 (GtkActivatable       *activatable,
//							           GtkAction            *action,
//							           const gchar          *property_name);
//	static void foo_bar_activatable_sync_action_properties (GtkActivatable       *activatable,
//							           GtkAction            *action);
//	...
//
//
//	static void
//	foo_bar_class_init (FooBarClass *klass)
//	{
//
//	  ...
//
//	  g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
//	  g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance");
//
//	  ...
//	}
//
//
//	static void
//	foo_bar_activatable_interface_init (GtkActivatableIface  *iface)
//	{
//	  iface->update = foo_bar_activatable_update;
//	  iface->sync_action_properties = foo_bar_activatable_sync_action_properties;
//	}
//
//	... Break the reference using gtk_activatable_do_set_related_action()...
//
//	static void
//	foo_bar_dispose (GObject *object)
//	{
//	  FooBar *bar = FOO_BAR (object);
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
//
//	  ...
//
//	  if (priv->action)
//	    {
//	      gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL);
//	      priv->action = NULL;
//	    }
//	  G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object);
//	}
//
//	... Handle the “related-action” and “use-action-appearance” properties ...
//
//	static void
//	foo_bar_set_property (GObject         *object,
//	                      guint            prop_id,
//	                      const GValue    *value,
//	                      GParamSpec      *pspec)
//	{
//	  FooBar *bar = FOO_BAR (object);
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
//
//	  switch (prop_id)
//	    {
//
//	      ...
//
//	    case PROP_ACTIVATABLE_RELATED_ACTION:
//	      foo_bar_set_related_action (bar, g_value_get_object (value));
//	      break;
//	    case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
//	      foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value));
//	      break;
//	    default:
//	      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
//	      break;
//	    }
//	}
//
//	static void
//	foo_bar_get_property (GObject         *object,
//	                         guint            prop_id,
//	                         GValue          *value,
//	                         GParamSpec      *pspec)
//	{
//	  FooBar *bar = FOO_BAR (object);
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
//
//	  switch (prop_id)
//	    {
//
//	      ...
//
//	    case PROP_ACTIVATABLE_RELATED_ACTION:
//	      g_value_set_object (value, priv->action);
//	      break;
//	    case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
//	      g_value_set_boolean (value, priv->use_action_appearance);
//	      break;
//	    default:
//	      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
//	      break;
//	    }
//	}
//
//
//	static void
//	foo_bar_set_use_action_appearance (FooBar   *bar,
//					   gboolean  use_appearance)
//	{
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
//
//	  if (priv->use_action_appearance != use_appearance)
//	    {
//	      priv->use_action_appearance = use_appearance;
//
//	      gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action);
//	    }
//	}
//
//	... call gtk_activatable_do_set_related_action() and then assign the action pointer,
//	no need to reference the action here since gtk_activatable_do_set_related_action() already
//	holds a reference here for you...
//	static void
//	foo_bar_set_related_action (FooBar    *bar,
//				    GtkAction *action)
//	{
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
//
//	  if (priv->action == action)
//	    return;
//
//	  gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action);
//
//	  priv->action = action;
//	}
//
//	... Selectively reset and update activatable depending on the use-action-appearance property ...
//	static void
//	gtk_button_activatable_sync_action_properties (GtkActivatable       *activatable,
//			                                  GtkAction            *action)
//	{
//	  GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
//
//	  if (!action)
//	    return;
//
//	  if (gtk_action_is_visible (action))
//	    gtk_widget_show (GTK_WIDGET (activatable));
//	  else
//	    gtk_widget_hide (GTK_WIDGET (activatable));
//
//	  gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
//
//	  ...
//
//	  if (priv->use_action_appearance)
//	    {
//	      if (gtk_action_get_stock_id (action))
//		foo_bar_set_stock (button, gtk_action_get_stock_id (action));
//	      else if (gtk_action_get_label (action))
//		foo_bar_set_label (button, gtk_action_get_label (action));
//
//	      ...
//
//	    }
//	}
//
//	static void
//	foo_bar_activatable_update (GtkActivatable       *activatable,
//				       GtkAction            *action,
//				       const gchar          *property_name)
//	{
//	  FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable);
//
//	  if (strcmp (property_name, "visible") == 0)
//	    {
//	      if (gtk_action_is_visible (action))
//		gtk_widget_show (GTK_WIDGET (activatable));
//	      else
//		gtk_widget_hide (GTK_WIDGET (activatable));
//	    }
//	  else if (strcmp (property_name, "sensitive") == 0)
//	    gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
//
//	  ...
//
//	  if (!priv->use_action_appearance)
//	    return;
//
//	  if (strcmp (property_name, "stock-id") == 0)
//	    foo_bar_set_stock (button, gtk_action_get_stock_id (action));
//	  else if (strcmp (property_name, "label") == 0)
//	    foo_bar_set_label (button, gtk_action_get_label (action));
//
//	  ...
//	}.
//
// Activatable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Activatable struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Activatable)(nil)
)

// Activatabler describes Activatable's interface methods.
type Activatabler interface {
	coreglib.Objector

	// DoSetRelatedAction: this is a utility function for Activatable
	// implementors.
	DoSetRelatedAction(action *Action)
	// RelatedAction gets the related Action for activatable.
	RelatedAction() *Action
	// UseActionAppearance gets whether this activatable should reset its layout
	// and appearance when setting the related action or when the action changes
	// appearance.
	UseActionAppearance() bool
	// SetRelatedAction sets the related action on the activatable object.
	SetRelatedAction(action *Action)
	// SetUseActionAppearance sets whether this activatable should reset its
	// layout and appearance when setting the related action or when the action
	// changes appearance.
	SetUseActionAppearance(useAppearance bool)
	// SyncActionProperties: this is called to update the activatable
	// completely, this is called internally when the Activatable:related-action
	// property is set or unset and by the implementing class when
	// Activatable:use-action-appearance changes.
	SyncActionProperties(action *Action)
}

var _ Activatabler = (*Activatable)(nil)

func wrapActivatable(obj *coreglib.Object) *Activatable {
	return &Activatable{
		Object: obj,
	}
}

func marshalActivatable(p uintptr) (interface{}, error) {
	return wrapActivatable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// DoSetRelatedAction: this is a utility function for Activatable implementors.
//
// When implementing Activatable you must call this when handling changes of the
// Activatable:related-action, and you must also use this to break references in
// #GObject->dispose().
//
// This function adds a reference to the currently set related action for you,
// it also makes sure the Activatable->update() method is called when the
// related Action properties change and registers to the action’s proxy list.
//
// > Be careful to call this before setting the local > copy of the Action
// property, since this function uses > gtk_activatable_get_related_action() to
// retrieve the > previous action.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action to set.
func (activatable *Activatable) DoSetRelatedAction(action *Action) {
	var _arg0 *C.GtkActivatable // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_activatable_do_set_related_action(_arg0, _arg1)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(action)
}

// RelatedAction gets the related Action for activatable.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - action: related Action if one is set.
func (activatable *Activatable) RelatedAction() *Action {
	var _arg0 *C.GtkActivatable // out
	var _cret *C.GtkAction      // in

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))

	_cret = C.gtk_activatable_get_related_action(_arg0)
	runtime.KeepAlive(activatable)

	var _action *Action // out

	_action = wrapAction(coreglib.Take(unsafe.Pointer(_cret)))

	return _action
}

// UseActionAppearance gets whether this activatable should reset its layout
// and appearance when setting the related action or when the action changes
// appearance.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: whether activatable uses its actions appearance.
func (activatable *Activatable) UseActionAppearance() bool {
	var _arg0 *C.GtkActivatable // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))

	_cret = C.gtk_activatable_get_use_action_appearance(_arg0)
	runtime.KeepAlive(activatable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetRelatedAction sets the related action on the activatable object.
//
// > Activatable implementors need to handle the Activatable:related-action >
// property and call gtk_activatable_do_set_related_action() when it changes.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action to set.
func (activatable *Activatable) SetRelatedAction(action *Action) {
	var _arg0 *C.GtkActivatable // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_activatable_set_related_action(_arg0, _arg1)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(action)
}

// SetUseActionAppearance sets whether this activatable should reset its layout
// and appearance when setting the related action or when the action changes
// appearance
//
// > Activatable implementors need to handle the >
// Activatable:use-action-appearance property and call >
// gtk_activatable_sync_action_properties() to update activatable > if needed.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - useAppearance: whether to use the actions appearance.
func (activatable *Activatable) SetUseActionAppearance(useAppearance bool) {
	var _arg0 *C.GtkActivatable // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	if useAppearance {
		_arg1 = C.TRUE
	}

	C.gtk_activatable_set_use_action_appearance(_arg0, _arg1)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(useAppearance)
}

// SyncActionProperties: this is called to update the activatable completely,
// this is called internally when the Activatable:related-action property is set
// or unset and by the implementing class when Activatable:use-action-appearance
// changes.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action (optional): related Action or NULL.
func (activatable *Activatable) SyncActionProperties(action *Action) {
	var _arg0 *C.GtkActivatable // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	if action != nil {
		_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	}

	C.gtk_activatable_sync_action_properties(_arg0, _arg1)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(action)
}

// syncActionProperties: this is called to update the activatable completely,
// this is called internally when the Activatable:related-action property is set
// or unset and by the implementing class when Activatable:use-action-appearance
// changes.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action (optional): related Action or NULL.
func (activatable *Activatable) syncActionProperties(action *Action) {
	gclass := (*C.GtkActivatableIface)(coreglib.PeekParentClass(activatable))
	fnarg := gclass.sync_action_properties

	var _arg0 *C.GtkActivatable // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	if action != nil {
		_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	}

	C._gotk4_gtk3_Activatable_virtual_sync_action_properties(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(action)
}

// Update: called to update the activatable when its related action’s properties
// change. You must check the Activatable:use-action-appearance property only
// apply action properties that are meant to effect the appearance accordingly.
//
// The function takes the following parameters:
//
//   - action
//   - propertyName
func (activatable *Activatable) update(action *Action, propertyName string) {
	gclass := (*C.GtkActivatableIface)(coreglib.PeekParentClass(activatable))
	fnarg := gclass.update

	var _arg0 *C.GtkActivatable // out
	var _arg1 *C.GtkAction      // out
	var _arg2 *C.gchar          // out

	_arg0 = (*C.GtkActivatable)(unsafe.Pointer(coreglib.InternObject(activatable).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))

	C._gotk4_gtk3_Activatable_virtual_update(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(activatable)
	runtime.KeepAlive(action)
	runtime.KeepAlive(propertyName)
}

// AppChooser is an interface that can be implemented by widgets which allow the
// user to choose an application (typically for the purpose of opening a file).
// The main objects that implement this interface are AppChooserWidget,
// AppChooserDialog and AppChooserButton.
//
// Applications are represented by GIO Info objects here. GIO has a concept of
// recommended and fallback applications for a given content type. Recommended
// applications are those that claim to handle the content type itself, while
// fallback also includes applications that handle a more generic content type.
// GIO also knows the default and last-used application for a given content
// type. The AppChooserWidget provides detailed control over whether the
// shown list of applications should include default, recommended or fallback
// applications.
//
// To obtain the application that has been selected in a AppChooser, use
// gtk_app_chooser_get_app_info().
//
// AppChooser wraps an interface. This means the user can get the
// underlying type by calling Cast().
type AppChooser struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*AppChooser)(nil)
)

// AppChooserer describes AppChooser's interface methods.
type AppChooserer interface {
	coreglib.Objector

	// AppInfo returns the currently selected application.
	AppInfo() *gio.AppInfo
	// ContentType returns the current value of the AppChooser:content-type
	// property.
	ContentType() string
	// Refresh reloads the list of applications.
	Refresh()
}

var _ AppChooserer = (*AppChooser)(nil)

func wrapAppChooser(obj *coreglib.Object) *AppChooser {
	return &AppChooser{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalAppChooser(p uintptr) (interface{}, error) {
	return wrapAppChooser(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// AppInfo returns the currently selected application.
//
// The function returns the following values:
//
//   - appInfo (optional) for the currently selected application, or NULL if
//     none is selected. Free with g_object_unref().
func (self *AppChooser) AppInfo() *gio.AppInfo {
	var _arg0 *C.GtkAppChooser // out
	var _cret *C.GAppInfo      // in

	_arg0 = (*C.GtkAppChooser)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_get_app_info(_arg0)
	runtime.KeepAlive(self)

	var _appInfo *gio.AppInfo // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_appInfo = &gio.AppInfo{
				Object: obj,
			}
		}
	}

	return _appInfo
}

// ContentType returns the current value of the AppChooser:content-type
// property.
//
// The function returns the following values:
//
//   - utf8: content type of self. Free with g_free().
func (self *AppChooser) ContentType() string {
	var _arg0 *C.GtkAppChooser // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkAppChooser)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_get_content_type(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Refresh reloads the list of applications.
func (self *AppChooser) Refresh() {
	var _arg0 *C.GtkAppChooser // out

	_arg0 = (*C.GtkAppChooser)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C.gtk_app_chooser_refresh(_arg0)
	runtime.KeepAlive(self)
}

// Buildable allows objects to extend and customize their deserialization from
// [GtkBuilder UI descriptions][BUILDER-UI]. The interface includes methods for
// setting names and properties of objects, parsing custom tags and constructing
// child objects.
//
// The GtkBuildable interface is implemented by all widgets and many of the
// non-widget objects that are provided by GTK+. The main user of this interface
// is Builder. There should be very little need for applications to call any of
// these functions directly.
//
// An object only needs to implement this interface if it needs to extend the
// Builder format or run any extra routines at deserialization time.
//
// Buildable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Buildable struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Buildable)(nil)
)

// Buildabler describes Buildable's interface methods.
type Buildabler interface {
	coreglib.Objector

	// AddChild adds a child to buildable.
	AddChild(builder *Builder, child *coreglib.Object, typ string)
	// ConstructChild constructs a child of buildable with the name name.
	ConstructChild(builder *Builder, name string) *coreglib.Object
	// CustomFinished: this is similar to gtk_buildable_parser_finished() but is
	// called once for each custom tag handled by the buildable.
	CustomFinished(builder *Builder, child *coreglib.Object, tagname string, data unsafe.Pointer)
	// CustomTagEnd: this is called at the end of each custom element handled by
	// the buildable.
	CustomTagEnd(builder *Builder, child *coreglib.Object, tagname string, data *unsafe.Pointer)
	// CustomTagStart: this is called for each unknown element under <child>.
	CustomTagStart(builder *Builder, child *coreglib.Object, tagname string) (*glib.MarkupParser, unsafe.Pointer, bool)
	// InternalChild: get the internal child called childname of the buildable
	// object.
	InternalChild(builder *Builder, childname string) *coreglib.Object
	// Name gets the name of the buildable object.
	Name() string
	// ParserFinished: called when the builder finishes the parsing of a
	// [GtkBuilder UI definition][BUILDER-UI].
	ParserFinished(builder *Builder)
	// SetBuildableProperty sets the property name name to value on the
	// buildable object.
	SetBuildableProperty(builder *Builder, name string, value *coreglib.Value)
	// SetName sets the name of the buildable object.
	SetName(name string)
}

var _ Buildabler = (*Buildable)(nil)

func wrapBuildable(obj *coreglib.Object) *Buildable {
	return &Buildable{
		Object: obj,
	}
}

func marshalBuildable(p uintptr) (interface{}, error) {
	return wrapBuildable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// AddChild adds a child to buildable. type is an optional string describing how
// the child should be added.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - child to add.
//   - typ (optional): kind of child or NULL.
func (buildable *Buildable) AddChild(builder *Builder, child *coreglib.Object, typ string) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	if typ != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(typ)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	C.gtk_buildable_add_child(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(typ)
}

// ConstructChild constructs a child of buildable with the name name.
//
// Builder calls this function if a “constructor” has been specified in the UI
// definition.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - name of child to construct.
//
// The function returns the following values:
//
//   - object: constructed child.
func (buildable *Buildable) ConstructChild(builder *Builder, name string) *coreglib.Object {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _cret *C.GObject      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_buildable_construct_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)

	var _object *coreglib.Object // out

	_object = coreglib.AssumeOwnership(unsafe.Pointer(_cret))

	return _object
}

// CustomFinished: this is similar to gtk_buildable_parser_finished() but is
// called once for each custom tag handled by the buildable.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of the tag.
//   - data (optional): user data created in custom_tag_start.
func (buildable *Buildable) CustomFinished(builder *Builder, child *coreglib.Object, tagname string, data unsafe.Pointer) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 C.gpointer      // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (C.gpointer)(unsafe.Pointer(data))

	C.gtk_buildable_custom_finished(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)
	runtime.KeepAlive(data)
}

// CustomTagEnd: this is called at the end of each custom element handled by the
// buildable.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of tag.
//   - data (optional): user data that will be passed in to parser functions.
func (buildable *Buildable) CustomTagEnd(builder *Builder, child *coreglib.Object, tagname string, data *unsafe.Pointer) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 *C.gpointer     // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))
	if data != nil {
		_arg4 = (*C.gpointer)(unsafe.Pointer(data))
	}

	C.gtk_buildable_custom_tag_end(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)
	runtime.KeepAlive(data)
}

// CustomTagStart: this is called for each unknown element under <child>.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of tag.
//
// The function returns the following values:
//
//   - parser to fill in.
//   - data (optional): return location for user data that will be passed in to
//     parser functions.
//   - ok: TRUE if a object has a custom implementation, FALSE if it doesn't.
func (buildable *Buildable) CustomTagStart(builder *Builder, child *coreglib.Object, tagname string) (*glib.MarkupParser, unsafe.Pointer, bool) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 C.GMarkupParser // in
	var _arg5 C.gpointer      // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))

	_cret = C.gtk_buildable_custom_tag_start(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)

	var _parser *glib.MarkupParser // out
	var _data unsafe.Pointer       // out
	var _ok bool                   // out

	_parser = (*glib.MarkupParser)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))
	_data = (unsafe.Pointer)(unsafe.Pointer(_arg5))
	if _cret != 0 {
		_ok = true
	}

	return _parser, _data, _ok
}

// InternalChild: get the internal child called childname of the buildable
// object.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - childname: name of child.
//
// The function returns the following values:
//
//   - object: internal child of the buildable object.
func (buildable *Buildable) InternalChild(builder *Builder, childname string) *coreglib.Object {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _cret *C.GObject      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(childname)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_buildable_get_internal_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(childname)

	var _object *coreglib.Object // out

	_object = coreglib.Take(unsafe.Pointer(_cret))

	return _object
}

// Name gets the name of the buildable object.
//
// Builder sets the name based on the [GtkBuilder UI definition][BUILDER-UI]
// used to construct the buildable.
//
// The function returns the following values:
//
//   - utf8: name set with gtk_buildable_set_name().
func (buildable *Buildable) Name() string {
	var _arg0 *C.GtkBuildable // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))

	_cret = C.gtk_buildable_get_name(_arg0)
	runtime.KeepAlive(buildable)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ParserFinished: called when the builder finishes the parsing of a [GtkBuilder
// UI definition][BUILDER-UI]. Note that this will be called once for each time
// gtk_builder_add_from_file() or gtk_builder_add_from_string() is called on a
// builder.
//
// The function takes the following parameters:
//
//   - builder: Builder.
func (buildable *Buildable) ParserFinished(builder *Builder) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))

	C.gtk_buildable_parser_finished(_arg0, _arg1)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
}

// SetBuildableProperty sets the property name name to value on the buildable
// object.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - name of property.
//   - value of property.
func (buildable *Buildable) SetBuildableProperty(builder *Builder, name string, value *coreglib.Value) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_buildable_set_buildable_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)
	runtime.KeepAlive(value)
}

// SetName sets the name of the buildable object.
//
// The function takes the following parameters:
//
//   - name to set.
func (buildable *Buildable) SetName(name string) {
	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_buildable_set_name(_arg0, _arg1)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(name)
}

// addChild adds a child to buildable. type is an optional string describing how
// the child should be added.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - child to add.
//   - typ (optional): kind of child or NULL.
func (buildable *Buildable) addChild(builder *Builder, child *coreglib.Object, typ string) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.add_child

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	if typ != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(typ)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	C._gotk4_gtk3_Buildable_virtual_add_child(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(typ)
}

// constructChild constructs a child of buildable with the name name.
//
// Builder calls this function if a “constructor” has been specified in the UI
// definition.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - name of child to construct.
//
// The function returns the following values:
//
//   - object: constructed child.
func (buildable *Buildable) constructChild(builder *Builder, name string) *coreglib.Object {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.construct_child

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _cret *C.GObject      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C._gotk4_gtk3_Buildable_virtual_construct_child(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)

	var _object *coreglib.Object // out

	_object = coreglib.AssumeOwnership(unsafe.Pointer(_cret))

	return _object
}

// customFinished: this is similar to gtk_buildable_parser_finished() but is
// called once for each custom tag handled by the buildable.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of the tag.
//   - data (optional): user data created in custom_tag_start.
func (buildable *Buildable) customFinished(builder *Builder, child *coreglib.Object, tagname string, data unsafe.Pointer) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.custom_finished

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 C.gpointer      // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (C.gpointer)(unsafe.Pointer(data))

	C._gotk4_gtk3_Buildable_virtual_custom_finished(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)
	runtime.KeepAlive(data)
}

// customTagEnd: this is called at the end of each custom element handled by the
// buildable.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of tag.
//   - data (optional): user data that will be passed in to parser functions.
func (buildable *Buildable) customTagEnd(builder *Builder, child *coreglib.Object, tagname string, data *unsafe.Pointer) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.custom_tag_end

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 *C.gpointer     // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))
	if data != nil {
		_arg4 = (*C.gpointer)(unsafe.Pointer(data))
	}

	C._gotk4_gtk3_Buildable_virtual_custom_tag_end(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)
	runtime.KeepAlive(data)
}

// customTagStart: this is called for each unknown element under <child>.
//
// The function takes the following parameters:
//
//   - builder used to construct this object.
//   - child (optional) object or NULL for non-child tags.
//   - tagname: name of tag.
//
// The function returns the following values:
//
//   - parser to fill in.
//   - data (optional): return location for user data that will be passed in to
//     parser functions.
//   - ok: TRUE if a object has a custom implementation, FALSE if it doesn't.
func (buildable *Buildable) customTagStart(builder *Builder, child *coreglib.Object, tagname string) (*glib.MarkupParser, unsafe.Pointer, bool) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.custom_tag_start

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.GObject      // out
	var _arg3 *C.gchar        // out
	var _arg4 C.GMarkupParser // in
	var _arg5 C.gpointer      // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if child != nil {
		_arg2 = (*C.GObject)(unsafe.Pointer(child.Native()))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tagname)))
	defer C.free(unsafe.Pointer(_arg3))

	_cret = C._gotk4_gtk3_Buildable_virtual_custom_tag_start(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tagname)

	var _parser *glib.MarkupParser // out
	var _data unsafe.Pointer       // out
	var _ok bool                   // out

	_parser = (*glib.MarkupParser)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))
	_data = (unsafe.Pointer)(unsafe.Pointer(_arg5))
	if _cret != 0 {
		_ok = true
	}

	return _parser, _data, _ok
}

// internalChild: get the internal child called childname of the buildable
// object.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - childname: name of child.
//
// The function returns the following values:
//
//   - object: internal child of the buildable object.
func (buildable *Buildable) internalChild(builder *Builder, childname string) *coreglib.Object {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.get_internal_child

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _cret *C.GObject      // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(childname)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C._gotk4_gtk3_Buildable_virtual_get_internal_child(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(childname)

	var _object *coreglib.Object // out

	_object = coreglib.Take(unsafe.Pointer(_cret))

	return _object
}

// Name gets the name of the buildable object.
//
// Builder sets the name based on the [GtkBuilder UI definition][BUILDER-UI]
// used to construct the buildable.
//
// The function returns the following values:
//
//   - utf8: name set with gtk_buildable_set_name().
func (buildable *Buildable) name() string {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.get_name

	var _arg0 *C.GtkBuildable // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))

	_cret = C._gotk4_gtk3_Buildable_virtual_get_name(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buildable)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// parserFinished: called when the builder finishes the parsing of a [GtkBuilder
// UI definition][BUILDER-UI]. Note that this will be called once for each time
// gtk_builder_add_from_file() or gtk_builder_add_from_string() is called on a
// builder.
//
// The function takes the following parameters:
//
//   - builder: Builder.
func (buildable *Buildable) parserFinished(builder *Builder) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.parser_finished

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))

	C._gotk4_gtk3_Buildable_virtual_parser_finished(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
}

// setBuildableProperty sets the property name name to value on the buildable
// object.
//
// The function takes the following parameters:
//
//   - builder: Builder.
//   - name of property.
//   - value of property.
func (buildable *Buildable) setBuildableProperty(builder *Builder, name string, value *coreglib.Value) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.set_buildable_property

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.GtkBuilder   // out
	var _arg2 *C.gchar        // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C._gotk4_gtk3_Buildable_virtual_set_buildable_property(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)
	runtime.KeepAlive(value)
}

// setName sets the name of the buildable object.
//
// The function takes the following parameters:
//
//   - name to set.
func (buildable *Buildable) setName(name string) {
	gclass := (*C.GtkBuildableIface)(coreglib.PeekParentClass(buildable))
	fnarg := gclass.set_name

	var _arg0 *C.GtkBuildable // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkBuildable)(unsafe.Pointer(coreglib.InternObject(buildable).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_Buildable_virtual_set_name(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(buildable)
	runtime.KeepAlive(name)
}

// CellAccessibleParent wraps an interface. This means the user can get the
// underlying type by calling Cast().
type CellAccessibleParent struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*CellAccessibleParent)(nil)
)

// CellAccessibleParenter describes CellAccessibleParent's interface methods.
type CellAccessibleParenter interface {
	coreglib.Objector

	Activate(cell *CellAccessible)
	Edit(cell *CellAccessible)
	ExpandCollapse(cell *CellAccessible)
	CellArea(cell *CellAccessible) *gdk.Rectangle
	CellExtents(cell *CellAccessible, coordType atk.CoordType) (x, y, width, height int)
	CellPosition(cell *CellAccessible) (row, column int)
	ChildIndex(cell *CellAccessible) int
	RendererState(cell *CellAccessible) CellRendererState
	GrabFocus(cell *CellAccessible) bool
	UpdateRelationset(cell *CellAccessible, relationset *atk.RelationSet)
}

var _ CellAccessibleParenter = (*CellAccessibleParent)(nil)

func wrapCellAccessibleParent(obj *coreglib.Object) *CellAccessibleParent {
	return &CellAccessibleParent{
		Object: obj,
	}
}

func marshalCellAccessibleParent(p uintptr) (interface{}, error) {
	return wrapCellAccessibleParent(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (parent *CellAccessibleParent) Activate(cell *CellAccessible) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_accessible_parent_activate(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) Edit(cell *CellAccessible) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_accessible_parent_edit(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) ExpandCollapse(cell *CellAccessible) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_accessible_parent_expand_collapse(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) CellArea(cell *CellAccessible) *gdk.Rectangle {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.GdkRectangle             // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_accessible_parent_get_cell_area(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _cellRect *gdk.Rectangle // out

	_cellRect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _cellRect
}

// The function takes the following parameters:
//
//   - cell
//   - coordType
//
// The function returns the following values:
//
//   - x
//   - y
//   - width
//   - height
func (parent *CellAccessibleParent) CellExtents(cell *CellAccessible, coordType atk.CoordType) (x, y, width, height int) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.gint                     // in
	var _arg3 C.gint                     // in
	var _arg4 C.gint                     // in
	var _arg5 C.gint                     // in
	var _arg6 C.AtkCoordType             // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg6 = C.AtkCoordType(coordType)

	C.gtk_cell_accessible_parent_get_cell_extents(_arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5, _arg6)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(coordType)

	var _x int      // out
	var _y int      // out
	var _width int  // out
	var _height int // out

	_x = int(_arg2)
	_y = int(_arg3)
	_width = int(_arg4)
	_height = int(_arg5)

	return _x, _y, _width, _height
}

// The function returns the following values:
//
//   - row
//   - column
func (parent *CellAccessibleParent) CellPosition(cell *CellAccessible) (row, column int) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.gint                     // in
	var _arg3 C.gint                     // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_accessible_parent_get_cell_position(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _row int    // out
	var _column int // out

	_row = int(_arg2)
	_column = int(_arg3)

	return _row, _column
}

func (parent *CellAccessibleParent) ChildIndex(cell *CellAccessible) int {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.int                      // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_accessible_parent_get_child_index(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

func (parent *CellAccessibleParent) RendererState(cell *CellAccessible) CellRendererState {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.GtkCellRendererState     // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_accessible_parent_get_renderer_state(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _cellRendererState CellRendererState // out

	_cellRendererState = CellRendererState(_cret)

	return _cellRendererState
}

func (parent *CellAccessibleParent) GrabFocus(cell *CellAccessible) bool {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.gboolean                 // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_accessible_parent_grab_focus(_arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - cell
//   - relationset
func (parent *CellAccessibleParent) UpdateRelationset(cell *CellAccessible, relationset *atk.RelationSet) {
	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 *C.AtkRelationSet          // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = (*C.AtkRelationSet)(unsafe.Pointer(coreglib.InternObject(relationset).Native()))

	C.gtk_cell_accessible_parent_update_relationset(_arg0, _arg1, _arg2)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(relationset)
}

func (parent *CellAccessibleParent) activate(cell *CellAccessible) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.activate

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_activate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) edit(cell *CellAccessible) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.edit

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_edit(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) expandCollapse(cell *CellAccessible) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.expand_collapse

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_expand_collapse(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
}

func (parent *CellAccessibleParent) cellArea(cell *CellAccessible) *gdk.Rectangle {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.get_cell_area

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.GdkRectangle             // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_get_cell_area(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _cellRect *gdk.Rectangle // out

	_cellRect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _cellRect
}

// The function takes the following parameters:
//
//   - cell
//   - coordType
//
// The function returns the following values:
//
//   - x
//   - y
//   - width
//   - height
func (parent *CellAccessibleParent) cellExtents(cell *CellAccessible, coordType atk.CoordType) (x, y, width, height int) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.get_cell_extents

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.gint                     // in
	var _arg3 C.gint                     // in
	var _arg4 C.gint                     // in
	var _arg5 C.gint                     // in
	var _arg6 C.AtkCoordType             // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg6 = C.AtkCoordType(coordType)

	C._gotk4_gtk3_CellAccessibleParent_virtual_get_cell_extents(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5, _arg6)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(coordType)

	var _x int      // out
	var _y int      // out
	var _width int  // out
	var _height int // out

	_x = int(_arg2)
	_y = int(_arg3)
	_width = int(_arg4)
	_height = int(_arg5)

	return _x, _y, _width, _height
}

// The function returns the following values:
//
//   - row
//   - column
func (parent *CellAccessibleParent) cellPosition(cell *CellAccessible) (row, column int) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.get_cell_position

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 C.gint                     // in
	var _arg3 C.gint                     // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_get_cell_position(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _row int    // out
	var _column int // out

	_row = int(_arg2)
	_column = int(_arg3)

	return _row, _column
}

func (parent *CellAccessibleParent) childIndex(cell *CellAccessible) int {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.get_child_index

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.int                      // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C._gotk4_gtk3_CellAccessibleParent_virtual_get_child_index(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

func (parent *CellAccessibleParent) rendererState(cell *CellAccessible) CellRendererState {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.get_renderer_state

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.GtkCellRendererState     // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C._gotk4_gtk3_CellAccessibleParent_virtual_get_renderer_state(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _cellRendererState CellRendererState // out

	_cellRendererState = CellRendererState(_cret)

	return _cellRendererState
}

func (parent *CellAccessibleParent) grabFocus(cell *CellAccessible) bool {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.grab_focus

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _cret C.gboolean                 // in

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C._gotk4_gtk3_CellAccessibleParent_virtual_grab_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - cell
//   - relationset
func (parent *CellAccessibleParent) updateRelationset(cell *CellAccessible, relationset *atk.RelationSet) {
	gclass := (*C.GtkCellAccessibleParentIface)(coreglib.PeekParentClass(parent))
	fnarg := gclass.update_relationset

	var _arg0 *C.GtkCellAccessibleParent // out
	var _arg1 *C.GtkCellAccessible       // out
	var _arg2 *C.AtkRelationSet          // out

	_arg0 = (*C.GtkCellAccessibleParent)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = (*C.AtkRelationSet)(unsafe.Pointer(coreglib.InternObject(relationset).Native()))

	C._gotk4_gtk3_CellAccessibleParent_virtual_update_relationset(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(relationset)
}

// CellEditable interface must be implemented for widgets to be usable to edit
// the contents of a TreeView cell. It provides a way to specify how temporary
// widgets should be configured for editing, get the new value, etc.
//
// CellEditable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type CellEditable struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*CellEditable)(nil)
)

// CellEditabler describes CellEditable's interface methods.
type CellEditabler interface {
	coreglib.Objector

	// EditingDone emits the CellEditable::editing-done signal.
	EditingDone()
	// RemoveWidget emits the CellEditable::remove-widget signal.
	RemoveWidget()
	// StartEditing begins editing on a cell_editable.
	StartEditing(event *gdk.Event)

	// Editing-done: this signal is a sign for the cell renderer to update its
	// value from the cell_editable.
	ConnectEditingDone(func()) coreglib.SignalHandle
	// Remove-widget: this signal is meant to indicate that the cell is
	// finished editing, and the cell_editable widget is being removed and may
	// subsequently be destroyed.
	ConnectRemoveWidget(func()) coreglib.SignalHandle
}

var _ CellEditabler = (*CellEditable)(nil)

func wrapCellEditable(obj *coreglib.Object) *CellEditable {
	return &CellEditable{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalCellEditable(p uintptr) (interface{}, error) {
	return wrapCellEditable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEditingDone: this signal is a sign for the cell renderer to update its
// value from the cell_editable.
//
// Implementations of CellEditable are responsible for emitting this signal
// when they are done editing, e.g. Entry emits this signal when the user
// presses Enter. Typical things to do in a handler for ::editing-done are to
// capture the edited value, disconnect the cell_editable from signals on the
// CellRenderer, etc.
//
// gtk_cell_editable_editing_done() is a convenience method for emitting
// CellEditable::editing-done.
func (cellEditable *CellEditable) ConnectEditingDone(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(cellEditable, "editing-done", false, unsafe.Pointer(C._gotk4_gtk3_CellEditable_ConnectEditingDone), f)
}

// ConnectRemoveWidget: this signal is meant to indicate that the cell is
// finished editing, and the cell_editable widget is being removed and may
// subsequently be destroyed.
//
// Implementations of CellEditable are responsible for emitting this
// signal when they are done editing. It must be emitted after the
// CellEditable::editing-done signal, to give the cell renderer a chance to
// update the cell's value before the widget is removed.
//
// gtk_cell_editable_remove_widget() is a convenience method for emitting
// CellEditable::remove-widget.
func (cellEditable *CellEditable) ConnectRemoveWidget(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(cellEditable, "remove-widget", false, unsafe.Pointer(C._gotk4_gtk3_CellEditable_ConnectRemoveWidget), f)
}

// EditingDone emits the CellEditable::editing-done signal.
func (cellEditable *CellEditable) EditingDone() {
	var _arg0 *C.GtkCellEditable // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))

	C.gtk_cell_editable_editing_done(_arg0)
	runtime.KeepAlive(cellEditable)
}

// RemoveWidget emits the CellEditable::remove-widget signal.
func (cellEditable *CellEditable) RemoveWidget() {
	var _arg0 *C.GtkCellEditable // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))

	C.gtk_cell_editable_remove_widget(_arg0)
	runtime.KeepAlive(cellEditable)
}

// StartEditing begins editing on a cell_editable.
//
// The CellRenderer for the cell creates and returns a CellEditable from
// gtk_cell_renderer_start_editing(), configured for the CellRenderer type.
//
// gtk_cell_editable_start_editing() can then set up cell_editable suitably for
// editing a cell, e.g. making the Esc key emit CellEditable::editing-done.
//
// Note that the cell_editable is created on-demand for the current edit; its
// lifetime is temporary and does not persist across other edits and/or cells.
//
// The function takes the following parameters:
//
//   - event (optional) that began the editing process, or NULL if editing was
//     initiated programmatically.
func (cellEditable *CellEditable) StartEditing(event *gdk.Event) {
	var _arg0 *C.GtkCellEditable // out
	var _arg1 *C.GdkEvent        // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))
	if event != nil {
		_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}

	C.gtk_cell_editable_start_editing(_arg0, _arg1)
	runtime.KeepAlive(cellEditable)
	runtime.KeepAlive(event)
}

// editingDone emits the CellEditable::editing-done signal.
func (cellEditable *CellEditable) editingDone() {
	gclass := (*C.GtkCellEditableIface)(coreglib.PeekParentClass(cellEditable))
	fnarg := gclass.editing_done

	var _arg0 *C.GtkCellEditable // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))

	C._gotk4_gtk3_CellEditable_virtual_editing_done(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cellEditable)
}

// removeWidget emits the CellEditable::remove-widget signal.
func (cellEditable *CellEditable) removeWidget() {
	gclass := (*C.GtkCellEditableIface)(coreglib.PeekParentClass(cellEditable))
	fnarg := gclass.remove_widget

	var _arg0 *C.GtkCellEditable // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))

	C._gotk4_gtk3_CellEditable_virtual_remove_widget(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cellEditable)
}

// startEditing begins editing on a cell_editable.
//
// The CellRenderer for the cell creates and returns a CellEditable from
// gtk_cell_renderer_start_editing(), configured for the CellRenderer type.
//
// gtk_cell_editable_start_editing() can then set up cell_editable suitably for
// editing a cell, e.g. making the Esc key emit CellEditable::editing-done.
//
// Note that the cell_editable is created on-demand for the current edit; its
// lifetime is temporary and does not persist across other edits and/or cells.
//
// The function takes the following parameters:
//
//   - event (optional) that began the editing process, or NULL if editing was
//     initiated programmatically.
func (cellEditable *CellEditable) startEditing(event *gdk.Event) {
	gclass := (*C.GtkCellEditableIface)(coreglib.PeekParentClass(cellEditable))
	fnarg := gclass.start_editing

	var _arg0 *C.GtkCellEditable // out
	var _arg1 *C.GdkEvent        // out

	_arg0 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(cellEditable).Native()))
	if event != nil {
		_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}

	C._gotk4_gtk3_CellEditable_virtual_start_editing(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(cellEditable)
	runtime.KeepAlive(event)
}

// CellLayout is an interface to be implemented by all objects which want to
// provide a TreeViewColumn like API for packing cells, setting attributes and
// data funcs.
//
// One of the notable features provided by implementations of GtkCellLayout
// are attributes. Attributes let you set the properties in flexible ways.
// They can just be set to constant values like regular properties.
// But they can also be mapped to a column of the underlying tree model
// with gtk_cell_layout_set_attributes(), which means that the value of
// the attribute can change from cell to cell as they are rendered by
// the cell renderer. Finally, it is possible to specify a function with
// gtk_cell_layout_set_cell_data_func() that is called to determine the value of
// the attribute for each cell that is rendered.
//
// # GtkCellLayouts as GtkBuildable
//
// Implementations of GtkCellLayout which also implement the GtkBuildable
// interface (CellView, IconView, ComboBox, EntryCompletion, TreeViewColumn)
// accept GtkCellRenderer objects as <child> elements in UI definitions. They
// support a custom <attributes> element for their children, which can contain
// multiple <attribute> elements. Each <attribute> element has a name attribute
// which specifies a property of the cell renderer; the content of the element
// is the attribute value.
//
// This is an example of a UI definition fragment specifying attributes:
//
//	static void
//	my_combo_box_init (MyComboBox *b)
//	{
//	  GtkCellRenderer *cell;
//
//	  cell = gtk_cell_renderer_pixbuf_new ();
//	  // The following call causes the default cell area for combo boxes,
//	  // a GtkCellAreaBox, to be instantiated
//	  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (b), cell, FALSE);
//	  ...
//	}
//
//	GtkWidget *
//	my_combo_box_new (GtkCellArea *area)
//	{
//	  // This call is going to cause a warning about area being ignored
//	  return g_object_new (MY_TYPE_COMBO_BOX, "cell-area", area, NULL);
//	}
//
// If supporting alternative cell areas with your derived widget is not
// important, then this does not have to concern you. If you want to support
// alternative cell areas, you can do so by moving the problematic calls out of
// init() and into a constructor() for your class.
//
// CellLayout wraps an interface. This means the user can get the
// underlying type by calling Cast().
type CellLayout struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*CellLayout)(nil)
)

// CellLayouter describes CellLayout's interface methods.
type CellLayouter interface {
	coreglib.Objector

	// AddAttribute adds an attribute mapping to the list in cell_layout.
	AddAttribute(cell CellRendererer, attribute string, column int)
	// Clear unsets all the mappings on all renderers on cell_layout and removes
	// all renderers from cell_layout.
	Clear()
	// ClearAttributes clears all existing attributes previously set with
	// gtk_cell_layout_set_attributes().
	ClearAttributes(cell CellRendererer)
	// Area returns the underlying CellArea which might be cell_layout if called
	// on a CellArea or might be NULL if no CellArea is used by cell_layout.
	Area() CellAreaer
	// Cells returns the cell renderers which have been added to cell_layout.
	Cells() []CellRendererer
	// PackEnd adds the cell to the end of cell_layout.
	PackEnd(cell CellRendererer, expand bool)
	// PackStart packs the cell into the beginning of cell_layout.
	PackStart(cell CellRendererer, expand bool)
	// Reorder re-inserts cell at position.
	Reorder(cell CellRendererer, position int)
	// SetCellDataFunc sets the CellLayoutDataFunc to use for cell_layout.
	SetCellDataFunc(cell CellRendererer, fn CellLayoutDataFunc)
}

var _ CellLayouter = (*CellLayout)(nil)

func wrapCellLayout(obj *coreglib.Object) *CellLayout {
	return &CellLayout{
		Object: obj,
	}
}

func marshalCellLayout(p uintptr) (interface{}, error) {
	return wrapCellLayout(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// AddAttribute adds an attribute mapping to the list in cell_layout.
//
// The column is the column of the model to get a value from, and the attribute
// is the parameter on cell to be set from the value. So for example if column
// 2 of the model contains strings, you could have the “text” attribute of a
// CellRendererText get its values from column 2.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - attribute on the renderer.
//   - column position on the model to get the attribute from.
func (cellLayout *CellLayout) AddAttribute(cell CellRendererer, attribute string, column int) {
	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _arg3 C.gint             // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(column)

	C.gtk_cell_layout_add_attribute(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(attribute)
	runtime.KeepAlive(column)
}

// Clear unsets all the mappings on all renderers on cell_layout and removes all
// renderers from cell_layout.
func (cellLayout *CellLayout) Clear() {
	var _arg0 *C.GtkCellLayout // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	C.gtk_cell_layout_clear(_arg0)
	runtime.KeepAlive(cellLayout)
}

// ClearAttributes clears all existing attributes previously set with
// gtk_cell_layout_set_attributes().
//
// The function takes the following parameters:
//
//   - cell to clear the attribute mapping on.
func (cellLayout *CellLayout) ClearAttributes(cell CellRendererer) {
	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_layout_clear_attributes(_arg0, _arg1)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
}

// Area returns the underlying CellArea which might be cell_layout if called on
// a CellArea or might be NULL if no CellArea is used by cell_layout.
//
// The function returns the following values:
//
//   - cellArea (optional): cell area used by cell_layout, or NULL in case no
//     cell area is used.
func (cellLayout *CellLayout) Area() CellAreaer {
	var _arg0 *C.GtkCellLayout // out
	var _cret *C.GtkCellArea   // in

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	_cret = C.gtk_cell_layout_get_area(_arg0)
	runtime.KeepAlive(cellLayout)

	var _cellArea CellAreaer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellAreaer)
				return ok
			})
			rv, ok := casted.(CellAreaer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellAreaer")
			}
			_cellArea = rv
		}
	}

	return _cellArea
}

// Cells returns the cell renderers which have been added to cell_layout.
//
// The function returns the following values:
//
//   - list: a list of cell renderers. The list, but not the renderers has been
//     newly allocated and should be freed with g_list_free() when no longer
//     needed.
func (cellLayout *CellLayout) Cells() []CellRendererer {
	var _arg0 *C.GtkCellLayout // out
	var _cret *C.GList         // in

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	_cret = C.gtk_cell_layout_get_cells(_arg0)
	runtime.KeepAlive(cellLayout)

	var _list []CellRendererer // out

	_list = make([]CellRendererer, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkCellRenderer)(v)
		var dst CellRendererer // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.CellRendererer is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// PackEnd adds the cell to the end of cell_layout. If expand is FALSE, then the
// cell is allocated no more space than it needs. Any unused space is divided
// evenly between cells for which expand is TRUE.
//
// Note that reusing the same cell renderer is not supported.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to cell_layout.
func (cellLayout *CellLayout) PackEnd(cell CellRendererer, expand bool) {
	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C.gtk_cell_layout_pack_end(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// PackStart packs the cell into the beginning of cell_layout. If expand is
// FALSE, then the cell is allocated no more space than it needs. Any unused
// space is divided evenly between cells for which expand is TRUE.
//
// Note that reusing the same cell renderer is not supported.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to cell_layout.
func (cellLayout *CellLayout) PackStart(cell CellRendererer, expand bool) {
	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C.gtk_cell_layout_pack_start(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// Reorder re-inserts cell at position.
//
// Note that cell has already to be packed into cell_layout for this to function
// properly.
//
// The function takes the following parameters:
//
//   - cell to reorder.
//   - position: new position to insert cell at.
func (cellLayout *CellLayout) Reorder(cell CellRendererer, position int) {
	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gint             // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = C.gint(position)

	C.gtk_cell_layout_reorder(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(position)
}

// SetCellDataFunc sets the CellLayoutDataFunc to use for cell_layout.
//
// This function is used instead of the standard attributes mapping for setting
// the column value, and should set the value of cell_layout’s cell renderer(s)
// as appropriate.
//
// func may be NULL to remove a previously set function.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - fn (optional) to use, or NULL.
func (cellLayout *CellLayout) SetCellDataFunc(cell CellRendererer, fn CellLayoutDataFunc) {
	var _arg0 *C.GtkCellLayout        // out
	var _arg1 *C.GtkCellRenderer      // out
	var _arg2 C.GtkCellLayoutDataFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if fn != nil {
		_arg2 = (*[0]byte)(C._gotk4_gtk3_CellLayoutDataFunc)
		_arg3 = C.gpointer(gbox.Assign(fn))
		_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_cell_layout_set_cell_data_func(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(fn)
}

// addAttribute adds an attribute mapping to the list in cell_layout.
//
// The column is the column of the model to get a value from, and the attribute
// is the parameter on cell to be set from the value. So for example if column
// 2 of the model contains strings, you could have the “text” attribute of a
// CellRendererText get its values from column 2.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - attribute on the renderer.
//   - column position on the model to get the attribute from.
func (cellLayout *CellLayout) addAttribute(cell CellRendererer, attribute string, column int) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.add_attribute

	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _arg3 C.gint             // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(column)

	C._gotk4_gtk3_CellLayout_virtual_add_attribute(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(attribute)
	runtime.KeepAlive(column)
}

// Clear unsets all the mappings on all renderers on cell_layout and removes all
// renderers from cell_layout.
func (cellLayout *CellLayout) clear() {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.clear

	var _arg0 *C.GtkCellLayout // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	C._gotk4_gtk3_CellLayout_virtual_clear(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cellLayout)
}

// clearAttributes clears all existing attributes previously set with
// gtk_cell_layout_set_attributes().
//
// The function takes the following parameters:
//
//   - cell to clear the attribute mapping on.
func (cellLayout *CellLayout) clearAttributes(cell CellRendererer) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.clear_attributes

	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellLayout_virtual_clear_attributes(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
}

// Area returns the underlying CellArea which might be cell_layout if called on
// a CellArea or might be NULL if no CellArea is used by cell_layout.
//
// The function returns the following values:
//
//   - cellArea (optional): cell area used by cell_layout, or NULL in case no
//     cell area is used.
func (cellLayout *CellLayout) area() CellAreaer {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.get_area

	var _arg0 *C.GtkCellLayout // out
	var _cret *C.GtkCellArea   // in

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	_cret = C._gotk4_gtk3_CellLayout_virtual_get_area(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cellLayout)

	var _cellArea CellAreaer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellAreaer)
				return ok
			})
			rv, ok := casted.(CellAreaer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellAreaer")
			}
			_cellArea = rv
		}
	}

	return _cellArea
}

// Cells returns the cell renderers which have been added to cell_layout.
//
// The function returns the following values:
//
//   - list: a list of cell renderers. The list, but not the renderers has been
//     newly allocated and should be freed with g_list_free() when no longer
//     needed.
func (cellLayout *CellLayout) cells() []CellRendererer {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.get_cells

	var _arg0 *C.GtkCellLayout // out
	var _cret *C.GList         // in

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))

	_cret = C._gotk4_gtk3_CellLayout_virtual_get_cells(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cellLayout)

	var _list []CellRendererer // out

	_list = make([]CellRendererer, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkCellRenderer)(v)
		var dst CellRendererer // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.CellRendererer is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// packEnd adds the cell to the end of cell_layout. If expand is FALSE, then the
// cell is allocated no more space than it needs. Any unused space is divided
// evenly between cells for which expand is TRUE.
//
// Note that reusing the same cell renderer is not supported.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to cell_layout.
func (cellLayout *CellLayout) packEnd(cell CellRendererer, expand bool) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.pack_end

	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C._gotk4_gtk3_CellLayout_virtual_pack_end(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// packStart packs the cell into the beginning of cell_layout. If expand is
// FALSE, then the cell is allocated no more space than it needs. Any unused
// space is divided evenly between cells for which expand is TRUE.
//
// Note that reusing the same cell renderer is not supported.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to cell_layout.
func (cellLayout *CellLayout) packStart(cell CellRendererer, expand bool) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.pack_start

	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C._gotk4_gtk3_CellLayout_virtual_pack_start(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// Reorder re-inserts cell at position.
//
// Note that cell has already to be packed into cell_layout for this to function
// properly.
//
// The function takes the following parameters:
//
//   - cell to reorder.
//   - position: new position to insert cell at.
func (cellLayout *CellLayout) reorder(cell CellRendererer, position int) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.reorder

	var _arg0 *C.GtkCellLayout   // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gint             // out

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg2 = C.gint(position)

	C._gotk4_gtk3_CellLayout_virtual_reorder(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(position)
}

// setCellDataFunc sets the CellLayoutDataFunc to use for cell_layout.
//
// This function is used instead of the standard attributes mapping for setting
// the column value, and should set the value of cell_layout’s cell renderer(s)
// as appropriate.
//
// func may be NULL to remove a previously set function.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - fn (optional) to use, or NULL.
func (cellLayout *CellLayout) setCellDataFunc(cell CellRendererer, fn CellLayoutDataFunc) {
	gclass := (*C.GtkCellLayoutIface)(coreglib.PeekParentClass(cellLayout))
	fnarg := gclass.set_cell_data_func

	var _arg0 *C.GtkCellLayout        // out
	var _arg1 *C.GtkCellRenderer      // out
	var _arg2 C.GtkCellLayoutDataFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkCellLayout)(unsafe.Pointer(coreglib.InternObject(cellLayout).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if fn != nil {
		_arg2 = (*[0]byte)(C._gotk4_gtk3_CellLayoutDataFunc)
		_arg3 = C.gpointer(gbox.Assign(fn))
		_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C._gotk4_gtk3_CellLayout_virtual_set_cell_data_func(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(cellLayout)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(fn)
}

// ColorChooser is an interface that is implemented by widgets for choosing
// colors. Depending on the situation, colors may be allowed to have alpha
// (translucency).
//
// In GTK+, the main widgets that implement this interface are
// ColorChooserWidget, ColorChooserDialog and ColorButton.
//
// ColorChooser wraps an interface. This means the user can get the
// underlying type by calling Cast().
type ColorChooser struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*ColorChooser)(nil)
)

// ColorChooserer describes ColorChooser's interface methods.
type ColorChooserer interface {
	coreglib.Objector

	// AddPalette adds a palette to the color chooser.
	AddPalette(orientation Orientation, colorsPerLine int, colors []gdk.RGBA)
	// RGBA gets the currently-selected color.
	RGBA() *gdk.RGBA
	// UseAlpha returns whether the color chooser shows the alpha channel.
	UseAlpha() bool
	// SetRGBA sets the color.
	SetRGBA(color *gdk.RGBA)
	// SetUseAlpha sets whether or not the color chooser should use the alpha
	// channel.
	SetUseAlpha(useAlpha bool)

	// Color-activated is emitted when a color is activated from the color
	// chooser.
	ConnectColorActivated(func(color *gdk.RGBA)) coreglib.SignalHandle
}

var _ ColorChooserer = (*ColorChooser)(nil)

func wrapColorChooser(obj *coreglib.Object) *ColorChooser {
	return &ColorChooser{
		Object: obj,
	}
}

func marshalColorChooser(p uintptr) (interface{}, error) {
	return wrapColorChooser(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectColorActivated is emitted when a color is activated from the color
// chooser. This usually happens when the user clicks a color swatch, or a
// color is selected and the user presses one of the keys Space, Shift+Space,
// Return or Enter.
func (chooser *ColorChooser) ConnectColorActivated(f func(color *gdk.RGBA)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "color-activated", false, unsafe.Pointer(C._gotk4_gtk3_ColorChooser_ConnectColorActivated), f)
}

// AddPalette adds a palette to the color chooser. If orientation is horizontal,
// the colors are grouped in rows, with colors_per_line colors in each row.
// If horizontal is FALSE, the colors are grouped in columns instead.
//
// The default color palette of ColorChooserWidget has 27 colors, organized in
// columns of 3 colors. The default gray palette has 9 grays in a single row.
//
// The layout of the color chooser widget works best when the palettes have 9-10
// columns.
//
// Calling this function for the first time has the side effect of removing the
// default color and gray palettes from the color chooser.
//
// If colors is NULL, removes all previously added palettes.
//
// The function takes the following parameters:
//
//   - orientation: GTK_ORIENTATION_HORIZONTAL if the palette should be
//     displayed in rows, GTK_ORIENTATION_VERTICAL for columns.
//   - colorsPerLine: number of colors to show in each row/column.
//   - colors (optional) of the palette, or NULL.
func (chooser *ColorChooser) AddPalette(orientation Orientation, colorsPerLine int, colors []gdk.RGBA) {
	var _arg0 *C.GtkColorChooser // out
	var _arg1 C.GtkOrientation   // out
	var _arg2 C.gint             // out
	var _arg4 *C.GdkRGBA         // out
	var _arg3 C.gint

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = C.GtkOrientation(orientation)
	_arg2 = C.gint(colorsPerLine)
	_arg3 = (C.gint)(len(colors))
	_arg4 = (*C.GdkRGBA)(C.calloc(C.size_t(len(colors)), C.size_t(C.sizeof_GdkRGBA)))
	defer C.free(unsafe.Pointer(_arg4))
	{
		out := unsafe.Slice((*C.GdkRGBA)(_arg4), len(colors))
		for i := range colors {
			out[i] = *(*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer((&colors[i]))))
		}
	}

	C.gtk_color_chooser_add_palette(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(colorsPerLine)
	runtime.KeepAlive(colors)
}

// RGBA gets the currently-selected color.
//
// The function returns the following values:
//
//   - color to fill in with the current color.
func (chooser *ColorChooser) RGBA() *gdk.RGBA {
	var _arg0 *C.GtkColorChooser // out
	var _arg1 C.GdkRGBA          // in

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C.gtk_color_chooser_get_rgba(_arg0, &_arg1)
	runtime.KeepAlive(chooser)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _color
}

// UseAlpha returns whether the color chooser shows the alpha channel.
//
// The function returns the following values:
//
//   - ok: TRUE if the color chooser uses the alpha channel, FALSE if not.
func (chooser *ColorChooser) UseAlpha() bool {
	var _arg0 *C.GtkColorChooser // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_color_chooser_get_use_alpha(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetRGBA sets the color.
//
// The function takes the following parameters:
//
//   - color: new color.
func (chooser *ColorChooser) SetRGBA(color *gdk.RGBA) {
	var _arg0 *C.GtkColorChooser // out
	var _arg1 *C.GdkRGBA         // out

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_color_chooser_set_rgba(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(color)
}

// SetUseAlpha sets whether or not the color chooser should use the alpha
// channel.
//
// The function takes the following parameters:
//
//   - useAlpha: TRUE if color chooser should use alpha channel, FALSE if not.
func (chooser *ColorChooser) SetUseAlpha(useAlpha bool) {
	var _arg0 *C.GtkColorChooser // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if useAlpha {
		_arg1 = C.TRUE
	}

	C.gtk_color_chooser_set_use_alpha(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(useAlpha)
}

// addPalette adds a palette to the color chooser. If orientation is horizontal,
// the colors are grouped in rows, with colors_per_line colors in each row.
// If horizontal is FALSE, the colors are grouped in columns instead.
//
// The default color palette of ColorChooserWidget has 27 colors, organized in
// columns of 3 colors. The default gray palette has 9 grays in a single row.
//
// The layout of the color chooser widget works best when the palettes have 9-10
// columns.
//
// Calling this function for the first time has the side effect of removing the
// default color and gray palettes from the color chooser.
//
// If colors is NULL, removes all previously added palettes.
//
// The function takes the following parameters:
//
//   - orientation: GTK_ORIENTATION_HORIZONTAL if the palette should be
//     displayed in rows, GTK_ORIENTATION_VERTICAL for columns.
//   - colorsPerLine: number of colors to show in each row/column.
//   - colors (optional) of the palette, or NULL.
func (chooser *ColorChooser) addPalette(orientation Orientation, colorsPerLine int, colors []gdk.RGBA) {
	gclass := (*C.GtkColorChooserInterface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.add_palette

	var _arg0 *C.GtkColorChooser // out
	var _arg1 C.GtkOrientation   // out
	var _arg2 C.gint             // out
	var _arg4 *C.GdkRGBA         // out
	var _arg3 C.gint

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = C.GtkOrientation(orientation)
	_arg2 = C.gint(colorsPerLine)
	_arg3 = (C.gint)(len(colors))
	_arg4 = (*C.GdkRGBA)(C.calloc(C.size_t(len(colors)), C.size_t(C.sizeof_GdkRGBA)))
	defer C.free(unsafe.Pointer(_arg4))
	{
		out := unsafe.Slice((*C.GdkRGBA)(_arg4), len(colors))
		for i := range colors {
			out[i] = *(*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer((&colors[i]))))
		}
	}

	C._gotk4_gtk3_ColorChooser_virtual_add_palette(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(colorsPerLine)
	runtime.KeepAlive(colors)
}

func (chooser *ColorChooser) colorActivated(color *gdk.RGBA) {
	gclass := (*C.GtkColorChooserInterface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.color_activated

	var _arg0 *C.GtkColorChooser // out
	var _arg1 *C.GdkRGBA         // out

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))

	C._gotk4_gtk3_ColorChooser_virtual_color_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(color)
}

// rgbA gets the currently-selected color.
//
// The function returns the following values:
//
//   - color to fill in with the current color.
func (chooser *ColorChooser) rgbA() *gdk.RGBA {
	gclass := (*C.GtkColorChooserInterface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.get_rgba

	var _arg0 *C.GtkColorChooser // out
	var _arg1 C.GdkRGBA          // in

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C._gotk4_gtk3_ColorChooser_virtual_get_rgba(unsafe.Pointer(fnarg), _arg0, &_arg1)
	runtime.KeepAlive(chooser)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _color
}

// setRGBA sets the color.
//
// The function takes the following parameters:
//
//   - color: new color.
func (chooser *ColorChooser) setRGBA(color *gdk.RGBA) {
	gclass := (*C.GtkColorChooserInterface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.set_rgba

	var _arg0 *C.GtkColorChooser // out
	var _arg1 *C.GdkRGBA         // out

	_arg0 = (*C.GtkColorChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))

	C._gotk4_gtk3_ColorChooser_virtual_set_rgba(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(color)
}

// Editable interface is an interface which should be implemented by text
// editing widgets, such as Entry and SpinButton. It contains functions for
// generically manipulating an editable widget, a large number of action signals
// used for key bindings, and several signals that an application can connect to
// to modify the behavior of a widget.
//
// As an example of the latter usage, by connecting the following handler to
// Editable::insert-text, an application can convert all entry into a widget
// into uppercase.
//
// Forcing entry to uppercase.
//
//	#include <ctype.h>;
//
//	void
//	insert_text_handler (GtkEditable *editable,
//	                     const gchar *text,
//	                     gint         length,
//	                     gint        *position,
//	                     gpointer     data)
//	{
//	  gchar *result = g_utf8_strup (text, length);
//
//	  g_signal_handlers_block_by_func (editable,
//	                               (gpointer) insert_text_handler, data);
//	  gtk_editable_insert_text (editable, result, length, position);
//	  g_signal_handlers_unblock_by_func (editable,
//	                                     (gpointer) insert_text_handler, data);
//
//	  g_signal_stop_emission_by_name (editable, "insert_text");
//
//	  g_free (result);
//	}.
//
// Editable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Editable struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Editable)(nil)
)

// Editabler describes Editable's interface methods.
type Editabler interface {
	coreglib.Objector

	// CopyClipboard copies the contents of the currently selected content in
	// the editable and puts it on the clipboard.
	CopyClipboard()
	// CutClipboard removes the contents of the currently selected content in
	// the editable and puts it on the clipboard.
	CutClipboard()
	// DeleteSelection deletes the currently selected text of the editable.
	DeleteSelection()
	// DeleteText deletes a sequence of characters.
	DeleteText(startPos, endPos int)
	// Chars retrieves a sequence of characters.
	Chars(startPos, endPos int) string
	// Editable retrieves whether editable is editable.
	Editable() bool
	// Position retrieves the current position of the cursor relative to the
	// start of the content of the editable.
	Position() int
	// SelectionBounds retrieves the selection bound of the editable.
	SelectionBounds() (startPos, endPos int, ok bool)
	// PasteClipboard pastes the content of the clipboard to the current
	// position of the cursor in the editable.
	PasteClipboard()
	// SelectRegion selects a region of text.
	SelectRegion(startPos, endPos int)
	// SetEditable determines if the user can edit the text in the editable
	// widget or not.
	SetEditable(isEditable bool)
	// SetPosition sets the cursor position in the editable to the given value.
	SetPosition(position int)

	// Changed signal is emitted at the end of a single user-visible operation
	// on the contents of the Editable.
	ConnectChanged(func()) coreglib.SignalHandle
	// Delete-text: this signal is emitted when text is deleted from the widget
	// by the user.
	ConnectDeleteText(func(startPos, endPos int)) coreglib.SignalHandle
}

var _ Editabler = (*Editable)(nil)

func wrapEditable(obj *coreglib.Object) *Editable {
	return &Editable{
		Object: obj,
	}
}

func marshalEditable(p uintptr) (interface{}, error) {
	return wrapEditable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged signal is emitted at the end of a single user-visible
// operation on the contents of the Editable.
//
// E.g., a paste operation that replaces the contents of the selection will
// cause only one signal emission (even though it is implemented by first
// deleting the selection, then inserting the new content, and may cause
// multiple ::notify::text signals to be emitted).
func (editable *Editable) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(editable, "changed", false, unsafe.Pointer(C._gotk4_gtk3_Editable_ConnectChanged), f)
}

// ConnectDeleteText: this signal is emitted when text is deleted from the
// widget by the user. The default handler for this signal will normally be
// responsible for deleting the text, so by connecting to this signal and
// then stopping the signal with g_signal_stop_emission(), it is possible
// to modify the range of deleted text, or prevent it from being deleted
// entirely. The start_pos and end_pos parameters are interpreted as for
// gtk_editable_delete_text().
func (editable *Editable) ConnectDeleteText(f func(startPos, endPos int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(editable, "delete-text", false, unsafe.Pointer(C._gotk4_gtk3_Editable_ConnectDeleteText), f)
}

// CopyClipboard copies the contents of the currently selected content in the
// editable and puts it on the clipboard.
func (editable *Editable) CopyClipboard() {
	var _arg0 *C.GtkEditable // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	C.gtk_editable_copy_clipboard(_arg0)
	runtime.KeepAlive(editable)
}

// CutClipboard removes the contents of the currently selected content in the
// editable and puts it on the clipboard.
func (editable *Editable) CutClipboard() {
	var _arg0 *C.GtkEditable // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	C.gtk_editable_cut_clipboard(_arg0)
	runtime.KeepAlive(editable)
}

// DeleteSelection deletes the currently selected text of the editable. This
// call doesn’t do anything if there is no selected text.
func (editable *Editable) DeleteSelection() {
	var _arg0 *C.GtkEditable // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	C.gtk_editable_delete_selection(_arg0)
	runtime.KeepAlive(editable)
}

// DeleteText deletes a sequence of characters. The characters that are deleted
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters deleted are those from
// start_pos to the end of the text.
//
// Note that the positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start position.
//   - endPos: end position.
func (editable *Editable) DeleteText(startPos, endPos int) {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	C.gtk_editable_delete_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)
}

// Chars retrieves a sequence of characters. The characters that are retrieved
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters retrieved are those
// characters from start_pos to the end of the text.
//
// Note that positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start of text.
//   - endPos: end of text.
//
// The function returns the following values:
//
//   - utf8: pointer to the contents of the widget as a string. This string
//     is allocated by the Editable implementation and should be freed by the
//     caller.
func (editable *Editable) Chars(startPos, endPos int) string {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	_cret = C.gtk_editable_get_chars(_arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Editable retrieves whether editable is editable. See
// gtk_editable_set_editable().
//
// The function returns the following values:
//
//   - ok: TRUE if editable is editable.
func (editable *Editable) Editable() bool {
	var _arg0 *C.GtkEditable // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	_cret = C.gtk_editable_get_editable(_arg0)
	runtime.KeepAlive(editable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Position retrieves the current position of the cursor relative to the start
// of the content of the editable.
//
// Note that this position is in characters, not in bytes.
//
// The function returns the following values:
//
//   - gint: cursor position.
func (editable *Editable) Position() int {
	var _arg0 *C.GtkEditable // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	_cret = C.gtk_editable_get_position(_arg0)
	runtime.KeepAlive(editable)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SelectionBounds retrieves the selection bound of the editable. start_pos will
// be filled with the start of the selection and end_pos with end. If no text
// was selected both will be identical and FALSE will be returned.
//
// Note that positions are specified in characters, not bytes.
//
// The function returns the following values:
//
//   - startPos (optional): location to store the starting position, or NULL.
//   - endPos (optional): location to store the end position, or NULL.
//   - ok: TRUE if an area is selected, FALSE otherwise.
func (editable *Editable) SelectionBounds() (startPos, endPos int, ok bool) {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // in
	var _arg2 C.gint         // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	_cret = C.gtk_editable_get_selection_bounds(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(editable)

	var _startPos int // out
	var _endPos int   // out
	var _ok bool      // out

	_startPos = int(_arg1)
	_endPos = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _startPos, _endPos, _ok
}

// PasteClipboard pastes the content of the clipboard to the current position of
// the cursor in the editable.
func (editable *Editable) PasteClipboard() {
	var _arg0 *C.GtkEditable // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	C.gtk_editable_paste_clipboard(_arg0)
	runtime.KeepAlive(editable)
}

// SelectRegion selects a region of text. The characters that are selected
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters selected are those
// characters from start_pos to the end of the text.
//
// Note that positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start of region.
//   - endPos: end of region.
func (editable *Editable) SelectRegion(startPos, endPos int) {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	C.gtk_editable_select_region(_arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)
}

// SetEditable determines if the user can edit the text in the editable widget
// or not.
//
// The function takes the following parameters:
//
//   - isEditable: TRUE if the user is allowed to edit the text in the widget.
func (editable *Editable) SetEditable(isEditable bool) {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	if isEditable {
		_arg1 = C.TRUE
	}

	C.gtk_editable_set_editable(_arg0, _arg1)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(isEditable)
}

// SetPosition sets the cursor position in the editable to the given value.
//
// The cursor is displayed before the character with the given (base 0) index
// in the contents of the editable. The value must be less than or equal to
// the number of characters in the editable. A value of -1 indicates that the
// position should be set after the last character of the editable. Note that
// position is in characters, not in bytes.
//
// The function takes the following parameters:
//
//   - position of the cursor.
func (editable *Editable) SetPosition(position int) {
	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(position)

	C.gtk_editable_set_position(_arg0, _arg1)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(position)
}

func (editable *Editable) changed() {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.changed

	var _arg0 *C.GtkEditable // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	C._gotk4_gtk3_Editable_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(editable)
}

// deleteText deletes a sequence of characters. The characters that are deleted
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters deleted are those from
// start_pos to the end of the text.
//
// Note that the positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start position.
//   - endPos: end position.
func (editable *Editable) deleteText(startPos, endPos int) {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.delete_text

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	C._gotk4_gtk3_Editable_virtual_delete_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)
}

// doDeleteText deletes a sequence of characters. The characters that are
// deleted are those characters at positions from start_pos up to, but not
// including end_pos. If end_pos is negative, then the characters deleted are
// those from start_pos to the end of the text.
//
// Note that the positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start position.
//   - endPos: end position.
func (editable *Editable) doDeleteText(startPos, endPos int) {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.do_delete_text

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	C._gotk4_gtk3_Editable_virtual_do_delete_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)
}

// Chars retrieves a sequence of characters. The characters that are retrieved
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters retrieved are those
// characters from start_pos to the end of the text.
//
// Note that positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start of text.
//   - endPos: end of text.
//
// The function returns the following values:
//
//   - utf8: pointer to the contents of the widget as a string. This string
//     is allocated by the Editable implementation and should be freed by the
//     caller.
func (editable *Editable) chars(startPos, endPos int) string {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.get_chars

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	_cret = C._gotk4_gtk3_Editable_virtual_get_chars(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Position retrieves the current position of the cursor relative to the start
// of the content of the editable.
//
// Note that this position is in characters, not in bytes.
//
// The function returns the following values:
//
//   - gint: cursor position.
func (editable *Editable) position() int {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.get_position

	var _arg0 *C.GtkEditable // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	_cret = C._gotk4_gtk3_Editable_virtual_get_position(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(editable)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// selectionBounds retrieves the selection bound of the editable. start_pos will
// be filled with the start of the selection and end_pos with end. If no text
// was selected both will be identical and FALSE will be returned.
//
// Note that positions are specified in characters, not bytes.
//
// The function returns the following values:
//
//   - startPos (optional): location to store the starting position, or NULL.
//   - endPos (optional): location to store the end position, or NULL.
//   - ok: TRUE if an area is selected, FALSE otherwise.
func (editable *Editable) selectionBounds() (startPos, endPos int, ok bool) {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.get_selection_bounds

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // in
	var _arg2 C.gint         // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))

	_cret = C._gotk4_gtk3_Editable_virtual_get_selection_bounds(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(editable)

	var _startPos int // out
	var _endPos int   // out
	var _ok bool      // out

	_startPos = int(_arg1)
	_endPos = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _startPos, _endPos, _ok
}

// setPosition sets the cursor position in the editable to the given value.
//
// The cursor is displayed before the character with the given (base 0) index
// in the contents of the editable. The value must be less than or equal to
// the number of characters in the editable. A value of -1 indicates that the
// position should be set after the last character of the editable. Note that
// position is in characters, not in bytes.
//
// The function takes the following parameters:
//
//   - position of the cursor.
func (editable *Editable) setPosition(position int) {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.set_position

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(position)

	C._gotk4_gtk3_Editable_virtual_set_position(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(position)
}

// setSelectionBounds selects a region of text. The characters that are selected
// are those characters at positions from start_pos up to, but not including
// end_pos. If end_pos is negative, then the characters selected are those
// characters from start_pos to the end of the text.
//
// Note that positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - startPos: start of region.
//   - endPos: end of region.
func (editable *Editable) setSelectionBounds(startPos, endPos int) {
	gclass := (*C.GtkEditableInterface)(coreglib.PeekParentClass(editable))
	fnarg := gclass.set_selection_bounds

	var _arg0 *C.GtkEditable // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg1 = C.gint(startPos)
	_arg2 = C.gint(endPos)

	C._gotk4_gtk3_Editable_virtual_set_selection_bounds(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(startPos)
	runtime.KeepAlive(endPos)
}

// FileChooser is an interface that can be implemented by file selection
// widgets. In GTK+, the main objects that implement this interface are
// FileChooserWidget, FileChooserDialog, and FileChooserButton. You do not need
// to write an object that implements the FileChooser interface unless you are
// trying to adapt an existing file selector to expose a standard programming
// interface.
//
// FileChooser allows for shortcuts to various places in the filesystem.
// In the default implementation these are displayed in the left pane. It may be
// a bit confusing at first that these shortcuts come from various sources and
// in various flavours, so lets explain the terminology here:
//
// - Bookmarks: are created by the user, by dragging folders from the right pane
// to the left pane, or by using the “Add”. Bookmarks can be renamed and deleted
// by the user.
//
// - Shortcuts: can be provided by the application. For example, a Paint program
// may want to add a shortcut for a Clipart folder. Shortcuts cannot be modified
// by the user.
//
// - Volumes: are provided by the underlying filesystem abstraction. They are
// the “roots” of the filesystem.
//
// # File Names and Encodings
//
// When the user is finished selecting files in a FileChooser, your program
// can get the selected names either as filenames or as URIs. For URIs, the
// normal escaping rules are applied if the URI contains non-ASCII characters.
// However, filenames are always returned in the character set specified by the
// G_FILENAME_ENCODING environment variable. Please see the GLib documentation
// for more details about this variable.
//
// This means that while you can pass the result of
// gtk_file_chooser_get_filename() to g_open() or g_fopen(), you may not be able
// to directly set it as the text of a Label widget unless you convert it first
// to UTF-8, which all GTK+ widgets expect. You should use g_filename_to_utf8()
// to convert filenames into strings that can be passed to GTK+ widgets.
//
// # Adding a Preview Widget
//
// You can add a custom preview widget to a file chooser and then get
// notification about when the preview needs to be updated. To install a preview
// widget, use gtk_file_chooser_set_preview_widget(). Then, connect to the
// FileChooser::update-preview signal to get notified when you need to update
// the contents of the preview.
//
// Your callback should use gtk_file_chooser_get_preview_filename() to see what
// needs previewing. Once you have generated the preview for the corresponding
// file, you must call gtk_file_chooser_set_preview_widget_active() with a
// boolean flag that indicates whether your callback could successfully generate
// a preview.
//
// Example: Using a Preview Widget
//
//	  GtkWidget *toggle;
//
//	  ...
//
//	  toggle = gtk_check_button_new_with_label ("Open file read-only");
//	  gtk_widget_show (toggle);
//	  gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
//	}
//
// If you want to set more than one extra widget in the file chooser, you can
// a container such as a Box or a Grid and include your widgets in it. Then,
// set the container as the whole extra widget.
//
// FileChooser wraps an interface. This means the user can get the
// underlying type by calling Cast().
type FileChooser struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*FileChooser)(nil)
)

// FileChooserer describes FileChooser's interface methods.
type FileChooserer interface {
	coreglib.Objector

	// AddChoice adds a 'choice' to the file chooser.
	AddChoice(id, label string, options, optionLabels []string)
	// AddFilter adds filter to the list of filters that the user can select
	// between.
	AddFilter(filter *FileFilter)
	// AddShortcutFolder adds a folder to be displayed with the shortcut folders
	// in a file chooser.
	AddShortcutFolder(folder string) error
	// AddShortcutFolderURI adds a folder URI to be displayed with the shortcut
	// folders in a file chooser.
	AddShortcutFolderURI(uri string) error
	// Action gets the type of operation that the file chooser is performing;
	// see gtk_file_chooser_set_action().
	Action() FileChooserAction
	// Choice gets the currently selected option in the 'choice' with the given
	// ID.
	Choice(id string) string
	// CreateFolders gets whether file choser will offer to create new folders.
	CreateFolders() bool
	// CurrentFolder gets the current folder of chooser as a local filename.
	CurrentFolder() string
	// CurrentFolderFile gets the current folder of chooser as #GFile.
	CurrentFolderFile() *gio.File
	// CurrentFolderURI gets the current folder of chooser as an URI.
	CurrentFolderURI() string
	// CurrentName gets the current name in the file selector, as entered by the
	// user in the text entry for “Name”.
	CurrentName() string
	// DoOverwriteConfirmation queries whether a file chooser is set to confirm
	// for overwriting when the user types a file name that already exists.
	DoOverwriteConfirmation() bool
	// ExtraWidget gets the current extra widget; see
	// gtk_file_chooser_set_extra_widget().
	ExtraWidget() Widgetter
	// File gets the #GFile for the currently selected file in the file
	// selector.
	File() *gio.File
	// Filename gets the filename for the currently selected file in the file
	// selector.
	Filename() string
	// Filenames lists all the selected files and subfolders in the current
	// folder of chooser.
	Filenames() []string
	// Files lists all the selected files and subfolders in the current folder
	// of chooser as #GFile.
	Files() []*gio.File
	// Filter gets the current filter; see gtk_file_chooser_set_filter().
	Filter() *FileFilter
	// LocalOnly gets whether only local files can be selected in the file
	// selector.
	LocalOnly() bool
	// PreviewFile gets the #GFile that should be previewed in a custom preview
	// Internal function, see gtk_file_chooser_get_preview_uri().
	PreviewFile() *gio.File
	// PreviewFilename gets the filename that should be previewed in a custom
	// preview widget.
	PreviewFilename() string
	// PreviewURI gets the URI that should be previewed in a custom preview
	// widget.
	PreviewURI() string
	// PreviewWidget gets the current preview widget; see
	// gtk_file_chooser_set_preview_widget().
	PreviewWidget() Widgetter
	// PreviewWidgetActive gets whether the preview widget set by
	// gtk_file_chooser_set_preview_widget() should be shown for the current
	// filename.
	PreviewWidgetActive() bool
	// SelectMultiple gets whether multiple files can be selected in the file
	// selector.
	SelectMultiple() bool
	// ShowHidden gets whether hidden files and folders are displayed in the
	// file selector.
	ShowHidden() bool
	// URI gets the URI for the currently selected file in the file selector.
	URI() string
	// URIs lists all the selected files and subfolders in the current folder of
	// chooser.
	URIs() []string
	// UsePreviewLabel gets whether a stock label should be drawn with the name
	// of the previewed file.
	UsePreviewLabel() bool
	// ListFilters lists the current set of user-selectable filters; see
	// gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
	ListFilters() []*FileFilter
	// ListShortcutFolderURIs queries the list of shortcut folders in the file
	// chooser, as set by gtk_file_chooser_add_shortcut_folder_uri().
	ListShortcutFolderURIs() []string
	// ListShortcutFolders queries the list of shortcut folders in the file
	// chooser, as set by gtk_file_chooser_add_shortcut_folder().
	ListShortcutFolders() []string
	// RemoveChoice removes a 'choice' that has been added with
	// gtk_file_chooser_add_choice().
	RemoveChoice(id string)
	// RemoveFilter removes filter from the list of filters that the user can
	// select between.
	RemoveFilter(filter *FileFilter)
	// RemoveShortcutFolder removes a folder from a file chooser’s list of
	// shortcut folders.
	RemoveShortcutFolder(folder string) error
	// RemoveShortcutFolderURI removes a folder URI from a file chooser’s list
	// of shortcut folders.
	RemoveShortcutFolderURI(uri string) error
	// SelectAll selects all the files in the current folder of a file chooser.
	SelectAll()
	// SelectFile selects the file referred to by file.
	SelectFile(file gio.Filer) error
	// SelectFilename selects a filename.
	SelectFilename(filename string) bool
	// SelectURI selects the file to by uri.
	SelectURI(uri string) bool
	// SetAction sets the type of operation that the chooser is performing;
	// the user interface is adapted to suit the selected action.
	SetAction(action FileChooserAction)
	// SetChoice selects an option in a 'choice' that has been added with
	// gtk_file_chooser_add_choice().
	SetChoice(id, option string)
	// SetCreateFolders sets whether file choser will offer to create new
	// folders.
	SetCreateFolders(createFolders bool)
	// SetCurrentFolder sets the current folder for chooser from a local
	// filename.
	SetCurrentFolder(filename string) bool
	// SetCurrentFolderFile sets the current folder for chooser from a #GFile.
	SetCurrentFolderFile(file gio.Filer) error
	// SetCurrentFolderURI sets the current folder for chooser from an URI.
	SetCurrentFolderURI(uri string) bool
	// SetCurrentName sets the current name in the file selector, as if entered
	// by the user.
	SetCurrentName(name string)
	// SetDoOverwriteConfirmation sets whether a file chooser in
	// GTK_FILE_CHOOSER_ACTION_SAVE mode will present a confirmation dialog if
	// the user types a file name that already exists.
	SetDoOverwriteConfirmation(doOverwriteConfirmation bool)
	// SetExtraWidget sets an application-supplied widget to provide extra
	// options to the user.
	SetExtraWidget(extraWidget Widgetter)
	// SetFile sets file as the current filename for the file chooser,
	// by changing to the file’s parent folder and actually selecting the file
	// in list.
	SetFile(file gio.Filer) error
	// SetFilename sets filename as the current filename for the file chooser,
	// by changing to the file’s parent folder and actually selecting the file
	// in list; all other files will be unselected.
	SetFilename(filename string) bool
	// SetFilter sets the current filter; only the files that pass the filter
	// will be displayed.
	SetFilter(filter *FileFilter)
	// SetLocalOnly sets whether only local files can be selected in the file
	// selector.
	SetLocalOnly(localOnly bool)
	// SetPreviewWidget sets an application-supplied widget to use to display a
	// custom preview of the currently selected file.
	SetPreviewWidget(previewWidget Widgetter)
	// SetPreviewWidgetActive sets whether the preview widget set by
	// gtk_file_chooser_set_preview_widget() should be shown for the current
	// filename.
	SetPreviewWidgetActive(active bool)
	// SetSelectMultiple sets whether multiple files can be selected in the file
	// selector.
	SetSelectMultiple(selectMultiple bool)
	// SetShowHidden sets whether hidden files and folders are displayed in the
	// file selector.
	SetShowHidden(showHidden bool)
	// SetURI sets the file referred to by uri as the current file for the file
	// chooser, by changing to the URI’s parent folder and actually selecting
	// the URI in the list.
	SetURI(uri string) bool
	// SetUsePreviewLabel sets whether the file chooser should display a stock
	// label with the name of the file that is being previewed; the default is
	// TRUE.
	SetUsePreviewLabel(useLabel bool)
	// UnselectAll unselects all the files in the current folder of a file
	// chooser.
	UnselectAll()
	// UnselectFile unselects the file referred to by file.
	UnselectFile(file gio.Filer)
	// UnselectFilename unselects a currently selected filename.
	UnselectFilename(filename string)
	// UnselectURI unselects the file referred to by uri.
	UnselectURI(uri string)

	// Confirm-overwrite: this signal gets emitted whenever it is appropriate to
	// present a confirmation dialog when the user has selected a file name that
	// already exists.
	ConnectConfirmOverwrite(func() (fileChooserConfirmation FileChooserConfirmation)) coreglib.SignalHandle
	// Current-folder-changed: this signal is emitted when the current folder in
	// a FileChooser changes.
	ConnectCurrentFolderChanged(func()) coreglib.SignalHandle
	// File-activated: this signal is emitted when the user "activates" a file
	// in the file chooser.
	ConnectFileActivated(func()) coreglib.SignalHandle
	// Selection-changed: this signal is emitted when there is a change in the
	// set of selected files in a FileChooser.
	ConnectSelectionChanged(func()) coreglib.SignalHandle
	// Update-preview: this signal is emitted when the preview in a file chooser
	// should be regenerated.
	ConnectUpdatePreview(func()) coreglib.SignalHandle
}

var _ FileChooserer = (*FileChooser)(nil)

func wrapFileChooser(obj *coreglib.Object) *FileChooser {
	return &FileChooser{
		Object: obj,
	}
}

func marshalFileChooser(p uintptr) (interface{}, error) {
	return wrapFileChooser(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectConfirmOverwrite: this signal gets emitted whenever it is appropriate
// to present a confirmation dialog when the user has selected a file name that
// already exists. The signal only gets emitted when the file chooser is in
// GTK_FILE_CHOOSER_ACTION_SAVE mode.
//
// Most applications just need to turn on the
// FileChooser:do-overwrite-confirmation property (or call the
// gtk_file_chooser_set_do_overwrite_confirmation() function), and they
// will automatically get a stock confirmation dialog. Applications which
// need to customize this behavior should do that, and also connect to the
// FileChooser::confirm-overwrite signal.
//
// A signal handler for this signal must return a FileChooserConfirmation
// value, which indicates the action to take. If the handler determines
// that the user wants to select a different filename, it should return
// GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines that
// the user is satisfied with his choice of file name, it should return
// GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME. On the other hand,
// if it determines that the stock confirmation dialog should be used,
// it should return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example
// illustrates this.
//
// Custom confirmation
//
//	static GtkFileChooserConfirmation
//	confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
//	{
//	  char *uri;
//
//	  uri = gtk_file_chooser_get_uri (chooser);
//
//	  if (is_uri_read_only (uri))
//	    {
//	      if (user_wants_to_replace_read_only_file (uri))
//	        return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
//	      else
//	        return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
//	    } else
//	      return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
//	}
//
//	...
//
//	chooser = gtk_file_chooser_dialog_new (...);
//
//	gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
//	g_signal_connect (chooser, "confirm-overwrite",
//	                  G_CALLBACK (confirm_overwrite_callback), NULL);
//
//	if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
//	        save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
//
//	gtk_widget_destroy (chooser);.
func (chooser *FileChooser) ConnectConfirmOverwrite(f func() (fileChooserConfirmation FileChooserConfirmation)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "confirm-overwrite", false, unsafe.Pointer(C._gotk4_gtk3_FileChooser_ConnectConfirmOverwrite), f)
}

// ConnectCurrentFolderChanged: this signal is emitted when the current folder
// in a FileChooser changes. This can happen due to the user performing some
// action that changes folders, such as selecting a bookmark or visiting a
// folder on the file list. It can also happen as a result of calling a function
// to explicitly change the current folder in a file chooser.
//
// Normally you do not need to connect to this signal, unless you need to keep
// track of which folder a file chooser is showing.
//
// See also: gtk_file_chooser_set_current_folder(),
// gtk_file_chooser_get_current_folder(),
// gtk_file_chooser_set_current_folder_uri(),
// gtk_file_chooser_get_current_folder_uri().
func (chooser *FileChooser) ConnectCurrentFolderChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "current-folder-changed", false, unsafe.Pointer(C._gotk4_gtk3_FileChooser_ConnectCurrentFolderChanged), f)
}

// ConnectFileActivated: this signal is emitted when the user "activates" a file
// in the file chooser. This can happen by double-clicking on a file in the file
// list, or by pressing Enter.
//
// Normally you do not need to connect to this signal. It is used internally by
// FileChooserDialog to know when to activate the default button in the dialog.
//
// See also: gtk_file_chooser_get_filename(), gtk_file_chooser_get_filenames(),
// gtk_file_chooser_get_uri(), gtk_file_chooser_get_uris().
func (chooser *FileChooser) ConnectFileActivated(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "file-activated", false, unsafe.Pointer(C._gotk4_gtk3_FileChooser_ConnectFileActivated), f)
}

// ConnectSelectionChanged: this signal is emitted when there is a change in
// the set of selected files in a FileChooser. This can happen when the user
// modifies the selection with the mouse or the keyboard, or when explicitly
// calling functions to change the selection.
//
// Normally you do not need to connect to this signal, as it is easier to wait
// for the file chooser to finish running, and then to get the list of selected
// files using the functions mentioned below.
//
// See also: gtk_file_chooser_select_filename(),
// gtk_file_chooser_unselect_filename(), gtk_file_chooser_get_filename(),
// gtk_file_chooser_get_filenames(), gtk_file_chooser_select_uri(),
// gtk_file_chooser_unselect_uri(), gtk_file_chooser_get_uri(),
// gtk_file_chooser_get_uris().
func (chooser *FileChooser) ConnectSelectionChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "selection-changed", false, unsafe.Pointer(C._gotk4_gtk3_FileChooser_ConnectSelectionChanged), f)
}

// ConnectUpdatePreview: this signal is emitted when the preview in a file
// chooser should be regenerated. For example, this can happen when the
// currently selected file changes. You should use this signal if you want your
// file chooser to have a preview widget.
//
// Once you have installed a preview widget with
// gtk_file_chooser_set_preview_widget(), you should update it when this signal
// is emitted. You can use the functions gtk_file_chooser_get_preview_filename()
// or gtk_file_chooser_get_preview_uri() to get the name of the file to preview.
// Your widget may not be able to preview all kinds of files; your callback must
// call gtk_file_chooser_set_preview_widget_active() to inform the file chooser
// about whether the preview was generated successfully or not.
//
// Please see the example code in [Using a Preview
// Widget][gtkfilechooser-preview].
//
// See also: gtk_file_chooser_set_preview_widget(),
// gtk_file_chooser_set_preview_widget_active(),
// gtk_file_chooser_set_use_preview_label(),
// gtk_file_chooser_get_preview_filename(), gtk_file_chooser_get_preview_uri().
func (chooser *FileChooser) ConnectUpdatePreview(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "update-preview", false, unsafe.Pointer(C._gotk4_gtk3_FileChooser_ConnectUpdatePreview), f)
}

// AddChoice adds a 'choice' to the file chooser. This is typically implemented
// as a combobox or, for boolean choices, as a checkbutton. You can select
// a value using gtk_file_chooser_set_choice() before the dialog is shown,
// and you can obtain the user-selected value in the ::response signal handler
// using gtk_file_chooser_get_choice().
//
// Compare gtk_file_chooser_set_extra_widget().
//
// The function takes the following parameters:
//
//   - id for the added choice.
//   - label: user-visible label for the added choice.
//   - options (optional) ids for the options of the choice, or NULL for a
//     boolean choice.
//   - optionLabels (optional): user-visible labels for the options, must be the
//     same length as options.
func (chooser *FileChooser) AddChoice(id, label string, options, optionLabels []string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _arg2 *C.char           // out
	var _arg3 **C.char          // out
	var _arg4 **C.char          // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(id)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.char)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		_arg3 = (**C.char)(C.calloc(C.size_t((len(options) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg3))
		{
			out := unsafe.Slice(_arg3, len(options)+1)
			var zero *C.char
			out[len(options)] = zero
			for i := range options {
				out[i] = (*C.char)(unsafe.Pointer(C.CString(options[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}
	{
		_arg4 = (**C.char)(C.calloc(C.size_t((len(optionLabels) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg4))
		{
			out := unsafe.Slice(_arg4, len(optionLabels)+1)
			var zero *C.char
			out[len(optionLabels)] = zero
			for i := range optionLabels {
				out[i] = (*C.char)(unsafe.Pointer(C.CString(optionLabels[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_file_chooser_add_choice(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(id)
	runtime.KeepAlive(label)
	runtime.KeepAlive(options)
	runtime.KeepAlive(optionLabels)
}

// AddFilter adds filter to the list of filters that the user can select
// between. When a filter is selected, only files that are passed by that filter
// are displayed.
//
// Note that the chooser takes ownership of the filter, so you have to ref and
// sink it if you want to keep a reference.
//
// The function takes the following parameters:
//
//   - filter: FileFilter.
func (chooser *FileChooser) AddFilter(filter *FileFilter) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GtkFileFilter  // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	C.g_object_ref(C.gpointer(coreglib.InternObject(filter).Native()))

	C.gtk_file_chooser_add_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// AddShortcutFolder adds a folder to be displayed with the shortcut folders
// in a file chooser. Note that shortcut folders do not get saved, as they
// are provided by the application. For example, you can use this to add a
// “/usr/share/mydrawprogram/Clipart” folder to the volume list.
//
// The function takes the following parameters:
//
//   - folder: filename of the folder to add.
func (chooser *FileChooser) AddShortcutFolder(folder string) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(folder)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_add_shortcut_folder(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(folder)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// AddShortcutFolderURI adds a folder URI to be displayed with the shortcut
// folders in a file chooser. Note that shortcut folders do not get saved,
// as they are provided by the application. For example, you can use this to add
// a “file:///usr/share/mydrawprogram/Clipart” folder to the volume list.
//
// The function takes the following parameters:
//
//   - uri: URI of the folder to add.
func (chooser *FileChooser) AddShortcutFolderURI(uri string) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_add_shortcut_folder_uri(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// Action gets the type of operation that the file chooser is performing;
// see gtk_file_chooser_set_action().
//
// The function returns the following values:
//
//   - fileChooserAction: action that the file selector is performing.
func (chooser *FileChooser) Action() FileChooserAction {
	var _arg0 *C.GtkFileChooser      // out
	var _cret C.GtkFileChooserAction // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_action(_arg0)
	runtime.KeepAlive(chooser)

	var _fileChooserAction FileChooserAction // out

	_fileChooserAction = FileChooserAction(_cret)

	return _fileChooserAction
}

// Choice gets the currently selected option in the 'choice' with the given ID.
//
// The function takes the following parameters:
//
//   - id: ID of the choice to get.
//
// The function returns the following values:
//
//   - utf8: ID of the currenly selected option.
func (chooser *FileChooser) Choice(id string) string {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(id)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_get_choice(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(id)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// CreateFolders gets whether file choser will offer to create new folders.
// See gtk_file_chooser_set_create_folders().
//
// The function returns the following values:
//
//   - ok: TRUE if the Create Folder button should be displayed.
func (chooser *FileChooser) CreateFolders() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_create_folders(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CurrentFolder gets the current folder of chooser as a local filename.
// See gtk_file_chooser_set_current_folder().
//
// Note that this is the folder that the file chooser is
// currently displaying (e.g. "/home/username/Documents"),
// which is not the same as the currently-selected folder if the
// chooser is in GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode (e.g.
// "/home/username/Documents/selected-folder/". To get the currently-selected
// folder in that mode, use gtk_file_chooser_get_uri() as the usual way to get
// the selection.
//
// The function returns the following values:
//
//   - filename (optional): full path of the current folder, or NULL if the
//     current path cannot be represented as a local filename. Free with
//     g_free(). This function will also return NULL if the file chooser was
//     unable to load the last folder that was requested from it; for example,
//     as would be for calling gtk_file_chooser_set_current_folder() on a
//     nonexistent folder.
func (chooser *FileChooser) CurrentFolder() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_current_folder(_arg0)
	runtime.KeepAlive(chooser)

	var _filename string // out

	if _cret != nil {
		_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _filename
}

// CurrentFolderFile gets the current folder of chooser as #GFile. See
// gtk_file_chooser_get_current_folder_uri().
//
// The function returns the following values:
//
//   - file (optional) for the current folder.
func (chooser *FileChooser) CurrentFolderFile() *gio.File {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GFile          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_current_folder_file(_arg0)
	runtime.KeepAlive(chooser)

	var _file *gio.File // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_file = &gio.File{
				Object: obj,
			}
		}
	}

	return _file
}

// CurrentFolderURI gets the current folder of chooser as an URI. See
// gtk_file_chooser_set_current_folder_uri().
//
// Note that this is the folder that the file chooser is
// currently displaying (e.g. "file:///home/username/Documents"),
// which is not the same as the currently-selected folder if the
// chooser is in GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode (e.g.
// "file:///home/username/Documents/selected-folder/". To get the
// currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
// usual way to get the selection.
//
// The function returns the following values:
//
//   - utf8 (optional): URI for the current folder. Free with g_free().
//     This function will also return NULL if the file chooser was unable to
//     load the last folder that was requested from it; for example, as would be
//     for calling gtk_file_chooser_set_current_folder_uri() on a nonexistent
//     folder.
func (chooser *FileChooser) CurrentFolderURI() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_current_folder_uri(_arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// CurrentName gets the current name in the file selector, as entered by the
// user in the text entry for “Name”.
//
// This is meant to be used in save dialogs, to get the currently typed filename
// when the file itself does not exist yet. For example, an application that
// adds a custom extra widget to the file chooser for “file format” may want to
// change the extension of the typed filename based on the chosen format, say,
// from “.jpg” to “.png”.
//
// The function returns the following values:
//
//   - utf8: raw text from the file chooser’s “Name” entry. Free this with
//     g_free(). Note that this string is not a full pathname or URI; it is
//     whatever the contents of the entry are. Note also that this string is
//     in UTF-8 encoding, which is not necessarily the system’s encoding for
//     filenames.
func (chooser *FileChooser) CurrentName() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_current_name(_arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// DoOverwriteConfirmation queries whether a file chooser is set to confirm for
// overwriting when the user types a file name that already exists.
//
// The function returns the following values:
//
//   - ok: TRUE if the file chooser will present a confirmation dialog; FALSE
//     otherwise.
func (chooser *FileChooser) DoOverwriteConfirmation() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_do_overwrite_confirmation(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ExtraWidget gets the current extra widget; see
// gtk_file_chooser_set_extra_widget().
//
// The function returns the following values:
//
//   - widget (optional): current extra widget, or NULL.
func (chooser *FileChooser) ExtraWidget() Widgetter {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_extra_widget(_arg0)
	runtime.KeepAlive(chooser)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// File gets the #GFile for the currently selected file in the file selector.
// If multiple files are selected, one of the files will be returned at random.
//
// If the file chooser is in folder mode, this function returns the selected
// folder.
//
// The function returns the following values:
//
//   - file: selected #GFile. You own the returned file; use g_object_unref() to
//     release it.
func (chooser *FileChooser) File() *gio.File {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GFile          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_file(_arg0)
	runtime.KeepAlive(chooser)

	var _file *gio.File // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_file = &gio.File{
			Object: obj,
		}
	}

	return _file
}

// Filename gets the filename for the currently selected file in the file
// selector. The filename is returned as an absolute path. If multiple files are
// selected, one of the filenames will be returned at random.
//
// If the file chooser is in folder mode, this function returns the selected
// folder.
//
// The function returns the following values:
//
//   - filename (optional): currently selected filename, or NULL if no file
//     is selected, or the selected file can't be represented with a local
//     filename. Free with g_free().
func (chooser *FileChooser) Filename() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_filename(_arg0)
	runtime.KeepAlive(chooser)

	var _filename string // out

	if _cret != nil {
		_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _filename
}

// Filenames lists all the selected files and subfolders in the current folder
// of chooser. The returned names are full absolute paths. If files in the
// current folder cannot be represented as local filenames they will be ignored.
// (See gtk_file_chooser_get_uris()).
//
// The function returns the following values:
//
//   - sList: List containing the filenames of all selected files and subfolders
//     in the current folder. Free the returned list with g_slist_free(),
//     and the filenames with g_free().
func (chooser *FileChooser) Filenames() []string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_filenames(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []string // out

	_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		defer C.free(unsafe.Pointer(src))
		_sList = append(_sList, dst)
	})

	return _sList
}

// Files lists all the selected files and subfolders in the current folder of
// chooser as #GFile. An internal function, see gtk_file_chooser_get_uris().
//
// The function returns the following values:
//
//   - sList: List containing a #GFile for each selected file and subfolder in
//     the current folder. Free the returned list with g_slist_free(), and the
//     files with g_object_unref().
func (chooser *FileChooser) Files() []*gio.File {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_files(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []*gio.File // out

	_sList = make([]*gio.File, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GFile)(v)
		var dst *gio.File // out
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(src))
			dst = &gio.File{
				Object: obj,
			}
		}
		_sList = append(_sList, dst)
	})

	return _sList
}

// Filter gets the current filter; see gtk_file_chooser_set_filter().
//
// The function returns the following values:
//
//   - fileFilter (optional): current filter, or NULL.
func (chooser *FileChooser) Filter() *FileFilter {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GtkFileFilter  // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_filter(_arg0)
	runtime.KeepAlive(chooser)

	var _fileFilter *FileFilter // out

	if _cret != nil {
		_fileFilter = wrapFileFilter(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _fileFilter
}

// LocalOnly gets whether only local files can be selected in the file selector.
// See gtk_file_chooser_set_local_only().
//
// The function returns the following values:
//
//   - ok: TRUE if only local files can be selected.
func (chooser *FileChooser) LocalOnly() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_local_only(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PreviewFile gets the #GFile that should be previewed in a custom preview
// Internal function, see gtk_file_chooser_get_preview_uri().
//
// The function returns the following values:
//
//   - file (optional) for the file to preview, or NULL if no file is selected.
//     Free with g_object_unref().
func (chooser *FileChooser) PreviewFile() *gio.File {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GFile          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_preview_file(_arg0)
	runtime.KeepAlive(chooser)

	var _file *gio.File // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_file = &gio.File{
				Object: obj,
			}
		}
	}

	return _file
}

// PreviewFilename gets the filename that should be previewed in a custom
// preview widget. See gtk_file_chooser_set_preview_widget().
//
// The function returns the following values:
//
//   - filename (optional) to preview, or NULL if no file is selected,
//     or if the selected file cannot be represented as a local filename.
//     Free with g_free().
func (chooser *FileChooser) PreviewFilename() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_preview_filename(_arg0)
	runtime.KeepAlive(chooser)

	var _filename string // out

	if _cret != nil {
		_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _filename
}

// PreviewURI gets the URI that should be previewed in a custom preview widget.
// See gtk_file_chooser_set_preview_widget().
//
// The function returns the following values:
//
//   - utf8 (optional): URI for the file to preview, or NULL if no file is
//     selected. Free with g_free().
func (chooser *FileChooser) PreviewURI() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_preview_uri(_arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// PreviewWidget gets the current preview widget; see
// gtk_file_chooser_set_preview_widget().
//
// The function returns the following values:
//
//   - widget (optional): current preview widget, or NULL.
func (chooser *FileChooser) PreviewWidget() Widgetter {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_preview_widget(_arg0)
	runtime.KeepAlive(chooser)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// PreviewWidgetActive gets whether the preview widget set by
// gtk_file_chooser_set_preview_widget() should be shown for the current
// filename. See gtk_file_chooser_set_preview_widget_active().
//
// The function returns the following values:
//
//   - ok: TRUE if the preview widget is active for the current filename.
func (chooser *FileChooser) PreviewWidgetActive() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_preview_widget_active(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SelectMultiple gets whether multiple files can be selected in the file
// selector. See gtk_file_chooser_set_select_multiple().
//
// The function returns the following values:
//
//   - ok: TRUE if multiple files can be selected.
func (chooser *FileChooser) SelectMultiple() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_select_multiple(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowHidden gets whether hidden files and folders are displayed in the file
// selector. See gtk_file_chooser_set_show_hidden().
//
// The function returns the following values:
//
//   - ok: TRUE if hidden files and folders are displayed.
func (chooser *FileChooser) ShowHidden() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_show_hidden(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// URI gets the URI for the currently selected file in the file selector. If
// multiple files are selected, one of the filenames will be returned at random.
//
// If the file chooser is in folder mode, this function returns the selected
// folder.
//
// The function returns the following values:
//
//   - utf8 (optional): currently selected URI, or NULL if no file is selected.
//     If gtk_file_chooser_set_local_only() is set to TRUE (the default) a local
//     URI will be returned for any FUSE locations. Free with g_free().
func (chooser *FileChooser) URI() string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_uri(_arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// URIs lists all the selected files and subfolders in the current folder of
// chooser. The returned names are full absolute URIs.
//
// The function returns the following values:
//
//   - sList containing the URIs of all selected files and subfolders in the
//     current folder. Free the returned list with g_slist_free(), and the
//     filenames with g_free().
func (chooser *FileChooser) URIs() []string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_uris(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []string // out

	_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		defer C.free(unsafe.Pointer(src))
		_sList = append(_sList, dst)
	})

	return _sList
}

// UsePreviewLabel gets whether a stock label should be drawn with the name of
// the previewed file. See gtk_file_chooser_set_use_preview_label().
//
// The function returns the following values:
//
//   - ok: TRUE if the file chooser is set to display a label with the name of
//     the previewed file, FALSE otherwise.
func (chooser *FileChooser) UsePreviewLabel() bool {
	var _arg0 *C.GtkFileChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_get_use_preview_label(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListFilters lists the current set of user-selectable filters; see
// gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
//
// The function returns the following values:
//
//   - sList: a List containing the current set of user selectable filters.
//     The contents of the list are owned by GTK+, but you must free the list
//     itself with g_slist_free() when you are done with it.
func (chooser *FileChooser) ListFilters() []*FileFilter {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_list_filters(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []*FileFilter // out

	_sList = make([]*FileFilter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkFileFilter)(v)
		var dst *FileFilter // out
		dst = wrapFileFilter(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// ListShortcutFolderURIs queries the list of shortcut folders in the file
// chooser, as set by gtk_file_chooser_add_shortcut_folder_uri().
//
// The function returns the following values:
//
//   - sList (optional): list of folder URIs, or NULL if there are no shortcut
//     folders. Free the returned list with g_slist_free(), and the URIs with
//     g_free().
func (chooser *FileChooser) ListShortcutFolderURIs() []string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_list_shortcut_folder_uris(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []string // out

	if _cret != nil {
		_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
		gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
			src := (*C.gchar)(v)
			var dst string // out
			dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
			defer C.free(unsafe.Pointer(src))
			_sList = append(_sList, dst)
		})
	}

	return _sList
}

// ListShortcutFolders queries the list of shortcut folders in the file chooser,
// as set by gtk_file_chooser_add_shortcut_folder().
//
// The function returns the following values:
//
//   - sList (optional): list of folder filenames, or NULL if there are no
//     shortcut folders. Free the returned list with g_slist_free(), and the
//     filenames with g_free().
func (chooser *FileChooser) ListShortcutFolders() []string {
	var _arg0 *C.GtkFileChooser // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_file_chooser_list_shortcut_folders(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []string // out

	if _cret != nil {
		_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
		gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
			src := (*C.gchar)(v)
			var dst string // out
			dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
			defer C.free(unsafe.Pointer(src))
			_sList = append(_sList, dst)
		})
	}

	return _sList
}

// RemoveChoice removes a 'choice' that has been added with
// gtk_file_chooser_add_choice().
//
// The function takes the following parameters:
//
//   - id: ID of the choice to remove.
func (chooser *FileChooser) RemoveChoice(id string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(id)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_remove_choice(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(id)
}

// RemoveFilter removes filter from the list of filters that the user can select
// between.
//
// The function takes the following parameters:
//
//   - filter: FileFilter.
func (chooser *FileChooser) RemoveFilter(filter *FileFilter) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GtkFileFilter  // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_file_chooser_remove_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// RemoveShortcutFolder removes a folder from a file chooser’s list of shortcut
// folders.
//
// The function takes the following parameters:
//
//   - folder: filename of the folder to remove.
func (chooser *FileChooser) RemoveShortcutFolder(folder string) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(folder)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_remove_shortcut_folder(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(folder)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// RemoveShortcutFolderURI removes a folder URI from a file chooser’s list of
// shortcut folders.
//
// The function takes the following parameters:
//
//   - uri: URI of the folder to remove.
func (chooser *FileChooser) RemoveShortcutFolderURI(uri string) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_remove_shortcut_folder_uri(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SelectAll selects all the files in the current folder of a file chooser.
func (chooser *FileChooser) SelectAll() {
	var _arg0 *C.GtkFileChooser // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C.gtk_file_chooser_select_all(_arg0)
	runtime.KeepAlive(chooser)
}

// SelectFile selects the file referred to by file. An internal function.
// See _gtk_file_chooser_select_uri().
//
// The function takes the following parameters:
//
//   - file to select.
func (chooser *FileChooser) SelectFile(file gio.Filer) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GFile          // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	C.gtk_file_chooser_select_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(file)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SelectFilename selects a filename. If the file name isn’t in the current
// folder of chooser, then the current folder of chooser will be changed to the
// folder containing filename.
//
// The function takes the following parameters:
//
//   - filename to select.
//
// The function returns the following values:
//
//   - ok: not useful.
//
//     See also: gtk_file_chooser_set_filename().
func (chooser *FileChooser) SelectFilename(filename string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_select_filename(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filename)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SelectURI selects the file to by uri. If the URI doesn’t refer to a file in
// the current folder of chooser, then the current folder of chooser will be
// changed to the folder containing filename.
//
// The function takes the following parameters:
//
//   - uri: URI to select.
//
// The function returns the following values:
//
//   - ok: not useful.
func (chooser *FileChooser) SelectURI(uri string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_select_uri(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAction sets the type of operation that the chooser is performing;
// the user interface is adapted to suit the selected action.
// For example, an option to create a new folder might be shown if
// the action is GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is
// GTK_FILE_CHOOSER_ACTION_OPEN.
//
// The function takes the following parameters:
//
//   - action that the file selector is performing.
func (chooser *FileChooser) SetAction(action FileChooserAction) {
	var _arg0 *C.GtkFileChooser      // out
	var _arg1 C.GtkFileChooserAction // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = C.GtkFileChooserAction(action)

	C.gtk_file_chooser_set_action(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(action)
}

// SetChoice selects an option in a 'choice' that has been added with
// gtk_file_chooser_add_choice(). For a boolean choice, the possible options are
// "true" and "false".
//
// The function takes the following parameters:
//
//   - id: ID of the choice to set.
//   - option: ID of the option to select.
func (chooser *FileChooser) SetChoice(id, option string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _arg2 *C.char           // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(id)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.char)(unsafe.Pointer(C.CString(option)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_file_chooser_set_choice(_arg0, _arg1, _arg2)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(id)
	runtime.KeepAlive(option)
}

// SetCreateFolders sets whether file choser will offer to create
// new folders. This is only relevant if the action is not set to be
// GTK_FILE_CHOOSER_ACTION_OPEN.
//
// The function takes the following parameters:
//
//   - createFolders: TRUE if the Create Folder button should be displayed.
func (chooser *FileChooser) SetCreateFolders(createFolders bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if createFolders {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_create_folders(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(createFolders)
}

// SetCurrentFolder sets the current folder for chooser from a local filename.
// The user will be shown the full contents of the current folder, plus user
// interface elements for navigating to other folders.
//
// In general, you should not use this function. See the [section on setting
// up a file chooser dialog][gtkfilechooserdialog-setting-up] for the rationale
// behind this.
//
// The function takes the following parameters:
//
//   - filename: full path of the new current folder.
//
// The function returns the following values:
//
//   - ok: not useful.
func (chooser *FileChooser) SetCurrentFolder(filename string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.gchar          // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_set_current_folder(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filename)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetCurrentFolderFile sets the current folder for chooser from a #GFile.
// Internal function, see gtk_file_chooser_set_current_folder_uri().
//
// The function takes the following parameters:
//
//   - file for the new folder.
func (chooser *FileChooser) SetCurrentFolderFile(file gio.Filer) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GFile          // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	C.gtk_file_chooser_set_current_folder_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(file)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetCurrentFolderURI sets the current folder for chooser from an URI. The user
// will be shown the full contents of the current folder, plus user interface
// elements for navigating to other folders.
//
// In general, you should not use this function. See the [section on setting
// up a file chooser dialog][gtkfilechooserdialog-setting-up] for the rationale
// behind this.
//
// The function takes the following parameters:
//
//   - uri: URI for the new current folder.
//
// The function returns the following values:
//
//   - ok: TRUE if the folder could be changed successfully, FALSE otherwise.
func (chooser *FileChooser) SetCurrentFolderURI(uri string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.gchar          // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_set_current_folder_uri(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetCurrentName sets the current name in the file selector, as if entered by
// the user. Note that the name passed in here is a UTF-8 string rather than a
// filename. This function is meant for such uses as a suggested name in a “Save
// As...” dialog. You can pass “Untitled.doc” or a similarly suitable suggestion
// for the name.
//
// If you want to preselect a particular existing file, you should use
// gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead.
// Please see the documentation for those functions for an example of using
// gtk_file_chooser_set_current_name() as well.
//
// The function takes the following parameters:
//
//   - name to use, as a UTF-8 string.
func (chooser *FileChooser) SetCurrentName(name string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_set_current_name(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(name)
}

// SetDoOverwriteConfirmation sets whether a file chooser in
// GTK_FILE_CHOOSER_ACTION_SAVE mode will present a confirmation dialog if the
// user types a file name that already exists. This is FALSE by default.
//
// If set to TRUE, the chooser will emit the FileChooser::confirm-overwrite
// signal when appropriate.
//
// If all you need is the stock confirmation dialog, set this property to TRUE.
// You can override the way confirmation is done by actually handling the
// FileChooser::confirm-overwrite signal; please refer to its documentation for
// the details.
//
// The function takes the following parameters:
//
//   - doOverwriteConfirmation: whether to confirm overwriting in save mode.
func (chooser *FileChooser) SetDoOverwriteConfirmation(doOverwriteConfirmation bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if doOverwriteConfirmation {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_do_overwrite_confirmation(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(doOverwriteConfirmation)
}

// SetExtraWidget sets an application-supplied widget to provide extra options
// to the user.
//
// The function takes the following parameters:
//
//   - extraWidget: widget for extra options.
func (chooser *FileChooser) SetExtraWidget(extraWidget Widgetter) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GtkWidget      // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(extraWidget).Native()))

	C.gtk_file_chooser_set_extra_widget(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(extraWidget)
}

// SetFile sets file as the current filename for the file chooser, by changing
// to the file’s parent folder and actually selecting the file in list. If the
// chooser is in GTK_FILE_CHOOSER_ACTION_SAVE mode, the file’s base name will
// also appear in the dialog’s file name entry.
//
// If the file name isn’t in the current folder of chooser, then the current
// folder of chooser will be changed to the folder containing filename.
// This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed
// by gtk_file_chooser_select_filename().
//
// Note that the file must exist, or nothing will be done except for the
// directory change.
//
// If you are implementing a save dialog, you should use this function if
// you already have a file name to which the user may save; for example,
// when the user opens an existing file and then does Save As... If you don’t
// have a file name already — for example, if the user just created a new file
// and is saving it for the first time, do not call this function. Instead,
// use something similar to this:
//
//	if (document_is_new)
//	  {
//	    // the user just created a new document
//	    gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving);
//	    gtk_file_chooser_set_current_name (chooser, "Untitled document");
//	  }
//	else
//	  {
//	    // the user edited an existing document
//	    gtk_file_chooser_set_file (chooser, existing_file);
//	  }.
//
// The function takes the following parameters:
//
//   - file to set as current.
func (chooser *FileChooser) SetFile(file gio.Filer) error {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GFile          // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	C.gtk_file_chooser_set_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(file)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetFilename sets filename as the current filename for the file chooser,
// by changing to the file’s parent folder and actually selecting the
// file in list; all other files will be unselected. If the chooser is in
// GTK_FILE_CHOOSER_ACTION_SAVE mode, the file’s base name will also appear in
// the dialog’s file name entry.
//
// Note that the file must exist, or nothing will be done except for the
// directory change.
//
// You should use this function only when implementing a save dialog for which
// you already have a file name to which the user may save. For example,
// when the user opens an existing file and then does Save As... to save a copy
// or a modified version. If you don’t have a file name already — for example,
// if the user just created a new file and is saving it for the first time,
// do not call this function. Instead, use something similar to this:
//
//	if (document_is_new)
//	  {
//	    // the user just created a new document
//	    gtk_file_chooser_set_current_name (chooser, "Untitled document");
//	  }
//	else
//	  {
//	    // the user edited an existing document
//	    gtk_file_chooser_set_filename (chooser, existing_filename);
//	  }
//
// In the first case, the file chooser will present the user with useful
// suggestions as to where to save his new file. In the second case, the file’s
// existing location is already known, so the file chooser will use it.
//
// The function takes the following parameters:
//
//   - filename to set as current.
//
// The function returns the following values:
//
//   - ok: not useful.
func (chooser *FileChooser) SetFilename(filename string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_set_filename(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filename)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetFilter sets the current filter; only the files that pass the filter will
// be displayed. If the user-selectable list of filters is non-empty, then the
// filter should be one of the filters in that list. Setting the current filter
// when the list of filters is empty is useful if you want to restrict the
// displayed set of files without letting the user change it.
//
// The function takes the following parameters:
//
//   - filter: FileFilter.
func (chooser *FileChooser) SetFilter(filter *FileFilter) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GtkFileFilter  // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_file_chooser_set_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// SetLocalOnly sets whether only local files can be selected in the file
// selector. If local_only is TRUE (the default), then the selected file or
// files are guaranteed to be accessible through the operating systems native
// file system and therefore the application only needs to worry about the
// filename functions in FileChooser, like gtk_file_chooser_get_filename(),
// rather than the URI functions like gtk_file_chooser_get_uri(),
//
// On some systems non-native files may still be available using the native
// filesystem via a userspace filesystem (FUSE).
//
// The function takes the following parameters:
//
//   - localOnly: TRUE if only local files can be selected.
func (chooser *FileChooser) SetLocalOnly(localOnly bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if localOnly {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_local_only(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(localOnly)
}

// SetPreviewWidget sets an application-supplied widget to use to display a
// custom preview of the currently selected file. To implement a preview, after
// setting the preview widget, you connect to the FileChooser::update-preview
// signal, and call gtk_file_chooser_get_preview_filename() or
// gtk_file_chooser_get_preview_uri() on each change. If you can display a
// preview of the new file, update your widget and set the preview active using
// gtk_file_chooser_set_preview_widget_active(). Otherwise, set the preview
// inactive.
//
// When there is no application-supplied preview widget, or the
// application-supplied preview widget is not active, the file chooser will
// display no preview at all.
//
// The function takes the following parameters:
//
//   - previewWidget: widget for displaying preview.
func (chooser *FileChooser) SetPreviewWidget(previewWidget Widgetter) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GtkWidget      // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(previewWidget).Native()))

	C.gtk_file_chooser_set_preview_widget(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(previewWidget)
}

// SetPreviewWidgetActive sets whether the preview widget set by
// gtk_file_chooser_set_preview_widget() should be shown for the current
// filename. When active is set to false, the file chooser may display an
// internally generated preview of the current file or it may display no preview
// at all. See gtk_file_chooser_set_preview_widget() for more details.
//
// The function takes the following parameters:
//
//   - active: whether to display the user-specified preview widget.
func (chooser *FileChooser) SetPreviewWidgetActive(active bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if active {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_preview_widget_active(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(active)
}

// SetSelectMultiple sets whether multiple files can be selected in
// the file selector. This is only relevant if the action is set to be
// GTK_FILE_CHOOSER_ACTION_OPEN or GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
//
// The function takes the following parameters:
//
//   - selectMultiple: TRUE if multiple files can be selected.
func (chooser *FileChooser) SetSelectMultiple(selectMultiple bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if selectMultiple {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_select_multiple(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(selectMultiple)
}

// SetShowHidden sets whether hidden files and folders are displayed in the file
// selector.
//
// The function takes the following parameters:
//
//   - showHidden: TRUE if hidden files and folders should be displayed.
func (chooser *FileChooser) SetShowHidden(showHidden bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if showHidden {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_show_hidden(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(showHidden)
}

// SetURI sets the file referred to by uri as the current file for the file
// chooser, by changing to the URI’s parent folder and actually selecting
// the URI in the list. If the chooser is GTK_FILE_CHOOSER_ACTION_SAVE mode,
// the URI’s base name will also appear in the dialog’s file name entry.
//
// Note that the URI must exist, or nothing will be done except for the
// directory change.
//
// You should use this function only when implementing a save dialog for which
// you already have a file name to which the user may save. For example,
// when the user opens an existing file and then does Save As... to save a copy
// or a modified version. If you don’t have a file name already — for example,
// if the user just created a new file and is saving it for the first time,
// do not call this function. Instead, use something similar to this:
//
//	if (document_is_new)
//	  {
//	    // the user just created a new document
//	    gtk_file_chooser_set_current_name (chooser, "Untitled document");
//	  }
//	else
//	  {
//	    // the user edited an existing document
//	    gtk_file_chooser_set_uri (chooser, existing_uri);
//	  }
//
// In the first case, the file chooser will present the user with useful
// suggestions as to where to save his new file. In the second case, the file’s
// existing location is already known, so the file chooser will use it.
//
// The function takes the following parameters:
//
//   - uri: URI to set as current.
//
// The function returns the following values:
//
//   - ok: not useful.
func (chooser *FileChooser) SetURI(uri string) bool {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_file_chooser_set_uri(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetUsePreviewLabel sets whether the file chooser should display a stock
// label with the name of the file that is being previewed; the default is TRUE.
// Applications that want to draw the whole preview area themselves should set
// this to FALSE and display the name themselves in their preview widget.
//
// See also: gtk_file_chooser_set_preview_widget().
//
// The function takes the following parameters:
//
//   - useLabel: whether to display a stock label with the name of the previewed
//     file.
func (chooser *FileChooser) SetUsePreviewLabel(useLabel bool) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if useLabel {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_set_use_preview_label(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(useLabel)
}

// UnselectAll unselects all the files in the current folder of a file chooser.
func (chooser *FileChooser) UnselectAll() {
	var _arg0 *C.GtkFileChooser // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C.gtk_file_chooser_unselect_all(_arg0)
	runtime.KeepAlive(chooser)
}

// UnselectFile unselects the file referred to by file. If the file is not
// in the current directory, does not exist, or is otherwise not currently
// selected, does nothing.
//
// The function takes the following parameters:
//
//   - file: #GFile.
func (chooser *FileChooser) UnselectFile(file gio.Filer) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.GFile          // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	C.gtk_file_chooser_unselect_file(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(file)
}

// UnselectFilename unselects a currently selected filename. If the filename is
// not in the current directory, does not exist, or is otherwise not currently
// selected, does nothing.
//
// The function takes the following parameters:
//
//   - filename to unselect.
func (chooser *FileChooser) UnselectFilename(filename string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_unselect_filename(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filename)
}

// UnselectURI unselects the file referred to by uri. If the file is not in the
// current directory, does not exist, or is otherwise not currently selected,
// does nothing.
//
// The function takes the following parameters:
//
//   - uri: URI to unselect.
func (chooser *FileChooser) UnselectURI(uri string) {
	var _arg0 *C.GtkFileChooser // out
	var _arg1 *C.char           // out

	_arg0 = (*C.GtkFileChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_unselect_uri(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)
}

// FontChooser is an interface that can be implemented by widgets displaying
// the list of fonts. In GTK+, the main objects that implement this interface
// are FontChooserWidget, FontChooserDialog and FontButton. The GtkFontChooser
// interface has been introducted in GTK+ 3.2.
//
// FontChooser wraps an interface. This means the user can get the
// underlying type by calling Cast().
type FontChooser struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*FontChooser)(nil)
)

// FontChooserer describes FontChooser's interface methods.
type FontChooserer interface {
	coreglib.Objector

	// Font gets the currently-selected font name.
	Font() string
	// FontDesc gets the currently-selected font.
	FontDesc() *pango.FontDescription
	// FontFace gets the FontFace representing the selected font group details
	// (i.e.
	FontFace() pango.FontFacer
	// FontFamily gets the FontFamily representing the selected font family.
	FontFamily() pango.FontFamilier
	// FontFeatures gets the currently-selected font features.
	FontFeatures() string
	// FontMap gets the custom font map of this font chooser widget, or NULL if
	// it does not have one.
	FontMap() pango.FontMapper
	// FontSize: selected font size.
	FontSize() int
	// Language gets the language that is used for font features.
	Language() string
	// Level returns the current level of granularity for selecting fonts.
	Level() FontChooserLevel
	// PreviewText gets the text displayed in the preview area.
	PreviewText() string
	// ShowPreviewEntry returns whether the preview entry is shown or not.
	ShowPreviewEntry() bool
	// SetFilterFunc adds a filter function that decides which fonts to display
	// in the font chooser.
	SetFilterFunc(filter FontFilterFunc)
	// SetFont sets the currently-selected font.
	SetFont(fontname string)
	// SetFontDesc sets the currently-selected font from font_desc.
	SetFontDesc(fontDesc *pango.FontDescription)
	// SetFontMap sets a custom font map to use for this font chooser widget.
	SetFontMap(fontmap pango.FontMapper)
	// SetLanguage sets the language to use for font features.
	SetLanguage(language string)
	// SetLevel sets the desired level of granularity for selecting fonts.
	SetLevel(level FontChooserLevel)
	// SetPreviewText sets the text displayed in the preview area.
	SetPreviewText(text string)
	// SetShowPreviewEntry shows or hides the editable preview entry.
	SetShowPreviewEntry(showPreviewEntry bool)

	// Font-activated is emitted when a font is activated.
	ConnectFontActivated(func(fontname string)) coreglib.SignalHandle
}

var _ FontChooserer = (*FontChooser)(nil)

func wrapFontChooser(obj *coreglib.Object) *FontChooser {
	return &FontChooser{
		Object: obj,
	}
}

func marshalFontChooser(p uintptr) (interface{}, error) {
	return wrapFontChooser(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectFontActivated is emitted when a font is activated. This usually
// happens when the user double clicks an item, or an item is selected and the
// user presses one of the keys Space, Shift+Space, Return or Enter.
func (fontchooser *FontChooser) ConnectFontActivated(f func(fontname string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(fontchooser, "font-activated", false, unsafe.Pointer(C._gotk4_gtk3_FontChooser_ConnectFontActivated), f)
}

// Font gets the currently-selected font name.
//
// Note that this can be a different string than what you set with
// gtk_font_chooser_set_font(), as the font chooser widget may normalize font
// names and thus return a string with a different structure. For example,
// “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”.
//
// Use pango_font_description_equal() if you want to compare two font
// descriptions.
//
// The function returns the following values:
//
//   - utf8 (optional): string with the name of the current font, or NULL if no
//     font is selected. You must free this string with g_free().
func (fontchooser *FontChooser) Font() string {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font(_arg0)
	runtime.KeepAlive(fontchooser)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// FontDesc gets the currently-selected font.
//
// Note that this can be a different string than what you set with
// gtk_font_chooser_set_font(), as the font chooser widget may normalize font
// names and thus return a string with a different structure. For example,
// “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”.
//
// Use pango_font_description_equal() if you want to compare two font
// descriptions.
//
// The function returns the following values:
//
//   - fontDescription (optional) for the current font, or NULL if no font is
//     selected.
func (fontchooser *FontChooser) FontDesc() *pango.FontDescription {
	var _arg0 *C.GtkFontChooser       // out
	var _cret *C.PangoFontDescription // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_desc(_arg0)
	runtime.KeepAlive(fontchooser)

	var _fontDescription *pango.FontDescription // out

	if _cret != nil {
		_fontDescription = (*pango.FontDescription)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_fontDescription)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.pango_font_description_free((*C.PangoFontDescription)(intern.C))
			},
		)
	}

	return _fontDescription
}

// FontFace gets the FontFace representing the selected font group details (i.e.
// family, slant, weight, width, etc).
//
// If the selected font is not installed, returns NULL.
//
// The function returns the following values:
//
//   - fontFace (optional) representing the selected font group details,
//     or NULL. The returned object is owned by fontchooser and must not be
//     modified or freed.
func (fontchooser *FontChooser) FontFace() pango.FontFacer {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.PangoFontFace  // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_face(_arg0)
	runtime.KeepAlive(fontchooser)

	var _fontFace pango.FontFacer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontFacer)
				return ok
			})
			rv, ok := casted.(pango.FontFacer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFacer")
			}
			_fontFace = rv
		}
	}

	return _fontFace
}

// FontFamily gets the FontFamily representing the selected font family.
// Font families are a collection of font faces.
//
// If the selected font is not installed, returns NULL.
//
// The function returns the following values:
//
//   - fontFamily (optional) representing the selected font family, or NULL.
//     The returned object is owned by fontchooser and must not be modified or
//     freed.
func (fontchooser *FontChooser) FontFamily() pango.FontFamilier {
	var _arg0 *C.GtkFontChooser  // out
	var _cret *C.PangoFontFamily // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_family(_arg0)
	runtime.KeepAlive(fontchooser)

	var _fontFamily pango.FontFamilier // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontFamilier)
				return ok
			})
			rv, ok := casted.(pango.FontFamilier)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFamilier")
			}
			_fontFamily = rv
		}
	}

	return _fontFamily
}

// FontFeatures gets the currently-selected font features.
//
// The function returns the following values:
//
//   - utf8: currently selected font features.
func (fontchooser *FontChooser) FontFeatures() string {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_features(_arg0)
	runtime.KeepAlive(fontchooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// FontMap gets the custom font map of this font chooser widget, or NULL if it
// does not have one.
//
// The function returns the following values:
//
//   - fontMap (optional) or NULL.
func (fontchooser *FontChooser) FontMap() pango.FontMapper {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.PangoFontMap   // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_map(_arg0)
	runtime.KeepAlive(fontchooser)

	var _fontMap pango.FontMapper // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.AssumeOwnership(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontMapper)
				return ok
			})
			rv, ok := casted.(pango.FontMapper)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontMapper")
			}
			_fontMap = rv
		}
	}

	return _fontMap
}

// FontSize: selected font size.
//
// The function returns the following values:
//
//   - gint: n integer representing the selected font size, or -1 if no font
//     size is selected.
func (fontchooser *FontChooser) FontSize() int {
	var _arg0 *C.GtkFontChooser // out
	var _cret C.gint            // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_font_size(_arg0)
	runtime.KeepAlive(fontchooser)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Language gets the language that is used for font features.
//
// The function returns the following values:
//
//   - utf8: currently selected language.
func (fontchooser *FontChooser) Language() string {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_language(_arg0)
	runtime.KeepAlive(fontchooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Level returns the current level of granularity for selecting fonts.
//
// The function returns the following values:
//
//   - fontChooserLevel: current granularity level.
func (fontchooser *FontChooser) Level() FontChooserLevel {
	var _arg0 *C.GtkFontChooser     // out
	var _cret C.GtkFontChooserLevel // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_level(_arg0)
	runtime.KeepAlive(fontchooser)

	var _fontChooserLevel FontChooserLevel // out

	_fontChooserLevel = FontChooserLevel(_cret)

	return _fontChooserLevel
}

// PreviewText gets the text displayed in the preview area.
//
// The function returns the following values:
//
//   - utf8: text displayed in the preview area.
func (fontchooser *FontChooser) PreviewText() string {
	var _arg0 *C.GtkFontChooser // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_preview_text(_arg0)
	runtime.KeepAlive(fontchooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// ShowPreviewEntry returns whether the preview entry is shown or not.
//
// The function returns the following values:
//
//   - ok: TRUE if the preview entry is shown or FALSE if it is hidden.
func (fontchooser *FontChooser) ShowPreviewEntry() bool {
	var _arg0 *C.GtkFontChooser // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C.gtk_font_chooser_get_show_preview_entry(_arg0)
	runtime.KeepAlive(fontchooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetFilterFunc adds a filter function that decides which fonts to display in
// the font chooser.
//
// The function takes the following parameters:
//
//   - filter (optional) or NULL.
func (fontchooser *FontChooser) SetFilterFunc(filter FontFilterFunc) {
	var _arg0 *C.GtkFontChooser   // out
	var _arg1 C.GtkFontFilterFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	if filter != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_FontFilterFunc)
		_arg2 = C.gpointer(gbox.Assign(filter))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_font_chooser_set_filter_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(filter)
}

// SetFont sets the currently-selected font.
//
// The function takes the following parameters:
//
//   - fontname: font name like “Helvetica 12” or “Times Bold 18”.
func (fontchooser *FontChooser) SetFont(fontname string) {
	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_chooser_set_font(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(fontname)
}

// SetFontDesc sets the currently-selected font from font_desc.
//
// The function takes the following parameters:
//
//   - fontDesc: FontDescription.
func (fontchooser *FontChooser) SetFontDesc(fontDesc *pango.FontDescription) {
	var _arg0 *C.GtkFontChooser       // out
	var _arg1 *C.PangoFontDescription // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	_arg1 = (*C.PangoFontDescription)(gextras.StructNative(unsafe.Pointer(fontDesc)))

	C.gtk_font_chooser_set_font_desc(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(fontDesc)
}

// SetFontMap sets a custom font map to use for this font chooser widget.
// A custom font map can be used to present application-specific fonts instead
// of or in addition to the normal system fonts.
//
//	FcConfig *config;
//	PangoFontMap *fontmap;
//
//	config = FcInitLoadConfigAndFonts ();
//	FcConfigAppFontAddFile (config, my_app_font_file);
//
//	fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
//	pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (fontmap), config);
//
//	gtk_font_chooser_set_font_map (font_chooser, fontmap);
//
// Note that other GTK+ widgets will only be able to use the
// application-specific font if it is present in the font map they use:
//
//	context = gtk_widget_get_pango_context (label);
//	pango_context_set_font_map (context, fontmap);.
//
// The function takes the following parameters:
//
//   - fontmap (optional): FontMap.
func (fontchooser *FontChooser) SetFontMap(fontmap pango.FontMapper) {
	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.PangoFontMap   // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	if fontmap != nil {
		_arg1 = (*C.PangoFontMap)(unsafe.Pointer(coreglib.InternObject(fontmap).Native()))
	}

	C.gtk_font_chooser_set_font_map(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(fontmap)
}

// SetLanguage sets the language to use for font features.
//
// The function takes the following parameters:
//
//   - language: language.
func (fontchooser *FontChooser) SetLanguage(language string) {
	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.char           // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(language)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_chooser_set_language(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(language)
}

// SetLevel sets the desired level of granularity for selecting fonts.
//
// The function takes the following parameters:
//
//   - level: desired level of granularity.
func (fontchooser *FontChooser) SetLevel(level FontChooserLevel) {
	var _arg0 *C.GtkFontChooser     // out
	var _arg1 C.GtkFontChooserLevel // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	_arg1 = C.GtkFontChooserLevel(level)

	C.gtk_font_chooser_set_level(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(level)
}

// SetPreviewText sets the text displayed in the preview area. The text is used
// to show how the selected font looks.
//
// The function takes the following parameters:
//
//   - text to display in the preview area.
func (fontchooser *FontChooser) SetPreviewText(text string) {
	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_chooser_set_preview_text(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(text)
}

// SetShowPreviewEntry shows or hides the editable preview entry.
//
// The function takes the following parameters:
//
//   - showPreviewEntry: whether to show the editable preview entry or not.
func (fontchooser *FontChooser) SetShowPreviewEntry(showPreviewEntry bool) {
	var _arg0 *C.GtkFontChooser // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	if showPreviewEntry {
		_arg1 = C.TRUE
	}

	C.gtk_font_chooser_set_show_preview_entry(_arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(showPreviewEntry)
}

func (chooser *FontChooser) fontActivated(fontname string) {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.font_activated

	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_FontChooser_virtual_font_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(fontname)
}

// fontFace gets the FontFace representing the selected font group details (i.e.
// family, slant, weight, width, etc).
//
// If the selected font is not installed, returns NULL.
//
// The function returns the following values:
//
//   - fontFace (optional) representing the selected font group details,
//     or NULL. The returned object is owned by fontchooser and must not be
//     modified or freed.
func (fontchooser *FontChooser) fontFace() pango.FontFacer {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.get_font_face

	var _arg0 *C.GtkFontChooser // out
	var _cret *C.PangoFontFace  // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C._gotk4_gtk3_FontChooser_virtual_get_font_face(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(fontchooser)

	var _fontFace pango.FontFacer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontFacer)
				return ok
			})
			rv, ok := casted.(pango.FontFacer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFacer")
			}
			_fontFace = rv
		}
	}

	return _fontFace
}

// fontFamily gets the FontFamily representing the selected font family.
// Font families are a collection of font faces.
//
// If the selected font is not installed, returns NULL.
//
// The function returns the following values:
//
//   - fontFamily (optional) representing the selected font family, or NULL.
//     The returned object is owned by fontchooser and must not be modified or
//     freed.
func (fontchooser *FontChooser) fontFamily() pango.FontFamilier {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.get_font_family

	var _arg0 *C.GtkFontChooser  // out
	var _cret *C.PangoFontFamily // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C._gotk4_gtk3_FontChooser_virtual_get_font_family(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(fontchooser)

	var _fontFamily pango.FontFamilier // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontFamilier)
				return ok
			})
			rv, ok := casted.(pango.FontFamilier)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFamilier")
			}
			_fontFamily = rv
		}
	}

	return _fontFamily
}

// fontMap gets the custom font map of this font chooser widget, or NULL if it
// does not have one.
//
// The function returns the following values:
//
//   - fontMap (optional) or NULL.
func (fontchooser *FontChooser) fontMap() pango.FontMapper {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.get_font_map

	var _arg0 *C.GtkFontChooser // out
	var _cret *C.PangoFontMap   // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C._gotk4_gtk3_FontChooser_virtual_get_font_map(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(fontchooser)

	var _fontMap pango.FontMapper // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.AssumeOwnership(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontMapper)
				return ok
			})
			rv, ok := casted.(pango.FontMapper)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontMapper")
			}
			_fontMap = rv
		}
	}

	return _fontMap
}

// fontSize: selected font size.
//
// The function returns the following values:
//
//   - gint: n integer representing the selected font size, or -1 if no font
//     size is selected.
func (fontchooser *FontChooser) fontSize() int {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.get_font_size

	var _arg0 *C.GtkFontChooser // out
	var _cret C.gint            // in

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))

	_cret = C._gotk4_gtk3_FontChooser_virtual_get_font_size(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(fontchooser)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// setFilterFunc adds a filter function that decides which fonts to display in
// the font chooser.
//
// The function takes the following parameters:
//
//   - filter (optional) or NULL.
func (fontchooser *FontChooser) setFilterFunc(filter FontFilterFunc) {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.set_filter_func

	var _arg0 *C.GtkFontChooser   // out
	var _arg1 C.GtkFontFilterFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	if filter != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_FontFilterFunc)
		_arg2 = C.gpointer(gbox.Assign(filter))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C._gotk4_gtk3_FontChooser_virtual_set_filter_func(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(filter)
}

// setFontMap sets a custom font map to use for this font chooser widget.
// A custom font map can be used to present application-specific fonts instead
// of or in addition to the normal system fonts.
//
//	FcConfig *config;
//	PangoFontMap *fontmap;
//
//	config = FcInitLoadConfigAndFonts ();
//	FcConfigAppFontAddFile (config, my_app_font_file);
//
//	fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
//	pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (fontmap), config);
//
//	gtk_font_chooser_set_font_map (font_chooser, fontmap);
//
// Note that other GTK+ widgets will only be able to use the
// application-specific font if it is present in the font map they use:
//
//	context = gtk_widget_get_pango_context (label);
//	pango_context_set_font_map (context, fontmap);.
//
// The function takes the following parameters:
//
//   - fontmap (optional): FontMap.
func (fontchooser *FontChooser) setFontMap(fontmap pango.FontMapper) {
	gclass := (*C.GtkFontChooserIface)(coreglib.PeekParentClass(fontchooser))
	fnarg := gclass.set_font_map

	var _arg0 *C.GtkFontChooser // out
	var _arg1 *C.PangoFontMap   // out

	_arg0 = (*C.GtkFontChooser)(unsafe.Pointer(coreglib.InternObject(fontchooser).Native()))
	if fontmap != nil {
		_arg1 = (*C.PangoFontMap)(unsafe.Pointer(coreglib.InternObject(fontmap).Native()))
	}

	C._gotk4_gtk3_FontChooser_virtual_set_font_map(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(fontchooser)
	runtime.KeepAlive(fontmap)
}

// OrientableOverrider contains methods that are overridable.
type OrientableOverrider interface {
}

// Orientable interface is implemented by all widgets that can be oriented
// horizontally or vertically. Historically, such widgets have been realized as
// subclasses of a common base class (e.g Box/HBox/VBox or Scale/HScale/VScale).
// Orientable is more flexible in that it allows the orientation to be changed
// at runtime, allowing the widgets to “flip”.
//
// Orientable was introduced in GTK+ 2.16.
//
// Orientable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Orientable struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Orientable)(nil)
)

// Orientabler describes Orientable's interface methods.
type Orientabler interface {
	coreglib.Objector

	// Orientation retrieves the orientation of the orientable.
	Orientation() Orientation
	// SetOrientation sets the orientation of the orientable.
	SetOrientation(orientation Orientation)
}

var _ Orientabler = (*Orientable)(nil)

func ifaceInitOrientabler(gifacePtr, data C.gpointer) {
}

func wrapOrientable(obj *coreglib.Object) *Orientable {
	return &Orientable{
		Object: obj,
	}
}

func marshalOrientable(p uintptr) (interface{}, error) {
	return wrapOrientable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Orientation retrieves the orientation of the orientable.
//
// The function returns the following values:
//
//   - orientation of the orientable.
func (orientable *Orientable) Orientation() Orientation {
	var _arg0 *C.GtkOrientable // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkOrientable)(unsafe.Pointer(coreglib.InternObject(orientable).Native()))

	_cret = C.gtk_orientable_get_orientation(_arg0)
	runtime.KeepAlive(orientable)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// SetOrientation sets the orientation of the orientable.
//
// The function takes the following parameters:
//
//   - orientation orientable’s new orientation.
func (orientable *Orientable) SetOrientation(orientation Orientation) {
	var _arg0 *C.GtkOrientable // out
	var _arg1 C.GtkOrientation // out

	_arg0 = (*C.GtkOrientable)(unsafe.Pointer(coreglib.InternObject(orientable).Native()))
	_arg1 = C.GtkOrientation(orientation)

	C.gtk_orientable_set_orientation(_arg0, _arg1)
	runtime.KeepAlive(orientable)
	runtime.KeepAlive(orientation)
}

// PrintOperationPreview wraps an interface. This means the user can get the
// underlying type by calling Cast().
type PrintOperationPreview struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*PrintOperationPreview)(nil)
)

// PrintOperationPreviewer describes PrintOperationPreview's interface methods.
type PrintOperationPreviewer interface {
	coreglib.Objector

	// EndPreview ends a preview.
	EndPreview()
	// IsSelected returns whether the given page is included in the set of pages
	// that have been selected for printing.
	IsSelected(pageNr int) bool
	// RenderPage renders a page to the preview, using the print context that
	// was passed to the PrintOperation::preview handler together with preview.
	RenderPage(pageNr int)

	// Got-page-size signal is emitted once for each page that gets rendered to
	// the preview.
	ConnectGotPageSize(func(context *PrintContext, pageSetup *PageSetup)) coreglib.SignalHandle
	// Ready signal gets emitted once per preview operation, before the first
	// page is rendered.
	ConnectReady(func(context *PrintContext)) coreglib.SignalHandle
}

var _ PrintOperationPreviewer = (*PrintOperationPreview)(nil)

func wrapPrintOperationPreview(obj *coreglib.Object) *PrintOperationPreview {
	return &PrintOperationPreview{
		Object: obj,
	}
}

func marshalPrintOperationPreview(p uintptr) (interface{}, error) {
	return wrapPrintOperationPreview(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectGotPageSize signal is emitted once for each page that gets rendered to
// the preview.
//
// A handler for this signal should update the context according
// to page_setup and set up a suitable cairo context, using
// gtk_print_context_set_cairo_context().
func (preview *PrintOperationPreview) ConnectGotPageSize(f func(context *PrintContext, pageSetup *PageSetup)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(preview, "got-page-size", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperationPreview_ConnectGotPageSize), f)
}

// ConnectReady signal gets emitted once per preview operation, before the first
// page is rendered.
//
// A handler for this signal can be used for setup tasks.
func (preview *PrintOperationPreview) ConnectReady(f func(context *PrintContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(preview, "ready", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperationPreview_ConnectReady), f)
}

// EndPreview ends a preview.
//
// This function must be called to finish a custom print preview.
func (preview *PrintOperationPreview) EndPreview() {
	var _arg0 *C.GtkPrintOperationPreview // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))

	C.gtk_print_operation_preview_end_preview(_arg0)
	runtime.KeepAlive(preview)
}

// IsSelected returns whether the given page is included in the set of pages
// that have been selected for printing.
//
// The function takes the following parameters:
//
//   - pageNr: page number.
//
// The function returns the following values:
//
//   - ok: TRUE if the page has been selected for printing.
func (preview *PrintOperationPreview) IsSelected(pageNr int) bool {
	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 C.gint                      // out
	var _cret C.gboolean                  // in

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = C.gint(pageNr)

	_cret = C.gtk_print_operation_preview_is_selected(_arg0, _arg1)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(pageNr)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RenderPage renders a page to the preview, using the print context that was
// passed to the PrintOperation::preview handler together with preview.
//
// A custom iprint preview should use this function in its ::expose handler to
// render the currently selected page.
//
// Note that this function requires a suitable cairo context to be associated
// with the print context.
//
// The function takes the following parameters:
//
//   - pageNr: page to render.
func (preview *PrintOperationPreview) RenderPage(pageNr int) {
	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 C.gint                      // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = C.gint(pageNr)

	C.gtk_print_operation_preview_render_page(_arg0, _arg1)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(pageNr)
}

// endPreview ends a preview.
//
// This function must be called to finish a custom print preview.
func (preview *PrintOperationPreview) endPreview() {
	gclass := (*C.GtkPrintOperationPreviewIface)(coreglib.PeekParentClass(preview))
	fnarg := gclass.end_preview

	var _arg0 *C.GtkPrintOperationPreview // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))

	C._gotk4_gtk3_PrintOperationPreview_virtual_end_preview(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(preview)
}

// The function takes the following parameters:
//
//   - context
//   - pageSetup
func (preview *PrintOperationPreview) gotPageSize(context *PrintContext, pageSetup *PageSetup) {
	gclass := (*C.GtkPrintOperationPreviewIface)(coreglib.PeekParentClass(preview))
	fnarg := gclass.got_page_size

	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 *C.GtkPrintContext          // out
	var _arg2 *C.GtkPageSetup             // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(pageSetup).Native()))

	C._gotk4_gtk3_PrintOperationPreview_virtual_got_page_size(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(context)
	runtime.KeepAlive(pageSetup)
}

// isSelected returns whether the given page is included in the set of pages
// that have been selected for printing.
//
// The function takes the following parameters:
//
//   - pageNr: page number.
//
// The function returns the following values:
//
//   - ok: TRUE if the page has been selected for printing.
func (preview *PrintOperationPreview) isSelected(pageNr int) bool {
	gclass := (*C.GtkPrintOperationPreviewIface)(coreglib.PeekParentClass(preview))
	fnarg := gclass.is_selected

	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 C.gint                      // out
	var _cret C.gboolean                  // in

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = C.gint(pageNr)

	_cret = C._gotk4_gtk3_PrintOperationPreview_virtual_is_selected(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(pageNr)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (preview *PrintOperationPreview) ready(context *PrintContext) {
	gclass := (*C.GtkPrintOperationPreviewIface)(coreglib.PeekParentClass(preview))
	fnarg := gclass.ready

	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 *C.GtkPrintContext          // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_PrintOperationPreview_virtual_ready(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(context)
}

// renderPage renders a page to the preview, using the print context that was
// passed to the PrintOperation::preview handler together with preview.
//
// A custom iprint preview should use this function in its ::expose handler to
// render the currently selected page.
//
// Note that this function requires a suitable cairo context to be associated
// with the print context.
//
// The function takes the following parameters:
//
//   - pageNr: page to render.
func (preview *PrintOperationPreview) renderPage(pageNr int) {
	gclass := (*C.GtkPrintOperationPreviewIface)(coreglib.PeekParentClass(preview))
	fnarg := gclass.render_page

	var _arg0 *C.GtkPrintOperationPreview // out
	var _arg1 C.gint                      // out

	_arg0 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg1 = C.gint(pageNr)

	C._gotk4_gtk3_PrintOperationPreview_virtual_render_page(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(pageNr)
}

// RecentChooser is an interface that can be implemented by widgets
// displaying the list of recently used files. In GTK+, the main objects that
// implement this interface are RecentChooserWidget, RecentChooserDialog and
// RecentChooserMenu.
//
// Recently used files are supported since GTK+ 2.10.
//
// RecentChooser wraps an interface. This means the user can get the
// underlying type by calling Cast().
type RecentChooser struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*RecentChooser)(nil)
)

// RecentChooserer describes RecentChooser's interface methods.
type RecentChooserer interface {
	coreglib.Objector

	// AddFilter adds filter to the list of RecentFilter objects held by
	// chooser.
	AddFilter(filter *RecentFilter)
	// CurrentItem gets the RecentInfo currently selected by chooser.
	CurrentItem() *RecentInfo
	// CurrentURI gets the URI currently selected by chooser.
	CurrentURI() string
	// Filter gets the RecentFilter object currently used by chooser to affect
	// the display of the recently used resources.
	Filter() *RecentFilter
	// Items gets the list of recently used resources in form of RecentInfo
	// objects.
	Items() []*RecentInfo
	// Limit gets the number of items returned by gtk_recent_chooser_get_items()
	// and gtk_recent_chooser_get_uris().
	Limit() int
	// LocalOnly gets whether only local resources should be shown in the
	// recently used resources selector.
	LocalOnly() bool
	// SelectMultiple gets whether chooser can select multiple items.
	SelectMultiple() bool
	// ShowIcons retrieves whether chooser should show an icon near the
	// resource.
	ShowIcons() bool
	// ShowNotFound retrieves whether chooser should show the recently used
	// resources that were not found.
	ShowNotFound() bool
	// ShowPrivate returns whether chooser should display recently used
	// resources registered as private.
	ShowPrivate() bool
	// ShowTips gets whether chooser should display tooltips containing the full
	// path of a recently user resource.
	ShowTips() bool
	// SortType gets the value set by gtk_recent_chooser_set_sort_type().
	SortType() RecentSortType
	// URIs gets the URI of the recently used resources.
	URIs() []string
	// ListFilters gets the RecentFilter objects held by chooser.
	ListFilters() []*RecentFilter
	// RemoveFilter removes filter from the list of RecentFilter objects held by
	// chooser.
	RemoveFilter(filter *RecentFilter)
	// SelectAll selects all the items inside chooser, if the chooser supports
	// multiple selection.
	SelectAll()
	// SelectURI selects uri inside chooser.
	SelectURI(uri string) error
	// SetCurrentURI sets uri as the current URI for chooser.
	SetCurrentURI(uri string) error
	// SetFilter sets filter as the current RecentFilter object used by chooser
	// to affect the displayed recently used resources.
	SetFilter(filter *RecentFilter)
	// SetLimit sets the number of items that should be returned by
	// gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().
	SetLimit(limit int)
	// SetLocalOnly sets whether only local resources, that is resources using
	// the file:// URI scheme, should be shown in the recently used resources
	// selector.
	SetLocalOnly(localOnly bool)
	// SetSelectMultiple sets whether chooser can select multiple items.
	SetSelectMultiple(selectMultiple bool)
	// SetShowIcons sets whether chooser should show an icon near the resource
	// when displaying it.
	SetShowIcons(showIcons bool)
	// SetShowNotFound sets whether chooser should display the recently used
	// resources that it didn’t find.
	SetShowNotFound(showNotFound bool)
	// SetShowPrivate: whether to show recently used resources marked registered
	// as private.
	SetShowPrivate(showPrivate bool)
	// SetShowTips sets whether to show a tooltips containing the full path of
	// each recently used resource in a RecentChooser widget.
	SetShowTips(showTips bool)
	// SetSortFunc sets the comparison function used when sorting to be
	// sort_func.
	SetSortFunc(sortFunc RecentSortFunc)
	// SetSortType changes the sorting order of the recently used resources list
	// displayed by chooser.
	SetSortType(sortType RecentSortType)
	// UnselectAll unselects all the items inside chooser.
	UnselectAll()
	// UnselectURI unselects uri inside chooser.
	UnselectURI(uri string)

	// Item-activated: this signal is emitted when the user "activates" a recent
	// item in the recent chooser.
	ConnectItemActivated(func()) coreglib.SignalHandle
	// Selection-changed: this signal is emitted when there is a change in the
	// set of selected recently used resources.
	ConnectSelectionChanged(func()) coreglib.SignalHandle
}

var _ RecentChooserer = (*RecentChooser)(nil)

func wrapRecentChooser(obj *coreglib.Object) *RecentChooser {
	return &RecentChooser{
		Object: obj,
	}
}

func marshalRecentChooser(p uintptr) (interface{}, error) {
	return wrapRecentChooser(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectItemActivated: this signal is emitted when the user "activates" a
// recent item in the recent chooser. This can happen by double-clicking on an
// item in the recently used resources list, or by pressing Enter.
func (chooser *RecentChooser) ConnectItemActivated(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "item-activated", false, unsafe.Pointer(C._gotk4_gtk3_RecentChooser_ConnectItemActivated), f)
}

// ConnectSelectionChanged: this signal is emitted when there is a change in the
// set of selected recently used resources. This can happen when a user modifies
// the selection with the mouse or the keyboard, or when explicitly calling
// functions to change the selection.
func (chooser *RecentChooser) ConnectSelectionChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(chooser, "selection-changed", false, unsafe.Pointer(C._gotk4_gtk3_RecentChooser_ConnectSelectionChanged), f)
}

// AddFilter adds filter to the list of RecentFilter objects held by chooser.
//
// If no previous filter objects were defined, this function will call
// gtk_recent_chooser_set_filter().
//
// The function takes the following parameters:
//
//   - filter: RecentFilter.
func (chooser *RecentChooser) AddFilter(filter *RecentFilter) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.GtkRecentFilter  // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_recent_chooser_add_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// CurrentItem gets the RecentInfo currently selected by chooser.
//
// The function returns the following values:
//
//   - recentInfo: RecentInfo. Use gtk_recent_info_unref() when when you have
//     finished using it.
func (chooser *RecentChooser) CurrentItem() *RecentInfo {
	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GtkRecentInfo    // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_current_item(_arg0)
	runtime.KeepAlive(chooser)

	var _recentInfo *RecentInfo // out

	_recentInfo = (*RecentInfo)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_recentInfo)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_recent_info_unref((*C.GtkRecentInfo)(intern.C))
		},
	)

	return _recentInfo
}

// CurrentURI gets the URI currently selected by chooser.
//
// The function returns the following values:
//
//   - utf8: newly allocated string holding a URI.
func (chooser *RecentChooser) CurrentURI() string {
	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_current_uri(_arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Filter gets the RecentFilter object currently used by chooser to affect the
// display of the recently used resources.
//
// The function returns the following values:
//
//   - recentFilter: RecentFilter object.
func (chooser *RecentChooser) Filter() *RecentFilter {
	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GtkRecentFilter  // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_filter(_arg0)
	runtime.KeepAlive(chooser)

	var _recentFilter *RecentFilter // out

	_recentFilter = wrapRecentFilter(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentFilter
}

// Items gets the list of recently used resources in form of RecentInfo objects.
//
// The return value of this function is affected by the “sort-type” and “limit”
// properties of chooser.
//
// The function returns the following values:
//
//   - list: newly allocated list of RecentInfo objects. You should use
//     gtk_recent_info_unref() on every item of the list, and then free the list
//     itself using g_list_free().
func (chooser *RecentChooser) Items() []*RecentInfo {
	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GList            // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_items(_arg0)
	runtime.KeepAlive(chooser)

	var _list []*RecentInfo // out

	_list = make([]*RecentInfo, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkRecentInfo)(v)
		var dst *RecentInfo // out
		dst = (*RecentInfo)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_recent_info_unref((*C.GtkRecentInfo)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _list
}

// Limit gets the number of items returned by gtk_recent_chooser_get_items() and
// gtk_recent_chooser_get_uris().
//
// The function returns the following values:
//
//   - gint: positive integer, or -1 meaning that all items are returned.
func (chooser *RecentChooser) Limit() int {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_limit(_arg0)
	runtime.KeepAlive(chooser)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// LocalOnly gets whether only local resources should be shown in the recently
// used resources selector. See gtk_recent_chooser_set_local_only().
//
// The function returns the following values:
//
//   - ok: TRUE if only local resources should be shown.
func (chooser *RecentChooser) LocalOnly() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_local_only(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SelectMultiple gets whether chooser can select multiple items.
//
// The function returns the following values:
//
//   - ok: TRUE if chooser can select more than one item.
func (chooser *RecentChooser) SelectMultiple() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_select_multiple(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowIcons retrieves whether chooser should show an icon near the resource.
//
// The function returns the following values:
//
//   - ok: TRUE if the icons should be displayed, FALSE otherwise.
func (chooser *RecentChooser) ShowIcons() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_show_icons(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowNotFound retrieves whether chooser should show the recently used
// resources that were not found.
//
// The function returns the following values:
//
//   - ok: TRUE if the resources not found should be displayed, and FALSE
//     otheriwse.
func (chooser *RecentChooser) ShowNotFound() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_show_not_found(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowPrivate returns whether chooser should display recently used resources
// registered as private.
//
// The function returns the following values:
//
//   - ok: TRUE if the recent chooser should show private items, FALSE
//     otherwise.
func (chooser *RecentChooser) ShowPrivate() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_show_private(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowTips gets whether chooser should display tooltips containing the full
// path of a recently user resource.
//
// The function returns the following values:
//
//   - ok: TRUE if the recent chooser should show tooltips, FALSE otherwise.
func (chooser *RecentChooser) ShowTips() bool {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_show_tips(_arg0)
	runtime.KeepAlive(chooser)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SortType gets the value set by gtk_recent_chooser_set_sort_type().
//
// The function returns the following values:
//
//   - recentSortType: sorting order of the chooser.
func (chooser *RecentChooser) SortType() RecentSortType {
	var _arg0 *C.GtkRecentChooser // out
	var _cret C.GtkRecentSortType // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_sort_type(_arg0)
	runtime.KeepAlive(chooser)

	var _recentSortType RecentSortType // out

	_recentSortType = RecentSortType(_cret)

	return _recentSortType
}

// URIs gets the URI of the recently used resources.
//
// The return value of this function is affected by the “sort-type” and “limit”
// properties of chooser.
//
// Since the returned array is NULL terminated, length may be NULL.
//
// The function returns the following values:
//
//   - utf8s: A newly allocated, NULL-terminated array of strings. Use
//     g_strfreev() to free it.
func (chooser *RecentChooser) URIs() []string {
	var _arg0 *C.GtkRecentChooser // out
	var _cret **C.gchar           // in
	var _arg1 C.gsize             // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_get_uris(_arg0, &_arg1)
	runtime.KeepAlive(chooser)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		src := unsafe.Slice((**C.gchar)(_cret), _arg1)
		_utf8s = make([]string, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// ListFilters gets the RecentFilter objects held by chooser.
//
// The function returns the following values:
//
//   - sList: singly linked list of RecentFilter objects. You should just free
//     the returned list using g_slist_free().
func (chooser *RecentChooser) ListFilters() []*RecentFilter {
	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GSList           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C.gtk_recent_chooser_list_filters(_arg0)
	runtime.KeepAlive(chooser)

	var _sList []*RecentFilter // out

	_sList = make([]*RecentFilter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkRecentFilter)(v)
		var dst *RecentFilter // out
		dst = wrapRecentFilter(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// RemoveFilter removes filter from the list of RecentFilter objects held by
// chooser.
//
// The function takes the following parameters:
//
//   - filter: RecentFilter.
func (chooser *RecentChooser) RemoveFilter(filter *RecentFilter) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.GtkRecentFilter  // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_recent_chooser_remove_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// SelectAll selects all the items inside chooser, if the chooser supports
// multiple selection.
func (chooser *RecentChooser) SelectAll() {
	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C.gtk_recent_chooser_select_all(_arg0)
	runtime.KeepAlive(chooser)
}

// SelectURI selects uri inside chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) SelectURI(uri string) error {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_chooser_select_uri(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetCurrentURI sets uri as the current URI for chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) SetCurrentURI(uri string) error {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_chooser_set_current_uri(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetFilter sets filter as the current RecentFilter object used by chooser to
// affect the displayed recently used resources.
//
// The function takes the following parameters:
//
//   - filter (optional): RecentFilter.
func (chooser *RecentChooser) SetFilter(filter *RecentFilter) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.GtkRecentFilter  // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if filter != nil {
		_arg1 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	}

	C.gtk_recent_chooser_set_filter(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// SetLimit sets the number of items that should be returned by
// gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().
//
// The function takes the following parameters:
//
//   - limit: positive integer, or -1 for all items.
func (chooser *RecentChooser) SetLimit(limit int) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gint              // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = C.gint(limit)

	C.gtk_recent_chooser_set_limit(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(limit)
}

// SetLocalOnly sets whether only local resources, that is resources using the
// file:// URI scheme, should be shown in the recently used resources selector.
// If local_only is TRUE (the default) then the shown resources are guaranteed
// to be accessible through the operating system native file system.
//
// The function takes the following parameters:
//
//   - localOnly: TRUE if only local files can be shown.
func (chooser *RecentChooser) SetLocalOnly(localOnly bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if localOnly {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_local_only(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(localOnly)
}

// SetSelectMultiple sets whether chooser can select multiple items.
//
// The function takes the following parameters:
//
//   - selectMultiple: TRUE if chooser can select more than one item.
func (chooser *RecentChooser) SetSelectMultiple(selectMultiple bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if selectMultiple {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_select_multiple(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(selectMultiple)
}

// SetShowIcons sets whether chooser should show an icon near the resource when
// displaying it.
//
// The function takes the following parameters:
//
//   - showIcons: whether to show an icon near the resource.
func (chooser *RecentChooser) SetShowIcons(showIcons bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if showIcons {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_show_icons(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(showIcons)
}

// SetShowNotFound sets whether chooser should display the recently used
// resources that it didn’t find. This only applies to local resources.
//
// The function takes the following parameters:
//
//   - showNotFound: whether to show the local items we didn’t find.
func (chooser *RecentChooser) SetShowNotFound(showNotFound bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if showNotFound {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_show_not_found(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(showNotFound)
}

// SetShowPrivate: whether to show recently used resources marked registered as
// private.
//
// The function takes the following parameters:
//
//   - showPrivate: TRUE to show private items, FALSE otherwise.
func (chooser *RecentChooser) SetShowPrivate(showPrivate bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if showPrivate {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_show_private(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(showPrivate)
}

// SetShowTips sets whether to show a tooltips containing the full path of each
// recently used resource in a RecentChooser widget.
//
// The function takes the following parameters:
//
//   - showTips: TRUE if tooltips should be shown.
func (chooser *RecentChooser) SetShowTips(showTips bool) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	if showTips {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_set_show_tips(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(showTips)
}

// SetSortFunc sets the comparison function used when sorting to be sort_func.
// If the chooser has the sort type set to K_RECENT_SORT_CUSTOM then the chooser
// will sort using this function.
//
// To the comparison function will be passed two RecentInfo structs and
// sort_data; sort_func should return a positive integer if the first item comes
// before the second, zero if the two items are equal and a negative integer if
// the first item comes after the second.
//
// The function takes the following parameters:
//
//   - sortFunc: comparison function.
func (chooser *RecentChooser) SetSortFunc(sortFunc RecentSortFunc) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.GtkRecentSortFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_RecentSortFunc)
	_arg2 = C.gpointer(gbox.Assign(sortFunc))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_recent_chooser_set_sort_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(sortFunc)
}

// SetSortType changes the sorting order of the recently used resources list
// displayed by chooser.
//
// The function takes the following parameters:
//
//   - sortType: sort order that the chooser should use.
func (chooser *RecentChooser) SetSortType(sortType RecentSortType) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.GtkRecentSortType // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = C.GtkRecentSortType(sortType)

	C.gtk_recent_chooser_set_sort_type(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(sortType)
}

// UnselectAll unselects all the items inside chooser.
func (chooser *RecentChooser) UnselectAll() {
	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C.gtk_recent_chooser_unselect_all(_arg0)
	runtime.KeepAlive(chooser)
}

// UnselectURI unselects uri inside chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) UnselectURI(uri string) {
	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_chooser_unselect_uri(_arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)
}

// addFilter adds filter to the list of RecentFilter objects held by chooser.
//
// If no previous filter objects were defined, this function will call
// gtk_recent_chooser_set_filter().
//
// The function takes the following parameters:
//
//   - filter: RecentFilter.
func (chooser *RecentChooser) addFilter(filter *RecentFilter) {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.add_filter

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.GtkRecentFilter  // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_add_filter(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// currentURI gets the URI currently selected by chooser.
//
// The function returns the following values:
//
//   - utf8: newly allocated string holding a URI.
func (chooser *RecentChooser) currentURI() string {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.get_current_uri

	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C._gotk4_gtk3_RecentChooser_virtual_get_current_uri(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Items gets the list of recently used resources in form of RecentInfo objects.
//
// The return value of this function is affected by the “sort-type” and “limit”
// properties of chooser.
//
// The function returns the following values:
//
//   - list: newly allocated list of RecentInfo objects. You should use
//     gtk_recent_info_unref() on every item of the list, and then free the list
//     itself using g_list_free().
func (chooser *RecentChooser) items() []*RecentInfo {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.get_items

	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GList            // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C._gotk4_gtk3_RecentChooser_virtual_get_items(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)

	var _list []*RecentInfo // out

	_list = make([]*RecentInfo, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkRecentInfo)(v)
		var dst *RecentInfo // out
		dst = (*RecentInfo)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_recent_info_unref((*C.GtkRecentInfo)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _list
}

// itemActivated: signal emitted when the user “activates” a recent item in the
// recent chooser.
func (chooser *RecentChooser) itemActivated() {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.item_activated

	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_item_activated(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)
}

// listFilters gets the RecentFilter objects held by chooser.
//
// The function returns the following values:
//
//   - sList: singly linked list of RecentFilter objects. You should just free
//     the returned list using g_slist_free().
func (chooser *RecentChooser) listFilters() []*RecentFilter {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.list_filters

	var _arg0 *C.GtkRecentChooser // out
	var _cret *C.GSList           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	_cret = C._gotk4_gtk3_RecentChooser_virtual_list_filters(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)

	var _sList []*RecentFilter // out

	_sList = make([]*RecentFilter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkRecentFilter)(v)
		var dst *RecentFilter // out
		dst = wrapRecentFilter(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// removeFilter removes filter from the list of RecentFilter objects held by
// chooser.
//
// The function takes the following parameters:
//
//   - filter: RecentFilter.
func (chooser *RecentChooser) removeFilter(filter *RecentFilter) {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.remove_filter

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.GtkRecentFilter  // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_remove_filter(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(filter)
}

// selectAll selects all the items inside chooser, if the chooser supports
// multiple selection.
func (chooser *RecentChooser) selectAll() {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.select_all

	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_select_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)
}

// selectURI selects uri inside chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) selectURI(uri string) error {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.select_uri

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_RecentChooser_virtual_select_uri(unsafe.Pointer(fnarg), _arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// selectionChanged: signal emitted when there is a change in the set of
// selected recently used resources.
func (chooser *RecentChooser) selectionChanged() {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.selection_changed

	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_selection_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)
}

// setCurrentURI sets uri as the current URI for chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) setCurrentURI(uri string) error {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.set_current_uri

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_RecentChooser_virtual_set_current_uri(unsafe.Pointer(fnarg), _arg0, _arg1, &_cerr)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// setSortFunc sets the comparison function used when sorting to be sort_func.
// If the chooser has the sort type set to K_RECENT_SORT_CUSTOM then the chooser
// will sort using this function.
//
// To the comparison function will be passed two RecentInfo structs and
// sort_data; sort_func should return a positive integer if the first item comes
// before the second, zero if the two items are equal and a negative integer if
// the first item comes after the second.
//
// The function takes the following parameters:
//
//   - sortFunc: comparison function.
func (chooser *RecentChooser) setSortFunc(sortFunc RecentSortFunc) {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.set_sort_func

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 C.GtkRecentSortFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_RecentSortFunc)
	_arg2 = C.gpointer(gbox.Assign(sortFunc))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C._gotk4_gtk3_RecentChooser_virtual_set_sort_func(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(sortFunc)
}

// unselectAll unselects all the items inside chooser.
func (chooser *RecentChooser) unselectAll() {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.unselect_all

	var _arg0 *C.GtkRecentChooser // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))

	C._gotk4_gtk3_RecentChooser_virtual_unselect_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(chooser)
}

// unselectURI unselects uri inside chooser.
//
// The function takes the following parameters:
//
//   - uri: URI.
func (chooser *RecentChooser) unselectURI(uri string) {
	gclass := (*C.GtkRecentChooserIface)(coreglib.PeekParentClass(chooser))
	fnarg := gclass.unselect_uri

	var _arg0 *C.GtkRecentChooser // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkRecentChooser)(unsafe.Pointer(coreglib.InternObject(chooser).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_RecentChooser_virtual_unselect_uri(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(chooser)
	runtime.KeepAlive(uri)
}

// Scrollable is an interface that is implemented by widgets with native
// scrolling ability.
//
// To implement this interface you should override the Scrollable:hadjustment
// and Scrollable:vadjustment properties.
//
// # Creating a scrollable widget
//
// All scrollable widgets should do the following.
//
// - When a parent widget sets the scrollable child widget’s adjustments, the
// widget should populate the adjustments’ Adjustment:lower, Adjustment:upper,
// Adjustment:step-increment, Adjustment:page-increment and Adjustment:page-size
// properties and connect to the Adjustment::value-changed signal.
//
// - Because its preferred size is the size for a fully expanded widget, the
// scrollable widget must be able to cope with underallocations. This means that
// it must accept any value passed to its WidgetClass.size_allocate() function.
//
// - When the parent allocates space to the scrollable child widget, the widget
// should update the adjustments’ properties with new values.
//
// - When any of the adjustments emits the Adjustment::value-changed signal,
// the scrollable widget should scroll its contents.
//
// Scrollable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type Scrollable struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Scrollable)(nil)
)

// Scrollabler describes Scrollable's interface methods.
type Scrollabler interface {
	coreglib.Objector

	// Border returns the size of a non-scrolling border around the outside of
	// the scrollable.
	Border() (*Border, bool)
	// HAdjustment retrieves the Adjustment used for horizontal scrolling.
	HAdjustment() *Adjustment
	// HScrollPolicy gets the horizontal ScrollablePolicy.
	HScrollPolicy() ScrollablePolicy
	// VAdjustment retrieves the Adjustment used for vertical scrolling.
	VAdjustment() *Adjustment
	// VScrollPolicy gets the vertical ScrollablePolicy.
	VScrollPolicy() ScrollablePolicy
	// SetHAdjustment sets the horizontal adjustment of the Scrollable.
	SetHAdjustment(hadjustment *Adjustment)
	// SetHScrollPolicy sets the ScrollablePolicy to determine whether
	// horizontal scrolling should start below the minimum width or below the
	// natural width.
	SetHScrollPolicy(policy ScrollablePolicy)
	// SetVAdjustment sets the vertical adjustment of the Scrollable.
	SetVAdjustment(vadjustment *Adjustment)
	// SetVScrollPolicy sets the ScrollablePolicy to determine whether vertical
	// scrolling should start below the minimum height or below the natural
	// height.
	SetVScrollPolicy(policy ScrollablePolicy)
}

var _ Scrollabler = (*Scrollable)(nil)

func wrapScrollable(obj *coreglib.Object) *Scrollable {
	return &Scrollable{
		Object: obj,
	}
}

func marshalScrollable(p uintptr) (interface{}, error) {
	return wrapScrollable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Border returns the size of a non-scrolling border around the outside of the
// scrollable. An example for this would be treeview headers. GTK+ can use this
// information to display overlayed graphics, like the overshoot indication,
// at the right position.
//
// The function returns the following values:
//
//   - border: return location for the results.
//   - ok: TRUE if border has been set.
func (scrollable *Scrollable) Border() (*Border, bool) {
	var _arg0 *C.GtkScrollable // out
	var _arg1 C.GtkBorder      // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C.gtk_scrollable_get_border(_arg0, &_arg1)
	runtime.KeepAlive(scrollable)

	var _border *Border // out
	var _ok bool        // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _border, _ok
}

// HAdjustment retrieves the Adjustment used for horizontal scrolling.
//
// The function returns the following values:
//
//   - adjustment: horizontal Adjustment.
func (scrollable *Scrollable) HAdjustment() *Adjustment {
	var _arg0 *C.GtkScrollable // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C.gtk_scrollable_get_hadjustment(_arg0)
	runtime.KeepAlive(scrollable)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// HScrollPolicy gets the horizontal ScrollablePolicy.
//
// The function returns the following values:
//
//   - scrollablePolicy: horizontal ScrollablePolicy.
func (scrollable *Scrollable) HScrollPolicy() ScrollablePolicy {
	var _arg0 *C.GtkScrollable      // out
	var _cret C.GtkScrollablePolicy // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C.gtk_scrollable_get_hscroll_policy(_arg0)
	runtime.KeepAlive(scrollable)

	var _scrollablePolicy ScrollablePolicy // out

	_scrollablePolicy = ScrollablePolicy(_cret)

	return _scrollablePolicy
}

// VAdjustment retrieves the Adjustment used for vertical scrolling.
//
// The function returns the following values:
//
//   - adjustment: vertical Adjustment.
func (scrollable *Scrollable) VAdjustment() *Adjustment {
	var _arg0 *C.GtkScrollable // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C.gtk_scrollable_get_vadjustment(_arg0)
	runtime.KeepAlive(scrollable)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// VScrollPolicy gets the vertical ScrollablePolicy.
//
// The function returns the following values:
//
//   - scrollablePolicy: vertical ScrollablePolicy.
func (scrollable *Scrollable) VScrollPolicy() ScrollablePolicy {
	var _arg0 *C.GtkScrollable      // out
	var _cret C.GtkScrollablePolicy // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C.gtk_scrollable_get_vscroll_policy(_arg0)
	runtime.KeepAlive(scrollable)

	var _scrollablePolicy ScrollablePolicy // out

	_scrollablePolicy = ScrollablePolicy(_cret)

	return _scrollablePolicy
}

// SetHAdjustment sets the horizontal adjustment of the Scrollable.
//
// The function takes the following parameters:
//
//   - hadjustment (optional): Adjustment.
func (scrollable *Scrollable) SetHAdjustment(hadjustment *Adjustment) {
	var _arg0 *C.GtkScrollable // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))
	if hadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(hadjustment).Native()))
	}

	C.gtk_scrollable_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(scrollable)
	runtime.KeepAlive(hadjustment)
}

// SetHScrollPolicy sets the ScrollablePolicy to determine whether horizontal
// scrolling should start below the minimum width or below the natural width.
//
// The function takes the following parameters:
//
//   - policy: horizontal ScrollablePolicy.
func (scrollable *Scrollable) SetHScrollPolicy(policy ScrollablePolicy) {
	var _arg0 *C.GtkScrollable      // out
	var _arg1 C.GtkScrollablePolicy // out

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))
	_arg1 = C.GtkScrollablePolicy(policy)

	C.gtk_scrollable_set_hscroll_policy(_arg0, _arg1)
	runtime.KeepAlive(scrollable)
	runtime.KeepAlive(policy)
}

// SetVAdjustment sets the vertical adjustment of the Scrollable.
//
// The function takes the following parameters:
//
//   - vadjustment (optional): Adjustment.
func (scrollable *Scrollable) SetVAdjustment(vadjustment *Adjustment) {
	var _arg0 *C.GtkScrollable // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))
	if vadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(vadjustment).Native()))
	}

	C.gtk_scrollable_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(scrollable)
	runtime.KeepAlive(vadjustment)
}

// SetVScrollPolicy sets the ScrollablePolicy to determine whether vertical
// scrolling should start below the minimum height or below the natural height.
//
// The function takes the following parameters:
//
//   - policy: vertical ScrollablePolicy.
func (scrollable *Scrollable) SetVScrollPolicy(policy ScrollablePolicy) {
	var _arg0 *C.GtkScrollable      // out
	var _arg1 C.GtkScrollablePolicy // out

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))
	_arg1 = C.GtkScrollablePolicy(policy)

	C.gtk_scrollable_set_vscroll_policy(_arg0, _arg1)
	runtime.KeepAlive(scrollable)
	runtime.KeepAlive(policy)
}

// Border returns the size of a non-scrolling border around the outside of the
// scrollable. An example for this would be treeview headers. GTK+ can use this
// information to display overlayed graphics, like the overshoot indication,
// at the right position.
//
// The function returns the following values:
//
//   - border: return location for the results.
//   - ok: TRUE if border has been set.
func (scrollable *Scrollable) border() (*Border, bool) {
	gclass := (*C.GtkScrollableInterface)(coreglib.PeekParentClass(scrollable))
	fnarg := gclass.get_border

	var _arg0 *C.GtkScrollable // out
	var _arg1 C.GtkBorder      // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkScrollable)(unsafe.Pointer(coreglib.InternObject(scrollable).Native()))

	_cret = C._gotk4_gtk3_Scrollable_virtual_get_border(unsafe.Pointer(fnarg), _arg0, &_arg1)
	runtime.KeepAlive(scrollable)

	var _border *Border // out
	var _ok bool        // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _border, _ok
}

// StyleProvider is an interface used to provide style information
// to a StyleContext. See gtk_style_context_add_provider() and
// gtk_style_context_add_provider_for_screen().
//
// StyleProvider wraps an interface. This means the user can get the
// underlying type by calling Cast().
type StyleProvider struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*StyleProvider)(nil)
)

// StyleProviderer describes StyleProvider's interface methods.
type StyleProviderer interface {
	coreglib.Objector

	// IconFactory returns the IconFactory defined to be in use for path,
	// or NULL if none is defined.
	IconFactory(path *WidgetPath) *IconFactory
	// Style returns the style settings affecting a widget defined by path,
	// or NULL if provider doesn’t contemplate styling path.
	Style(path *WidgetPath) *StyleProperties
}

var _ StyleProviderer = (*StyleProvider)(nil)

func wrapStyleProvider(obj *coreglib.Object) *StyleProvider {
	return &StyleProvider{
		Object: obj,
	}
}

func marshalStyleProvider(p uintptr) (interface{}, error) {
	return wrapStyleProvider(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// IconFactory returns the IconFactory defined to be in use for path, or NULL if
// none is defined.
//
// Deprecated: Will always return NULL for all GTK-provided style providers.
//
// The function takes the following parameters:
//
//   - path to query.
//
// The function returns the following values:
//
//   - iconFactory (optional): icon factory to use for path, or NULL.
func (provider *StyleProvider) IconFactory(path *WidgetPath) *IconFactory {
	var _arg0 *C.GtkStyleProvider // out
	var _arg1 *C.GtkWidgetPath    // out
	var _cret *C.GtkIconFactory   // in

	_arg0 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_style_provider_get_icon_factory(_arg0, _arg1)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(path)

	var _iconFactory *IconFactory // out

	if _cret != nil {
		_iconFactory = wrapIconFactory(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _iconFactory
}

// Style returns the style settings affecting a widget defined by path, or NULL
// if provider doesn’t contemplate styling path.
//
// Deprecated: Will always return NULL for all GTK-provided style providers as
// the interface cannot correctly work the way CSS is specified.
//
// The function takes the following parameters:
//
//   - path to query.
//
// The function returns the following values:
//
//   - styleProperties (optional) containing the style settings affecting path.
func (provider *StyleProvider) Style(path *WidgetPath) *StyleProperties {
	var _arg0 *C.GtkStyleProvider   // out
	var _arg1 *C.GtkWidgetPath      // out
	var _cret *C.GtkStyleProperties // in

	_arg0 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_style_provider_get_style(_arg0, _arg1)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(path)

	var _styleProperties *StyleProperties // out

	if _cret != nil {
		_styleProperties = wrapStyleProperties(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _styleProperties
}

// iconFactory returns the IconFactory defined to be in use for path, or NULL if
// none is defined.
//
// Deprecated: Will always return NULL for all GTK-provided style providers.
//
// The function takes the following parameters:
//
//   - path to query.
//
// The function returns the following values:
//
//   - iconFactory (optional): icon factory to use for path, or NULL.
func (provider *StyleProvider) iconFactory(path *WidgetPath) *IconFactory {
	gclass := (*C.GtkStyleProviderIface)(coreglib.PeekParentClass(provider))
	fnarg := gclass.get_icon_factory

	var _arg0 *C.GtkStyleProvider // out
	var _arg1 *C.GtkWidgetPath    // out
	var _cret *C.GtkIconFactory   // in

	_arg0 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_StyleProvider_virtual_get_icon_factory(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(path)

	var _iconFactory *IconFactory // out

	if _cret != nil {
		_iconFactory = wrapIconFactory(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _iconFactory
}

// Style returns the style settings affecting a widget defined by path, or NULL
// if provider doesn’t contemplate styling path.
//
// Deprecated: Will always return NULL for all GTK-provided style providers as
// the interface cannot correctly work the way CSS is specified.
//
// The function takes the following parameters:
//
//   - path to query.
//
// The function returns the following values:
//
//   - styleProperties (optional) containing the style settings affecting path.
func (provider *StyleProvider) style(path *WidgetPath) *StyleProperties {
	gclass := (*C.GtkStyleProviderIface)(coreglib.PeekParentClass(provider))
	fnarg := gclass.get_style

	var _arg0 *C.GtkStyleProvider   // out
	var _arg1 *C.GtkWidgetPath      // out
	var _cret *C.GtkStyleProperties // in

	_arg0 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_StyleProvider_virtual_get_style(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(path)

	var _styleProperties *StyleProperties // out

	if _cret != nil {
		_styleProperties = wrapStyleProperties(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _styleProperties
}

// ToolShell interface allows container widgets to provide additional
// information when embedding ToolItem widgets.
//
// ToolShell wraps an interface. This means the user can get the
// underlying type by calling Cast().
type ToolShell struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*ToolShell)(nil)
)

// ToolSheller describes ToolShell's interface methods.
type ToolSheller interface {
	coreglib.Objector

	// EllipsizeMode retrieves the current ellipsize mode for the tool shell.
	EllipsizeMode() pango.EllipsizeMode
	// IconSize retrieves the icon size for the tool shell.
	IconSize() int
	// Orientation retrieves the current orientation for the tool shell.
	Orientation() Orientation
	// ReliefStyle returns the relief style of buttons on shell.
	ReliefStyle() ReliefStyle
	// Style retrieves whether the tool shell has text, icons, or both.
	Style() ToolbarStyle
	// TextAlignment retrieves the current text alignment for the tool shell.
	TextAlignment() float32
	// TextOrientation retrieves the current text orientation for the tool
	// shell.
	TextOrientation() Orientation
	// TextSizeGroup retrieves the current text size group for the tool shell.
	TextSizeGroup() *SizeGroup
	// RebuildMenu: calling this function signals the tool shell that the
	// overflow menu item for tool items have changed.
	RebuildMenu()
}

var _ ToolSheller = (*ToolShell)(nil)

func wrapToolShell(obj *coreglib.Object) *ToolShell {
	return &ToolShell{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalToolShell(p uintptr) (interface{}, error) {
	return wrapToolShell(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// EllipsizeMode retrieves the current ellipsize mode for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_ellipsize_mode() instead.
//
// The function returns the following values:
//
//   - ellipsizeMode: current ellipsize mode of shell.
func (shell *ToolShell) EllipsizeMode() pango.EllipsizeMode {
	var _arg0 *C.GtkToolShell      // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_ellipsize_mode(_arg0)
	runtime.KeepAlive(shell)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// IconSize retrieves the icon size for the tool shell. Tool items must not call
// this function directly, but rely on gtk_tool_item_get_icon_size() instead.
//
// The function returns the following values:
//
//   - gint: current size (IconSize) for icons of shell.
func (shell *ToolShell) IconSize() int {
	var _arg0 *C.GtkToolShell // out
	var _cret C.GtkIconSize   // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_icon_size(_arg0)
	runtime.KeepAlive(shell)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Orientation retrieves the current orientation for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_orientation() instead.
//
// The function returns the following values:
//
//   - orientation: current orientation of shell.
func (shell *ToolShell) Orientation() Orientation {
	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_orientation(_arg0)
	runtime.KeepAlive(shell)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// ReliefStyle returns the relief style of buttons on shell. Tool items must not
// call this function directly, but rely on gtk_tool_item_get_relief_style()
// instead.
//
// The function returns the following values:
//
//   - reliefStyle: relief style of buttons on shell.
func (shell *ToolShell) ReliefStyle() ReliefStyle {
	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkReliefStyle // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_relief_style(_arg0)
	runtime.KeepAlive(shell)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// Style retrieves whether the tool shell has text, icons, or both.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_toolbar_style() instead.
//
// The function returns the following values:
//
//   - toolbarStyle: current style of shell.
func (shell *ToolShell) Style() ToolbarStyle {
	var _arg0 *C.GtkToolShell   // out
	var _cret C.GtkToolbarStyle // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_style(_arg0)
	runtime.KeepAlive(shell)

	var _toolbarStyle ToolbarStyle // out

	_toolbarStyle = ToolbarStyle(_cret)

	return _toolbarStyle
}

// TextAlignment retrieves the current text alignment for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_alignment() instead.
//
// The function returns the following values:
//
//   - gfloat: current text alignment of shell.
func (shell *ToolShell) TextAlignment() float32 {
	var _arg0 *C.GtkToolShell // out
	var _cret C.gfloat        // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_text_alignment(_arg0)
	runtime.KeepAlive(shell)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// TextOrientation retrieves the current text orientation for the tool
// shell. Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_orientation() instead.
//
// The function returns the following values:
//
//   - orientation: current text orientation of shell.
func (shell *ToolShell) TextOrientation() Orientation {
	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_text_orientation(_arg0)
	runtime.KeepAlive(shell)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// TextSizeGroup retrieves the current text size group for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_size_group() instead.
//
// The function returns the following values:
//
//   - sizeGroup: current text size group of shell.
func (shell *ToolShell) TextSizeGroup() *SizeGroup {
	var _arg0 *C.GtkToolShell // out
	var _cret *C.GtkSizeGroup // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C.gtk_tool_shell_get_text_size_group(_arg0)
	runtime.KeepAlive(shell)

	var _sizeGroup *SizeGroup // out

	_sizeGroup = wrapSizeGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _sizeGroup
}

// RebuildMenu: calling this function signals the tool shell that the overflow
// menu item for tool items have changed. If there is an overflow menu and if it
// is visible when this function it called, the menu will be rebuilt.
//
// Tool items must not call this function directly, but rely on
// gtk_tool_item_rebuild_menu() instead.
func (shell *ToolShell) RebuildMenu() {
	var _arg0 *C.GtkToolShell // out

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	C.gtk_tool_shell_rebuild_menu(_arg0)
	runtime.KeepAlive(shell)
}

// ellipsizeMode retrieves the current ellipsize mode for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_ellipsize_mode() instead.
//
// The function returns the following values:
//
//   - ellipsizeMode: current ellipsize mode of shell.
func (shell *ToolShell) ellipsizeMode() pango.EllipsizeMode {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_ellipsize_mode

	var _arg0 *C.GtkToolShell      // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_ellipsize_mode(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// iconSize: mandatory implementation of gtk_tool_shell_get_icon_size().
func (shell *ToolShell) iconSize() IconSize {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_icon_size

	var _arg0 *C.GtkToolShell // out
	var _cret C.GtkIconSize   // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_icon_size(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _iconSize IconSize // out

	_iconSize = IconSize(_cret)

	return _iconSize
}

// Orientation retrieves the current orientation for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_orientation() instead.
//
// The function returns the following values:
//
//   - orientation: current orientation of shell.
func (shell *ToolShell) orientation() Orientation {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_orientation

	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_orientation(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// reliefStyle returns the relief style of buttons on shell. Tool items must not
// call this function directly, but rely on gtk_tool_item_get_relief_style()
// instead.
//
// The function returns the following values:
//
//   - reliefStyle: relief style of buttons on shell.
func (shell *ToolShell) reliefStyle() ReliefStyle {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_relief_style

	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkReliefStyle // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_relief_style(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// Style retrieves whether the tool shell has text, icons, or both.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_toolbar_style() instead.
//
// The function returns the following values:
//
//   - toolbarStyle: current style of shell.
func (shell *ToolShell) style() ToolbarStyle {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_style

	var _arg0 *C.GtkToolShell   // out
	var _cret C.GtkToolbarStyle // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_style(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _toolbarStyle ToolbarStyle // out

	_toolbarStyle = ToolbarStyle(_cret)

	return _toolbarStyle
}

// textAlignment retrieves the current text alignment for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_alignment() instead.
//
// The function returns the following values:
//
//   - gfloat: current text alignment of shell.
func (shell *ToolShell) textAlignment() float32 {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_text_alignment

	var _arg0 *C.GtkToolShell // out
	var _cret C.gfloat        // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_text_alignment(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// textOrientation retrieves the current text orientation for the tool
// shell. Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_orientation() instead.
//
// The function returns the following values:
//
//   - orientation: current text orientation of shell.
func (shell *ToolShell) textOrientation() Orientation {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_text_orientation

	var _arg0 *C.GtkToolShell  // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_text_orientation(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// textSizeGroup retrieves the current text size group for the tool shell.
// Tool items must not call this function directly, but rely on
// gtk_tool_item_get_text_size_group() instead.
//
// The function returns the following values:
//
//   - sizeGroup: current text size group of shell.
func (shell *ToolShell) textSizeGroup() *SizeGroup {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.get_text_size_group

	var _arg0 *C.GtkToolShell // out
	var _cret *C.GtkSizeGroup // in

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	_cret = C._gotk4_gtk3_ToolShell_virtual_get_text_size_group(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)

	var _sizeGroup *SizeGroup // out

	_sizeGroup = wrapSizeGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _sizeGroup
}

// rebuildMenu: calling this function signals the tool shell that the overflow
// menu item for tool items have changed. If there is an overflow menu and if it
// is visible when this function it called, the menu will be rebuilt.
//
// Tool items must not call this function directly, but rely on
// gtk_tool_item_rebuild_menu() instead.
func (shell *ToolShell) rebuildMenu() {
	gclass := (*C.GtkToolShellIface)(coreglib.PeekParentClass(shell))
	fnarg := gclass.rebuild_menu

	var _arg0 *C.GtkToolShell // out

	_arg0 = (*C.GtkToolShell)(unsafe.Pointer(coreglib.InternObject(shell).Native()))

	C._gotk4_gtk3_ToolShell_virtual_rebuild_menu(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(shell)
}

// TreeDragDest wraps an interface. This means the user can get the
// underlying type by calling Cast().
type TreeDragDest struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TreeDragDest)(nil)
)

// TreeDragDester describes TreeDragDest's interface methods.
type TreeDragDester interface {
	coreglib.Objector

	// DragDataReceived asks the TreeDragDest to insert a row before the path
	// dest, deriving the contents of the row from selection_data.
	DragDataReceived(dest *TreePath, selectionData *SelectionData) bool
	// RowDropPossible determines whether a drop is possible before the given
	// dest_path, at the same depth as dest_path.
	RowDropPossible(destPath *TreePath, selectionData *SelectionData) bool
}

var _ TreeDragDester = (*TreeDragDest)(nil)

func wrapTreeDragDest(obj *coreglib.Object) *TreeDragDest {
	return &TreeDragDest{
		Object: obj,
	}
}

func marshalTreeDragDest(p uintptr) (interface{}, error) {
	return wrapTreeDragDest(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// DragDataReceived asks the TreeDragDest to insert a row before the path dest,
// deriving the contents of the row from selection_data. If dest is outside the
// tree so that inserting before it is impossible, FALSE will be returned. Also,
// FALSE may be returned if the new row is not created for some model-specific
// reason. Should robustly handle a dest no longer found in the model!.
//
// The function takes the following parameters:
//
//   - dest: row to drop in front of.
//   - selectionData: data to drop.
//
// The function returns the following values:
//
//   - ok: whether a new row was created before position dest.
func (dragDest *TreeDragDest) DragDataReceived(dest *TreePath, selectionData *SelectionData) bool {
	var _arg0 *C.GtkTreeDragDest  // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeDragDest)(unsafe.Pointer(coreglib.InternObject(dragDest).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(dest)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_tree_drag_dest_drag_data_received(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dragDest)
	runtime.KeepAlive(dest)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowDropPossible determines whether a drop is possible before the given
// dest_path, at the same depth as dest_path. i.e., can we drop the data in
// selection_data at that location. dest_path does not have to exist; the return
// value will almost certainly be FALSE if the parent of dest_path doesn’t
// exist, though.
//
// The function takes the following parameters:
//
//   - destPath: destination row.
//   - selectionData: data being dragged.
//
// The function returns the following values:
//
//   - ok: TRUE if a drop is possible before dest_path.
func (dragDest *TreeDragDest) RowDropPossible(destPath *TreePath, selectionData *SelectionData) bool {
	var _arg0 *C.GtkTreeDragDest  // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeDragDest)(unsafe.Pointer(coreglib.InternObject(dragDest).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(destPath)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_tree_drag_dest_row_drop_possible(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dragDest)
	runtime.KeepAlive(destPath)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// dragDataReceived asks the TreeDragDest to insert a row before the path dest,
// deriving the contents of the row from selection_data. If dest is outside the
// tree so that inserting before it is impossible, FALSE will be returned. Also,
// FALSE may be returned if the new row is not created for some model-specific
// reason. Should robustly handle a dest no longer found in the model!.
//
// The function takes the following parameters:
//
//   - dest: row to drop in front of.
//   - selectionData: data to drop.
//
// The function returns the following values:
//
//   - ok: whether a new row was created before position dest.
func (dragDest *TreeDragDest) dragDataReceived(dest *TreePath, selectionData *SelectionData) bool {
	gclass := (*C.GtkTreeDragDestIface)(coreglib.PeekParentClass(dragDest))
	fnarg := gclass.drag_data_received

	var _arg0 *C.GtkTreeDragDest  // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeDragDest)(unsafe.Pointer(coreglib.InternObject(dragDest).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(dest)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C._gotk4_gtk3_TreeDragDest_virtual_drag_data_received(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(dragDest)
	runtime.KeepAlive(dest)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// rowDropPossible determines whether a drop is possible before the given
// dest_path, at the same depth as dest_path. i.e., can we drop the data in
// selection_data at that location. dest_path does not have to exist; the return
// value will almost certainly be FALSE if the parent of dest_path doesn’t
// exist, though.
//
// The function takes the following parameters:
//
//   - destPath: destination row.
//   - selectionData: data being dragged.
//
// The function returns the following values:
//
//   - ok: TRUE if a drop is possible before dest_path.
func (dragDest *TreeDragDest) rowDropPossible(destPath *TreePath, selectionData *SelectionData) bool {
	gclass := (*C.GtkTreeDragDestIface)(coreglib.PeekParentClass(dragDest))
	fnarg := gclass.row_drop_possible

	var _arg0 *C.GtkTreeDragDest  // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeDragDest)(unsafe.Pointer(coreglib.InternObject(dragDest).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(destPath)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C._gotk4_gtk3_TreeDragDest_virtual_row_drop_possible(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(dragDest)
	runtime.KeepAlive(destPath)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeDragSource wraps an interface. This means the user can get the
// underlying type by calling Cast().
type TreeDragSource struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TreeDragSource)(nil)
)

// TreeDragSourcer describes TreeDragSource's interface methods.
type TreeDragSourcer interface {
	coreglib.Objector

	// DragDataDelete asks the TreeDragSource to delete the row at path, because
	// it was moved somewhere else via drag-and-drop.
	DragDataDelete(path *TreePath) bool
	// DragDataGet asks the TreeDragSource to fill in selection_data with a
	// representation of the row at path.
	DragDataGet(path *TreePath, selectionData *SelectionData) bool
	// RowDraggable asks the TreeDragSource whether a particular row can be used
	// as the source of a DND operation.
	RowDraggable(path *TreePath) bool
}

var _ TreeDragSourcer = (*TreeDragSource)(nil)

func wrapTreeDragSource(obj *coreglib.Object) *TreeDragSource {
	return &TreeDragSource{
		Object: obj,
	}
}

func marshalTreeDragSource(p uintptr) (interface{}, error) {
	return wrapTreeDragSource(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// DragDataDelete asks the TreeDragSource to delete the row at path, because it
// was moved somewhere else via drag-and-drop. Returns FALSE if the deletion
// fails because path no longer exists, or for some model-specific reason.
// Should robustly handle a path no longer found in the model!.
//
// The function takes the following parameters:
//
//   - path: row that was being dragged.
//
// The function returns the following values:
//
//   - ok: TRUE if the row was successfully deleted.
func (dragSource *TreeDragSource) DragDataDelete(path *TreePath) bool {
	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_drag_source_drag_data_delete(_arg0, _arg1)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DragDataGet asks the TreeDragSource to fill in selection_data with a
// representation of the row at path. selection_data->target gives the required
// type of the data. Should robustly handle a path no longer found in the
// model!.
//
// The function takes the following parameters:
//
//   - path: row that was dragged.
//   - selectionData to fill with data from the dragged row.
//
// The function returns the following values:
//
//   - ok: TRUE if data of the required type was provided.
func (dragSource *TreeDragSource) DragDataGet(path *TreePath, selectionData *SelectionData) bool {
	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkSelectionData  // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_tree_drag_source_drag_data_get(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowDraggable asks the TreeDragSource whether a particular row can be used
// as the source of a DND operation. If the source doesn’t implement this
// interface, the row is assumed draggable.
//
// The function takes the following parameters:
//
//   - path: row on which user is initiating a drag.
//
// The function returns the following values:
//
//   - ok: TRUE if the row can be dragged.
func (dragSource *TreeDragSource) RowDraggable(path *TreePath) bool {
	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_drag_source_row_draggable(_arg0, _arg1)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// dragDataDelete asks the TreeDragSource to delete the row at path, because it
// was moved somewhere else via drag-and-drop. Returns FALSE if the deletion
// fails because path no longer exists, or for some model-specific reason.
// Should robustly handle a path no longer found in the model!.
//
// The function takes the following parameters:
//
//   - path: row that was being dragged.
//
// The function returns the following values:
//
//   - ok: TRUE if the row was successfully deleted.
func (dragSource *TreeDragSource) dragDataDelete(path *TreePath) bool {
	gclass := (*C.GtkTreeDragSourceIface)(coreglib.PeekParentClass(dragSource))
	fnarg := gclass.drag_data_delete

	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_TreeDragSource_virtual_drag_data_delete(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// dragDataGet asks the TreeDragSource to fill in selection_data with a
// representation of the row at path. selection_data->target gives the required
// type of the data. Should robustly handle a path no longer found in the
// model!.
//
// The function takes the following parameters:
//
//   - path: row that was dragged.
//   - selectionData to fill with data from the dragged row.
//
// The function returns the following values:
//
//   - ok: TRUE if data of the required type was provided.
func (dragSource *TreeDragSource) dragDataGet(path *TreePath, selectionData *SelectionData) bool {
	gclass := (*C.GtkTreeDragSourceIface)(coreglib.PeekParentClass(dragSource))
	fnarg := gclass.drag_data_get

	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkSelectionData  // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C._gotk4_gtk3_TreeDragSource_virtual_drag_data_get(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// rowDraggable asks the TreeDragSource whether a particular row can be used
// as the source of a DND operation. If the source doesn’t implement this
// interface, the row is assumed draggable.
//
// The function takes the following parameters:
//
//   - path: row on which user is initiating a drag.
//
// The function returns the following values:
//
//   - ok: TRUE if the row can be dragged.
func (dragSource *TreeDragSource) rowDraggable(path *TreePath) bool {
	gclass := (*C.GtkTreeDragSourceIface)(coreglib.PeekParentClass(dragSource))
	fnarg := gclass.row_draggable

	var _arg0 *C.GtkTreeDragSource // out
	var _arg1 *C.GtkTreePath       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeDragSource)(unsafe.Pointer(coreglib.InternObject(dragSource).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_TreeDragSource_virtual_row_draggable(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(dragSource)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeModel interface defines a generic tree interface for use by the TreeView
// widget. It is an abstract interface, and is designed to be usable with
// any appropriate data structure. The programmer just has to implement this
// interface on their own data type for it to be viewable by a TreeView widget.
//
// The model is represented as a hierarchical tree of strongly-typed, columned
// data. In other words, the model can be seen as a tree where every node has
// different values depending on which column is being queried. The type of data
// found in a column is determined by using the GType system (ie. TYPE_INT,
// K_TYPE_BUTTON, TYPE_POINTER, etc). The types are homogeneous per column
// across all nodes. It is important to note that this interface only provides
// a way of examining a model and observing changes. The implementation of each
// individual model decides how and if changes are made.
//
// In order to make life simpler for programmers who do not need to write their
// own specialized model, two generic models are provided — the TreeStore and
// the ListStore. To use these, the developer simply pushes data into these
// models as necessary. These models provide the data structure as well as
// all appropriate tree interfaces. As a result, implementing drag and drop,
// sorting, and storing data is trivial. For the vast majority of trees and
// lists, these two models are sufficient.
//
// Models are accessed on a node/column level of granularity. One can query for
// the value of a model at a certain node and a certain column on that node.
// There are two structures used to reference a particular node in a model.
// They are the TreePath-struct and the TreeIter-struct (“iter” is short for
// iterator). Most of the interface consists of operations on a TreeIter-struct.
//
// A path is essentially a potential node. It is a location on a model that
// may or may not actually correspond to a node on a specific model. The
// TreePath-struct can be converted into either an array of unsigned integers
// or a string. The string form is a list of numbers separated by a colon.
// Each number refers to the offset at that level. Thus, the path 0 refers to
// the root node and the path 2:4 refers to the fifth child of the third node.
//
// By contrast, a TreeIter-struct is a reference to a specific node on a
// specific model. It is a generic struct with an integer and three generic
// pointers. These are filled in by the model in a model-specific way.
// One can convert a path to an iterator by calling gtk_tree_model_get_iter().
// These iterators are the primary way of accessing a model and are similar to
// the iterators used by TextBuffer. They are generally statically allocated on
// the stack and only used for a short time. The model interface defines a set
// of operations using them for navigating the model.
//
// It is expected that models fill in the iterator with private data.
// For example, the ListStore model, which is internally a simple linked list,
// stores a list node in one of the pointers. The TreeModelSort stores an
// array and an offset in two of the pointers. Additionally, there is an
// integer field. This field is generally filled with a unique stamp per model.
// This stamp is for catching errors resulting from using invalid iterators with
// a model.
//
// The lifecycle of an iterator can be a little confusing at first. Iterators
// are expected to always be valid for as long as the model is unchanged (and
// doesn’t emit a signal). The model is considered to own all outstanding
// iterators and nothing needs to be done to free them from the user’s point
// of view. Additionally, some models guarantee that an iterator is valid for
// as long as the node it refers to is valid (most notably the TreeStore and
// ListStore). Although generally uninteresting, as one always has to allow
// for the case where iterators do not persist beyond a signal, some very
// important performance enhancements were made in the sort model. As a result,
// the K_TREE_MODEL_ITERS_PERSIST flag was added to indicate this behavior.
//
// To help show some common operation of a model, some examples are provided.
// The first example shows three ways of getting the iter at the location 3:2:5.
// While the first method shown is easier, the second is much more common,
// as you often get paths from callbacks.
//
// Acquiring a TreeIter-struct
//
//	enum
//	{
//	  STRING_COLUMN,
//	  INT_COLUMN,
//	  N_COLUMNS
//	};
//
//	...
//
//	GtkTreeModel *list_store;
//	GtkTreeIter iter;
//	gboolean valid;
//	gint row_count = 0;
//
//	// make a new list_store
//	list_store = gtk_list_store_new (N_COLUMNS,
//	                                 G_TYPE_STRING,
//	                                 G_TYPE_INT);
//
//	// Fill the list store with data
//	populate_model (list_store);
//
//	// Get the first iter in the list, check it is valid and walk
//	// through the list, reading each row.
//
//	valid = gtk_tree_model_get_iter_first (list_store,
//	                                       &iter);
//	while (valid)
//	 {
//	   gchar *str_data;
//	   gint   int_data;
//
//	   // Make sure you terminate calls to gtk_tree_model_get() with a “-1” value
//	   gtk_tree_model_get (list_store, &iter,
//	                       STRING_COLUMN, &str_data,
//	                       INT_COLUMN, &int_data,
//	                       -1);
//
//	   // Do something with the data
//	   g_print ("Row d: (s,d)\n",
//	            row_count, str_data, int_data);
//	   g_free (str_data);
//
//	   valid = gtk_tree_model_iter_next (list_store,
//	                                     &iter);
//	   row_count++;
//	 }
//
// The TreeModel interface contains two methods for reference counting:
// gtk_tree_model_ref_node() and gtk_tree_model_unref_node(). These two methods
// are optional to implement. The reference counting is meant as a way for
// views to let models know when nodes are being displayed. TreeView will take
// a reference on a node when it is visible, which means the node is either
// in the toplevel or expanded. Being displayed does not mean that the node
// is currently directly visible to the user in the viewport. Based on this
// reference counting scheme a caching model, for example, can decide whether or
// not to cache a node based on the reference count. A file-system based model
// would not want to keep the entire file hierarchy in memory, but just the
// folders that are currently expanded in every current view.
//
// When working with reference counting, the following rules must be taken into
// account:
//
// - Never take a reference on a node without owning a reference on its parent.
// This means that all parent nodes of a referenced node must be referenced as
// well.
//
// - Outstanding references on a deleted node are not released. This is
// not possible because the node has already been deleted by the time the
// row-deleted signal is received.
//
// - Models are not obligated to emit a signal on rows of which none of its
// siblings are referenced. To phrase this differently, signals are only
// required for levels in which nodes are referenced. For the root level
// however, signals must be emitted at all times (however the root level is
// always referenced when any view is attached).
//
// TreeModel wraps an interface. This means the user can get the
// underlying type by calling Cast().
type TreeModel struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TreeModel)(nil)
)

// TreeModeller describes TreeModel's interface methods.
type TreeModeller interface {
	coreglib.Objector

	// ForEach calls func on each node in model in a depth-first fashion.
	ForEach(fn TreeModelForEachFunc)
	// ColumnType returns the type of the column.
	ColumnType(index_ int) coreglib.Type
	// Flags returns a set of flags supported by this interface.
	Flags() TreeModelFlags
	// Iter sets iter to a valid iterator pointing to path.
	Iter(path *TreePath) (*TreeIter, bool)
	// IterFirst initializes iter with the first iterator in the tree (the one
	// at the path "0") and returns TRUE.
	IterFirst() (*TreeIter, bool)
	// IterFromString sets iter to a valid iterator pointing to path_string,
	// if it exists.
	IterFromString(pathString string) (*TreeIter, bool)
	// NColumns returns the number of columns supported by tree_model.
	NColumns() int
	// Path returns a newly-created TreePath-struct referenced by iter.
	Path(iter *TreeIter) *TreePath
	// StringFromIter generates a string representation of the iter.
	StringFromIter(iter *TreeIter) string
	// Value initializes and sets value to that at column.
	Value(iter *TreeIter, column int) coreglib.Value
	// IterChildren sets iter to point to the first child of parent.
	IterChildren(parent *TreeIter) (*TreeIter, bool)
	// IterHasChild returns TRUE if iter has children, FALSE otherwise.
	IterHasChild(iter *TreeIter) bool
	// IterNChildren returns the number of children that iter has.
	IterNChildren(iter *TreeIter) int
	// IterNext sets iter to point to the node following it at the current
	// level.
	IterNext(iter *TreeIter) bool
	// IterNthChild sets iter to be the child of parent, using the given index.
	IterNthChild(parent *TreeIter, n int) (*TreeIter, bool)
	// IterParent sets iter to be the parent of child.
	IterParent(child *TreeIter) (*TreeIter, bool)
	// IterPrevious sets iter to point to the previous node at the current
	// level.
	IterPrevious(iter *TreeIter) bool
	// RefNode lets the tree ref the node.
	RefNode(iter *TreeIter)
	// RowChanged emits the TreeModel::row-changed signal on tree_model.
	RowChanged(path *TreePath, iter *TreeIter)
	// RowDeleted emits the TreeModel::row-deleted signal on tree_model.
	RowDeleted(path *TreePath)
	// RowHasChildToggled emits the TreeModel::row-has-child-toggled signal on
	// tree_model.
	RowHasChildToggled(path *TreePath, iter *TreeIter)
	// RowInserted emits the TreeModel::row-inserted signal on tree_model.
	RowInserted(path *TreePath, iter *TreeIter)
	// RowsReordered emits the TreeModel::rows-reordered signal on tree_model.
	RowsReordered(path *TreePath, iter *TreeIter, newOrder []int)
	// UnrefNode lets the tree unref the node.
	UnrefNode(iter *TreeIter)

	// Row-changed: this signal is emitted when a row in the model has changed.
	ConnectRowChanged(func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle
	// Row-deleted: this signal is emitted when a row has been deleted.
	ConnectRowDeleted(func(path *TreePath)) coreglib.SignalHandle
	// Row-has-child-toggled: this signal is emitted when a row has gotten the
	// first child row or lost its last child row.
	ConnectRowHasChildToggled(func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle
	// Row-inserted: this signal is emitted when a new row has been inserted in
	// the model.
	ConnectRowInserted(func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle
	// Rows-reordered: this signal is emitted when the children of a node in the
	// TreeModel have been reordered.
	ConnectRowsReordered(func(path *TreePath, iter *TreeIter, newOrder unsafe.Pointer)) coreglib.SignalHandle
}

var _ TreeModeller = (*TreeModel)(nil)

func wrapTreeModel(obj *coreglib.Object) *TreeModel {
	return &TreeModel{
		Object: obj,
	}
}

func marshalTreeModel(p uintptr) (interface{}, error) {
	return wrapTreeModel(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectRowChanged: this signal is emitted when a row in the model has
// changed.
func (childModel *TreeModel) ConnectRowChanged(f func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(childModel, "row-changed", false, unsafe.Pointer(C._gotk4_gtk3_TreeModel_ConnectRowChanged), f)
}

// ConnectRowDeleted: this signal is emitted when a row has been deleted.
//
// Note that no iterator is passed to the signal handler, since the row is
// already deleted.
//
// This should be called by models after a row has been removed. The location
// pointed to by path should be the location that the row previously was at.
// It may not be a valid location anymore.
func (childModel *TreeModel) ConnectRowDeleted(f func(path *TreePath)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(childModel, "row-deleted", false, unsafe.Pointer(C._gotk4_gtk3_TreeModel_ConnectRowDeleted), f)
}

// ConnectRowHasChildToggled: this signal is emitted when a row has gotten the
// first child row or lost its last child row.
func (childModel *TreeModel) ConnectRowHasChildToggled(f func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(childModel, "row-has-child-toggled", false, unsafe.Pointer(C._gotk4_gtk3_TreeModel_ConnectRowHasChildToggled), f)
}

// ConnectRowInserted: this signal is emitted when a new row has been inserted
// in the model.
//
// Note that the row may still be empty at this point, since it is a common
// pattern to first insert an empty row, and then fill it with the desired
// values.
func (childModel *TreeModel) ConnectRowInserted(f func(path *TreePath, iter *TreeIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(childModel, "row-inserted", false, unsafe.Pointer(C._gotk4_gtk3_TreeModel_ConnectRowInserted), f)
}

// ConnectRowsReordered: this signal is emitted when the children of a node in
// the TreeModel have been reordered.
//
// Note that this signal is not emitted when rows are reordered by DND, since
// this is implemented by removing and then reinserting the row.
func (childModel *TreeModel) ConnectRowsReordered(f func(path *TreePath, iter *TreeIter, newOrder unsafe.Pointer)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(childModel, "rows-reordered", false, unsafe.Pointer(C._gotk4_gtk3_TreeModel_ConnectRowsReordered), f)
}

// NewFilter creates a new TreeModel, with child_model as the child_model and
// root as the virtual root.
//
// The function takes the following parameters:
//
//   - root (optional) or NULL.
//
// The function returns the following values:
//
//   - treeModel: new TreeModel.
func (childModel *TreeModel) NewFilter(root *TreePath) *TreeModel {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _cret *C.GtkTreeModel // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(childModel).Native()))
	if root != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(root)))
	}

	_cret = C.gtk_tree_model_filter_new(_arg0, _arg1)
	runtime.KeepAlive(childModel)
	runtime.KeepAlive(root)

	var _treeModel *TreeModel // out

	_treeModel = wrapTreeModel(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _treeModel
}

// ForEach calls func on each node in model in a depth-first fashion.
//
// If func returns TRUE, then the tree ceases to be walked, and
// gtk_tree_model_foreach() returns.
//
// The function takes the following parameters:
//
//   - fn: function to be called on each row.
func (model *TreeModel) ForEach(fn TreeModelForEachFunc) {
	var _arg0 *C.GtkTreeModel           // out
	var _arg1 C.GtkTreeModelForeachFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeModelForEachFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_tree_model_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(model)
	runtime.KeepAlive(fn)
}

// ColumnType returns the type of the column.
//
// The function takes the following parameters:
//
//   - index_: column index.
//
// The function returns the following values:
//
//   - gType: type of the column.
func (treeModel *TreeModel) ColumnType(index_ int) coreglib.Type {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.gint          // out
	var _cret C.GType         // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = C.gint(index_)

	_cret = C.gtk_tree_model_get_column_type(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(index_)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// Flags returns a set of flags supported by this interface.
//
// The flags are a bitwise combination of TreeModelFlags. The flags supported
// should not change during the lifetime of the tree_model.
//
// The function returns the following values:
//
//   - treeModelFlags flags supported by this interface.
func (treeModel *TreeModel) Flags() TreeModelFlags {
	var _arg0 *C.GtkTreeModel     // out
	var _cret C.GtkTreeModelFlags // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C.gtk_tree_model_get_flags(_arg0)
	runtime.KeepAlive(treeModel)

	var _treeModelFlags TreeModelFlags // out

	_treeModelFlags = TreeModelFlags(_cret)

	return _treeModelFlags
}

// Iter sets iter to a valid iterator pointing to path. If path does not exist,
// iter is set to an invalid iterator and FALSE is returned.
//
// The function takes the following parameters:
//
//   - path: TreePath-struct.
//
// The function returns the following values:
//
//   - iter: uninitialized TreeIter-struct.
//   - ok: TRUE, if iter was set.
func (treeModel *TreeModel) Iter(path *TreePath) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreePath  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_model_get_iter(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterFirst initializes iter with the first iterator in the tree (the one at
// the path "0") and returns TRUE. Returns FALSE if the tree is empty.
//
// The function returns the following values:
//
//   - iter: uninitialized TreeIter-struct.
//   - ok: TRUE, if iter was set.
func (treeModel *TreeModel) IterFirst() (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C.gtk_tree_model_get_iter_first(_arg0, &_arg1)
	runtime.KeepAlive(treeModel)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterFromString sets iter to a valid iterator pointing to path_string,
// if it exists. Otherwise, iter is left invalid and FALSE is returned.
//
// The function takes the following parameters:
//
//   - pathString: string representation of a TreePath-struct.
//
// The function returns the following values:
//
//   - iter: uninitialized TreeIter-struct.
//   - ok: TRUE, if iter was set.
func (treeModel *TreeModel) IterFromString(pathString string) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.gchar        // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(pathString)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_tree_model_get_iter_from_string(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(pathString)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// NColumns returns the number of columns supported by tree_model.
//
// The function returns the following values:
//
//   - gint: number of columns.
func (treeModel *TreeModel) NColumns() int {
	var _arg0 *C.GtkTreeModel // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C.gtk_tree_model_get_n_columns(_arg0)
	runtime.KeepAlive(treeModel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Path returns a newly-created TreePath-struct referenced by iter.
//
// This path should be freed with gtk_tree_path_free().
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - treePath: newly-created TreePath-struct.
func (treeModel *TreeModel) Path(iter *TreeIter) *TreePath {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret *C.GtkTreePath  // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_get_path(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// StringFromIter generates a string representation of the iter.
//
// This string is a “:” separated list of numbers. For example, “4:10:0:3” would
// be an acceptable return value for this string.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - utf8: newly-allocated string. Must be freed with g_free().
func (treeModel *TreeModel) StringFromIter(iter *TreeIter) string {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_get_string_from_iter(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Value initializes and sets value to that at column.
//
// When done with value, g_value_unset() needs to be called to free any
// allocated memory.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//   - column to lookup the value at.
//
// The function returns the following values:
//
//   - value: empty #GValue to set.
func (treeModel *TreeModel) Value(iter *TreeIter, column int) coreglib.Value {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 C.gint          // out
	var _arg3 C.GValue        // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gint(column)

	C.gtk_tree_model_get_value(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(column)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))

	return _value
}

// IterChildren sets iter to point to the first child of parent.
//
// If parent has no children, FALSE is returned and iter is set to be invalid.
// parent will remain a valid node after this function has been called.
//
// If parent is NULL returns the first node, equivalent to
// gtk_tree_model_get_iter_first (tree_model, iter);.
//
// The function takes the following parameters:
//
//   - parent (optional) or NULL.
//
// The function returns the following values:
//
//   - iter: new TreeIter-struct to be set to the child.
//   - ok: TRUE, if iter has been set to the first child.
func (treeModel *TreeModel) IterChildren(parent *TreeIter) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}

	_cret = C.gtk_tree_model_iter_children(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(parent)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterHasChild returns TRUE if iter has children, FALSE otherwise.
//
// The function takes the following parameters:
//
//   - iter to test for children.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has children.
func (treeModel *TreeModel) IterHasChild(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_iter_has_child(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterNChildren returns the number of children that iter has.
//
// As a special case, if iter is NULL, then the number of toplevel nodes is
// returned.
//
// The function takes the following parameters:
//
//   - iter (optional) or NULL.
//
// The function returns the following values:
//
//   - gint: number of children of iter.
func (treeModel *TreeModel) IterNChildren(iter *TreeIter) int {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if iter != nil {
		_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	}

	_cret = C.gtk_tree_model_iter_n_children(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IterNext sets iter to point to the node following it at the current level.
//
// If there is no next iter, FALSE is returned and iter is set to be invalid.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has been changed to the next node.
func (treeModel *TreeModel) IterNext(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_iter_next(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterNthChild sets iter to be the child of parent, using the given index.
//
// The first index is 0. If n is too big, or parent has no children, iter is set
// to an invalid iterator and FALSE is returned. parent will remain a valid node
// after this function has been called. As a special case, if parent is NULL,
// then the n-th root node is set.
//
// The function takes the following parameters:
//
//   - parent (optional) to get the child from, or NULL.
//   - n: index of the desired child.
//
// The function returns the following values:
//
//   - iter to set to the nth child.
//   - ok: TRUE, if parent has an n-th child.
func (treeModel *TreeModel) IterNthChild(parent *TreeIter, n int) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gint          // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	_arg3 = C.gint(n)

	_cret = C.gtk_tree_model_iter_nth_child(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(n)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterParent sets iter to be the parent of child.
//
// If child is at the toplevel, and doesn’t have a parent, then iter is set to
// an invalid iterator and FALSE is returned. child will remain a valid node
// after this function has been called.
//
// iter will be initialized before the lookup is performed, so child and iter
// cannot point to the same memory location.
//
// The function takes the following parameters:
//
//   - child: TreeIter-struct.
//
// The function returns the following values:
//
//   - iter: new TreeIter-struct to set to the parent.
//   - ok: TRUE, if iter is set to the parent of child.
func (treeModel *TreeModel) IterParent(child *TreeIter) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(child)))

	_cret = C.gtk_tree_model_iter_parent(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(child)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterPrevious sets iter to point to the previous node at the current level.
//
// If there is no previous iter, FALSE is returned and iter is set to be
// invalid.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has been changed to the previous node.
func (treeModel *TreeModel) IterPrevious(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_iter_previous(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RefNode lets the tree ref the node.
//
// This is an optional method for models to implement. To be more specific,
// models may ignore this call as it exists primarily for performance reasons.
//
// This function is primarily meant as a way for views to let caching models
// know when nodes are being displayed (and hence, whether or not to cache that
// node). Being displayed means a node is in an expanded branch, regardless
// of whether the node is currently visible in the viewport. For example,
// a file-system based model would not want to keep the entire file-hierarchy in
// memory, just the sections that are currently being displayed by every current
// view.
//
// A model should be expected to be able to get an iter independent of its
// reffed state.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
func (treeModel *TreeModel) RefNode(iter *TreeIter) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_model_ref_node(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
}

// RowChanged emits the TreeModel::row-changed signal on tree_model.
//
// The function takes the following parameters:
//
//   - path pointing to the changed row.
//   - iter: valid TreeIter-struct pointing to the changed row.
func (treeModel *TreeModel) RowChanged(path *TreePath, iter *TreeIter) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_model_row_changed(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// RowDeleted emits the TreeModel::row-deleted signal on tree_model.
//
// This should be called by models after a row has been removed. The location
// pointed to by path should be the location that the row previously was at.
// It may not be a valid location anymore.
//
// Nodes that are deleted are not unreffed, this means that any outstanding
// references on the deleted node should not be released.
//
// The function takes the following parameters:
//
//   - path pointing to the previous location of the deleted row.
func (treeModel *TreeModel) RowDeleted(path *TreePath) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_model_row_deleted(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
}

// RowHasChildToggled emits the TreeModel::row-has-child-toggled signal on
// tree_model. This should be called by models after the child state of a node
// changes.
//
// The function takes the following parameters:
//
//   - path pointing to the changed row.
//   - iter: valid TreeIter-struct pointing to the changed row.
func (treeModel *TreeModel) RowHasChildToggled(path *TreePath, iter *TreeIter) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_model_row_has_child_toggled(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// RowInserted emits the TreeModel::row-inserted signal on tree_model.
//
// The function takes the following parameters:
//
//   - path pointing to the inserted row.
//   - iter: valid TreeIter-struct pointing to the inserted row.
func (treeModel *TreeModel) RowInserted(path *TreePath, iter *TreeIter) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_model_row_inserted(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// RowsReordered emits the TreeModel::rows-reordered signal on tree_model.
//
// This should be called by models when their rows have been reordered.
//
// The function takes the following parameters:
//
//   - path pointing to the tree node whose children have been reordered.
//   - iter (optional): valid TreeIter-struct pointing to the node whose
//     children have been reordered, or NULL if the depth of path is 0.
//   - newOrder: array of integers mapping the current position of each child to
//     its old position before the re-ordering, i.e. new_order[newpos] = oldpos.
func (treeModel *TreeModel) RowsReordered(path *TreePath, iter *TreeIter, newOrder []int) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 *C.gint         // out
	var _arg4 C.gint

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if iter != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	}
	_arg4 = (C.gint)(len(newOrder))
	_arg3 = (*C.gint)(C.calloc(C.size_t(len(newOrder)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg3))
	{
		out := unsafe.Slice((*C.gint)(_arg3), len(newOrder))
		for i := range newOrder {
			out[i] = C.gint(newOrder[i])
		}
	}

	C.gtk_tree_model_rows_reordered_with_length(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(newOrder)
}

// UnrefNode lets the tree unref the node.
//
// This is an optional method for models to implement. To be more specific,
// models may ignore this call as it exists primarily for performance reasons.
// For more information on what this means, see gtk_tree_model_ref_node().
//
// Please note that nodes that are deleted are not unreffed.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
func (treeModel *TreeModel) UnrefNode(iter *TreeIter) {
	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_model_unref_node(_arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
}

// columnType returns the type of the column.
//
// The function takes the following parameters:
//
//   - index_: column index.
//
// The function returns the following values:
//
//   - gType: type of the column.
func (treeModel *TreeModel) columnType(index_ int) coreglib.Type {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_column_type

	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.gint          // out
	var _cret C.GType         // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = C.gint(index_)

	_cret = C._gotk4_gtk3_TreeModel_virtual_get_column_type(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(index_)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// Flags returns a set of flags supported by this interface.
//
// The flags are a bitwise combination of TreeModelFlags. The flags supported
// should not change during the lifetime of the tree_model.
//
// The function returns the following values:
//
//   - treeModelFlags flags supported by this interface.
func (treeModel *TreeModel) flags() TreeModelFlags {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_flags

	var _arg0 *C.GtkTreeModel     // out
	var _cret C.GtkTreeModelFlags // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C._gotk4_gtk3_TreeModel_virtual_get_flags(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeModel)

	var _treeModelFlags TreeModelFlags // out

	_treeModelFlags = TreeModelFlags(_cret)

	return _treeModelFlags
}

// Iter sets iter to a valid iterator pointing to path. If path does not exist,
// iter is set to an invalid iterator and FALSE is returned.
//
// The function takes the following parameters:
//
//   - path: TreePath-struct.
//
// The function returns the following values:
//
//   - iter: uninitialized TreeIter-struct.
//   - ok: TRUE, if iter was set.
func (treeModel *TreeModel) iter(path *TreePath) (*TreeIter, bool) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_iter

	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreePath  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_get_iter(unsafe.Pointer(fnarg), _arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// nColumns returns the number of columns supported by tree_model.
//
// The function returns the following values:
//
//   - gint: number of columns.
func (treeModel *TreeModel) nColumns() int {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_n_columns

	var _arg0 *C.GtkTreeModel // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C._gotk4_gtk3_TreeModel_virtual_get_n_columns(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeModel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Path returns a newly-created TreePath-struct referenced by iter.
//
// This path should be freed with gtk_tree_path_free().
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - treePath: newly-created TreePath-struct.
func (treeModel *TreeModel) path(iter *TreeIter) *TreePath {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_path

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret *C.GtkTreePath  // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_get_path(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// Value initializes and sets value to that at column.
//
// When done with value, g_value_unset() needs to be called to free any
// allocated memory.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//   - column to lookup the value at.
//
// The function returns the following values:
//
//   - value: empty #GValue to set.
func (treeModel *TreeModel) value(iter *TreeIter, column int) coreglib.Value {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.get_value

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 C.gint          // out
	var _arg3 C.GValue        // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gint(column)

	C._gotk4_gtk3_TreeModel_virtual_get_value(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(column)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))

	return _value
}

// iterChildren sets iter to point to the first child of parent.
//
// If parent has no children, FALSE is returned and iter is set to be invalid.
// parent will remain a valid node after this function has been called.
//
// If parent is NULL returns the first node, equivalent to
// gtk_tree_model_get_iter_first (tree_model, iter);.
//
// The function takes the following parameters:
//
//   - parent (optional) or NULL.
//
// The function returns the following values:
//
//   - iter: new TreeIter-struct to be set to the child.
//   - ok: TRUE, if iter has been set to the first child.
func (treeModel *TreeModel) iterChildren(parent *TreeIter) (*TreeIter, bool) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_children

	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_children(unsafe.Pointer(fnarg), _arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(parent)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// iterHasChild returns TRUE if iter has children, FALSE otherwise.
//
// The function takes the following parameters:
//
//   - iter to test for children.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has children.
func (treeModel *TreeModel) iterHasChild(iter *TreeIter) bool {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_has_child

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_has_child(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// iterNChildren returns the number of children that iter has.
//
// As a special case, if iter is NULL, then the number of toplevel nodes is
// returned.
//
// The function takes the following parameters:
//
//   - iter (optional) or NULL.
//
// The function returns the following values:
//
//   - gint: number of children of iter.
func (treeModel *TreeModel) iterNChildren(iter *TreeIter) int {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_n_children

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if iter != nil {
		_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	}

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_n_children(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// iterNext sets iter to point to the node following it at the current level.
//
// If there is no next iter, FALSE is returned and iter is set to be invalid.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has been changed to the next node.
func (treeModel *TreeModel) iterNext(iter *TreeIter) bool {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_next

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_next(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// iterNthChild sets iter to be the child of parent, using the given index.
//
// The first index is 0. If n is too big, or parent has no children, iter is set
// to an invalid iterator and FALSE is returned. parent will remain a valid node
// after this function has been called. As a special case, if parent is NULL,
// then the n-th root node is set.
//
// The function takes the following parameters:
//
//   - parent (optional) to get the child from, or NULL.
//   - n: index of the desired child.
//
// The function returns the following values:
//
//   - iter to set to the nth child.
//   - ok: TRUE, if parent has an n-th child.
func (treeModel *TreeModel) iterNthChild(parent *TreeIter, n int) (*TreeIter, bool) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_nth_child

	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gint          // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	_arg3 = C.gint(n)

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_nth_child(unsafe.Pointer(fnarg), _arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(n)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// iterParent sets iter to be the parent of child.
//
// If child is at the toplevel, and doesn’t have a parent, then iter is set to
// an invalid iterator and FALSE is returned. child will remain a valid node
// after this function has been called.
//
// iter will be initialized before the lookup is performed, so child and iter
// cannot point to the same memory location.
//
// The function takes the following parameters:
//
//   - child: TreeIter-struct.
//
// The function returns the following values:
//
//   - iter: new TreeIter-struct to set to the parent.
//   - ok: TRUE, if iter is set to the parent of child.
func (treeModel *TreeModel) iterParent(child *TreeIter) (*TreeIter, bool) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_parent

	var _arg0 *C.GtkTreeModel // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(child)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_parent(unsafe.Pointer(fnarg), _arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(child)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// iterPrevious sets iter to point to the previous node at the current level.
//
// If there is no previous iter, FALSE is returned and iter is set to be
// invalid.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if iter has been changed to the previous node.
func (treeModel *TreeModel) iterPrevious(iter *TreeIter) bool {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.iter_previous

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TreeModel_virtual_iter_previous(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// refNode lets the tree ref the node.
//
// This is an optional method for models to implement. To be more specific,
// models may ignore this call as it exists primarily for performance reasons.
//
// This function is primarily meant as a way for views to let caching models
// know when nodes are being displayed (and hence, whether or not to cache that
// node). Being displayed means a node is in an expanded branch, regardless
// of whether the node is currently visible in the viewport. For example,
// a file-system based model would not want to keep the entire file-hierarchy in
// memory, just the sections that are currently being displayed by every current
// view.
//
// A model should be expected to be able to get an iter independent of its
// reffed state.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
func (treeModel *TreeModel) refNode(iter *TreeIter) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.ref_node

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C._gotk4_gtk3_TreeModel_virtual_ref_node(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
}

// rowChanged emits the TreeModel::row-changed signal on tree_model.
//
// The function takes the following parameters:
//
//   - path pointing to the changed row.
//   - iter: valid TreeIter-struct pointing to the changed row.
func (treeModel *TreeModel) rowChanged(path *TreePath, iter *TreeIter) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.row_changed

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C._gotk4_gtk3_TreeModel_virtual_row_changed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// rowDeleted emits the TreeModel::row-deleted signal on tree_model.
//
// This should be called by models after a row has been removed. The location
// pointed to by path should be the location that the row previously was at.
// It may not be a valid location anymore.
//
// Nodes that are deleted are not unreffed, this means that any outstanding
// references on the deleted node should not be released.
//
// The function takes the following parameters:
//
//   - path pointing to the previous location of the deleted row.
func (treeModel *TreeModel) rowDeleted(path *TreePath) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.row_deleted

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C._gotk4_gtk3_TreeModel_virtual_row_deleted(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
}

// rowHasChildToggled emits the TreeModel::row-has-child-toggled signal on
// tree_model. This should be called by models after the child state of a node
// changes.
//
// The function takes the following parameters:
//
//   - path pointing to the changed row.
//   - iter: valid TreeIter-struct pointing to the changed row.
func (treeModel *TreeModel) rowHasChildToggled(path *TreePath, iter *TreeIter) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.row_has_child_toggled

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C._gotk4_gtk3_TreeModel_virtual_row_has_child_toggled(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// rowInserted emits the TreeModel::row-inserted signal on tree_model.
//
// The function takes the following parameters:
//
//   - path pointing to the inserted row.
//   - iter: valid TreeIter-struct pointing to the inserted row.
func (treeModel *TreeModel) rowInserted(path *TreePath, iter *TreeIter) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.row_inserted

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreePath  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C._gotk4_gtk3_TreeModel_virtual_row_inserted(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(path)
	runtime.KeepAlive(iter)
}

// unrefNode lets the tree unref the node.
//
// This is an optional method for models to implement. To be more specific,
// models may ignore this call as it exists primarily for performance reasons.
// For more information on what this means, see gtk_tree_model_ref_node().
//
// Please note that nodes that are deleted are not unreffed.
//
// The function takes the following parameters:
//
//   - iter: TreeIter-struct.
func (treeModel *TreeModel) unrefNode(iter *TreeIter) {
	gclass := (*C.GtkTreeModelIface)(coreglib.PeekParentClass(treeModel))
	fnarg := gclass.unref_node

	var _arg0 *C.GtkTreeModel // out
	var _arg1 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C._gotk4_gtk3_TreeModel_virtual_unref_node(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
}

// TreeSortable is an interface to be implemented by tree models which support
// sorting. The TreeView uses the methods provided by this interface to sort the
// model.
//
// TreeSortable wraps an interface. This means the user can get the
// underlying type by calling Cast().
type TreeSortable struct {
	_ [0]func() // equal guard
	TreeModel
}

var ()

// TreeSortabler describes TreeSortable's interface methods.
type TreeSortabler interface {
	coreglib.Objector

	// SortColumnID fills in sort_column_id and order with the current sort
	// column and the order.
	SortColumnID() (int, SortType, bool)
	// HasDefaultSortFunc returns TRUE if the model has a default sort function.
	HasDefaultSortFunc() bool
	// SetDefaultSortFunc sets the default comparison function used when sorting
	// to be sort_func.
	SetDefaultSortFunc(sortFunc TreeIterCompareFunc)
	// SetSortColumnID sets the current sort column to be sort_column_id.
	SetSortColumnID(sortColumnId int, order SortType)
	// SetSortFunc sets the comparison function used when sorting to be
	// sort_func.
	SetSortFunc(sortColumnId int, sortFunc TreeIterCompareFunc)
	// SortColumnChanged emits a TreeSortable::sort-column-changed signal on
	// sortable.
	SortColumnChanged()

	// Sort-column-changed signal is emitted when the sort column or sort order
	// of sortable is changed.
	ConnectSortColumnChanged(func()) coreglib.SignalHandle
}

var _ TreeSortabler = (*TreeSortable)(nil)

func wrapTreeSortable(obj *coreglib.Object) *TreeSortable {
	return &TreeSortable{
		TreeModel: TreeModel{
			Object: obj,
		},
	}
}

func marshalTreeSortable(p uintptr) (interface{}, error) {
	return wrapTreeSortable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectSortColumnChanged signal is emitted when the sort column or sort order
// of sortable is changed. The signal is emitted before the contents of sortable
// are resorted.
func (sortable *TreeSortable) ConnectSortColumnChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sortable, "sort-column-changed", false, unsafe.Pointer(C._gotk4_gtk3_TreeSortable_ConnectSortColumnChanged), f)
}

// SortColumnID fills in sort_column_id and order with the
// current sort column and the order. It returns TRUE unless the
// sort_column_id is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
// GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
//
// The function returns the following values:
//
//   - sortColumnId: sort column id to be filled in.
//   - order to be filled in.
//   - ok: TRUE if the sort column is not one of the special sort column ids.
func (sortable *TreeSortable) SortColumnID() (int, SortType, bool) {
	var _arg0 *C.GtkTreeSortable // out
	var _arg1 C.gint             // in
	var _arg2 C.GtkSortType      // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	_cret = C.gtk_tree_sortable_get_sort_column_id(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(sortable)

	var _sortColumnId int // out
	var _order SortType   // out
	var _ok bool          // out

	_sortColumnId = int(_arg1)
	_order = SortType(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _sortColumnId, _order, _ok
}

// HasDefaultSortFunc returns TRUE if the model has a default sort function.
// This is used primarily by GtkTreeViewColumns in order to determine if a model
// can go back to the default state, or not.
//
// The function returns the following values:
//
//   - ok: TRUE, if the model has a default sort function.
func (sortable *TreeSortable) HasDefaultSortFunc() bool {
	var _arg0 *C.GtkTreeSortable // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	_cret = C.gtk_tree_sortable_has_default_sort_func(_arg0)
	runtime.KeepAlive(sortable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetDefaultSortFunc sets the default comparison function used when
// sorting to be sort_func. If the current sort column id of sortable is
// GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this
// function.
//
// If sort_func is NULL, then there will be no default comparison function.
// This means that once the model has been sorted, it can’t go back to the
// default state. In this case, when the current sort column id of sortable is
// GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
//
// The function takes the following parameters:
//
//   - sortFunc: comparison function.
func (sortable *TreeSortable) SetDefaultSortFunc(sortFunc TreeIterCompareFunc) {
	var _arg0 *C.GtkTreeSortable       // out
	var _arg1 C.GtkTreeIterCompareFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeIterCompareFunc)
	_arg2 = C.gpointer(gbox.Assign(sortFunc))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_tree_sortable_set_default_sort_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortFunc)
}

// SetSortColumnID sets the current sort column to be sort_column_id.
// The sortable will resort itself to reflect this change, after emitting a
// TreeSortable::sort-column-changed signal. sort_column_id may either be a
// regular column id, or one of the following special values:
//
// - GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function will be
// used, if it is set
//
// - GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur.
//
// The function takes the following parameters:
//
//   - sortColumnId: sort column id to set.
//   - order: sort order of the column.
func (sortable *TreeSortable) SetSortColumnID(sortColumnId int, order SortType) {
	var _arg0 *C.GtkTreeSortable // out
	var _arg1 C.gint             // out
	var _arg2 C.GtkSortType      // out

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = C.gint(sortColumnId)
	_arg2 = C.GtkSortType(order)

	C.gtk_tree_sortable_set_sort_column_id(_arg0, _arg1, _arg2)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortColumnId)
	runtime.KeepAlive(order)
}

// SetSortFunc sets the comparison function used when sorting to be sort_func.
// If the current sort column id of sortable is the same as sort_column_id,
// then the model will sort using this function.
//
// The function takes the following parameters:
//
//   - sortColumnId: sort column id to set the function for.
//   - sortFunc: comparison function.
func (sortable *TreeSortable) SetSortFunc(sortColumnId int, sortFunc TreeIterCompareFunc) {
	var _arg0 *C.GtkTreeSortable       // out
	var _arg1 C.gint                   // out
	var _arg2 C.GtkTreeIterCompareFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = C.gint(sortColumnId)
	_arg2 = (*[0]byte)(C._gotk4_gtk3_TreeIterCompareFunc)
	_arg3 = C.gpointer(gbox.Assign(sortFunc))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_tree_sortable_set_sort_func(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortColumnId)
	runtime.KeepAlive(sortFunc)
}

// SortColumnChanged emits a TreeSortable::sort-column-changed signal on
// sortable.
func (sortable *TreeSortable) SortColumnChanged() {
	var _arg0 *C.GtkTreeSortable // out

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	C.gtk_tree_sortable_sort_column_changed(_arg0)
	runtime.KeepAlive(sortable)
}

// sortColumnID fills in sort_column_id and order with the
// current sort column and the order. It returns TRUE unless the
// sort_column_id is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
// GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
//
// The function returns the following values:
//
//   - sortColumnId: sort column id to be filled in.
//   - order to be filled in.
//   - ok: TRUE if the sort column is not one of the special sort column ids.
func (sortable *TreeSortable) sortColumnID() (int, SortType, bool) {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.get_sort_column_id

	var _arg0 *C.GtkTreeSortable // out
	var _arg1 C.gint             // in
	var _arg2 C.GtkSortType      // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	_cret = C._gotk4_gtk3_TreeSortable_virtual_get_sort_column_id(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(sortable)

	var _sortColumnId int // out
	var _order SortType   // out
	var _ok bool          // out

	_sortColumnId = int(_arg1)
	_order = SortType(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _sortColumnId, _order, _ok
}

// hasDefaultSortFunc returns TRUE if the model has a default sort function.
// This is used primarily by GtkTreeViewColumns in order to determine if a model
// can go back to the default state, or not.
//
// The function returns the following values:
//
//   - ok: TRUE, if the model has a default sort function.
func (sortable *TreeSortable) hasDefaultSortFunc() bool {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.has_default_sort_func

	var _arg0 *C.GtkTreeSortable // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	_cret = C._gotk4_gtk3_TreeSortable_virtual_has_default_sort_func(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(sortable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// setDefaultSortFunc sets the default comparison function used when
// sorting to be sort_func. If the current sort column id of sortable is
// GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this
// function.
//
// If sort_func is NULL, then there will be no default comparison function.
// This means that once the model has been sorted, it can’t go back to the
// default state. In this case, when the current sort column id of sortable is
// GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
//
// The function takes the following parameters:
//
//   - sortFunc: comparison function.
func (sortable *TreeSortable) setDefaultSortFunc(sortFunc TreeIterCompareFunc) {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.set_default_sort_func

	var _arg0 *C.GtkTreeSortable       // out
	var _arg1 C.GtkTreeIterCompareFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeIterCompareFunc)
	_arg2 = C.gpointer(gbox.Assign(sortFunc))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C._gotk4_gtk3_TreeSortable_virtual_set_default_sort_func(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortFunc)
}

// setSortColumnID sets the current sort column to be sort_column_id.
// The sortable will resort itself to reflect this change, after emitting a
// TreeSortable::sort-column-changed signal. sort_column_id may either be a
// regular column id, or one of the following special values:
//
// - GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function will be
// used, if it is set
//
// - GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur.
//
// The function takes the following parameters:
//
//   - sortColumnId: sort column id to set.
//   - order: sort order of the column.
func (sortable *TreeSortable) setSortColumnID(sortColumnId int, order SortType) {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.set_sort_column_id

	var _arg0 *C.GtkTreeSortable // out
	var _arg1 C.gint             // out
	var _arg2 C.GtkSortType      // out

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = C.gint(sortColumnId)
	_arg2 = C.GtkSortType(order)

	C._gotk4_gtk3_TreeSortable_virtual_set_sort_column_id(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortColumnId)
	runtime.KeepAlive(order)
}

// setSortFunc sets the comparison function used when sorting to be sort_func.
// If the current sort column id of sortable is the same as sort_column_id,
// then the model will sort using this function.
//
// The function takes the following parameters:
//
//   - sortColumnId: sort column id to set the function for.
//   - sortFunc: comparison function.
func (sortable *TreeSortable) setSortFunc(sortColumnId int, sortFunc TreeIterCompareFunc) {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.set_sort_func

	var _arg0 *C.GtkTreeSortable       // out
	var _arg1 C.gint                   // out
	var _arg2 C.GtkTreeIterCompareFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))
	_arg1 = C.gint(sortColumnId)
	_arg2 = (*[0]byte)(C._gotk4_gtk3_TreeIterCompareFunc)
	_arg3 = C.gpointer(gbox.Assign(sortFunc))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C._gotk4_gtk3_TreeSortable_virtual_set_sort_func(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(sortable)
	runtime.KeepAlive(sortColumnId)
	runtime.KeepAlive(sortFunc)
}

// sortColumnChanged emits a TreeSortable::sort-column-changed signal on
// sortable.
func (sortable *TreeSortable) sortColumnChanged() {
	gclass := (*C.GtkTreeSortableIface)(coreglib.PeekParentClass(sortable))
	fnarg := gclass.sort_column_changed

	var _arg0 *C.GtkTreeSortable // out

	_arg0 = (*C.GtkTreeSortable)(unsafe.Pointer(coreglib.InternObject(sortable).Native()))

	C._gotk4_gtk3_TreeSortable_virtual_sort_column_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(sortable)
}

// AboutDialogOverrides contains methods that are overridable.
type AboutDialogOverrides struct {
	ActivateLink func(uri string) bool
}

func defaultAboutDialogOverrides(v *AboutDialog) AboutDialogOverrides {
	return AboutDialogOverrides{
		ActivateLink: v.activateLink,
	}
}

// AboutDialog offers a simple way to display information about a program like
// its logo, name, copyright, website and license. It is also possible to give
// credits to the authors, documenters, translators and artists who have worked
// on the program. An about dialog is typically opened when the user selects the
// About option from the Help menu. All parts of the dialog are optional.
//
// About dialogs often contain links and email addresses.
// GtkAboutDialog displays these as clickable links. By default, it calls
// gtk_show_uri_on_window() when a user clicks one. The behaviour can be
// overridden with the AboutDialog::activate-link signal.
//
// To specify a person with an email address, use a string like "Edgar Allan Poe
// <edgar\poe.com>". To specify a website with a title, use a string like "GTK+
// team http://www.gtk.org".
//
// To make constructing a GtkAboutDialog as convenient as possible, you can use
// the function gtk_show_about_dialog() which constructs and shows a dialog and
// keeps it around so that it can be shown again.
//
// Note that GTK+ sets a default title of _("About s") on the dialog window
// (where \s is replaced by the name of the application, but in order to ensure
// proper translation of the title, applications should set the title property
// explicitly when constructing a GtkAboutDialog, as shown in the following
// example:
//
//	GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
//	gtk_show_about_dialog (NULL,
//	                       "program-name", "ExampleCode",
//	                       "logo", example_logo,
//	                       "title", _("About ExampleCode"),
//	                       NULL);
//
// It is also possible to show a AboutDialog like any other Dialog, e.g.
// using gtk_dialog_run(). In this case, you might need to know that the “Close”
// button returns the K_RESPONSE_CANCEL response id.
type AboutDialog struct {
	_ [0]func() // equal guard
	Dialog
}

var (
	_ Binner = (*AboutDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AboutDialog, *AboutDialogClass, AboutDialogOverrides](
		GTypeAboutDialog,
		initAboutDialogClass,
		wrapAboutDialog,
		defaultAboutDialogOverrides,
	)
}

func initAboutDialogClass(gclass unsafe.Pointer, overrides AboutDialogOverrides, classInitFunc func(*AboutDialogClass)) {
	pclass := (*C.GtkAboutDialogClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAboutDialog))))

	if overrides.ActivateLink != nil {
		pclass.activate_link = (*[0]byte)(C._gotk4_gtk3_AboutDialogClass_activate_link)
	}

	if classInitFunc != nil {
		class := (*AboutDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAboutDialog(obj *coreglib.Object) *AboutDialog {
	return &AboutDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
	}
}

func marshalAboutDialog(p uintptr) (interface{}, error) {
	return wrapAboutDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateLink: signal which gets emitted to activate a URI.
// Applications may connect to it to override the default behaviour, which is to
// call gtk_show_uri_on_window().
func (about *AboutDialog) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(about, "activate-link", false, unsafe.Pointer(C._gotk4_gtk3_AboutDialog_ConnectActivateLink), f)
}

// NewAboutDialog creates a new AboutDialog.
//
// The function returns the following values:
//
//   - aboutDialog: newly created AboutDialog.
func NewAboutDialog() *AboutDialog {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_about_dialog_new()

	var _aboutDialog *AboutDialog // out

	_aboutDialog = wrapAboutDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _aboutDialog
}

// AddCreditSection creates a new section in the Credits page.
//
// The function takes the following parameters:
//
//   - sectionName: name of the section.
//   - people who belong to that section.
func (about *AboutDialog) AddCreditSection(sectionName string, people []string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out
	var _arg2 **C.gchar         // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(sectionName)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		_arg2 = (**C.gchar)(C.calloc(C.size_t((len(people) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg2))
		{
			out := unsafe.Slice(_arg2, len(people)+1)
			var zero *C.gchar
			out[len(people)] = zero
			for i := range people {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(people[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_about_dialog_add_credit_section(_arg0, _arg1, _arg2)
	runtime.KeepAlive(about)
	runtime.KeepAlive(sectionName)
	runtime.KeepAlive(people)
}

// Artists returns the string which are displayed in the artists tab of the
// secondary credits dialog.
//
// The function returns the following values:
//
//   - utf8s: a NULL-terminated string array containing the artists. The array
//     is owned by the about dialog and must not be modified.
func (about *AboutDialog) Artists() []string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_artists(_arg0)
	runtime.KeepAlive(about)

	var _utf8s []string // out

	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}

	return _utf8s
}

// Authors returns the string which are displayed in the authors tab of the
// secondary credits dialog.
//
// The function returns the following values:
//
//   - utf8s: a NULL-terminated string array containing the authors. The array
//     is owned by the about dialog and must not be modified.
func (about *AboutDialog) Authors() []string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_authors(_arg0)
	runtime.KeepAlive(about)

	var _utf8s []string // out

	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}

	return _utf8s
}

// Comments returns the comments string.
//
// The function returns the following values:
//
//   - utf8: comments. The string is owned by the about dialog and must not be
//     modified.
func (about *AboutDialog) Comments() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_comments(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Copyright returns the copyright string.
//
// The function returns the following values:
//
//   - utf8: copyright string. The string is owned by the about dialog and must
//     not be modified.
func (about *AboutDialog) Copyright() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_copyright(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Documenters returns the string which are displayed in the documenters tab of
// the secondary credits dialog.
//
// The function returns the following values:
//
//   - utf8s: a NULL-terminated string array containing the documenters.
//     The array is owned by the about dialog and must not be modified.
func (about *AboutDialog) Documenters() []string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_documenters(_arg0)
	runtime.KeepAlive(about)

	var _utf8s []string // out

	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}

	return _utf8s
}

// License returns the license information.
//
// The function returns the following values:
//
//   - utf8: license information. The string is owned by the about dialog and
//     must not be modified.
func (about *AboutDialog) License() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_license(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// LicenseType retrieves the license set using
// gtk_about_dialog_set_license_type().
//
// The function returns the following values:
//
//   - license: License value.
func (about *AboutDialog) LicenseType() License {
	var _arg0 *C.GtkAboutDialog // out
	var _cret C.GtkLicense      // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_license_type(_arg0)
	runtime.KeepAlive(about)

	var _license License // out

	_license = License(_cret)

	return _license
}

// Logo returns the pixbuf displayed as logo in the about dialog.
//
// The function returns the following values:
//
//   - pixbuf displayed as logo. The pixbuf is owned by the about dialog. If you
//     want to keep a reference to it, you have to call g_object_ref() on it.
func (about *AboutDialog) Logo() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.GdkPixbuf      // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_logo(_arg0)
	runtime.KeepAlive(about)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// LogoIconName returns the icon name displayed as logo in the about dialog.
//
// The function returns the following values:
//
//   - utf8: icon name displayed as logo. The string is owned by the dialog.
//     If you want to keep a reference to it, you have to call g_strdup() on it.
func (about *AboutDialog) LogoIconName() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_logo_icon_name(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ProgramName returns the program name displayed in the about dialog.
//
// The function returns the following values:
//
//   - utf8: program name. The string is owned by the about dialog and must not
//     be modified.
func (about *AboutDialog) ProgramName() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_program_name(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TranslatorCredits returns the translator credits string which is displayed in
// the translators tab of the secondary credits dialog.
//
// The function returns the following values:
//
//   - utf8: translator credits string. The string is owned by the about dialog
//     and must not be modified.
func (about *AboutDialog) TranslatorCredits() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_translator_credits(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Version returns the version string.
//
// The function returns the following values:
//
//   - utf8: version string. The string is owned by the about dialog and must
//     not be modified.
func (about *AboutDialog) Version() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_version(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Website returns the website URL.
//
// The function returns the following values:
//
//   - utf8: website URL. The string is owned by the about dialog and must not
//     be modified.
func (about *AboutDialog) Website() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_website(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// WebsiteLabel returns the label used for the website link.
//
// The function returns the following values:
//
//   - utf8: label used for the website link. The string is owned by the about
//     dialog and must not be modified.
func (about *AboutDialog) WebsiteLabel() string {
	var _arg0 *C.GtkAboutDialog // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_website_label(_arg0)
	runtime.KeepAlive(about)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// WrapLicense returns whether the license text in about is automatically
// wrapped.
//
// The function returns the following values:
//
//   - ok: TRUE if the license text is wrapped.
func (about *AboutDialog) WrapLicense() bool {
	var _arg0 *C.GtkAboutDialog // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))

	_cret = C.gtk_about_dialog_get_wrap_license(_arg0)
	runtime.KeepAlive(about)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetArtists sets the strings which are displayed in the artists tab of the
// secondary credits dialog.
//
// The function takes the following parameters:
//
//   - artists: NULL-terminated array of strings.
func (about *AboutDialog) SetArtists(artists []string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 **C.gchar         // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(artists) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(artists)+1)
			var zero *C.gchar
			out[len(artists)] = zero
			for i := range artists {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(artists[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_about_dialog_set_artists(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(artists)
}

// SetAuthors sets the strings which are displayed in the authors tab of the
// secondary credits dialog.
//
// The function takes the following parameters:
//
//   - authors: NULL-terminated array of strings.
func (about *AboutDialog) SetAuthors(authors []string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 **C.gchar         // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(authors) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(authors)+1)
			var zero *C.gchar
			out[len(authors)] = zero
			for i := range authors {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(authors[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_about_dialog_set_authors(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(authors)
}

// SetComments sets the comments string to display in the about dialog. This
// should be a short string of one or two lines.
//
// The function takes the following parameters:
//
//   - comments (optional) string.
func (about *AboutDialog) SetComments(comments string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if comments != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(comments)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_comments(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(comments)
}

// SetCopyright sets the copyright string to display in the about dialog.
// This should be a short string of one or two lines.
//
// The function takes the following parameters:
//
//   - copyright (optional) string.
func (about *AboutDialog) SetCopyright(copyright string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if copyright != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(copyright)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_copyright(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(copyright)
}

// SetDocumenters sets the strings which are displayed in the documenters tab of
// the secondary credits dialog.
//
// The function takes the following parameters:
//
//   - documenters: NULL-terminated array of strings.
func (about *AboutDialog) SetDocumenters(documenters []string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 **C.gchar         // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(documenters) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(documenters)+1)
			var zero *C.gchar
			out[len(documenters)] = zero
			for i := range documenters {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(documenters[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_about_dialog_set_documenters(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(documenters)
}

// SetLicense sets the license information to be displayed in the secondary
// license dialog. If license is NULL, the license button is hidden.
//
// The function takes the following parameters:
//
//   - license (optional) information or NULL.
func (about *AboutDialog) SetLicense(license string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if license != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(license)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_license(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(license)
}

// SetLicenseType sets the license of the application showing the about dialog
// from a list of known licenses.
//
// This function overrides the license set using gtk_about_dialog_set_license().
//
// The function takes the following parameters:
//
//   - licenseType: type of license.
func (about *AboutDialog) SetLicenseType(licenseType License) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 C.GtkLicense      // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	_arg1 = C.GtkLicense(licenseType)

	C.gtk_about_dialog_set_license_type(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(licenseType)
}

// SetLogo sets the pixbuf to be displayed as logo in the about dialog. If it is
// NULL, the default window icon set with gtk_window_set_default_icon() will be
// used.
//
// The function takes the following parameters:
//
//   - logo (optional) or NULL.
func (about *AboutDialog) SetLogo(logo *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.GdkPixbuf      // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if logo != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(logo).Native()))
	}

	C.gtk_about_dialog_set_logo(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(logo)
}

// SetLogoIconName sets the pixbuf to be displayed as logo in the about dialog.
// If it is NULL, the default window icon set with gtk_window_set_default_icon()
// will be used.
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name, or NULL.
func (about *AboutDialog) SetLogoIconName(iconName string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_logo_icon_name(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(iconName)
}

// SetProgramName sets the name to display in the about dialog. If this is not
// set, it defaults to g_get_application_name().
//
// The function takes the following parameters:
//
//   - name: program name.
func (about *AboutDialog) SetProgramName(name string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_about_dialog_set_program_name(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(name)
}

// SetTranslatorCredits sets the translator credits string which is displayed in
// the translators tab of the secondary credits dialog.
//
// The intended use for this string is to display the translator of the language
// which is currently used in the user interface. Using gettext(), a simple way
// to achieve that is to mark the string for translation:
//
//	GtkWidget *about = gtk_about_dialog_new ();
//	gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
//	                                         _("translator-credits"));
//
// It is a good idea to use the customary msgid “translator-credits” for this
// purpose, since translators will already know the purpose of that msgid,
// and since AboutDialog will detect if “translator-credits” is untranslated and
// hide the tab.
//
// The function takes the following parameters:
//
//   - translatorCredits (optional): translator credits.
func (about *AboutDialog) SetTranslatorCredits(translatorCredits string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if translatorCredits != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(translatorCredits)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_translator_credits(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(translatorCredits)
}

// SetVersion sets the version string to display in the about dialog.
//
// The function takes the following parameters:
//
//   - version (optional) string.
func (about *AboutDialog) SetVersion(version string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if version != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(version)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_version(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(version)
}

// SetWebsite sets the URL to use for the website link.
//
// The function takes the following parameters:
//
//   - website (optional): URL string starting with "http://".
func (about *AboutDialog) SetWebsite(website string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if website != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(website)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_about_dialog_set_website(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(website)
}

// SetWebsiteLabel sets the label to be used for the website link.
//
// The function takes the following parameters:
//
//   - websiteLabel: label used for the website link.
func (about *AboutDialog) SetWebsiteLabel(websiteLabel string) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(websiteLabel)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_about_dialog_set_website_label(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(websiteLabel)
}

// SetWrapLicense sets whether the license text in about is automatically
// wrapped.
//
// The function takes the following parameters:
//
//   - wrapLicense: whether to wrap the license.
func (about *AboutDialog) SetWrapLicense(wrapLicense bool) {
	var _arg0 *C.GtkAboutDialog // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(about).Native()))
	if wrapLicense {
		_arg1 = C.TRUE
	}

	C.gtk_about_dialog_set_wrap_license(_arg0, _arg1)
	runtime.KeepAlive(about)
	runtime.KeepAlive(wrapLicense)
}

func (dialog *AboutDialog) activateLink(uri string) bool {
	gclass := (*C.GtkAboutDialogClass)(coreglib.PeekParentClass(dialog))
	fnarg := gclass.activate_link

	var _arg0 *C.GtkAboutDialog // out
	var _arg1 *C.gchar          // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkAboutDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_AboutDialog_virtual_activate_link(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AccelGroupOverrides contains methods that are overridable.
type AccelGroupOverrides struct {
}

func defaultAccelGroupOverrides(v *AccelGroup) AccelGroupOverrides {
	return AccelGroupOverrides{}
}

// AccelGroup represents a group of keyboard accelerators, typically attached
// to a toplevel Window (with gtk_window_add_accel_group()). Usually you won’t
// need to create a AccelGroup directly; instead, when using UIManager, GTK+
// automatically sets up the accelerators for your menus in the ui manager’s
// AccelGroup.
//
// Note that “accelerators” are different from “mnemonics”. Accelerators
// are shortcuts for activating a menu item; they appear alongside the
// menu item they’re a shortcut for. For example “Ctrl+Q” might appear
// alongside the “Quit” menu item. Mnemonics are shortcuts for GUI elements
// such as text entries or buttons; they appear as underlined characters.
// See gtk_label_new_with_mnemonic(). Menu items can have both accelerators and
// mnemonics, of course.
type AccelGroup struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*AccelGroup)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AccelGroup, *AccelGroupClass, AccelGroupOverrides](
		GTypeAccelGroup,
		initAccelGroupClass,
		wrapAccelGroup,
		defaultAccelGroupOverrides,
	)
}

func initAccelGroupClass(gclass unsafe.Pointer, overrides AccelGroupOverrides, classInitFunc func(*AccelGroupClass)) {
	if classInitFunc != nil {
		class := (*AccelGroupClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAccelGroup(obj *coreglib.Object) *AccelGroup {
	return &AccelGroup{
		Object: obj,
	}
}

func marshalAccelGroup(p uintptr) (interface{}, error) {
	return wrapAccelGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectAccelActivate signal is an implementation detail of AccelGroup and not
// meant to be used by applications.
func (accelGroup *AccelGroup) ConnectAccelActivate(f func(acceleratable *coreglib.Object, keyval uint, modifier gdk.ModifierType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(accelGroup, "accel-activate", false, unsafe.Pointer(C._gotk4_gtk3_AccelGroup_ConnectAccelActivate), f)
}

// NewAccelGroup creates a new AccelGroup.
//
// The function returns the following values:
//
//   - accelGroup: new AccelGroup object.
func NewAccelGroup() *AccelGroup {
	var _cret *C.GtkAccelGroup // in

	_cret = C.gtk_accel_group_new()

	var _accelGroup *AccelGroup // out

	_accelGroup = wrapAccelGroup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _accelGroup
}

// Activate finds the first accelerator in accel_group that matches accel_key
// and accel_mods, and activates it.
//
// The function takes the following parameters:
//
//   - accelQuark: quark for the accelerator name.
//   - acceleratable usually a Window, on which to activate the accelerator.
//   - accelKey: accelerator keyval from a key event.
//   - accelMods: keyboard state mask from a key event.
//
// The function returns the following values:
//
//   - ok: TRUE if an accelerator was activated and handled this keypress.
func (accelGroup *AccelGroup) Activate(accelQuark glib.Quark, acceleratable *coreglib.Object, accelKey uint, accelMods gdk.ModifierType) bool {
	var _arg0 *C.GtkAccelGroup  // out
	var _arg1 C.GQuark          // out
	var _arg2 *C.GObject        // out
	var _arg3 C.guint           // out
	var _arg4 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = C.GQuark(accelQuark)
	_arg2 = (*C.GObject)(unsafe.Pointer(acceleratable.Native()))
	_arg3 = C.guint(accelKey)
	_arg4 = C.GdkModifierType(accelMods)

	_cret = C.gtk_accel_group_activate(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelQuark)
	runtime.KeepAlive(acceleratable)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ConnectAccelGroup installs an accelerator in this group. When accel_group
// is being activated in response to a call to gtk_accel_groups_activate(),
// closure will be invoked if the accel_key and accel_mods from
// gtk_accel_groups_activate() match those of this connection.
//
// The signature used for the closure is that of AccelGroupActivate.
//
// Note that, due to implementation details, a single closure can only be
// connected to one accelerator group.
//
// The function takes the following parameters:
//
//   - accelKey: key value of the accelerator.
//   - accelMods: modifier combination of the accelerator.
//   - accelFlags: flag mask to configure this accelerator.
//   - closure to be executed upon accelerator activation.
func (accelGroup *AccelGroup) ConnectAccelGroup(accelKey uint, accelMods gdk.ModifierType, accelFlags AccelFlags, closure coreglib.AnyClosure) {
	var _arg0 *C.GtkAccelGroup  // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _arg3 C.GtkAccelFlags   // out
	var _arg4 *C.GClosure       // out

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = C.guint(accelKey)
	_arg2 = C.GdkModifierType(accelMods)
	_arg3 = C.GtkAccelFlags(accelFlags)
	_arg4 = (*C.GClosure)(coreglib.NewClosure(coreglib.InternObject(accelGroup), closure))

	C.gtk_accel_group_connect(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)
	runtime.KeepAlive(accelFlags)
	runtime.KeepAlive(closure)
}

// ConnectByPath installs an accelerator in this group, using an
// accelerator path to look up the appropriate key and modifiers (see
// gtk_accel_map_add_entry()). When accel_group is being activated in response
// to a call to gtk_accel_groups_activate(), closure will be invoked if the
// accel_key and accel_mods from gtk_accel_groups_activate() match the key and
// modifiers for the path.
//
// The signature used for the closure is that of AccelGroupActivate.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath: path used for determining key and modifiers.
//   - closure to be executed upon accelerator activation.
func (accelGroup *AccelGroup) ConnectByPath(accelPath string, closure coreglib.AnyClosure) {
	var _arg0 *C.GtkAccelGroup // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GClosure      // out

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GClosure)(coreglib.NewClosure(coreglib.InternObject(accelGroup), closure))

	C.gtk_accel_group_connect_by_path(_arg0, _arg1, _arg2)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelPath)
	runtime.KeepAlive(closure)
}

// Disconnect removes an accelerator previously installed through
// gtk_accel_group_connect().
//
// Since 2.20 closure can be NULL.
//
// The function takes the following parameters:
//
//   - closure (optional) to remove from this accelerator group, or NULL to
//     remove all closures.
//
// The function returns the following values:
//
//   - ok: TRUE if the closure was found and got disconnected.
func (accelGroup *AccelGroup) Disconnect(closure coreglib.AnyClosure) bool {
	var _arg0 *C.GtkAccelGroup // out
	var _arg1 *C.GClosure      // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = (*C.GClosure)(coreglib.NewClosure(coreglib.InternObject(accelGroup), closure))

	_cret = C.gtk_accel_group_disconnect(_arg0, _arg1)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(closure)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DisconnectKey removes an accelerator previously installed through
// gtk_accel_group_connect().
//
// The function takes the following parameters:
//
//   - accelKey: key value of the accelerator.
//   - accelMods: modifier combination of the accelerator.
//
// The function returns the following values:
//
//   - ok: TRUE if there was an accelerator which could be removed, FALSE
//     otherwise.
func (accelGroup *AccelGroup) DisconnectKey(accelKey uint, accelMods gdk.ModifierType) bool {
	var _arg0 *C.GtkAccelGroup  // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = C.guint(accelKey)
	_arg2 = C.GdkModifierType(accelMods)

	_cret = C.gtk_accel_group_disconnect_key(_arg0, _arg1, _arg2)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsLocked locks are added and removed using gtk_accel_group_lock() and
// gtk_accel_group_unlock().
//
// The function returns the following values:
//
//   - ok: TRUE if there are 1 or more locks on the accel_group, FALSE
//     otherwise.
func (accelGroup *AccelGroup) IsLocked() bool {
	var _arg0 *C.GtkAccelGroup // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	_cret = C.gtk_accel_group_get_is_locked(_arg0)
	runtime.KeepAlive(accelGroup)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ModifierMask gets a ModifierType representing the mask for this accel_group.
// For example, K_CONTROL_MASK, K_SHIFT_MASK, etc.
//
// The function returns the following values:
//
//   - modifierType: modifier mask for this accel group.
func (accelGroup *AccelGroup) ModifierMask() gdk.ModifierType {
	var _arg0 *C.GtkAccelGroup  // out
	var _cret C.GdkModifierType // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	_cret = C.gtk_accel_group_get_modifier_mask(_arg0)
	runtime.KeepAlive(accelGroup)

	var _modifierType gdk.ModifierType // out

	_modifierType = gdk.ModifierType(_cret)

	return _modifierType
}

// Lock locks the given accelerator group.
//
// Locking an acelerator group prevents the accelerators contained within it
// to be changed during runtime. Refer to gtk_accel_map_change_entry() about
// runtime accelerator changes.
//
// If called more than once, accel_group remains locked until
// gtk_accel_group_unlock() has been called an equivalent number of times.
func (accelGroup *AccelGroup) Lock() {
	var _arg0 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	C.gtk_accel_group_lock(_arg0)
	runtime.KeepAlive(accelGroup)
}

// Query queries an accelerator group for all entries matching accel_key and
// accel_mods.
//
// The function takes the following parameters:
//
//   - accelKey: key value of the accelerator.
//   - accelMods: modifier combination of the accelerator.
//
// The function returns the following values:
//
//   - accelGroupEntrys (optional): array of n_entries AccelGroupEntry elements,
//     or NULL. The array is owned by GTK+ and must not be freed.
func (accelGroup *AccelGroup) Query(accelKey uint, accelMods gdk.ModifierType) []AccelGroupEntry {
	var _arg0 *C.GtkAccelGroup      // out
	var _arg1 C.guint               // out
	var _arg2 C.GdkModifierType     // out
	var _cret *C.GtkAccelGroupEntry // in
	var _arg3 C.guint               // in

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = C.guint(accelKey)
	_arg2 = C.GdkModifierType(accelMods)

	_cret = C.gtk_accel_group_query(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)

	var _accelGroupEntrys []AccelGroupEntry // out

	if _cret != nil {
		{
			src := unsafe.Slice((*C.GtkAccelGroupEntry)(_cret), _arg3)
			_accelGroupEntrys = make([]AccelGroupEntry, _arg3)
			for i := 0; i < int(_arg3); i++ {
				_accelGroupEntrys[i] = *(*AccelGroupEntry)(gextras.NewStructNative(unsafe.Pointer((&src[i]))))
			}
		}
	}

	return _accelGroupEntrys
}

// Unlock undoes the last call to gtk_accel_group_lock() on this accel_group.
func (accelGroup *AccelGroup) Unlock() {
	var _arg0 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	C.gtk_accel_group_unlock(_arg0)
	runtime.KeepAlive(accelGroup)
}

// accelChanged: signal emitted when an entry is added to or removed from the
// accel group.
//
// The function takes the following parameters:
//
//   - keyval
//   - modifier
//   - accelClosure
func (accelGroup *AccelGroup) accelChanged(keyval uint, modifier gdk.ModifierType, accelClosure coreglib.AnyClosure) {
	gclass := (*C.GtkAccelGroupClass)(coreglib.PeekParentClass(accelGroup))
	fnarg := gclass.accel_changed

	var _arg0 *C.GtkAccelGroup  // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _arg3 *C.GClosure       // out

	_arg0 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg1 = C.guint(keyval)
	_arg2 = C.GdkModifierType(modifier)
	_arg3 = (*C.GClosure)(coreglib.NewClosure(coreglib.InternObject(accelGroup), accelClosure))

	C._gotk4_gtk3_AccelGroup_virtual_accel_changed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifier)
	runtime.KeepAlive(accelClosure)
}

// AccelLabelOverrides contains methods that are overridable.
type AccelLabelOverrides struct {
}

func defaultAccelLabelOverrides(v *AccelLabel) AccelLabelOverrides {
	return AccelLabelOverrides{}
}

// AccelLabel widget is a subclass of Label that also displays an accelerator
// key on the right of the label text, e.g. “Ctrl+S”. It is commonly used in
// menus to show the keyboard short-cuts for commands.
//
// The accelerator key to display is typically not set explicitly (although it
// can be, with gtk_accel_label_set_accel()). Instead, the AccelLabel displays
// the accelerators which have been added to a particular widget. This widget is
// set by calling gtk_accel_label_set_accel_widget().
//
// For example, a MenuItem widget may have an accelerator added to emit the
// “activate” signal when the “Ctrl+S” key combination is pressed. A AccelLabel
// is created and added to the MenuItem, and gtk_accel_label_set_accel_widget()
// is called with the MenuItem as the second argument. The AccelLabel will now
// display “Ctrl+S” after its label.
//
// Note that creating a MenuItem with gtk_menu_item_new_with_label() (or one of
// the similar functions for CheckMenuItem and RadioMenuItem) automatically adds
// a AccelLabel to the MenuItem and calls gtk_accel_label_set_accel_widget() to
// set it up for you.
//
// A AccelLabel will only display accelerators which have GTK_ACCEL_VISIBLE set
// (see AccelFlags). A AccelLabel can display multiple accelerators and even
// signal names, though it is almost always used to display just one accelerator
// key.
//
// Creating a simple menu item with an accelerator key.
//
//	label
//	╰── accelerator
//
// Like Label, GtkAccelLabel has a main CSS node with the name label. It adds a
// subnode with name accelerator.
type AccelLabel struct {
	_ [0]func() // equal guard
	Label
}

var (
	_ Miscer = (*AccelLabel)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AccelLabel, *AccelLabelClass, AccelLabelOverrides](
		GTypeAccelLabel,
		initAccelLabelClass,
		wrapAccelLabel,
		defaultAccelLabelOverrides,
	)
}

func initAccelLabelClass(gclass unsafe.Pointer, overrides AccelLabelOverrides, classInitFunc func(*AccelLabelClass)) {
	if classInitFunc != nil {
		class := (*AccelLabelClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAccelLabel(obj *coreglib.Object) *AccelLabel {
	return &AccelLabel{
		Label: Label{
			Misc: Misc{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalAccelLabel(p uintptr) (interface{}, error) {
	return wrapAccelLabel(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewAccelLabel creates a new AccelLabel.
//
// The function takes the following parameters:
//
//   - str: label string. Must be non-NULL.
//
// The function returns the following values:
//
//   - accelLabel: new AccelLabel.
func NewAccelLabel(str string) *AccelLabel {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_accel_label_new(_arg1)
	runtime.KeepAlive(str)

	var _accelLabel *AccelLabel // out

	_accelLabel = wrapAccelLabel(coreglib.Take(unsafe.Pointer(_cret)))

	return _accelLabel
}

// Accel gets the keyval and modifier mask set with gtk_accel_label_set_accel().
//
// The function returns the following values:
//
//   - acceleratorKey: return location for the keyval.
//   - acceleratorMods: return location for the modifier mask.
func (accelLabel *AccelLabel) Accel() (uint, gdk.ModifierType) {
	var _arg0 *C.GtkAccelLabel  // out
	var _arg1 C.guint           // in
	var _arg2 C.GdkModifierType // in

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))

	C.gtk_accel_label_get_accel(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(accelLabel)

	var _acceleratorKey uint              // out
	var _acceleratorMods gdk.ModifierType // out

	_acceleratorKey = uint(_arg1)
	_acceleratorMods = gdk.ModifierType(_arg2)

	return _acceleratorKey, _acceleratorMods
}

// AccelWidget fetches the widget monitored by this accelerator label.
// See gtk_accel_label_set_accel_widget().
//
// The function returns the following values:
//
//   - widget (optional): object monitored by the accelerator label, or NULL.
func (accelLabel *AccelLabel) AccelWidget() Widgetter {
	var _arg0 *C.GtkAccelLabel // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))

	_cret = C.gtk_accel_label_get_accel_widget(_arg0)
	runtime.KeepAlive(accelLabel)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// AccelWidth returns the width needed to display the accelerator key(s).
// This is used by menus to align all of the MenuItem widgets, and shouldn't be
// needed by applications.
//
// The function returns the following values:
//
//   - guint: width needed to display the accelerator key(s).
func (accelLabel *AccelLabel) AccelWidth() uint {
	var _arg0 *C.GtkAccelLabel // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))

	_cret = C.gtk_accel_label_get_accel_width(_arg0)
	runtime.KeepAlive(accelLabel)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Refetch recreates the string representing the accelerator keys. This should
// not be needed since the string is automatically updated whenever accelerators
// are added or removed from the associated widget.
//
// The function returns the following values:
//
//   - ok always returns FALSE.
func (accelLabel *AccelLabel) Refetch() bool {
	var _arg0 *C.GtkAccelLabel // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))

	_cret = C.gtk_accel_label_refetch(_arg0)
	runtime.KeepAlive(accelLabel)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAccel: manually sets a keyval and modifier mask as the accelerator
// rendered by accel_label.
//
// If a keyval and modifier are explicitly set then these values are used
// regardless of any associated accel closure or widget.
//
// Providing an accelerator_key of 0 removes the manual setting.
//
// The function takes the following parameters:
//
//   - acceleratorKey: keyval, or 0.
//   - acceleratorMods: modifier mask for the accel.
func (accelLabel *AccelLabel) SetAccel(acceleratorKey uint, acceleratorMods gdk.ModifierType) {
	var _arg0 *C.GtkAccelLabel  // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))
	_arg1 = C.guint(acceleratorKey)
	_arg2 = C.GdkModifierType(acceleratorMods)

	C.gtk_accel_label_set_accel(_arg0, _arg1, _arg2)
	runtime.KeepAlive(accelLabel)
	runtime.KeepAlive(acceleratorKey)
	runtime.KeepAlive(acceleratorMods)
}

// SetAccelClosure sets the closure to be monitored by this accelerator
// label. The closure must be connected to an accelerator group; see
// gtk_accel_group_connect(). Passing NULL for accel_closure will dissociate
// accel_label from its current closure, if any.
//
// The function takes the following parameters:
//
//   - accelClosure (optional): closure to monitor for accelerator changes,
//     or NULL.
func (accelLabel *AccelLabel) SetAccelClosure(accelClosure coreglib.AnyClosure) {
	var _arg0 *C.GtkAccelLabel // out
	var _arg1 *C.GClosure      // out

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))
	_arg1 = (*C.GClosure)(coreglib.NewClosure(coreglib.InternObject(accelLabel), accelClosure))

	C.gtk_accel_label_set_accel_closure(_arg0, _arg1)
	runtime.KeepAlive(accelLabel)
	runtime.KeepAlive(accelClosure)
}

// SetAccelWidget sets the widget to be monitored by this accelerator label.
// Passing NULL for accel_widget will dissociate accel_label from its current
// widget, if any.
//
// The function takes the following parameters:
//
//   - accelWidget (optional): widget to be monitored, or NULL.
func (accelLabel *AccelLabel) SetAccelWidget(accelWidget Widgetter) {
	var _arg0 *C.GtkAccelLabel // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkAccelLabel)(unsafe.Pointer(coreglib.InternObject(accelLabel).Native()))
	if accelWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(accelWidget).Native()))
	}

	C.gtk_accel_label_set_accel_widget(_arg0, _arg1)
	runtime.KeepAlive(accelLabel)
	runtime.KeepAlive(accelWidget)
}

// AccelMap: accelerator maps are used to define runtime configurable
// accelerators. Functions for manipulating them are are usually used by
// higher level convenience mechanisms like UIManager and are thus considered
// “low-level”. You’ll want to use them if you’re manually creating menus that
// should have user-configurable accelerators.
//
// An accelerator is uniquely defined by:
//
// - accelerator path
//
// - accelerator key
//
// - accelerator modifiers
//
// The accelerator path must consist of
// “<WINDOWTYPE>/Category1/Category2/.../Action”, where WINDOWTYPE should be a
// unique application-specific identifier that corresponds to the kind of window
// the accelerator is being used in, e.g. “Gimp-Image”, “Abiword-Document” or
// “Gnumeric-Settings”. The “Category1/.../Action” portion is most appropriately
// chosen by the action the accelerator triggers, i.e. for accelerators on menu
// items, choose the item’s menu path, e.g. “File/Save As”, “Image/View/Zoom”
// or “Edit/Select All”. So a full valid accelerator path may look like:
// “<Gimp-Toolbox>/File/Dialogs/Tool Options...”.
//
// All accelerators are stored inside one global AccelMap that can be obtained
// using gtk_accel_map_get(). See [Monitoring changes][monitoring-changes] for
// additional details.
//
// # Manipulating accelerators
//
// New accelerators can be added using gtk_accel_map_add_entry(). To search
// for specific accelerator, use gtk_accel_map_lookup_entry(). Modifications of
// existing accelerators should be done using gtk_accel_map_change_entry().
//
// In order to avoid having some accelerators changed, they can be
// locked using gtk_accel_map_lock_path(). Unlocking is done using
// gtk_accel_map_unlock_path().
//
// # Saving and loading accelerator maps
//
// Accelerator maps can be saved to and loaded from some external resource.
// For simple saving and loading from file, gtk_accel_map_save() and
// gtk_accel_map_load() are provided. Saving and loading can also be
// done by providing file descriptor to gtk_accel_map_save_fd() and
// gtk_accel_map_load_fd().
//
// # Monitoring changes
//
// AccelMap object is only useful for monitoring changes of accelerators.
// By connecting to AccelMap::changed signal, one can monitor changes of all
// accelerators. It is also possible to monitor only single accelerator path by
// using it as a detail of the AccelMap::changed signal.
type AccelMap struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*AccelMap)(nil)
)

func wrapAccelMap(obj *coreglib.Object) *AccelMap {
	return &AccelMap{
		Object: obj,
	}
}

func marshalAccelMap(p uintptr) (interface{}, error) {
	return wrapAccelMap(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged notifies of a change in the global accelerator map. The path
// is also used as the detail for the signal, so it is possible to connect to
// changed::accel_path.
func (v *AccelMap) ConnectChanged(f func(accelPath string, accelKey uint, accelMods gdk.ModifierType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "changed", false, unsafe.Pointer(C._gotk4_gtk3_AccelMap_ConnectChanged), f)
}

// AccelMapAddEntry registers a new accelerator with the global accelerator map.
// This function should only be called once per accel_path with the canonical
// accel_key and accel_mods for this path. To change the accelerator during
// runtime programatically, use gtk_accel_map_change_entry().
//
// Set accel_key and accel_mods to 0 to request a removal of the accelerator.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath: valid accelerator path.
//   - accelKey: accelerator key.
//   - accelMods: accelerator modifiers.
func AccelMapAddEntry(accelPath string, accelKey uint, accelMods gdk.ModifierType) {
	var _arg1 *C.gchar          // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.guint(accelKey)
	_arg3 = C.GdkModifierType(accelMods)

	C.gtk_accel_map_add_entry(_arg1, _arg2, _arg3)
	runtime.KeepAlive(accelPath)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)
}

// AccelMapAddFilter adds a filter to the global list of accel path filters.
//
// Accel map entries whose accel path matches one of the filters are skipped by
// gtk_accel_map_foreach().
//
// This function is intended for GTK+ modules that create their own menus,
// but don’t want them to be saved into the applications accelerator map dump.
//
// The function takes the following parameters:
//
//   - filterPattern: pattern (see Spec).
func AccelMapAddFilter(filterPattern string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filterPattern)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accel_map_add_filter(_arg1)
	runtime.KeepAlive(filterPattern)
}

// AccelMapChangeEntry changes the accel_key and accel_mods currently associated
// with accel_path. Due to conflicts with other accelerators, a change may
// not always be possible, replace indicates whether other accelerators may be
// deleted to resolve such conflicts. A change will only occur if all conflicts
// could be resolved (which might not be the case if conflicting accelerators
// are locked). Successful changes are indicated by a TRUE return value.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath: valid accelerator path.
//   - accelKey: new accelerator key.
//   - accelMods: new accelerator modifiers.
//   - replace: TRUE if other accelerators may be deleted upon conflicts.
//
// The function returns the following values:
//
//   - ok: TRUE if the accelerator could be changed, FALSE otherwise.
func AccelMapChangeEntry(accelPath string, accelKey uint, accelMods gdk.ModifierType, replace bool) bool {
	var _arg1 *C.gchar          // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _arg4 C.gboolean        // out
	var _cret C.gboolean        // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.guint(accelKey)
	_arg3 = C.GdkModifierType(accelMods)
	if replace {
		_arg4 = C.TRUE
	}

	_cret = C.gtk_accel_map_change_entry(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(accelPath)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)
	runtime.KeepAlive(replace)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AccelMapGet gets the singleton global AccelMap object. This object is useful
// only for notification of changes to the accelerator map via the ::changed
// signal; it isn’t a parameter to the other accelerator map functions.
//
// The function returns the following values:
//
//   - accelMap: global AccelMap object.
func AccelMapGet() *AccelMap {
	var _cret *C.GtkAccelMap // in

	_cret = C.gtk_accel_map_get()

	var _accelMap *AccelMap // out

	_accelMap = wrapAccelMap(coreglib.Take(unsafe.Pointer(_cret)))

	return _accelMap
}

// AccelMapLoad parses a file previously saved with gtk_accel_map_save() for
// accelerator specifications, and propagates them accordingly.
//
// The function takes the following parameters:
//
//   - fileName: file containing accelerator specifications, in the GLib file
//     name encoding.
func AccelMapLoad(fileName string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accel_map_load(_arg1)
	runtime.KeepAlive(fileName)
}

// AccelMapLoadFd: filedescriptor variant of gtk_accel_map_load().
//
// Note that the file descriptor will not be closed by this function.
//
// The function takes the following parameters:
//
//   - fd: valid readable file descriptor.
func AccelMapLoadFd(fd int) {
	var _arg1 C.gint // out

	_arg1 = C.gint(fd)

	C.gtk_accel_map_load_fd(_arg1)
	runtime.KeepAlive(fd)
}

// AccelMapLoadScanner variant of gtk_accel_map_load().
//
// The function takes the following parameters:
//
//   - scanner which has already been provided with an input file.
func AccelMapLoadScanner(scanner *glib.Scanner) {
	var _arg1 *C.GScanner // out

	_arg1 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))

	C.gtk_accel_map_load_scanner(_arg1)
	runtime.KeepAlive(scanner)
}

// AccelMapLockPath locks the given accelerator path. If the accelerator map
// doesn’t yet contain an entry for accel_path, a new one is created.
//
// Locking an accelerator path prevents its accelerator from being
// changed during runtime. A locked accelerator path can be unlocked by
// gtk_accel_map_unlock_path(). Refer to gtk_accel_map_change_entry() for
// information about runtime accelerator changes.
//
// If called more than once, accel_path remains locked until
// gtk_accel_map_unlock_path() has been called an equivalent number of times.
//
// Note that locking of individual accelerator paths is independent from
// locking the AccelGroup containing them. For runtime accelerator changes to be
// possible, both the accelerator path and its AccelGroup have to be unlocked.
//
// The function takes the following parameters:
//
//   - accelPath: valid accelerator path.
func AccelMapLockPath(accelPath string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accel_map_lock_path(_arg1)
	runtime.KeepAlive(accelPath)
}

// AccelMapLookupEntry looks up the accelerator entry for accel_path and fills
// in key.
//
// The function takes the following parameters:
//
//   - accelPath: valid accelerator path.
//
// The function returns the following values:
//
//   - key (optional): accelerator key to be filled in (optional).
//   - ok: TRUE if accel_path is known, FALSE otherwise.
func AccelMapLookupEntry(accelPath string) (*AccelKey, bool) {
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkAccelKey // in
	var _cret C.gboolean    // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_accel_map_lookup_entry(_arg1, &_arg2)
	runtime.KeepAlive(accelPath)

	var _key *AccelKey // out
	var _ok bool       // out

	_key = (*AccelKey)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _key, _ok
}

// AccelMapSave saves current accelerator specifications (accelerator path,
// key and modifiers) to file_name. The file is written in a format suitable to
// be read back in by gtk_accel_map_load().
//
// The function takes the following parameters:
//
//   - fileName: name of the file to contain accelerator specifications,
//     in the GLib file name encoding.
func AccelMapSave(fileName string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accel_map_save(_arg1)
	runtime.KeepAlive(fileName)
}

// AccelMapSaveFd: filedescriptor variant of gtk_accel_map_save().
//
// Note that the file descriptor will not be closed by this function.
//
// The function takes the following parameters:
//
//   - fd: valid writable file descriptor.
func AccelMapSaveFd(fd int) {
	var _arg1 C.gint // out

	_arg1 = C.gint(fd)

	C.gtk_accel_map_save_fd(_arg1)
	runtime.KeepAlive(fd)
}

// AccelMapUnlockPath undoes the last call to gtk_accel_map_lock_path() on
// this accel_path. Refer to gtk_accel_map_lock_path() for information about
// accelerator path locking.
//
// The function takes the following parameters:
//
//   - accelPath: valid accelerator path.
func AccelMapUnlockPath(accelPath string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_accel_map_unlock_path(_arg1)
	runtime.KeepAlive(accelPath)
}

// AccessibleOverrides contains methods that are overridable.
type AccessibleOverrides struct {
	// ConnectWidgetDestroyed: this function specifies the callback function to
	// be called when the widget corresponding to a GtkAccessible is destroyed.
	//
	// Deprecated: Use gtk_accessible_set_widget() and its vfuncs.
	ConnectWidgetDestroyed func()
	WidgetSet              func()
	WidgetUnset            func()
}

func defaultAccessibleOverrides(v *Accessible) AccessibleOverrides {
	return AccessibleOverrides{
		ConnectWidgetDestroyed: v.connectWidgetDestroyed,
		WidgetSet:              v.widgetSet,
		WidgetUnset:            v.widgetUnset,
	}
}

// Accessible class is the base class for accessible implementations for Widget
// subclasses. It is a thin wrapper around Object, which adds facilities for
// associating a widget with its accessible object.
//
// An accessible implementation for a third-party widget should derive from
// Accessible and implement the suitable interfaces from ATK, such as Text
// or Selection. To establish the connection between the widget class and its
// corresponding acccessible implementation, override the get_accessible vfunc
// in WidgetClass.
type Accessible struct {
	_ [0]func() // equal guard
	atk.AtkObject
}

var (
	_ coreglib.Objector = (*Accessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Accessible, *AccessibleClass, AccessibleOverrides](
		GTypeAccessible,
		initAccessibleClass,
		wrapAccessible,
		defaultAccessibleOverrides,
	)
}

func initAccessibleClass(gclass unsafe.Pointer, overrides AccessibleOverrides, classInitFunc func(*AccessibleClass)) {
	pclass := (*C.GtkAccessibleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAccessible))))

	if overrides.ConnectWidgetDestroyed != nil {
		pclass.connect_widget_destroyed = (*[0]byte)(C._gotk4_gtk3_AccessibleClass_connect_widget_destroyed)
	}

	if overrides.WidgetSet != nil {
		pclass.widget_set = (*[0]byte)(C._gotk4_gtk3_AccessibleClass_widget_set)
	}

	if overrides.WidgetUnset != nil {
		pclass.widget_unset = (*[0]byte)(C._gotk4_gtk3_AccessibleClass_widget_unset)
	}

	if classInitFunc != nil {
		class := (*AccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAccessible(obj *coreglib.Object) *Accessible {
	return &Accessible{
		AtkObject: atk.AtkObject{
			Object: obj,
		},
	}
}

func marshalAccessible(p uintptr) (interface{}, error) {
	return wrapAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectWidgetDestroyed: this function specifies the callback function to be
// called when the widget corresponding to a GtkAccessible is destroyed.
//
// Deprecated: Use gtk_accessible_set_widget() and its vfuncs.
func (accessible *Accessible) ConnectWidgetDestroyed() {
	var _arg0 *C.GtkAccessible // out

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	C.gtk_accessible_connect_widget_destroyed(_arg0)
	runtime.KeepAlive(accessible)
}

// Widget gets the Widget corresponding to the Accessible. The returned widget
// does not have a reference added, so you do not need to unref it.
//
// The function returns the following values:
//
//   - widget (optional): pointer to the Widget corresponding to the Accessible,
//     or NULL.
func (accessible *Accessible) Widget() Widgetter {
	var _arg0 *C.GtkAccessible // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	_cret = C.gtk_accessible_get_widget(_arg0)
	runtime.KeepAlive(accessible)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// SetWidget sets the Widget corresponding to the Accessible.
//
// accessible will not hold a reference to widget. It is the caller’s
// responsibility to ensure that when widget is destroyed, the widget is unset
// by calling this function again with widget set to NULL.
//
// The function takes the following parameters:
//
//   - widget (optional) or NULL to unset.
func (accessible *Accessible) SetWidget(widget Widgetter) {
	var _arg0 *C.GtkAccessible // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}

	C.gtk_accessible_set_widget(_arg0, _arg1)
	runtime.KeepAlive(accessible)
	runtime.KeepAlive(widget)
}

// connectWidgetDestroyed: this function specifies the callback function to be
// called when the widget corresponding to a GtkAccessible is destroyed.
//
// Deprecated: Use gtk_accessible_set_widget() and its vfuncs.
func (accessible *Accessible) connectWidgetDestroyed() {
	gclass := (*C.GtkAccessibleClass)(coreglib.PeekParentClass(accessible))
	fnarg := gclass.connect_widget_destroyed

	var _arg0 *C.GtkAccessible // out

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	C._gotk4_gtk3_Accessible_virtual_connect_widget_destroyed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(accessible)
}

func (accessible *Accessible) widgetSet() {
	gclass := (*C.GtkAccessibleClass)(coreglib.PeekParentClass(accessible))
	fnarg := gclass.widget_set

	var _arg0 *C.GtkAccessible // out

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	C._gotk4_gtk3_Accessible_virtual_widget_set(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(accessible)
}

func (accessible *Accessible) widgetUnset() {
	gclass := (*C.GtkAccessibleClass)(coreglib.PeekParentClass(accessible))
	fnarg := gclass.widget_unset

	var _arg0 *C.GtkAccessible // out

	_arg0 = (*C.GtkAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	C._gotk4_gtk3_Accessible_virtual_widget_unset(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(accessible)
}

// ActionOverrides contains methods that are overridable.
type ActionOverrides struct {
	// Activate emits the “activate” signal on the specified action, if it
	// isn't insensitive. This gets called by the proxy widgets when they get
	// activated.
	//
	// It can also be used to manually activate an action.
	//
	// Deprecated: Use g_action_group_activate_action() on a #GAction instead.
	Activate     func()
	ConnectProxy func(proxy Widgetter)
	// CreateMenu: if action provides a Menu widget as a submenu for the menu
	// item or the toolbar item it creates, this function returns an instance of
	// that menu.
	//
	// Deprecated: Use #GAction and Model instead, and create a Menu with
	// gtk_menu_new_from_model().
	//
	// The function returns the following values:
	//
	//   - widget: menu item provided by the action, or NULL.
	CreateMenu func() Widgetter
	// CreateMenuItem creates a menu item widget that proxies for the given
	// action.
	//
	// Deprecated: Use g_menu_item_new() and associate it with a #GAction
	// instead.
	//
	// The function returns the following values:
	//
	//   - widget: menu item connected to the action.
	CreateMenuItem func() Widgetter
	// CreateToolItem creates a toolbar item widget that proxies for the given
	// action.
	//
	// Deprecated: Use a ToolItem and associate it with a #GAction using
	// gtk_actionable_set_action_name() instead.
	//
	// The function returns the following values:
	//
	//   - widget: toolbar item connected to the action.
	CreateToolItem  func() Widgetter
	DisconnectProxy func(proxy Widgetter)
}

func defaultActionOverrides(v *Action) ActionOverrides {
	return ActionOverrides{
		Activate:        v.activate,
		ConnectProxy:    v.connectProxy,
		CreateMenu:      v.createMenu,
		CreateMenuItem:  v.createMenuItem,
		CreateToolItem:  v.createToolItem,
		DisconnectProxy: v.disconnectProxy,
	}
}

// Action: > In GTK+ 3.10, GtkAction has been deprecated. Use #GAction >
// instead, and associate actions with Actionable widgets. Use > Model for
// creating menus with gtk_menu_new_from_model().
//
// Actions represent operations that the user can be perform, along with some
// information how it should be presented in the interface. Each action provides
// methods to create icons, menu items and toolbar items representing itself.
//
// As well as the callback that is called when the action gets activated,
// the following also gets associated with the action:
//
// - a name (not translated, for path lookup)
//
// - a label (translated, for display)
//
// - an accelerator
//
// - whether label indicates a stock id
//
// - a tooltip (optional, translated)
//
// - a toolbar label (optional, shorter than label)
//
//	The action will also have some state information:
//
// - visible (shown/hidden)
//
// - sensitive (enabled/disabled)
//
// Apart from regular actions, there are [toggle actions][GtkToggleAction],
// which can be toggled between two states and [radio actions][GtkRadioAction],
// of which only one in a group can be in the “active” state. Other actions can
// be implemented as Action subclasses.
//
// Each action can have one or more proxy widgets. To act as an action proxy,
// widget needs to implement Activatable interface. Proxies mirror the state
// of the action and should change when the action’s state changes. Properties
// that are always mirrored by proxies are Action:sensitive and Action:visible.
// Action:gicon, Action:icon-name, Action:label, Action:short-label
// and Action:stock-id properties are only mirorred if proxy widget has
// Activatable:use-action-appearance property set to TRUE.
//
// When the proxy is activated, it should activate its action.
type Action struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*Action)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Action, *ActionClass, ActionOverrides](
		GTypeAction,
		initActionClass,
		wrapAction,
		defaultActionOverrides,
	)
}

func initActionClass(gclass unsafe.Pointer, overrides ActionOverrides, classInitFunc func(*ActionClass)) {
	pclass := (*C.GtkActionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAction))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_ActionClass_activate)
	}

	if overrides.ConnectProxy != nil {
		pclass.connect_proxy = (*[0]byte)(C._gotk4_gtk3_ActionClass_connect_proxy)
	}

	if overrides.CreateMenu != nil {
		pclass.create_menu = (*[0]byte)(C._gotk4_gtk3_ActionClass_create_menu)
	}

	if overrides.CreateMenuItem != nil {
		pclass.create_menu_item = (*[0]byte)(C._gotk4_gtk3_ActionClass_create_menu_item)
	}

	if overrides.CreateToolItem != nil {
		pclass.create_tool_item = (*[0]byte)(C._gotk4_gtk3_ActionClass_create_tool_item)
	}

	if overrides.DisconnectProxy != nil {
		pclass.disconnect_proxy = (*[0]byte)(C._gotk4_gtk3_ActionClass_disconnect_proxy)
	}

	if classInitFunc != nil {
		class := (*ActionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAction(obj *coreglib.Object) *Action {
	return &Action{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalAction(p uintptr) (interface{}, error) {
	return wrapAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate: "activate" signal is emitted when the action is activated.
func (action *Action) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(action, "activate", false, unsafe.Pointer(C._gotk4_gtk3_Action_ConnectActivate), f)
}

// NewAction creates a new Action object. To add the action to
// a ActionGroup and set the accelerator for the action, call
// gtk_action_group_add_action_with_accel(). See the [UI Definition
// section][XML-UI] for information on allowed action names.
//
// Deprecated: Use #GAction instead, associating it to a widget with Actionable
// or creating a Menu with gtk_menu_new_from_model().
//
// The function takes the following parameters:
//
//   - name: unique name for the action.
//   - label (optional) displayed in menu items and on buttons, or NULL.
//   - tooltip (optional) for the action, or NULL.
//   - stockId (optional): stock icon to display in widgets representing the
//     action, or NULL.
//
// The function returns the following values:
//
//   - action: new Action.
func NewAction(name, label, tooltip, stockId string) *Action {
	var _arg1 *C.gchar     // out
	var _arg2 *C.gchar     // out
	var _arg3 *C.gchar     // out
	var _arg4 *C.gchar     // out
	var _cret *C.GtkAction // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if tooltip != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	if stockId != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg4))
	}

	_cret = C.gtk_action_new(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)

	var _action *Action // out

	_action = wrapAction(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _action
}

// Activate emits the “activate” signal on the specified action, if it isn't
// insensitive. This gets called by the proxy widgets when they get activated.
//
// It can also be used to manually activate an action.
//
// Deprecated: Use g_action_group_activate_action() on a #GAction instead.
func (action *Action) Activate() {
	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_activate(_arg0)
	runtime.KeepAlive(action)
}

// BlockActivate: disable activation signals from the action
//
// This is needed when updating the state of your proxy Activatable widget could
// result in calling gtk_action_activate(), this is a convenience function to
// avoid recursing in those cases (updating toggle state for instance).
//
// Deprecated: Use g_simple_action_set_enabled() to disable the Action instead.
func (action *Action) BlockActivate() {
	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_block_activate(_arg0)
	runtime.KeepAlive(action)
}

// ConnectAccelerator installs the accelerator for action if action
// has an accel path and group. See gtk_action_set_accel_path() and
// gtk_action_set_accel_group()
//
// Since multiple proxies may independently trigger the installation
// of the accelerator, the action counts the number of times this
// function has been called and doesn’t remove the accelerator until
// gtk_action_disconnect_accelerator() has been called as many times.
//
// Deprecated: Use #GAction and the accelerator group on an associated Menu
// instead.
func (action *Action) ConnectAccelerator() {
	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_connect_accelerator(_arg0)
	runtime.KeepAlive(action)
}

// CreateIcon: this function is intended for use by action implementations to
// create icons displayed in the proxy widgets.
//
// Deprecated: Use g_menu_item_set_icon() to set an icon on a Item, or
// gtk_container_add() to add a Image to a Button.
//
// The function takes the following parameters:
//
//   - iconSize: size of the icon (IconSize) that should be created.
//
// The function returns the following values:
//
//   - widget that displays the icon for this action.
func (action *Action) CreateIcon(iconSize int) Widgetter {
	var _arg0 *C.GtkAction  // out
	var _arg1 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = C.GtkIconSize(iconSize)

	_cret = C.gtk_action_create_icon(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(iconSize)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// CreateMenu: if action provides a Menu widget as a submenu for the menu item
// or the toolbar item it creates, this function returns an instance of that
// menu.
//
// Deprecated: Use #GAction and Model instead, and create a Menu with
// gtk_menu_new_from_model().
//
// The function returns the following values:
//
//   - widget: menu item provided by the action, or NULL.
func (action *Action) CreateMenu() Widgetter {
	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_create_menu(_arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// CreateMenuItem creates a menu item widget that proxies for the given action.
//
// Deprecated: Use g_menu_item_new() and associate it with a #GAction instead.
//
// The function returns the following values:
//
//   - widget: menu item connected to the action.
func (action *Action) CreateMenuItem() Widgetter {
	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_create_menu_item(_arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// CreateToolItem creates a toolbar item widget that proxies for the given
// action.
//
// Deprecated: Use a ToolItem and associate it with a #GAction using
// gtk_actionable_set_action_name() instead.
//
// The function returns the following values:
//
//   - widget: toolbar item connected to the action.
func (action *Action) CreateToolItem() Widgetter {
	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_create_tool_item(_arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// DisconnectAccelerator undoes the effect of one call to
// gtk_action_connect_accelerator().
//
// Deprecated: Use #GAction and the accelerator group on an associated Menu
// instead.
func (action *Action) DisconnectAccelerator() {
	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_disconnect_accelerator(_arg0)
	runtime.KeepAlive(action)
}

// AccelPath returns the accel path for this action.
//
// Deprecated: Use #GAction and the accelerator path on an associated Menu
// instead.
//
// The function returns the following values:
//
//   - utf8: accel path for this action, or NULL if none is set. The returned
//     string is owned by GTK+ and must not be freed or modified.
func (action *Action) AccelPath() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_accel_path(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// AlwaysShowImage returns whether action's menu item proxies will always show
// their image, if available.
//
// Deprecated: Use g_menu_item_get_attribute_value() on a Item instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the menu item proxies will always show their image.
func (action *Action) AlwaysShowImage() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_always_show_image(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// GIcon gets the gicon of action.
//
// Deprecated: Use #GAction instead, and g_menu_item_get_attribute_value() to
// get an icon from a Item associated with a #GAction.
//
// The function returns the following values:
//
//   - icon action’s #GIcon if one is set.
func (action *Action) GIcon() *gio.Icon {
	var _arg0 *C.GtkAction // out
	var _cret *C.GIcon     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_gicon(_arg0)
	runtime.KeepAlive(action)

	var _icon *gio.Icon // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_icon = &gio.Icon{
			Object: obj,
		}
	}

	return _icon
}

// IconName gets the icon name of action.
//
// Deprecated: Use #GAction instead, and g_menu_item_get_attribute_value() to
// get an icon from a Item associated with a #GAction.
//
// The function returns the following values:
//
//   - utf8: icon name.
func (action *Action) IconName() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_icon_name(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// IsImportant checks whether action is important or not
//
// Deprecated: Use #GAction instead, and control and monitor whether labels are
// shown directly.
//
// The function returns the following values:
//
//   - ok: whether action is important.
func (action *Action) IsImportant() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_is_important(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Label gets the label text of action.
//
// Deprecated: Use #GAction instead, and get a label from a menu item
// with g_menu_item_get_attribute_value(). For Actionable widgets, use the
// widget-specific API to get a label.
//
// The function returns the following values:
//
//   - utf8: label text.
func (action *Action) Label() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_label(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Name returns the name of the action.
//
// Deprecated: Use g_action_get_name() on a #GAction instead.
//
// The function returns the following values:
//
//   - utf8: name of the action. The string belongs to GTK+ and should not be
//     freed.
func (action *Action) Name() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_name(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Proxies returns the proxy widgets for an action. See also
// gtk_activatable_get_related_action().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - sList of proxy widgets. The list is owned by GTK+ and must not be
//     modified.
func (action *Action) Proxies() []Widgetter {
	var _arg0 *C.GtkAction // out
	var _cret *C.GSList    // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_proxies(_arg0)
	runtime.KeepAlive(action)

	var _sList []Widgetter // out

	_sList = make([]Widgetter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_sList = append(_sList, dst)
	})

	return _sList
}

// Sensitive returns whether the action itself is sensitive. Note that this
// doesn’t necessarily mean effective sensitivity. See gtk_action_is_sensitive()
// for that.
//
// Deprecated: Use g_action_get_enabled() on a #GAction instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the action itself is sensitive.
func (action *Action) Sensitive() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_sensitive(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShortLabel gets the short label text of action.
//
// Deprecated: Use #GAction instead, which has no equivalent of short labels.
//
// The function returns the following values:
//
//   - utf8: short label text.
func (action *Action) ShortLabel() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_short_label(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// StockID gets the stock id of action.
//
// Deprecated: Use #GAction instead, which has no equivalent of stock items.
//
// The function returns the following values:
//
//   - utf8: stock id.
func (action *Action) StockID() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_stock_id(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Tooltip gets the tooltip text of action.
//
// Deprecated: Use #GAction instead, and get tooltips from associated Actionable
// widgets with gtk_widget_get_tooltip_text().
//
// The function returns the following values:
//
//   - utf8: tooltip text.
func (action *Action) Tooltip() string {
	var _arg0 *C.GtkAction // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_tooltip(_arg0)
	runtime.KeepAlive(action)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Visible returns whether the action itself is visible. Note that this doesn’t
// necessarily mean effective visibility. See gtk_action_is_sensitive() for
// that.
//
// Deprecated: Use #GAction instead, and control and monitor the state of
// Actionable widgets directly.
//
// The function returns the following values:
//
//   - ok: TRUE if the action itself is visible.
func (action *Action) Visible() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_visible(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleHorizontal checks whether action is visible when horizontal
//
// Deprecated: Use #GAction instead, and control and monitor the visibility of
// associated widgets and menu items directly.
//
// The function returns the following values:
//
//   - ok: whether action is visible when horizontal.
func (action *Action) VisibleHorizontal() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_visible_horizontal(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleVertical checks whether action is visible when horizontal
//
// Deprecated: Use #GAction instead, and control and monitor the visibility of
// associated widgets and menu items directly.
//
// The function returns the following values:
//
//   - ok: whether action is visible when horizontal.
func (action *Action) VisibleVertical() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_get_visible_vertical(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsSensitive returns whether the action is effectively sensitive.
//
// Deprecated: Use g_action_get_enabled() on a #GAction instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the action and its associated action group are both
//     sensitive.
func (action *Action) IsSensitive() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_is_sensitive(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsVisible returns whether the action is effectively visible.
//
// Deprecated: Use #GAction instead, and control and monitor the state of
// Actionable widgets directly.
//
// The function returns the following values:
//
//   - ok: TRUE if the action and its associated action group are both visible.
func (action *Action) IsVisible() bool {
	var _arg0 *C.GtkAction // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_action_is_visible(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAccelGroup sets the AccelGroup in which the accelerator for this action
// will be installed.
//
// Deprecated: Use #GAction and the accelerator group on an associated Menu
// instead.
//
// The function takes the following parameters:
//
//   - accelGroup (optional) or NULL.
func (action *Action) SetAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkAction     // out
	var _arg1 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if accelGroup != nil {
		_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	}

	C.gtk_action_set_accel_group(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(accelGroup)
}

// SetAccelPath sets the accel path for this action. All proxy widgets
// associated with the action will have this accel path, so that their
// accelerators are consistent.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// Deprecated: Use #GAction and the accelerator path on an associated Menu
// instead.
//
// The function takes the following parameters:
//
//   - accelPath: accelerator path.
func (action *Action) SetAccelPath(accelPath string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_accel_path(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(accelPath)
}

// SetAlwaysShowImage sets whether action's menu item proxies will ignore the
// Settings:gtk-menu-images setting and always show their image, if available.
//
// Use this if the menu item would be useless or hard to use without their
// image.
//
// Deprecated: Use g_menu_item_set_icon() on a Item instead, if the item should
// have an image.
//
// The function takes the following parameters:
//
//   - alwaysShow: TRUE if menuitem proxies should always show their image.
func (action *Action) SetAlwaysShowImage(alwaysShow bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if alwaysShow {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_always_show_image(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(alwaysShow)
}

// SetGIcon sets the icon of action.
//
// Deprecated: Use #GAction instead, and g_menu_item_set_icon() to set an icon
// on a Item associated with a #GAction, or gtk_container_add() to add a Image
// to a Button.
//
// The function takes the following parameters:
//
//   - icon to set.
func (action *Action) SetGIcon(icon gio.Iconner) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.GIcon     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	C.gtk_action_set_gicon(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(icon)
}

// SetIconName sets the icon name on action
//
// Deprecated: Use #GAction instead, and g_menu_item_set_icon() to set an icon
// on a Item associated with a #GAction, or gtk_container_add() to add a Image
// to a Button.
//
// The function takes the following parameters:
//
//   - iconName: icon name to set.
func (action *Action) SetIconName(iconName string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_icon_name(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(iconName)
}

// SetIsImportant sets whether the action is important, this attribute is used
// primarily by toolbar items to decide whether to show a label or not.
//
// Deprecated: Use #GAction instead, and control and monitor whether labels are
// shown directly.
//
// The function takes the following parameters:
//
//   - isImportant: TRUE to make the action important.
func (action *Action) SetIsImportant(isImportant bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if isImportant {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_is_important(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(isImportant)
}

// SetLabel sets the label of action.
//
// Deprecated: Use #GAction instead, and set a label on a menu item with
// g_menu_item_set_label(). For Actionable widgets, use the widget-specific API
// to set a label.
//
// The function takes the following parameters:
//
//   - label text to set.
func (action *Action) SetLabel(label string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_label(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(label)
}

// SetSensitive sets the :sensitive property of the action to sensitive.
// Note that this doesn’t necessarily mean effective sensitivity. See
// gtk_action_is_sensitive() for that.
//
// Deprecated: Use g_simple_action_set_enabled() on a Action instead.
//
// The function takes the following parameters:
//
//   - sensitive: TRUE to make the action sensitive.
func (action *Action) SetSensitive(sensitive bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if sensitive {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_sensitive(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(sensitive)
}

// SetShortLabel sets a shorter label text on action.
//
// Deprecated: Use #GAction instead, which has no equivalent of short labels.
//
// The function takes the following parameters:
//
//   - shortLabel: label text to set.
func (action *Action) SetShortLabel(shortLabel string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(shortLabel)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_short_label(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(shortLabel)
}

// SetStockID sets the stock id on action
//
// Deprecated: Use #GAction instead, which has no equivalent of stock items.
//
// The function takes the following parameters:
//
//   - stockId: stock id.
func (action *Action) SetStockID(stockId string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_stock_id(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(stockId)
}

// SetTooltip sets the tooltip text on action
//
// Deprecated: Use #GAction instead, and set tooltips on associated Actionable
// widgets with gtk_widget_set_tooltip_text().
//
// The function takes the following parameters:
//
//   - tooltip text.
func (action *Action) SetTooltip(tooltip string) {
	var _arg0 *C.GtkAction // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_action_set_tooltip(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(tooltip)
}

// SetVisible sets the :visible property of the action to visible.
// Note that this doesn’t necessarily mean effective visibility. See
// gtk_action_is_visible() for that.
//
// Deprecated: Use #GAction instead, and control and monitor the state of
// Actionable widgets directly.
//
// The function takes the following parameters:
//
//   - visible: TRUE to make the action visible.
func (action *Action) SetVisible(visible bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_visible(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(visible)
}

// SetVisibleHorizontal sets whether action is visible when horizontal
//
// Deprecated: Use #GAction instead, and control and monitor the visibility of
// associated widgets and menu items directly.
//
// The function takes the following parameters:
//
//   - visibleHorizontal: whether the action is visible horizontally.
func (action *Action) SetVisibleHorizontal(visibleHorizontal bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if visibleHorizontal {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_visible_horizontal(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(visibleHorizontal)
}

// SetVisibleVertical sets whether action is visible when vertical
//
// Deprecated: Use #GAction instead, and control and monitor the visibility of
// associated widgets and menu items directly.
//
// The function takes the following parameters:
//
//   - visibleVertical: whether the action is visible vertically.
func (action *Action) SetVisibleVertical(visibleVertical bool) {
	var _arg0 *C.GtkAction // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if visibleVertical {
		_arg1 = C.TRUE
	}

	C.gtk_action_set_visible_vertical(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(visibleVertical)
}

// UnblockActivate: reenable activation signals from the action
//
// Deprecated: Use g_simple_action_set_enabled() to enable the Action instead.
func (action *Action) UnblockActivate() {
	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_unblock_activate(_arg0)
	runtime.KeepAlive(action)
}

// Activate emits the “activate” signal on the specified action, if it isn't
// insensitive. This gets called by the proxy widgets when they get activated.
//
// It can also be used to manually activate an action.
//
// Deprecated: Use g_action_group_activate_action() on a #GAction instead.
func (action *Action) activate() {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.activate

	var _arg0 *C.GtkAction // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C._gotk4_gtk3_Action_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(action)
}

func (action *Action) connectProxy(proxy Widgetter) {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.connect_proxy

	var _arg0 *C.GtkAction // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(proxy).Native()))

	C._gotk4_gtk3_Action_virtual_connect_proxy(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(proxy)
}

// createMenu: if action provides a Menu widget as a submenu for the menu item
// or the toolbar item it creates, this function returns an instance of that
// menu.
//
// Deprecated: Use #GAction and Model instead, and create a Menu with
// gtk_menu_new_from_model().
//
// The function returns the following values:
//
//   - widget: menu item provided by the action, or NULL.
func (action *Action) createMenu() Widgetter {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.create_menu

	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C._gotk4_gtk3_Action_virtual_create_menu(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// createMenuItem creates a menu item widget that proxies for the given action.
//
// Deprecated: Use g_menu_item_new() and associate it with a #GAction instead.
//
// The function returns the following values:
//
//   - widget: menu item connected to the action.
func (action *Action) createMenuItem() Widgetter {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.create_menu_item

	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C._gotk4_gtk3_Action_virtual_create_menu_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// createToolItem creates a toolbar item widget that proxies for the given
// action.
//
// Deprecated: Use a ToolItem and associate it with a #GAction using
// gtk_actionable_set_action_name() instead.
//
// The function returns the following values:
//
//   - widget: toolbar item connected to the action.
func (action *Action) createToolItem() Widgetter {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.create_tool_item

	var _arg0 *C.GtkAction // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C._gotk4_gtk3_Action_virtual_create_tool_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(action)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

func (action *Action) disconnectProxy(proxy Widgetter) {
	gclass := (*C.GtkActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.disconnect_proxy

	var _arg0 *C.GtkAction // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(proxy).Native()))

	C._gotk4_gtk3_Action_virtual_disconnect_proxy(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(proxy)
}

// ActionBarOverrides contains methods that are overridable.
type ActionBarOverrides struct {
}

func defaultActionBarOverrides(v *ActionBar) ActionBarOverrides {
	return ActionBarOverrides{}
}

// ActionBar is designed to present contextual actions. It is expected to be
// displayed below the content and expand horizontally to fill the area.
//
// It allows placing children at the start or the end. In addition, it contains
// an internal centered box which is centered with respect to the full width
// of the box, even if the children at either side take up different amounts of
// space.
//
// # CSS nodes
//
// GtkActionBar has a single CSS node with name actionbar.
type ActionBar struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*ActionBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ActionBar, *ActionBarClass, ActionBarOverrides](
		GTypeActionBar,
		initActionBarClass,
		wrapActionBar,
		defaultActionBarOverrides,
	)
}

func initActionBarClass(gclass unsafe.Pointer, overrides ActionBarOverrides, classInitFunc func(*ActionBarClass)) {
	if classInitFunc != nil {
		class := (*ActionBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapActionBar(obj *coreglib.Object) *ActionBar {
	return &ActionBar{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalActionBar(p uintptr) (interface{}, error) {
	return wrapActionBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewActionBar creates a new ActionBar widget.
//
// The function returns the following values:
//
//   - actionBar: new ActionBar.
func NewActionBar() *ActionBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_action_bar_new()

	var _actionBar *ActionBar // out

	_actionBar = wrapActionBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _actionBar
}

// CenterWidget retrieves the center bar widget of the bar.
//
// The function returns the following values:
//
//   - widget (optional): center Widget or NULL.
func (actionBar *ActionBar) CenterWidget() Widgetter {
	var _arg0 *C.GtkActionBar // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkActionBar)(unsafe.Pointer(coreglib.InternObject(actionBar).Native()))

	_cret = C.gtk_action_bar_get_center_widget(_arg0)
	runtime.KeepAlive(actionBar)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// PackEnd adds child to action_bar, packed with reference to the end of the
// action_bar.
//
// The function takes the following parameters:
//
//   - child to be added to action_bar.
func (actionBar *ActionBar) PackEnd(child Widgetter) {
	var _arg0 *C.GtkActionBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkActionBar)(unsafe.Pointer(coreglib.InternObject(actionBar).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_action_bar_pack_end(_arg0, _arg1)
	runtime.KeepAlive(actionBar)
	runtime.KeepAlive(child)
}

// PackStart adds child to action_bar, packed with reference to the start of the
// action_bar.
//
// The function takes the following parameters:
//
//   - child to be added to action_bar.
func (actionBar *ActionBar) PackStart(child Widgetter) {
	var _arg0 *C.GtkActionBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkActionBar)(unsafe.Pointer(coreglib.InternObject(actionBar).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_action_bar_pack_start(_arg0, _arg1)
	runtime.KeepAlive(actionBar)
	runtime.KeepAlive(child)
}

// SetCenterWidget sets the center widget for the ActionBar.
//
// The function takes the following parameters:
//
//   - centerWidget (optional): widget to use for the center.
func (actionBar *ActionBar) SetCenterWidget(centerWidget Widgetter) {
	var _arg0 *C.GtkActionBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkActionBar)(unsafe.Pointer(coreglib.InternObject(actionBar).Native()))
	if centerWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(centerWidget).Native()))
	}

	C.gtk_action_bar_set_center_widget(_arg0, _arg1)
	runtime.KeepAlive(actionBar)
	runtime.KeepAlive(centerWidget)
}

// ActionGroupOverrides contains methods that are overridable.
type ActionGroupOverrides struct {
	// Action looks up an action in the action group by name.
	//
	// Deprecated: since version 3.10.
	//
	// The function takes the following parameters:
	//
	//   - actionName: name of the action.
	//
	// The function returns the following values:
	//
	//   - action: action, or NULL if no action by that name exists.
	Action func(actionName string) *Action
}

func defaultActionGroupOverrides(v *ActionGroup) ActionGroupOverrides {
	return ActionGroupOverrides{
		Action: v.action,
	}
}

// ActionGroup actions are organised into groups. An action group is essentially
// a map from names to Action objects.
//
// All actions that would make sense to use in a particular context should be
// in a single group. Multiple action groups may be used for a particular user
// interface. In fact, it is expected that most nontrivial applications will
// make use of multiple groups. For example, in an application that can edit
// multiple documents, one group holding global actions (e.g. quit, about, new),
// and one group per document holding actions that act on that document (eg.
// save, cut/copy/paste, etc). Each window’s menus would be constructed from a
// combination of two action groups.
//
// # Accelerators
//
// Accelerators are handled by the GTK+ accelerator map. All actions
// are assigned an accelerator path (which normally has the form
// <Actions>/group-name/action-name) and a shortcut is associated with this
// accelerator path. All menuitems and toolitems take on this accelerator path.
// The GTK+ accelerator map code makes sure that the correct shortcut is
// displayed next to the menu item.
//
// # GtkActionGroup as GtkBuildable
//
// The ActionGroup implementation of the Buildable interface accepts Action
// objects as <child> elements in UI definitions.
//
// Note that it is probably more common to define actions and action groups in
// the code, since they are directly related to what the code can do.
//
// The GtkActionGroup implementation of the GtkBuildable interface supports
// a custom <accelerator> element, which has attributes named “key“ and
// “modifiers“ and allows to specify accelerators. This is similar to the
// <accelerator> element of Widget, the main difference is that it doesn’t allow
// you to specify a signal.
//
// A Dialog UI definition fragment. ##
//
//	<object class="GtkActionGroup" id="actiongroup">
//	  <child>
//	      <object class="GtkAction" id="About">
//	          <property name="name">About</property>
//	          <property name="stock_id">gtk-about</property>
//	          <signal handler="about_activate" name="activate"/>
//	      </object>
//	      <accelerator key="F1" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK"/>
//	  </child>
//	</object>.
type ActionGroup struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*ActionGroup)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ActionGroup, *ActionGroupClass, ActionGroupOverrides](
		GTypeActionGroup,
		initActionGroupClass,
		wrapActionGroup,
		defaultActionGroupOverrides,
	)
}

func initActionGroupClass(gclass unsafe.Pointer, overrides ActionGroupOverrides, classInitFunc func(*ActionGroupClass)) {
	pclass := (*C.GtkActionGroupClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeActionGroup))))

	if overrides.Action != nil {
		pclass.get_action = (*[0]byte)(C._gotk4_gtk3_ActionGroupClass_get_action)
	}

	if classInitFunc != nil {
		class := (*ActionGroupClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapActionGroup(obj *coreglib.Object) *ActionGroup {
	return &ActionGroup{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalActionGroup(p uintptr) (interface{}, error) {
	return wrapActionGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectConnectProxy signal is emitted after connecting a proxy to an action
// in the group. Note that the proxy may have been connected to a different
// action before.
//
// This is intended for simple customizations for which a custom action class
// would be too clumsy, e.g. showing tooltips for menuitems in the statusbar.
//
// UIManager proxies the signal and provides global notification just before any
// action is connected to a proxy, which is probably more convenient to use.
func (actionGroup *ActionGroup) ConnectConnectProxy(f func(action *Action, proxy Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(actionGroup, "connect-proxy", false, unsafe.Pointer(C._gotk4_gtk3_ActionGroup_ConnectConnectProxy), f)
}

// ConnectDisconnectProxy signal is emitted after disconnecting a proxy from an
// action in the group.
//
// UIManager proxies the signal and provides global notification just before any
// action is connected to a proxy, which is probably more convenient to use.
func (actionGroup *ActionGroup) ConnectDisconnectProxy(f func(action *Action, proxy Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(actionGroup, "disconnect-proxy", false, unsafe.Pointer(C._gotk4_gtk3_ActionGroup_ConnectDisconnectProxy), f)
}

// ConnectPostActivate signal is emitted just after the action in the
// action_group is activated
//
// This is intended for UIManager to proxy the signal and provide global
// notification just after any action is activated.
func (actionGroup *ActionGroup) ConnectPostActivate(f func(action *Action)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(actionGroup, "post-activate", false, unsafe.Pointer(C._gotk4_gtk3_ActionGroup_ConnectPostActivate), f)
}

// ConnectPreActivate signal is emitted just before the action in the
// action_group is activated
//
// This is intended for UIManager to proxy the signal and provide global
// notification just before any action is activated.
func (actionGroup *ActionGroup) ConnectPreActivate(f func(action *Action)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(actionGroup, "pre-activate", false, unsafe.Pointer(C._gotk4_gtk3_ActionGroup_ConnectPreActivate), f)
}

// NewActionGroup creates a new ActionGroup object. The name of the action group
// is used when associating [keybindings][Action-Accel] with the actions.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - name of the action group.
//
// The function returns the following values:
//
//   - actionGroup: new ActionGroup.
func NewActionGroup(name string) *ActionGroup {
	var _arg1 *C.gchar          // out
	var _cret *C.GtkActionGroup // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_action_group_new(_arg1)
	runtime.KeepAlive(name)

	var _actionGroup *ActionGroup // out

	_actionGroup = wrapActionGroup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _actionGroup
}

// AddAction adds an action object to the action group. Note that this function
// does not set up the accel path of the action, which can lead to problems
// if a user tries to modify the accelerator of a menuitem associated with
// the action. Therefore you must either set the accel path yourself with
// gtk_action_set_accel_path(), or use gtk_action_group_add_action_with_accel
// (..., NULL).
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action: action.
func (actionGroup *ActionGroup) AddAction(action *Action) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_group_add_action(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(action)
}

// AddActionWithAccel adds an action object to the action group and sets up the
// accelerator.
//
// If accelerator is NULL, attempts to use the accelerator associated with the
// stock_id of the action.
//
// Accel paths are set to <Actions>/group-name/action-name.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action to add.
//   - accelerator (optional) for the action, in the format understood by
//     gtk_accelerator_parse(), or "" for no accelerator, or NULL to use the
//     stock accelerator.
func (actionGroup *ActionGroup) AddActionWithAccel(action *Action, accelerator string) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.GtkAction      // out
	var _arg2 *C.gchar          // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if accelerator != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_action_group_add_action_with_accel(_arg0, _arg1, _arg2)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(action)
	runtime.KeepAlive(accelerator)
}

// AccelGroup gets the accelerator group.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - accelGroup: accelerator group associated with this action group or NULL
//     if there is none.
func (actionGroup *ActionGroup) AccelGroup() *AccelGroup {
	var _arg0 *C.GtkActionGroup // out
	var _cret *C.GtkAccelGroup  // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	_cret = C.gtk_action_group_get_accel_group(_arg0)
	runtime.KeepAlive(actionGroup)

	var _accelGroup *AccelGroup // out

	_accelGroup = wrapAccelGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _accelGroup
}

// Action looks up an action in the action group by name.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - actionName: name of the action.
//
// The function returns the following values:
//
//   - action: action, or NULL if no action by that name exists.
func (actionGroup *ActionGroup) Action(actionName string) *Action {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.gchar          // out
	var _cret *C.GtkAction      // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_action_group_get_action(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(actionName)

	var _action *Action // out

	_action = wrapAction(coreglib.Take(unsafe.Pointer(_cret)))

	return _action
}

// Name gets the name of the action group.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - utf8: name of the action group.
func (actionGroup *ActionGroup) Name() string {
	var _arg0 *C.GtkActionGroup // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	_cret = C.gtk_action_group_get_name(_arg0)
	runtime.KeepAlive(actionGroup)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Sensitive returns TRUE if the group is sensitive. The constituent actions
// can only be logically sensitive (see gtk_action_is_sensitive()) if they are
// sensitive (see gtk_action_get_sensitive()) and their group is sensitive.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the group is sensitive.
func (actionGroup *ActionGroup) Sensitive() bool {
	var _arg0 *C.GtkActionGroup // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	_cret = C.gtk_action_group_get_sensitive(_arg0)
	runtime.KeepAlive(actionGroup)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Visible returns TRUE if the group is visible. The constituent actions can
// only be logically visible (see gtk_action_is_visible()) if they are visible
// (see gtk_action_get_visible()) and their group is visible.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the group is visible.
func (actionGroup *ActionGroup) Visible() bool {
	var _arg0 *C.GtkActionGroup // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	_cret = C.gtk_action_group_get_visible(_arg0)
	runtime.KeepAlive(actionGroup)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListActions lists the actions in the action group.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - list: allocated list of the action objects in the action group.
func (actionGroup *ActionGroup) ListActions() []*Action {
	var _arg0 *C.GtkActionGroup // out
	var _cret *C.GList          // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	_cret = C.gtk_action_group_list_actions(_arg0)
	runtime.KeepAlive(actionGroup)

	var _list []*Action // out

	_list = make([]*Action, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkAction)(v)
		var dst *Action // out
		dst = wrapAction(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// RemoveAction removes an action object from the action group.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - action: action.
func (actionGroup *ActionGroup) RemoveAction(action *Action) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.GtkAction      // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_action_group_remove_action(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(action)
}

// SetAccelGroup sets the accelerator group to be used by every action in this
// group.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - accelGroup (optional) to set or NULL.
func (actionGroup *ActionGroup) SetAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.GtkAccelGroup  // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	if accelGroup != nil {
		_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	}

	C.gtk_action_group_set_accel_group(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(accelGroup)
}

// SetSensitive changes the sensitivity of action_group
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - sensitive: new sensitivity.
func (actionGroup *ActionGroup) SetSensitive(sensitive bool) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	if sensitive {
		_arg1 = C.TRUE
	}

	C.gtk_action_group_set_sensitive(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(sensitive)
}

// SetTranslateFunc sets a function to be used for translating the label and
// tooltip of ActionEntrys added by gtk_action_group_add_actions().
//
// If you’re using gettext(), it is enough to set the translation domain with
// gtk_action_group_set_translation_domain().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - fn: TranslateFunc.
func (actionGroup *ActionGroup) SetTranslateFunc(fn TranslateFunc) {
	var _arg0 *C.GtkActionGroup  // out
	var _arg1 C.GtkTranslateFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TranslateFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_action_group_set_translate_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(fn)
}

// SetTranslationDomain sets the translation domain and uses g_dgettext()
// for translating the label and tooltip of ActionEntrys added by
// gtk_action_group_add_actions().
//
// If you’re not using gettext() for localization, see
// gtk_action_group_set_translate_func().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - domain (optional): translation domain to use for g_dgettext() calls,
//     or NULL to use the domain set with textdomain().
func (actionGroup *ActionGroup) SetTranslationDomain(domain string) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	if domain != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(domain)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_action_group_set_translation_domain(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(domain)
}

// SetVisible changes the visible of action_group.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - visible: new visiblity.
func (actionGroup *ActionGroup) SetVisible(visible bool) {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_action_group_set_visible(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(visible)
}

// TranslateString translates a string using the function set with
// gtk_action_group_set_translate_func(). This is mainly intended for language
// bindings.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - str: string.
//
// The function returns the following values:
//
//   - utf8: translation of string.
func (actionGroup *ActionGroup) TranslateString(str string) string {
	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.gchar          // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_action_group_translate_string(_arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(str)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Action looks up an action in the action group by name.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - actionName: name of the action.
//
// The function returns the following values:
//
//   - action: action, or NULL if no action by that name exists.
func (actionGroup *ActionGroup) action(actionName string) *Action {
	gclass := (*C.GtkActionGroupClass)(coreglib.PeekParentClass(actionGroup))
	fnarg := gclass.get_action

	var _arg0 *C.GtkActionGroup // out
	var _arg1 *C.gchar          // out
	var _cret *C.GtkAction      // in

	_arg0 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_ActionGroup_virtual_get_action(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(actionName)

	var _action *Action // out

	_action = wrapAction(coreglib.Take(unsafe.Pointer(_cret)))

	return _action
}

// AdjustmentOverrides contains methods that are overridable.
type AdjustmentOverrides struct {
	// Changed emits a Adjustment::changed signal from the Adjustment. This is
	// typically called by the owner of the Adjustment after it has changed any
	// of the Adjustment properties other than the value.
	//
	// Deprecated: GTK+ emits Adjustment::changed itself whenever any of the
	// properties (other than value) change.
	Changed func()
	// ValueChanged emits a Adjustment::value-changed signal from the
	// Adjustment. This is typically called by the owner of the Adjustment after
	// it has changed the Adjustment:value property.
	//
	// Deprecated: GTK+ emits Adjustment::value-changed itself whenever the
	// value changes.
	ValueChanged func()
}

func defaultAdjustmentOverrides(v *Adjustment) AdjustmentOverrides {
	return AdjustmentOverrides{
		Changed:      v.changed,
		ValueChanged: v.valueChanged,
	}
}

// Adjustment object represents a value which has an associated lower and upper
// bound, together with step and page increments, and a page size. It is used
// within several GTK+ widgets, including SpinButton, Viewport, and Range (which
// is a base class for Scrollbar and Scale).
//
// The Adjustment object does not update the value itself. Instead it is left up
// to the owner of the Adjustment to control the value.
type Adjustment struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned
}

var ()

func init() {
	coreglib.RegisterClassInfo[*Adjustment, *AdjustmentClass, AdjustmentOverrides](
		GTypeAdjustment,
		initAdjustmentClass,
		wrapAdjustment,
		defaultAdjustmentOverrides,
	)
}

func initAdjustmentClass(gclass unsafe.Pointer, overrides AdjustmentOverrides, classInitFunc func(*AdjustmentClass)) {
	pclass := (*C.GtkAdjustmentClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAdjustment))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_AdjustmentClass_changed)
	}

	if overrides.ValueChanged != nil {
		pclass.value_changed = (*[0]byte)(C._gotk4_gtk3_AdjustmentClass_value_changed)
	}

	if classInitFunc != nil {
		class := (*AdjustmentClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAdjustment(obj *coreglib.Object) *Adjustment {
	return &Adjustment{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
	}
}

func marshalAdjustment(p uintptr) (interface{}, error) {
	return wrapAdjustment(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged is emitted when one or more of the Adjustment properties have
// been changed, other than the Adjustment:value property.
func (adjustment *Adjustment) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(adjustment, "changed", false, unsafe.Pointer(C._gotk4_gtk3_Adjustment_ConnectChanged), f)
}

// ConnectValueChanged is emitted when the Adjustment:value property has been
// changed.
func (adjustment *Adjustment) ConnectValueChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(adjustment, "value-changed", false, unsafe.Pointer(C._gotk4_gtk3_Adjustment_ConnectValueChanged), f)
}

// NewAdjustment creates a new Adjustment.
//
// The function takes the following parameters:
//
//   - value: initial value.
//   - lower: minimum value.
//   - upper: maximum value.
//   - stepIncrement: step increment.
//   - pageIncrement: page increment.
//   - pageSize: page size.
//
// The function returns the following values:
//
//   - adjustment: new Adjustment.
func NewAdjustment(value, lower, upper, stepIncrement, pageIncrement, pageSize float64) *Adjustment {
	var _arg1 C.gdouble        // out
	var _arg2 C.gdouble        // out
	var _arg3 C.gdouble        // out
	var _arg4 C.gdouble        // out
	var _arg5 C.gdouble        // out
	var _arg6 C.gdouble        // out
	var _cret *C.GtkAdjustment // in

	_arg1 = C.gdouble(value)
	_arg2 = C.gdouble(lower)
	_arg3 = C.gdouble(upper)
	_arg4 = C.gdouble(stepIncrement)
	_arg5 = C.gdouble(pageIncrement)
	_arg6 = C.gdouble(pageSize)

	_cret = C.gtk_adjustment_new(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(value)
	runtime.KeepAlive(lower)
	runtime.KeepAlive(upper)
	runtime.KeepAlive(stepIncrement)
	runtime.KeepAlive(pageIncrement)
	runtime.KeepAlive(pageSize)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// Changed emits a Adjustment::changed signal from the Adjustment. This is
// typically called by the owner of the Adjustment after it has changed any of
// the Adjustment properties other than the value.
//
// Deprecated: GTK+ emits Adjustment::changed itself whenever any of the
// properties (other than value) change.
func (adjustment *Adjustment) Changed() {
	var _arg0 *C.GtkAdjustment // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_adjustment_changed(_arg0)
	runtime.KeepAlive(adjustment)
}

// ClampPage updates the Adjustment:value property to ensure that the range
// between lower and upper is in the current page (i.e. between Adjustment:value
// and Adjustment:value + Adjustment:page-size). If the range is larger than the
// page size, then only the start of it will be in the current page.
//
// A Adjustment::value-changed signal will be emitted if the value is changed.
//
// The function takes the following parameters:
//
//   - lower value.
//   - upper value.
func (adjustment *Adjustment) ClampPage(lower, upper float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out
	var _arg2 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(lower)
	_arg2 = C.gdouble(upper)

	C.gtk_adjustment_clamp_page(_arg0, _arg1, _arg2)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(lower)
	runtime.KeepAlive(upper)
}

// Configure sets all properties of the adjustment at once.
//
// Use this function to avoid multiple emissions of the Adjustment::changed
// signal. See gtk_adjustment_set_lower() for an alternative way of compressing
// multiple emissions of Adjustment::changed into one.
//
// The function takes the following parameters:
//
//   - value: new value.
//   - lower: new minimum value.
//   - upper: new maximum value.
//   - stepIncrement: new step increment.
//   - pageIncrement: new page increment.
//   - pageSize: new page size.
func (adjustment *Adjustment) Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out
	var _arg2 C.gdouble        // out
	var _arg3 C.gdouble        // out
	var _arg4 C.gdouble        // out
	var _arg5 C.gdouble        // out
	var _arg6 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(value)
	_arg2 = C.gdouble(lower)
	_arg3 = C.gdouble(upper)
	_arg4 = C.gdouble(stepIncrement)
	_arg5 = C.gdouble(pageIncrement)
	_arg6 = C.gdouble(pageSize)

	C.gtk_adjustment_configure(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(value)
	runtime.KeepAlive(lower)
	runtime.KeepAlive(upper)
	runtime.KeepAlive(stepIncrement)
	runtime.KeepAlive(pageIncrement)
	runtime.KeepAlive(pageSize)
}

// Lower retrieves the minimum value of the adjustment.
//
// The function returns the following values:
//
//   - gdouble: current minimum value of the adjustment.
func (adjustment *Adjustment) Lower() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_lower(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// MinimumIncrement gets the smaller of step increment and page increment.
//
// The function returns the following values:
//
//   - gdouble: minimum increment of adjustment.
func (adjustment *Adjustment) MinimumIncrement() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_minimum_increment(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PageIncrement retrieves the page increment of the adjustment.
//
// The function returns the following values:
//
//   - gdouble: current page increment of the adjustment.
func (adjustment *Adjustment) PageIncrement() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_page_increment(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PageSize retrieves the page size of the adjustment.
//
// The function returns the following values:
//
//   - gdouble: current page size of the adjustment.
func (adjustment *Adjustment) PageSize() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_page_size(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// StepIncrement retrieves the step increment of the adjustment.
//
// The function returns the following values:
//
//   - gdouble: current step increment of the adjustment.
func (adjustment *Adjustment) StepIncrement() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_step_increment(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Upper retrieves the maximum value of the adjustment.
//
// The function returns the following values:
//
//   - gdouble: current maximum value of the adjustment.
func (adjustment *Adjustment) Upper() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_upper(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Value gets the current value of the adjustment. See
// gtk_adjustment_set_value().
//
// The function returns the following values:
//
//   - gdouble: current value of the adjustment.
func (adjustment *Adjustment) Value() float64 {
	var _arg0 *C.GtkAdjustment // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_adjustment_get_value(_arg0)
	runtime.KeepAlive(adjustment)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// SetLower sets the minimum value of the adjustment.
//
// When setting multiple adjustment properties via their individual setters,
// multiple Adjustment::changed signals will be emitted. However, since the
// emission of the Adjustment::changed signal is tied to the emission of the
// #GObject::notify signals of the changed properties, it’s possible to compress
// the Adjustment::changed signals into one by calling g_object_freeze_notify()
// and g_object_thaw_notify() around the calls to the individual setters.
//
// Alternatively, using a single g_object_set() for all the properties
// to change, or using gtk_adjustment_configure() has the same effect of
// compressing Adjustment::changed emissions.
//
// The function takes the following parameters:
//
//   - lower: new minimum value.
func (adjustment *Adjustment) SetLower(lower float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(lower)

	C.gtk_adjustment_set_lower(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(lower)
}

// SetPageIncrement sets the page increment of the adjustment.
//
// See gtk_adjustment_set_lower() about how to compress multiple emissions of
// the Adjustment::changed signal when setting multiple adjustment properties.
//
// The function takes the following parameters:
//
//   - pageIncrement: new page increment.
func (adjustment *Adjustment) SetPageIncrement(pageIncrement float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(pageIncrement)

	C.gtk_adjustment_set_page_increment(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(pageIncrement)
}

// SetPageSize sets the page size of the adjustment.
//
// See gtk_adjustment_set_lower() about how to compress multiple emissions
// of the GtkAdjustment::changed signal when setting multiple adjustment
// properties.
//
// The function takes the following parameters:
//
//   - pageSize: new page size.
func (adjustment *Adjustment) SetPageSize(pageSize float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(pageSize)

	C.gtk_adjustment_set_page_size(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(pageSize)
}

// SetStepIncrement sets the step increment of the adjustment.
//
// See gtk_adjustment_set_lower() about how to compress multiple emissions of
// the Adjustment::changed signal when setting multiple adjustment properties.
//
// The function takes the following parameters:
//
//   - stepIncrement: new step increment.
func (adjustment *Adjustment) SetStepIncrement(stepIncrement float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(stepIncrement)

	C.gtk_adjustment_set_step_increment(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(stepIncrement)
}

// SetUpper sets the maximum value of the adjustment.
//
// Note that values will be restricted by upper - page-size if the page-size
// property is nonzero.
//
// See gtk_adjustment_set_lower() about how to compress multiple emissions of
// the Adjustment::changed signal when setting multiple adjustment properties.
//
// The function takes the following parameters:
//
//   - upper: new maximum value.
func (adjustment *Adjustment) SetUpper(upper float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(upper)

	C.gtk_adjustment_set_upper(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(upper)
}

// SetValue sets the Adjustment value. The value is clamped to lie between
// Adjustment:lower and Adjustment:upper.
//
// Note that for adjustments which are used in a Scrollbar, the effective
// range of allowed values goes from Adjustment:lower to Adjustment:upper -
// Adjustment:page-size.
//
// The function takes the following parameters:
//
//   - value: new value.
func (adjustment *Adjustment) SetValue(value float64) {
	var _arg0 *C.GtkAdjustment // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_adjustment_set_value(_arg0, _arg1)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(value)
}

// ValueChanged emits a Adjustment::value-changed signal from the Adjustment.
// This is typically called by the owner of the Adjustment after it has changed
// the Adjustment:value property.
//
// Deprecated: GTK+ emits Adjustment::value-changed itself whenever the value
// changes.
func (adjustment *Adjustment) ValueChanged() {
	var _arg0 *C.GtkAdjustment // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_adjustment_value_changed(_arg0)
	runtime.KeepAlive(adjustment)
}

// Changed emits a Adjustment::changed signal from the Adjustment. This is
// typically called by the owner of the Adjustment after it has changed any of
// the Adjustment properties other than the value.
//
// Deprecated: GTK+ emits Adjustment::changed itself whenever any of the
// properties (other than value) change.
func (adjustment *Adjustment) changed() {
	gclass := (*C.GtkAdjustmentClass)(coreglib.PeekParentClass(adjustment))
	fnarg := gclass.changed

	var _arg0 *C.GtkAdjustment // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C._gotk4_gtk3_Adjustment_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(adjustment)
}

// valueChanged emits a Adjustment::value-changed signal from the Adjustment.
// This is typically called by the owner of the Adjustment after it has changed
// the Adjustment:value property.
//
// Deprecated: GTK+ emits Adjustment::value-changed itself whenever the value
// changes.
func (adjustment *Adjustment) valueChanged() {
	gclass := (*C.GtkAdjustmentClass)(coreglib.PeekParentClass(adjustment))
	fnarg := gclass.value_changed

	var _arg0 *C.GtkAdjustment // out

	_arg0 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C._gotk4_gtk3_Adjustment_virtual_value_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(adjustment)
}

// AlignmentOverrides contains methods that are overridable.
type AlignmentOverrides struct {
}

func defaultAlignmentOverrides(v *Alignment) AlignmentOverrides {
	return AlignmentOverrides{}
}

// Alignment widget controls the alignment and size of its child widget.
// It has four settings: xscale, yscale, xalign, and yalign.
//
// The scale settings are used to specify how much the child widget should
// expand to fill the space allocated to the Alignment. The values can range
// from 0 (meaning the child doesn’t expand at all) to 1 (meaning the child
// expands to fill all of the available space).
//
// The align settings are used to place the child widget within the available
// area. The values range from 0 (top or left) to 1 (bottom or right).
// Of course, if the scale settings are both set to 1, the alignment settings
// have no effect.
//
// GtkAlignment has been deprecated in 3.14 and should not be used in
// newly-written code. The desired effect can be achieved by using the
// Widget:halign, Widget:valign and Widget:margin properties on the child
// widget.
type Alignment struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Alignment)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Alignment, *AlignmentClass, AlignmentOverrides](
		GTypeAlignment,
		initAlignmentClass,
		wrapAlignment,
		defaultAlignmentOverrides,
	)
}

func initAlignmentClass(gclass unsafe.Pointer, overrides AlignmentOverrides, classInitFunc func(*AlignmentClass)) {
	if classInitFunc != nil {
		class := (*AlignmentClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAlignment(obj *coreglib.Object) *Alignment {
	return &Alignment{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalAlignment(p uintptr) (interface{}, error) {
	return wrapAlignment(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewAlignment creates a new Alignment.
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function takes the following parameters:
//
//   - xalign: horizontal alignment of the child widget, from 0 (left) to 1
//     (right).
//   - yalign: vertical alignment of the child widget, from 0 (top) to 1
//     (bottom).
//   - xscale: amount that the child widget expands horizontally to fill up
//     unused space, from 0 to 1. A value of 0 indicates that the child widget
//     should never expand. A value of 1 indicates that the child widget will
//     expand to fill all of the space allocated for the Alignment.
//   - yscale: amount that the child widget expands vertically to fill up unused
//     space, from 0 to 1. The values are similar to xscale.
//
// The function returns the following values:
//
//   - alignment: new Alignment.
func NewAlignment(xalign, yalign, xscale, yscale float32) *Alignment {
	var _arg1 C.gfloat     // out
	var _arg2 C.gfloat     // out
	var _arg3 C.gfloat     // out
	var _arg4 C.gfloat     // out
	var _cret *C.GtkWidget // in

	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)
	_arg3 = C.gfloat(xscale)
	_arg4 = C.gfloat(yscale)

	_cret = C.gtk_alignment_new(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
	runtime.KeepAlive(xscale)
	runtime.KeepAlive(yscale)

	var _alignment *Alignment // out

	_alignment = wrapAlignment(coreglib.Take(unsafe.Pointer(_cret)))

	return _alignment
}

// Padding gets the padding on the different sides of the widget. See
// gtk_alignment_set_padding ().
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function returns the following values:
//
//   - paddingTop (optional): location to store the padding for the top of the
//     widget, or NULL.
//   - paddingBottom (optional): location to store the padding for the bottom of
//     the widget, or NULL.
//   - paddingLeft (optional): location to store the padding for the left of the
//     widget, or NULL.
//   - paddingRight (optional): location to store the padding for the right of
//     the widget, or NULL.
func (alignment *Alignment) Padding() (paddingTop, paddingBottom, paddingLeft, paddingRight uint) {
	var _arg0 *C.GtkAlignment // out
	var _arg1 C.guint         // in
	var _arg2 C.guint         // in
	var _arg3 C.guint         // in
	var _arg4 C.guint         // in

	_arg0 = (*C.GtkAlignment)(unsafe.Pointer(coreglib.InternObject(alignment).Native()))

	C.gtk_alignment_get_padding(_arg0, &_arg1, &_arg2, &_arg3, &_arg4)
	runtime.KeepAlive(alignment)

	var _paddingTop uint    // out
	var _paddingBottom uint // out
	var _paddingLeft uint   // out
	var _paddingRight uint  // out

	_paddingTop = uint(_arg1)
	_paddingBottom = uint(_arg2)
	_paddingLeft = uint(_arg3)
	_paddingRight = uint(_arg4)

	return _paddingTop, _paddingBottom, _paddingLeft, _paddingRight
}

// Set sets the Alignment values.
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function takes the following parameters:
//
//   - xalign: horizontal alignment of the child widget, from 0 (left) to 1
//     (right).
//   - yalign: vertical alignment of the child widget, from 0 (top) to 1
//     (bottom).
//   - xscale: amount that the child widget expands horizontally to fill up
//     unused space, from 0 to 1. A value of 0 indicates that the child widget
//     should never expand. A value of 1 indicates that the child widget will
//     expand to fill all of the space allocated for the Alignment.
//   - yscale: amount that the child widget expands vertically to fill up unused
//     space, from 0 to 1. The values are similar to xscale.
func (alignment *Alignment) Set(xalign, yalign, xscale, yscale float32) {
	var _arg0 *C.GtkAlignment // out
	var _arg1 C.gfloat        // out
	var _arg2 C.gfloat        // out
	var _arg3 C.gfloat        // out
	var _arg4 C.gfloat        // out

	_arg0 = (*C.GtkAlignment)(unsafe.Pointer(coreglib.InternObject(alignment).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)
	_arg3 = C.gfloat(xscale)
	_arg4 = C.gfloat(yscale)

	C.gtk_alignment_set(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(alignment)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
	runtime.KeepAlive(xscale)
	runtime.KeepAlive(yscale)
}

// SetPadding sets the padding on the different sides of the widget. The padding
// adds blank space to the sides of the widget. For instance, this can be used
// to indent the child widget towards the right by adding padding on the left.
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function takes the following parameters:
//
//   - paddingTop: padding at the top of the widget.
//   - paddingBottom: padding at the bottom of the widget.
//   - paddingLeft: padding at the left of the widget.
//   - paddingRight: padding at the right of the widget.
func (alignment *Alignment) SetPadding(paddingTop, paddingBottom, paddingLeft, paddingRight uint) {
	var _arg0 *C.GtkAlignment // out
	var _arg1 C.guint         // out
	var _arg2 C.guint         // out
	var _arg3 C.guint         // out
	var _arg4 C.guint         // out

	_arg0 = (*C.GtkAlignment)(unsafe.Pointer(coreglib.InternObject(alignment).Native()))
	_arg1 = C.guint(paddingTop)
	_arg2 = C.guint(paddingBottom)
	_arg3 = C.guint(paddingLeft)
	_arg4 = C.guint(paddingRight)

	C.gtk_alignment_set_padding(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(alignment)
	runtime.KeepAlive(paddingTop)
	runtime.KeepAlive(paddingBottom)
	runtime.KeepAlive(paddingLeft)
	runtime.KeepAlive(paddingRight)
}

// AppChooserButtonOverrides contains methods that are overridable.
type AppChooserButtonOverrides struct {
	// CustomItemActivated: signal emitted when a custom item, previously added
	// with gtk_app_chooser_button_append_custom_item(), is activated from the
	// dropdown menu.
	CustomItemActivated func(itemName string)
}

func defaultAppChooserButtonOverrides(v *AppChooserButton) AppChooserButtonOverrides {
	return AppChooserButtonOverrides{
		CustomItemActivated: v.customItemActivated,
	}
}

// AppChooserButton is a widget that lets the user select an application.
// It implements the AppChooser interface.
//
// Initially, a AppChooserButton selects the first application in its list,
// which will either be the most-recently used application or, if
// AppChooserButton:show-default-item is TRUE, the default application.
//
// The list of applications shown in a AppChooserButton includes
// the recommended applications for the given content type. When
// AppChooserButton:show-default-item is set, the default application is
// also included. To let the user chooser other applications, you can set the
// AppChooserButton:show-dialog-item property, which allows to open a full
// AppChooserDialog.
//
// It is possible to add custom items to the list, using
// gtk_app_chooser_button_append_custom_item(). These items cause the
// AppChooserButton::custom-item-activated signal to be emitted when they are
// selected.
//
// To track changes in the selected application, use the ComboBox::changed
// signal.
type AppChooserButton struct {
	_ [0]func() // equal guard
	ComboBox

	*coreglib.Object
	AppChooser
}

var (
	_ coreglib.Objector = (*AppChooserButton)(nil)
	_ Binner            = (*AppChooserButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AppChooserButton, *AppChooserButtonClass, AppChooserButtonOverrides](
		GTypeAppChooserButton,
		initAppChooserButtonClass,
		wrapAppChooserButton,
		defaultAppChooserButtonOverrides,
	)
}

func initAppChooserButtonClass(gclass unsafe.Pointer, overrides AppChooserButtonOverrides, classInitFunc func(*AppChooserButtonClass)) {
	pclass := (*C.GtkAppChooserButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAppChooserButton))))

	if overrides.CustomItemActivated != nil {
		pclass.custom_item_activated = (*[0]byte)(C._gotk4_gtk3_AppChooserButtonClass_custom_item_activated)
	}

	if classInitFunc != nil {
		class := (*AppChooserButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAppChooserButton(obj *coreglib.Object) *AppChooserButton {
	return &AppChooserButton{
		ComboBox: ComboBox{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			CellEditable: CellEditable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			CellLayout: CellLayout{
				Object: obj,
			},
		},
		Object: obj,
		AppChooser: AppChooser{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalAppChooserButton(p uintptr) (interface{}, error) {
	return wrapAppChooserButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectCustomItemActivated is emitted when a custom item, previously added
// with gtk_app_chooser_button_append_custom_item(), is activated from the
// dropdown menu.
func (self *AppChooserButton) ConnectCustomItemActivated(f func(itemName string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "custom-item-activated", false, unsafe.Pointer(C._gotk4_gtk3_AppChooserButton_ConnectCustomItemActivated), f)
}

// NewAppChooserButton creates a new AppChooserButton for applications that can
// handle content of the given type.
//
// The function takes the following parameters:
//
//   - contentType: content type to show applications for.
//
// The function returns the following values:
//
//   - appChooserButton: newly created AppChooserButton.
func NewAppChooserButton(contentType string) *AppChooserButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(contentType)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_app_chooser_button_new(_arg1)
	runtime.KeepAlive(contentType)

	var _appChooserButton *AppChooserButton // out

	_appChooserButton = wrapAppChooserButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _appChooserButton
}

// AppendCustomItem appends a custom item to the list of applications that is
// shown in the popup; the item name must be unique per-widget. Clients can use
// the provided name as a detail for the AppChooserButton::custom-item-activated
// signal, to add a callback for the activation of a particular custom item in
// the list. See also gtk_app_chooser_button_append_separator().
//
// The function takes the following parameters:
//
//   - name of the custom item.
//   - label for the custom item.
//   - icon for the custom item.
func (self *AppChooserButton) AppendCustomItem(name, label string, icon gio.Iconner) {
	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 *C.gchar               // out
	var _arg2 *C.gchar               // out
	var _arg3 *C.GIcon               // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	C.gtk_app_chooser_button_append_custom_item(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(icon)
}

// AppendSeparator appends a separator to the list of applications that is shown
// in the popup.
func (self *AppChooserButton) AppendSeparator() {
	var _arg0 *C.GtkAppChooserButton // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C.gtk_app_chooser_button_append_separator(_arg0)
	runtime.KeepAlive(self)
}

// Heading returns the text to display at the top of the dialog.
//
// The function returns the following values:
//
//   - utf8 (optional): text to display at the top of the dialog, or NULL,
//     in which case a default text is displayed.
func (self *AppChooserButton) Heading() string {
	var _arg0 *C.GtkAppChooserButton // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_button_get_heading(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// ShowDefaultItem returns the current value of the
// AppChooserButton:show-default-item property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserButton:show-default-item.
func (self *AppChooserButton) ShowDefaultItem() bool {
	var _arg0 *C.GtkAppChooserButton // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_button_get_show_default_item(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowDialogItem returns the current value of the
// AppChooserButton:show-dialog-item property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserButton:show-dialog-item.
func (self *AppChooserButton) ShowDialogItem() bool {
	var _arg0 *C.GtkAppChooserButton // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_button_get_show_dialog_item(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActiveCustomItem selects a custom item previously added with
// gtk_app_chooser_button_append_custom_item().
//
// Use gtk_app_chooser_refresh() to bring the selection to its initial state.
//
// The function takes the following parameters:
//
//   - name of the custom item.
func (self *AppChooserButton) SetActiveCustomItem(name string) {
	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_app_chooser_button_set_active_custom_item(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)
}

// SetHeading sets the text to display at the top of the dialog. If the heading
// is not set, the dialog displays a default text.
//
// The function takes the following parameters:
//
//   - heading: string containing Pango markup.
func (self *AppChooserButton) SetHeading(heading string) {
	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(heading)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_app_chooser_button_set_heading(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(heading)
}

// SetShowDefaultItem sets whether the dropdown menu of this button should show
// the default application for the given content type at top.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserButton:show-default-item.
func (self *AppChooserButton) SetShowDefaultItem(setting bool) {
	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_button_set_show_default_item(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// SetShowDialogItem sets whether the dropdown menu of this button should show
// an entry to trigger a AppChooserDialog.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserButton:show-dialog-item.
func (self *AppChooserButton) SetShowDialogItem(setting bool) {
	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_button_set_show_dialog_item(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// customItemActivated: signal emitted when a custom item, previously added with
// gtk_app_chooser_button_append_custom_item(), is activated from the dropdown
// menu.
func (self *AppChooserButton) customItemActivated(itemName string) {
	gclass := (*C.GtkAppChooserButtonClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.custom_item_activated

	var _arg0 *C.GtkAppChooserButton // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkAppChooserButton)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(itemName)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_AppChooserButton_virtual_custom_item_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(itemName)
}

// AppChooserDialogOverrides contains methods that are overridable.
type AppChooserDialogOverrides struct {
}

func defaultAppChooserDialogOverrides(v *AppChooserDialog) AppChooserDialogOverrides {
	return AppChooserDialogOverrides{}
}

// AppChooserDialog shows a AppChooserWidget inside a Dialog.
//
// Note that AppChooserDialog does not have any interesting methods of
// its own. Instead, you should get the embedded AppChooserWidget using
// gtk_app_chooser_dialog_get_widget() and call its methods if the generic
// AppChooser interface is not sufficient for your needs.
//
// To set the heading that is shown above the AppChooserWidget, use
// gtk_app_chooser_dialog_set_heading().
type AppChooserDialog struct {
	_ [0]func() // equal guard
	Dialog

	*coreglib.Object
	AppChooser
}

var (
	_ coreglib.Objector = (*AppChooserDialog)(nil)
	_ Binner            = (*AppChooserDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AppChooserDialog, *AppChooserDialogClass, AppChooserDialogOverrides](
		GTypeAppChooserDialog,
		initAppChooserDialogClass,
		wrapAppChooserDialog,
		defaultAppChooserDialogOverrides,
	)
}

func initAppChooserDialogClass(gclass unsafe.Pointer, overrides AppChooserDialogOverrides, classInitFunc func(*AppChooserDialogClass)) {
	if classInitFunc != nil {
		class := (*AppChooserDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAppChooserDialog(obj *coreglib.Object) *AppChooserDialog {
	return &AppChooserDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
		Object: obj,
		AppChooser: AppChooser{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalAppChooserDialog(p uintptr) (interface{}, error) {
	return wrapAppChooserDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewAppChooserDialog creates a new AppChooserDialog for the provided #GFile,
// to allow the user to select an application for it.
//
// The function takes the following parameters:
//
//   - parent (optional) or NULL.
//   - flags for this dialog.
//   - file: #GFile.
//
// The function returns the following values:
//
//   - appChooserDialog: newly created AppChooserDialog.
func NewAppChooserDialog(parent *Window, flags DialogFlags, file gio.Filer) *AppChooserDialog {
	var _arg1 *C.GtkWindow     // out
	var _arg2 C.GtkDialogFlags // out
	var _arg3 *C.GFile         // out
	var _cret *C.GtkWidget     // in

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	_arg2 = C.GtkDialogFlags(flags)
	_arg3 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	_cret = C.gtk_app_chooser_dialog_new(_arg1, _arg2, _arg3)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(file)

	var _appChooserDialog *AppChooserDialog // out

	_appChooserDialog = wrapAppChooserDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _appChooserDialog
}

// NewAppChooserDialogForContentType creates a new AppChooserDialog for the
// provided content type, to allow the user to select an application for it.
//
// The function takes the following parameters:
//
//   - parent (optional) or NULL.
//   - flags for this dialog.
//   - contentType: content type string.
//
// The function returns the following values:
//
//   - appChooserDialog: newly created AppChooserDialog.
func NewAppChooserDialogForContentType(parent *Window, flags DialogFlags, contentType string) *AppChooserDialog {
	var _arg1 *C.GtkWindow     // out
	var _arg2 C.GtkDialogFlags // out
	var _arg3 *C.gchar         // out
	var _cret *C.GtkWidget     // in

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	_arg2 = C.GtkDialogFlags(flags)
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(contentType)))
	defer C.free(unsafe.Pointer(_arg3))

	_cret = C.gtk_app_chooser_dialog_new_for_content_type(_arg1, _arg2, _arg3)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(contentType)

	var _appChooserDialog *AppChooserDialog // out

	_appChooserDialog = wrapAppChooserDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _appChooserDialog
}

// Heading returns the text to display at the top of the dialog.
//
// The function returns the following values:
//
//   - utf8 (optional): text to display at the top of the dialog, or NULL,
//     in which case a default text is displayed.
func (self *AppChooserDialog) Heading() string {
	var _arg0 *C.GtkAppChooserDialog // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkAppChooserDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_dialog_get_heading(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Widget returns the AppChooserWidget of this dialog.
//
// The function returns the following values:
//
//   - widget of self.
func (self *AppChooserDialog) Widget() Widgetter {
	var _arg0 *C.GtkAppChooserDialog // out
	var _cret *C.GtkWidget           // in

	_arg0 = (*C.GtkAppChooserDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_dialog_get_widget(_arg0)
	runtime.KeepAlive(self)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetHeading sets the text to display at the top of the dialog. If the heading
// is not set, the dialog displays a default text.
//
// The function takes the following parameters:
//
//   - heading: string containing Pango markup.
func (self *AppChooserDialog) SetHeading(heading string) {
	var _arg0 *C.GtkAppChooserDialog // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkAppChooserDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(heading)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_app_chooser_dialog_set_heading(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(heading)
}

// AppChooserWidgetOverrides contains methods that are overridable.
type AppChooserWidgetOverrides struct {
	// ApplicationActivated: signal emitted when an application item is
	// activated from the widget’s list.
	ApplicationActivated func(appInfo gio.AppInfor)
	// ApplicationSelected: signal emitted when an application item is selected
	// from the widget’s list.
	ApplicationSelected func(appInfo gio.AppInfor)
	// PopulatePopup: signal emitted when a context menu is about to popup over
	// an application item.
	//
	// The function takes the following parameters:
	//
	//   - menu
	//   - appInfo
	PopulatePopup func(menu *Menu, appInfo gio.AppInfor)
}

func defaultAppChooserWidgetOverrides(v *AppChooserWidget) AppChooserWidgetOverrides {
	return AppChooserWidgetOverrides{
		ApplicationActivated: v.applicationActivated,
		ApplicationSelected:  v.applicationSelected,
		PopulatePopup:        v.populatePopup,
	}
}

// AppChooserWidget is a widget for selecting applications. It is the main
// building block for AppChooserDialog. Most applications only need to use the
// latter; but you can use this widget as part of a larger widget if you have
// special needs.
//
// AppChooserWidget offers detailed control over what applications are shown,
// using the AppChooserWidget:show-default, AppChooserWidget:show-recommended,
// AppChooserWidget:show-fallback, AppChooserWidget:show-other and
// AppChooserWidget:show-all properties. See the AppChooser documentation for
// more information about these groups of applications.
//
// To keep track of the selected application,
// use the AppChooserWidget::application-selected and
// AppChooserWidget::application-activated signals.
//
// # CSS nodes
//
// GtkAppChooserWidget has a single CSS node with name appchooser.
type AppChooserWidget struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	AppChooser
}

var (
	_ coreglib.Objector = (*AppChooserWidget)(nil)
	_ Containerer       = (*AppChooserWidget)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AppChooserWidget, *AppChooserWidgetClass, AppChooserWidgetOverrides](
		GTypeAppChooserWidget,
		initAppChooserWidgetClass,
		wrapAppChooserWidget,
		defaultAppChooserWidgetOverrides,
	)
}

func initAppChooserWidgetClass(gclass unsafe.Pointer, overrides AppChooserWidgetOverrides, classInitFunc func(*AppChooserWidgetClass)) {
	pclass := (*C.GtkAppChooserWidgetClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAppChooserWidget))))

	if overrides.ApplicationActivated != nil {
		pclass.application_activated = (*[0]byte)(C._gotk4_gtk3_AppChooserWidgetClass_application_activated)
	}

	if overrides.ApplicationSelected != nil {
		pclass.application_selected = (*[0]byte)(C._gotk4_gtk3_AppChooserWidgetClass_application_selected)
	}

	if overrides.PopulatePopup != nil {
		pclass.populate_popup = (*[0]byte)(C._gotk4_gtk3_AppChooserWidgetClass_populate_popup)
	}

	if classInitFunc != nil {
		class := (*AppChooserWidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAppChooserWidget(obj *coreglib.Object) *AppChooserWidget {
	return &AppChooserWidget{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		AppChooser: AppChooser{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalAppChooserWidget(p uintptr) (interface{}, error) {
	return wrapAppChooserWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectApplicationActivated is emitted when an application item is activated
// from the widget's list.
//
// This usually happens when the user double clicks an item, or an item is
// selected and the user presses one of the keys Space, Shift+Space, Return or
// Enter.
func (self *AppChooserWidget) ConnectApplicationActivated(f func(application gio.AppInfor)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "application-activated", false, unsafe.Pointer(C._gotk4_gtk3_AppChooserWidget_ConnectApplicationActivated), f)
}

// ConnectApplicationSelected is emitted when an application item is selected
// from the widget's list.
func (self *AppChooserWidget) ConnectApplicationSelected(f func(application gio.AppInfor)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "application-selected", false, unsafe.Pointer(C._gotk4_gtk3_AppChooserWidget_ConnectApplicationSelected), f)
}

// ConnectPopulatePopup is emitted when a context menu is about to popup over an
// application item. Clients can insert menu items into the provided Menu object
// in the callback of this signal; the context menu will be shown over the item
// if at least one item has been added to the menu.
func (self *AppChooserWidget) ConnectPopulatePopup(f func(menu *Menu, application gio.AppInfor)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "populate-popup", false, unsafe.Pointer(C._gotk4_gtk3_AppChooserWidget_ConnectPopulatePopup), f)
}

// NewAppChooserWidget creates a new AppChooserWidget for applications that can
// handle content of the given type.
//
// The function takes the following parameters:
//
//   - contentType: content type to show applications for.
//
// The function returns the following values:
//
//   - appChooserWidget: newly created AppChooserWidget.
func NewAppChooserWidget(contentType string) *AppChooserWidget {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(contentType)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_app_chooser_widget_new(_arg1)
	runtime.KeepAlive(contentType)

	var _appChooserWidget *AppChooserWidget // out

	_appChooserWidget = wrapAppChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _appChooserWidget
}

// DefaultText returns the text that is shown if there are not applications that
// can handle the content type.
//
// The function returns the following values:
//
//   - utf8: value of AppChooserWidget:default-text.
func (self *AppChooserWidget) DefaultText() string {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_default_text(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ShowAll returns the current value of the AppChooserWidget:show-all property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserWidget:show-all.
func (self *AppChooserWidget) ShowAll() bool {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_show_all(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowDefault returns the current value of the AppChooserWidget:show-default
// property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserWidget:show-default.
func (self *AppChooserWidget) ShowDefault() bool {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_show_default(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowFallback returns the current value of the AppChooserWidget:show-fallback
// property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserWidget:show-fallback.
func (self *AppChooserWidget) ShowFallback() bool {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_show_fallback(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowOther returns the current value of the AppChooserWidget:show-other
// property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserWidget:show-other.
func (self *AppChooserWidget) ShowOther() bool {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_show_other(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowRecommended returns the current value of the
// AppChooserWidget:show-recommended property.
//
// The function returns the following values:
//
//   - ok: value of AppChooserWidget:show-recommended.
func (self *AppChooserWidget) ShowRecommended() bool {
	var _arg0 *C.GtkAppChooserWidget // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_app_chooser_widget_get_show_recommended(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetDefaultText sets the text that is shown if there are not applications that
// can handle the content type.
//
// The function takes the following parameters:
//
//   - text: new value for AppChooserWidget:default-text.
func (self *AppChooserWidget) SetDefaultText(text string) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_app_chooser_widget_set_default_text(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(text)
}

// SetShowAll sets whether the app chooser should show all applications in a
// flat list.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserWidget:show-all.
func (self *AppChooserWidget) SetShowAll(setting bool) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_widget_set_show_all(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// SetShowDefault sets whether the app chooser should show the default handler
// for the content type in a separate section.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserWidget:show-default.
func (self *AppChooserWidget) SetShowDefault(setting bool) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_widget_set_show_default(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// SetShowFallback sets whether the app chooser should show related applications
// for the content type in a separate section.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserWidget:show-fallback.
func (self *AppChooserWidget) SetShowFallback(setting bool) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_widget_set_show_fallback(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// SetShowOther sets whether the app chooser should show applications which are
// unrelated to the content type.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserWidget:show-other.
func (self *AppChooserWidget) SetShowOther(setting bool) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_widget_set_show_other(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// SetShowRecommended sets whether the app chooser should show recommended
// applications for the content type in a separate section.
//
// The function takes the following parameters:
//
//   - setting: new value for AppChooserWidget:show-recommended.
func (self *AppChooserWidget) SetShowRecommended(setting bool) {
	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_app_chooser_widget_set_show_recommended(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(setting)
}

// applicationActivated: signal emitted when an application item is activated
// from the widget’s list.
func (self *AppChooserWidget) applicationActivated(appInfo gio.AppInfor) {
	gclass := (*C.GtkAppChooserWidgetClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.application_activated

	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 *C.GAppInfo            // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GAppInfo)(unsafe.Pointer(coreglib.InternObject(appInfo).Native()))

	C._gotk4_gtk3_AppChooserWidget_virtual_application_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(appInfo)
}

// applicationSelected: signal emitted when an application item is selected from
// the widget’s list.
func (self *AppChooserWidget) applicationSelected(appInfo gio.AppInfor) {
	gclass := (*C.GtkAppChooserWidgetClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.application_selected

	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 *C.GAppInfo            // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GAppInfo)(unsafe.Pointer(coreglib.InternObject(appInfo).Native()))

	C._gotk4_gtk3_AppChooserWidget_virtual_application_selected(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(appInfo)
}

// populatePopup: signal emitted when a context menu is about to popup over an
// application item.
//
// The function takes the following parameters:
//
//   - menu
//   - appInfo
func (self *AppChooserWidget) populatePopup(menu *Menu, appInfo gio.AppInfor) {
	gclass := (*C.GtkAppChooserWidgetClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.populate_popup

	var _arg0 *C.GtkAppChooserWidget // out
	var _arg1 *C.GtkMenu             // out
	var _arg2 *C.GAppInfo            // out

	_arg0 = (*C.GtkAppChooserWidget)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg2 = (*C.GAppInfo)(unsafe.Pointer(coreglib.InternObject(appInfo).Native()))

	C._gotk4_gtk3_AppChooserWidget_virtual_populate_popup(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(self)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(appInfo)
}

// ApplicationOverrides contains methods that are overridable.
type ApplicationOverrides struct {
	// WindowAdded: signal emitted when a Window is added to application through
	// gtk_application_add_window().
	WindowAdded func(window *Window)
	// WindowRemoved: signal emitted when a Window is removed from application,
	// either as a side-effect of being destroyed or explicitly through
	// gtk_application_remove_window().
	WindowRemoved func(window *Window)
}

func defaultApplicationOverrides(v *Application) ApplicationOverrides {
	return ApplicationOverrides{
		WindowAdded:   v.windowAdded,
		WindowRemoved: v.windowRemoved,
	}
}

// Application is a class that handles many important aspects of a GTK+
// application in a convenient fashion, without enforcing a one-size-fits-all
// application model.
//
// Currently, GtkApplication handles GTK+ initialization, application
// uniqueness, session management, provides some basic scriptability and desktop
// shell integration by exporting actions and menus and manages a list of
// toplevel windows whose life-cycle is automatically tied to the life-cycle of
// your application.
//
// While GtkApplication works fine with plain Windows, it is recommended to use
// it together with ApplicationWindow.
//
// When GDK threads are enabled, GtkApplication will acquire the GDK lock
// when invoking actions that arrive from other processes. The GDK lock is
// not touched for local action invocations. In order to have actions invoked
// in a predictable context it is therefore recommended that the GDK lock be
// held while invoking actions locally with g_action_group_activate_action().
// The same applies to actions associated with ApplicationWindow and to the
// “activate” and “open” #GApplication methods.
//
// # Automatic resources
//
// Application will automatically load menus from the Builder resource located
// at "gtk/menus.ui", relative to the application's resource base path (see
// g_application_set_resource_base_path()). The menu with the ID "app-menu"
// is taken as the application's app menu and the menu with the ID "menubar"
// is taken as the application's menubar. Additional menus (most interesting
// submenus) can be named and accessed via gtk_application_get_menu_by_id()
// which allows for dynamic population of a part of the menu structure.
//
// If the resources "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui"
// are present then these files will be used in preference, depending
// on the value of gtk_application_prefers_app_menu(). If the resource
// "gtk/menus-common.ui" is present it will be loaded as well. This is useful
// for storing items that are referenced from both "gtk/menus-appmenu.ui" and
// "gtk/menus-traditional.ui".
//
// It is also possible to provide the menus manually using
// gtk_application_set_app_menu() and gtk_application_set_menubar().
//
// Application will also automatically setup an icon search path for the
// default icon theme by appending "icons" to the resource base path.
// This allows your application to easily store its icons as resources.
// See gtk_icon_theme_add_resource_path() for more information.
//
// If there is a resource located at "gtk/help-overlay.ui" which defines a
// ShortcutsWindow with ID "help_overlay" then GtkApplication associates an
// instance of this shortcuts window with each ApplicationWindow and sets up
// keyboard accelerators (Control-F1 and Control-?) to open it. To create a menu
// item that displays the shortcuts window, associate the item with the action
// win.show-help-overlay.
//
// # A simple application
//
// A simple example
// (https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/examples/bp/bloatpad.c)
//
// GtkApplication optionally registers with a session manager of the users
// session (if you set the Application:register-session property) and offers
// various functionality related to the session life-cycle.
//
// An application can block various ways to end the session with the
// gtk_application_inhibit() function. Typical use cases for this kind of
// inhibiting are long-running, uninterruptible operations, such as burning a CD
// or performing a disk backup. The session manager may not honor the inhibitor,
// but it can be expected to inform the user about the negative consequences of
// ending the session while inhibitors are present.
//
// # See Also
//
// HowDoI: Using GtkApplication (https://wiki.gnome.org/HowDoI/GtkApplication),
// Getting Started with GTK+: Basics
// (https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.3).
type Application struct {
	_ [0]func() // equal guard
	gio.Application
}

var (
	_ coreglib.Objector = (*Application)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Application, *ApplicationClass, ApplicationOverrides](
		GTypeApplication,
		initApplicationClass,
		wrapApplication,
		defaultApplicationOverrides,
	)
}

func initApplicationClass(gclass unsafe.Pointer, overrides ApplicationOverrides, classInitFunc func(*ApplicationClass)) {
	pclass := (*C.GtkApplicationClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeApplication))))

	if overrides.WindowAdded != nil {
		pclass.window_added = (*[0]byte)(C._gotk4_gtk3_ApplicationClass_window_added)
	}

	if overrides.WindowRemoved != nil {
		pclass.window_removed = (*[0]byte)(C._gotk4_gtk3_ApplicationClass_window_removed)
	}

	if classInitFunc != nil {
		class := (*ApplicationClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapApplication(obj *coreglib.Object) *Application {
	return &Application{
		Application: gio.Application{
			Object: obj,
			ActionGroup: gio.ActionGroup{
				Object: obj,
			},
			ActionMap: gio.ActionMap{
				Object: obj,
			},
		},
	}
}

func marshalApplication(p uintptr) (interface{}, error) {
	return wrapApplication(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectQueryEnd is emitted when the session manager is about to end the
// session, only if Application::register-session is TRUE. Applications
// can connect to this signal and call gtk_application_inhibit() with
// GTK_APPLICATION_INHIBIT_LOGOUT to delay the end of the session until state
// has been saved.
func (application *Application) ConnectQueryEnd(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(application, "query-end", false, unsafe.Pointer(C._gotk4_gtk3_Application_ConnectQueryEnd), f)
}

// ConnectWindowAdded is emitted when a Window is added to application through
// gtk_application_add_window().
func (application *Application) ConnectWindowAdded(f func(window *Window)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(application, "window-added", false, unsafe.Pointer(C._gotk4_gtk3_Application_ConnectWindowAdded), f)
}

// ConnectWindowRemoved is emitted when a Window is removed from application,
// either as a side-effect of being destroyed or explicitly through
// gtk_application_remove_window().
func (application *Application) ConnectWindowRemoved(f func(window *Window)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(application, "window-removed", false, unsafe.Pointer(C._gotk4_gtk3_Application_ConnectWindowRemoved), f)
}

// NewApplication creates a new Application instance.
//
// When using Application, it is not necessary to call gtk_init() manually. It
// is called as soon as the application gets registered as the primary instance.
//
// Concretely, gtk_init() is called in the default handler for the
// #GApplication::startup signal. Therefore, Application subclasses should chain
// up in their #GApplication::startup handler before using any GTK+ API.
//
// Note that commandline arguments are not passed to gtk_init(). All GTK+
// functionality that is available via commandline arguments can also be
// achieved by setting suitable environment variables such as G_DEBUG, so this
// should not be a big problem. If you absolutely must support GTK+ commandline
// arguments, you can explicitly call gtk_init() before creating the application
// instance.
//
// If non-NULL, the application ID must be valid. See
// g_application_id_is_valid().
//
// If no application ID is given then some features (most notably application
// uniqueness) will be disabled. A null application ID is only allowed with GTK+
// 3.6 or later.
//
// The function takes the following parameters:
//
//   - applicationId (optional): application ID.
//   - flags: application flags.
//
// The function returns the following values:
//
//   - application: new Application instance.
func NewApplication(applicationId string, flags gio.ApplicationFlags) *Application {
	var _arg1 *C.gchar            // out
	var _arg2 C.GApplicationFlags // out
	var _cret *C.GtkApplication   // in

	if applicationId != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(applicationId)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GApplicationFlags(flags)

	_cret = C.gtk_application_new(_arg1, _arg2)
	runtime.KeepAlive(applicationId)
	runtime.KeepAlive(flags)

	var _application *Application // out

	_application = wrapApplication(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _application
}

// AddAccelerator installs an accelerator that will cause the named action to be
// activated when the key combination specificed by accelerator is pressed.
//
// accelerator must be a string that can be parsed by gtk_accelerator_parse(),
// e.g. "<Primary>q" or “<Control><Alt>p”.
//
// action_name must be the name of an action as it would be used in the app
// menu, i.e. actions that have been added to the application are referred to
// with an “app.” prefix, and window-specific actions with a “win.” prefix.
//
// GtkApplication also extracts accelerators out of “accel” attributes
// in the Models passed to gtk_application_set_app_menu() and
// gtk_application_set_menubar(), which is usually more convenient than calling
// this function for each accelerator.
//
// Deprecated: Use gtk_application_set_accels_for_action() instead.
//
// The function takes the following parameters:
//
//   - accelerator string.
//   - actionName: name of the action to activate.
//   - parameter (optional) to pass when activating the action, or NULL if the
//     action does not accept an activation parameter.
func (application *Application) AddAccelerator(accelerator, actionName string, parameter *glib.Variant) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _arg2 *C.gchar          // out
	var _arg3 *C.GVariant       // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
	defer C.free(unsafe.Pointer(_arg2))
	if parameter != nil {
		_arg3 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(parameter)))
	}

	C.gtk_application_add_accelerator(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(application)
	runtime.KeepAlive(accelerator)
	runtime.KeepAlive(actionName)
	runtime.KeepAlive(parameter)
}

// AddWindow adds a window to application.
//
// This call can only happen after the application has started; typically,
// you should add new application windows in response to the emission of the
// #GApplication::activate signal.
//
// This call is equivalent to setting the Window:application property of window
// to application.
//
// Normally, the connection between the application and the window will
// remain until the window is destroyed, but you can explicitly remove it with
// gtk_application_remove_window().
//
// GTK+ will keep the application running as long as it has any windows.
//
// The function takes the following parameters:
//
//   - window: Window.
func (application *Application) AddWindow(window *Window) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_application_add_window(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(window)
}

// AccelsForAction gets the accelerators that are currently associated with the
// given action.
//
// The function takes the following parameters:
//
//   - detailedActionName: detailed action name, specifying an action and target
//     to obtain accelerators for.
//
// The function returns the following values:
//
//   - utf8s accelerators for detailed_action_name, as a NULL-terminated array.
//     Free with g_strfreev() when no longer needed.
func (application *Application) AccelsForAction(detailedActionName string) []string {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(detailedActionName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_application_get_accels_for_action(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(detailedActionName)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// ActionsForAccel returns the list of actions (possibly empty) that accel maps
// to. Each item in the list is a detailed action name in the usual form.
//
// This might be useful to discover if an accel already exists in order to
// prevent installation of a conflicting accelerator (from an accelerator editor
// or a plugin system, for example). Note that having more than one action per
// accelerator may not be a bad thing and might make sense in cases where the
// actions never appear in the same context.
//
// In case there are no actions for a given accelerator, an empty array is
// returned. NULL is never returned.
//
// It is a programmer error to pass an invalid accelerator string. If you are
// unsure, check it with gtk_accelerator_parse() first.
//
// The function takes the following parameters:
//
//   - accel: accelerator that can be parsed by gtk_accelerator_parse().
//
// The function returns the following values:
//
//   - utf8s: NULL-terminated array of actions for accel.
func (application *Application) ActionsForAccel(accel string) []string {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accel)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_application_get_actions_for_accel(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(accel)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// ActiveWindow gets the “active” window for the application.
//
// The active window is the one that was most recently focused (within the
// application). This window may not have the focus at the moment if another
// application has it — this is just the most recently-focused window within
// this application.
//
// The function returns the following values:
//
//   - window (optional): active window, or NULL if there isn't one.
func (application *Application) ActiveWindow() *Window {
	var _arg0 *C.GtkApplication // out
	var _cret *C.GtkWindow      // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_get_active_window(_arg0)
	runtime.KeepAlive(application)

	var _window *Window // out

	if _cret != nil {
		_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _window
}

// AppMenu returns the menu model that has been set with
// gtk_application_set_app_menu().
//
// The function returns the following values:
//
//   - menuModel (optional): application menu of application or NULL if no
//     application menu has been set.
func (application *Application) AppMenu() gio.MenuModeller {
	var _arg0 *C.GtkApplication // out
	var _cret *C.GMenuModel     // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_get_app_menu(_arg0)
	runtime.KeepAlive(application)

	var _menuModel gio.MenuModeller // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gio.MenuModeller)
				return ok
			})
			rv, ok := casted.(gio.MenuModeller)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gio.MenuModeller")
			}
			_menuModel = rv
		}
	}

	return _menuModel
}

// MenuByID gets a menu from automatically loaded resources. See [Automatic
// resources][automatic-resources] for more information.
//
// The function takes the following parameters:
//
//   - id of the menu to look up.
//
// The function returns the following values:
//
//   - menu gets the menu with the given id from the automatically loaded
//     resources.
func (application *Application) MenuByID(id string) *gio.Menu {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _cret *C.GMenu          // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(id)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_application_get_menu_by_id(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(id)

	var _menu *gio.Menu // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_menu = &gio.Menu{
			MenuModel: gio.MenuModel{
				Object: obj,
			},
		}
	}

	return _menu
}

// Menubar returns the menu model that has been set with
// gtk_application_set_menubar().
//
// The function returns the following values:
//
//   - menuModel: menubar for windows of application.
func (application *Application) Menubar() gio.MenuModeller {
	var _arg0 *C.GtkApplication // out
	var _cret *C.GMenuModel     // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_get_menubar(_arg0)
	runtime.KeepAlive(application)

	var _menuModel gio.MenuModeller // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gio.MenuModeller is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gio.MenuModeller)
			return ok
		})
		rv, ok := casted.(gio.MenuModeller)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gio.MenuModeller")
		}
		_menuModel = rv
	}

	return _menuModel
}

// WindowByID returns the ApplicationWindow with the given ID.
//
// The ID of a ApplicationWindow can be retrieved with
// gtk_application_window_get_id().
//
// The function takes the following parameters:
//
//   - id: identifier number.
//
// The function returns the following values:
//
//   - window (optional) with ID id, or NULL if there is no window with this ID.
func (application *Application) WindowByID(id uint) *Window {
	var _arg0 *C.GtkApplication // out
	var _arg1 C.guint           // out
	var _cret *C.GtkWindow      // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = C.guint(id)

	_cret = C.gtk_application_get_window_by_id(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(id)

	var _window *Window // out

	if _cret != nil {
		_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _window
}

// Windows gets a list of the Windows associated with application.
//
// The list is sorted by most recently focused window, such that the first
// element is the currently focused window. (Useful for choosing a parent for a
// transient window.)
//
// The list that is returned should not be modified in any way. It will only
// remain valid until the next focus change or window creation or deletion.
//
// The function returns the following values:
//
//   - list of Window.
func (application *Application) Windows() []*Window {
	var _arg0 *C.GtkApplication // out
	var _cret *C.GList          // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_get_windows(_arg0)
	runtime.KeepAlive(application)

	var _list []*Window // out

	_list = make([]*Window, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkWindow)(v)
		var dst *Window // out
		dst = wrapWindow(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// Inhibit: inform the session manager that certain types of actions should be
// inhibited. This is not guaranteed to work on all platforms and for all types
// of actions.
//
// Applications should invoke this method when they begin an operation
// that should not be interrupted, such as creating a CD or DVD.
// The types of actions that may be blocked are specified by the flags
// parameter. When the application completes the operation it should call
// gtk_application_uninhibit() to remove the inhibitor. Note that an application
// can have multiple inhibitors, and all of them must be individually removed.
// Inhibitors are also cleared when the application exits.
//
// Applications should not expect that they will always be able to block the
// action. In most cases, users will be given the option to force the action to
// take place.
//
// Reasons should be short and to the point.
//
// If window is given, the session manager may point the user to this window to
// find out more about why the action is inhibited.
//
// The function takes the following parameters:
//
//   - window (optional) or NULL.
//   - flags: what types of actions should be inhibited.
//   - reason (optional): short, human-readable string that explains why these
//     operations are inhibited.
//
// The function returns the following values:
//
//   - guint: non-zero cookie that is used to uniquely identify this request.
//     It should be used as an argument to gtk_application_uninhibit() in order
//     to remove the request. If the platform does not support inhibiting or the
//     request failed for some reason, 0 is returned.
func (application *Application) Inhibit(window *Window, flags ApplicationInhibitFlags, reason string) uint {
	var _arg0 *C.GtkApplication            // out
	var _arg1 *C.GtkWindow                 // out
	var _arg2 C.GtkApplicationInhibitFlags // out
	var _arg3 *C.gchar                     // out
	var _cret C.guint                      // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	if window != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	}
	_arg2 = C.GtkApplicationInhibitFlags(flags)
	if reason != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(reason)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	_cret = C.gtk_application_inhibit(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(application)
	runtime.KeepAlive(window)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(reason)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// IsInhibited determines if any of the actions specified in flags are currently
// inhibited (possibly by another application).
//
// Note that this information may not be available (for example when the
// application is running in a sandbox).
//
// The function takes the following parameters:
//
//   - flags: what types of actions should be queried.
//
// The function returns the following values:
//
//   - ok: TRUE if any of the actions specified in flags are inhibited.
func (application *Application) IsInhibited(flags ApplicationInhibitFlags) bool {
	var _arg0 *C.GtkApplication            // out
	var _arg1 C.GtkApplicationInhibitFlags // out
	var _cret C.gboolean                   // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = C.GtkApplicationInhibitFlags(flags)

	_cret = C.gtk_application_is_inhibited(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(flags)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListActionDescriptions lists the detailed action names which have associated
// accelerators. See gtk_application_set_accels_for_action().
//
// The function returns the following values:
//
//   - utf8s: NULL-terminated array of strings, free with g_strfreev() when
//     done.
func (application *Application) ListActionDescriptions() []string {
	var _arg0 *C.GtkApplication // out
	var _cret **C.gchar         // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_list_action_descriptions(_arg0)
	runtime.KeepAlive(application)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// PrefersAppMenu determines if the desktop environment in which the application
// is running would prefer an application menu be shown.
//
// If this function returns TRUE then the application should call
// gtk_application_set_app_menu() with the contents of an application menu,
// which will be shown by the desktop environment. If it returns FALSE then you
// should consider using an alternate approach, such as a menubar.
//
// The value returned by this function is purely advisory and you are free to
// ignore it. If you call gtk_application_set_app_menu() even if the desktop
// environment doesn't support app menus, then a fallback will be provided.
//
// Applications are similarly free not to set an app menu even if the desktop
// environment wants to show one. In that case, a fallback will also be created
// by the desktop environment (GNOME, for example, uses a menu with only a
// "Quit" item in it).
//
// The value returned by this function never changes. Once it returns a
// particular value, it is guaranteed to always return the same value.
//
// You may only call this function after the application has been registered
// and after the base startup handler has run. You're most likely to want to use
// this from your own startup handler. It may also make sense to consult this
// function while constructing UI (in activate, open or an action activation
// handler) in order to determine if you should show a gear menu or not.
//
// This function will return FALSE on Mac OS and a default app menu will be
// created automatically with the "usual" contents of that menu typical to most
// Mac OS applications. If you call gtk_application_set_app_menu() anyway,
// then this menu will be replaced with your own.
//
// The function returns the following values:
//
//   - ok: TRUE if you should set an app menu.
func (application *Application) PrefersAppMenu() bool {
	var _arg0 *C.GtkApplication // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_prefers_app_menu(_arg0)
	runtime.KeepAlive(application)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RemoveAccelerator removes an accelerator that has been previously added with
// gtk_application_add_accelerator().
//
// Deprecated: Use gtk_application_set_accels_for_action() instead.
//
// The function takes the following parameters:
//
//   - actionName: name of the action to activate.
//   - parameter (optional) to pass when activating the action, or NULL if the
//     action does not accept an activation parameter.
func (application *Application) RemoveAccelerator(actionName string, parameter *glib.Variant) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _arg2 *C.GVariant       // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
	defer C.free(unsafe.Pointer(_arg1))
	if parameter != nil {
		_arg2 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(parameter)))
	}

	C.gtk_application_remove_accelerator(_arg0, _arg1, _arg2)
	runtime.KeepAlive(application)
	runtime.KeepAlive(actionName)
	runtime.KeepAlive(parameter)
}

// RemoveWindow: remove a window from application.
//
// If window belongs to application then this call is equivalent to setting the
// Window:application property of window to NULL.
//
// The application may stop running as a result of a call to this function.
//
// The function takes the following parameters:
//
//   - window: Window.
func (application *Application) RemoveWindow(window *Window) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_application_remove_window(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(window)
}

// SetAccelsForAction sets zero or more keyboard accelerators that will trigger
// the given action. The first item in accels will be the primary accelerator,
// which may be displayed in the UI.
//
// To remove all accelerators for an action, use an empty, zero-terminated array
// for accels.
//
// For the detailed_action_name, see g_action_parse_detailed_name() and
// g_action_print_detailed_name().
//
// The function takes the following parameters:
//
//   - detailedActionName: detailed action name, specifying an action and target
//     to associate accelerators with.
//   - accels: list of accelerators in the format understood by
//     gtk_accelerator_parse().
func (application *Application) SetAccelsForAction(detailedActionName string, accels []string) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.gchar          // out
	var _arg2 **C.gchar         // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(detailedActionName)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		_arg2 = (**C.gchar)(C.calloc(C.size_t((len(accels) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg2))
		{
			out := unsafe.Slice(_arg2, len(accels)+1)
			var zero *C.gchar
			out[len(accels)] = zero
			for i := range accels {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(accels[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_application_set_accels_for_action(_arg0, _arg1, _arg2)
	runtime.KeepAlive(application)
	runtime.KeepAlive(detailedActionName)
	runtime.KeepAlive(accels)
}

// SetAppMenu sets or unsets the application menu for application.
//
// This can only be done in the primary instance of the application, after it
// has been registered. #GApplication::startup is a good place to call this.
//
// The application menu is a single menu containing items that typically impact
// the application as a whole, rather than acting on a specific window or
// document. For example, you would expect to see “Preferences” or “Quit” in an
// application menu, but not “Save” or “Print”.
//
// If supported, the application menu will be rendered by the desktop
// environment.
//
// Use the base Map interface to add actions, to respond to the user selecting
// these menu items.
//
// The function takes the following parameters:
//
//   - appMenu (optional) or NULL.
func (application *Application) SetAppMenu(appMenu gio.MenuModeller) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GMenuModel     // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	if appMenu != nil {
		_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(appMenu).Native()))
	}

	C.gtk_application_set_app_menu(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(appMenu)
}

// SetMenubar sets or unsets the menubar for windows of application.
//
// This is a menubar in the traditional sense.
//
// This can only be done in the primary instance of the application, after it
// has been registered. #GApplication::startup is a good place to call this.
//
// Depending on the desktop environment, this may appear at the top of each
// window, or at the top of the screen. In some environments, if both the
// application menu and the menubar are set, the application menu will be
// presented as if it were the first item of the menubar. Other environments
// treat the two as completely separate — for example, the application menu may
// be rendered by the desktop shell while the menubar (if set) remains in each
// individual window.
//
// Use the base Map interface to add actions, to respond to the user selecting
// these menu items.
//
// The function takes the following parameters:
//
//   - menubar (optional) or NULL.
func (application *Application) SetMenubar(menubar gio.MenuModeller) {
	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GMenuModel     // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	if menubar != nil {
		_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(menubar).Native()))
	}

	C.gtk_application_set_menubar(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(menubar)
}

// Uninhibit removes an inhibitor that has been established with
// gtk_application_inhibit(). Inhibitors are also cleared when the application
// exits.
//
// The function takes the following parameters:
//
//   - cookie that was returned by gtk_application_inhibit().
func (application *Application) Uninhibit(cookie uint) {
	var _arg0 *C.GtkApplication // out
	var _arg1 C.guint           // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = C.guint(cookie)

	C.gtk_application_uninhibit(_arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(cookie)
}

// windowAdded: signal emitted when a Window is added to application through
// gtk_application_add_window().
func (application *Application) windowAdded(window *Window) {
	gclass := (*C.GtkApplicationClass)(coreglib.PeekParentClass(application))
	fnarg := gclass.window_added

	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C._gotk4_gtk3_Application_virtual_window_added(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(window)
}

// windowRemoved: signal emitted when a Window is removed from application,
// either as a side-effect of being destroyed or explicitly through
// gtk_application_remove_window().
func (application *Application) windowRemoved(window *Window) {
	gclass := (*C.GtkApplicationClass)(coreglib.PeekParentClass(application))
	fnarg := gclass.window_removed

	var _arg0 *C.GtkApplication // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C._gotk4_gtk3_Application_virtual_window_removed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(application)
	runtime.KeepAlive(window)
}

// ApplicationWindowOverrides contains methods that are overridable.
type ApplicationWindowOverrides struct {
}

func defaultApplicationWindowOverrides(v *ApplicationWindow) ApplicationWindowOverrides {
	return ApplicationWindowOverrides{}
}

// ApplicationWindow is a Window subclass that offers some extra
// functionality for better integration with Application features. Notably,
// it can handle both the application menu as well as the menubar. See
// gtk_application_set_app_menu() and gtk_application_set_menubar().
//
// This class implements the Group and Map interfaces, to let you add
// window-specific actions that will be exported by the associated Application,
// together with its application-wide actions. Window-specific actions are
// prefixed with the “win.” prefix and application-wide actions are prefixed
// with the “app.” prefix. Actions must be addressed with the prefixed name when
// referring to them from a Model.
//
// Note that widgets that are placed inside a ApplicationWindow can also
// activate these actions, if they implement the Actionable interface.
//
// As with Application, the GDK lock will be acquired when processing actions
// arriving from other processes and should therefore be held when activating
// actions locally (if GDK threads are enabled).
//
// The settings Settings:gtk-shell-shows-app-menu and
// Settings:gtk-shell-shows-menubar tell GTK+ whether the desktop environment
// is showing the application menu and menubar models outside the application
// as part of the desktop shell. For instance, on OS X, both menus will be
// displayed remotely; on Windows neither will be. gnome-shell (starting with
// version 3.4) will display the application menu, but not the menubar.
//
// If the desktop environment does not display the menubar, then
// ApplicationWindow will automatically show a MenuBar for it. This behaviour
// can be overridden with the ApplicationWindow:show-menubar property.
// If the desktop environment does not display the application menu, then it
// will automatically be included in the menubar or in the windows client-side
// decorations.
//
// A GtkApplicationWindow with a menubar
//
//	GtkApplication *app = gtk_application_new ("org.gtk.test", 0);
//
//	GtkBuilder *builder = gtk_builder_new_from_string (
//	    "<interface>"
//	    "  <menu id='menubar'>"
//	    "    <submenu label='_Edit'>"
//	    "      <item label='_Copy' action='win.copy'/>"
//	    "      <item label='_Paste' action='win.paste'/>"
//	    "    </submenu>"
//	    "  </menu>"
//	    "</interface>",
//	    -1);
//
//	GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder,
//	                                                            "menubar"));
//	gtk_application_set_menubar (GTK_APPLICATION (app), menubar);
//	g_object_unref (builder);
//
//	// ...
//
//	GtkWidget *window = gtk_application_window_new (app);
//
// # Handling fallback yourself
//
// A simple example (https://git.gnome.org/browse/gtk+/tree/examples/sunny.c)
//
// The XML format understood by Builder for Model consists of a toplevel <menu>
// element, which contains one or more <item> elements. Each <item> element
// contains <attribute> and <link> elements with a mandatory name attribute.
// <link> elements have the same content model as <menu>. Instead of <link
// name="submenu> or <link name="section">, you can use <submenu> or <section>
// elements.
//
// Attribute values can be translated using gettext, like other Builder content.
// <attribute> elements can be marked for translation with a translatable="yes"
// attribute. It is also possible to specify message context and translator
// comments, using the context and comments attributes. To make use of this,
// the Builder must have been given the gettext domain to use.
//
// The following attributes are used when constructing menu items:
//
// - "label": a user-visible string to display
//
// - "action": the prefixed name of the action to trigger
//
// - "target": the parameter to use when activating the action
//
// - "icon" and "verb-icon": names of icons that may be displayed
//
// - "submenu-action": name of an action that may be used to determine if a
// submenu can be opened
//
// - "hidden-when": a string used to determine when the item will be hidden.
// Possible values include "action-disabled", "action-missing", "macos-menubar".
//
// The following attributes are used when constructing sections:
//
// - "label": a user-visible string to use as section heading
//
// - "display-hint": a string used to determine special formatting for the
// section. Possible values include "horizontal-buttons".
//
// - "text-direction": a string used to determine the TextDirection to use when
// "display-hint" is set to "horizontal-buttons". Possible values include "rtl",
// "ltr", and "none".
//
// The following attributes are used when constructing submenus:
//
// - "label": a user-visible string to display
//
// - "icon": icon name to display.
type ApplicationWindow struct {
	_ [0]func() // equal guard
	Window

	*coreglib.Object
	gio.ActionGroup
	gio.ActionMap
}

var (
	_ coreglib.Objector = (*ApplicationWindow)(nil)
	_ Binner            = (*ApplicationWindow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ApplicationWindow, *ApplicationWindowClass, ApplicationWindowOverrides](
		GTypeApplicationWindow,
		initApplicationWindowClass,
		wrapApplicationWindow,
		defaultApplicationWindowOverrides,
	)
}

func initApplicationWindowClass(gclass unsafe.Pointer, overrides ApplicationWindowOverrides, classInitFunc func(*ApplicationWindowClass)) {
	if classInitFunc != nil {
		class := (*ApplicationWindowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapApplicationWindow(obj *coreglib.Object) *ApplicationWindow {
	return &ApplicationWindow{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
		Object: obj,
		ActionGroup: gio.ActionGroup{
			Object: obj,
		},
		ActionMap: gio.ActionMap{
			Object: obj,
		},
	}
}

func marshalApplicationWindow(p uintptr) (interface{}, error) {
	return wrapApplicationWindow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewApplicationWindow creates a new ApplicationWindow.
//
// The function takes the following parameters:
//
//   - application: Application.
//
// The function returns the following values:
//
//   - applicationWindow: newly created ApplicationWindow.
func NewApplicationWindow(application *Application) *ApplicationWindow {
	var _arg1 *C.GtkApplication // out
	var _cret *C.GtkWidget      // in

	_arg1 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	_cret = C.gtk_application_window_new(_arg1)
	runtime.KeepAlive(application)

	var _applicationWindow *ApplicationWindow // out

	_applicationWindow = wrapApplicationWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _applicationWindow
}

// HelpOverlay gets the ShortcutsWindow that has been set up with a prior call
// to gtk_application_window_set_help_overlay().
//
// The function returns the following values:
//
//   - shortcutsWindow (optional): help overlay associated with window, or NULL.
func (window *ApplicationWindow) HelpOverlay() *ShortcutsWindow {
	var _arg0 *C.GtkApplicationWindow // out
	var _cret *C.GtkShortcutsWindow   // in

	_arg0 = (*C.GtkApplicationWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_application_window_get_help_overlay(_arg0)
	runtime.KeepAlive(window)

	var _shortcutsWindow *ShortcutsWindow // out

	if _cret != nil {
		_shortcutsWindow = wrapShortcutsWindow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _shortcutsWindow
}

// ID returns the unique ID of the window. If the window has not yet been added
// to a Application, returns 0.
//
// The function returns the following values:
//
//   - guint: unique ID for window, or 0 if the window has not yet been added to
//     a Application.
func (window *ApplicationWindow) ID() uint {
	var _arg0 *C.GtkApplicationWindow // out
	var _cret C.guint                 // in

	_arg0 = (*C.GtkApplicationWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_application_window_get_id(_arg0)
	runtime.KeepAlive(window)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// ShowMenubar returns whether the window will display a menubar for the app
// menu and menubar as needed.
//
// The function returns the following values:
//
//   - ok: TRUE if window will display a menubar when needed.
func (window *ApplicationWindow) ShowMenubar() bool {
	var _arg0 *C.GtkApplicationWindow // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkApplicationWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_application_window_get_show_menubar(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetHelpOverlay associates a shortcuts window with the application window,
// and sets up an action with the name win.show-help-overlay to present it.
//
// window takes resposibility for destroying help_overlay.
//
// The function takes the following parameters:
//
//   - helpOverlay (optional): ShortcutsWindow.
func (window *ApplicationWindow) SetHelpOverlay(helpOverlay *ShortcutsWindow) {
	var _arg0 *C.GtkApplicationWindow // out
	var _arg1 *C.GtkShortcutsWindow   // out

	_arg0 = (*C.GtkApplicationWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if helpOverlay != nil {
		_arg1 = (*C.GtkShortcutsWindow)(unsafe.Pointer(coreglib.InternObject(helpOverlay).Native()))
	}

	C.gtk_application_window_set_help_overlay(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(helpOverlay)
}

// SetShowMenubar sets whether the window will display a menubar for the app
// menu and menubar as needed.
//
// The function takes the following parameters:
//
//   - showMenubar: whether to show a menubar when needed.
func (window *ApplicationWindow) SetShowMenubar(showMenubar bool) {
	var _arg0 *C.GtkApplicationWindow // out
	var _arg1 C.gboolean              // out

	_arg0 = (*C.GtkApplicationWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if showMenubar {
		_arg1 = C.TRUE
	}

	C.gtk_application_window_set_show_menubar(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(showMenubar)
}

// ArrowOverrides contains methods that are overridable.
type ArrowOverrides struct {
}

func defaultArrowOverrides(v *Arrow) ArrowOverrides {
	return ArrowOverrides{}
}

// Arrow should be used to draw simple arrows that need to point in one of the
// four cardinal directions (up, down, left, or right). The style of the arrow
// can be one of shadow in, shadow out, etched in, or etched out. Note that
// these directions and style types may be amended in versions of GTK+ to come.
//
// GtkArrow will fill any space alloted to it, but since it is inherited
// from Misc, it can be padded and/or aligned, to fill exactly the space the
// programmer desires.
//
// Arrows are created with a call to gtk_arrow_new(). The direction or style of
// an arrow can be changed after creation by using gtk_arrow_set().
//
// GtkArrow has been deprecated; you can simply use a Image with a suitable
// icon name, such as “pan-down-symbolic“. When replacing GtkArrow by an image,
// pay attention to the fact that GtkArrow is doing automatic flipping between
// K_ARROW_LEFT and K_ARROW_RIGHT, depending on the text direction. To get
// the same effect with an image, use the icon names “pan-start-symbolic“ and
// “pan-end-symbolic“, which react to the text direction.
type Arrow struct {
	_ [0]func() // equal guard
	Misc
}

var (
	_ Miscer = (*Arrow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Arrow, *ArrowClass, ArrowOverrides](
		GTypeArrow,
		initArrowClass,
		wrapArrow,
		defaultArrowOverrides,
	)
}

func initArrowClass(gclass unsafe.Pointer, overrides ArrowOverrides, classInitFunc func(*ArrowClass)) {
	if classInitFunc != nil {
		class := (*ArrowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapArrow(obj *coreglib.Object) *Arrow {
	return &Arrow{
		Misc: Misc{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalArrow(p uintptr) (interface{}, error) {
	return wrapArrow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewArrow creates a new Arrow widget.
//
// Deprecated: Use a Image with a suitable icon.
//
// The function takes the following parameters:
//
//   - arrowType: valid ArrowType.
//   - shadowType: valid ShadowType.
//
// The function returns the following values:
//
//   - arrow: new Arrow widget.
func NewArrow(arrowType ArrowType, shadowType ShadowType) *Arrow {
	var _arg1 C.GtkArrowType  // out
	var _arg2 C.GtkShadowType // out
	var _cret *C.GtkWidget    // in

	_arg1 = C.GtkArrowType(arrowType)
	_arg2 = C.GtkShadowType(shadowType)

	_cret = C.gtk_arrow_new(_arg1, _arg2)
	runtime.KeepAlive(arrowType)
	runtime.KeepAlive(shadowType)

	var _arrow *Arrow // out

	_arrow = wrapArrow(coreglib.Take(unsafe.Pointer(_cret)))

	return _arrow
}

// Set sets the direction and style of the Arrow, arrow.
//
// Deprecated: Use a Image with a suitable icon.
//
// The function takes the following parameters:
//
//   - arrowType: valid ArrowType.
//   - shadowType: valid ShadowType.
func (arrow *Arrow) Set(arrowType ArrowType, shadowType ShadowType) {
	var _arg0 *C.GtkArrow     // out
	var _arg1 C.GtkArrowType  // out
	var _arg2 C.GtkShadowType // out

	_arg0 = (*C.GtkArrow)(unsafe.Pointer(coreglib.InternObject(arrow).Native()))
	_arg1 = C.GtkArrowType(arrowType)
	_arg2 = C.GtkShadowType(shadowType)

	C.gtk_arrow_set(_arg0, _arg1, _arg2)
	runtime.KeepAlive(arrow)
	runtime.KeepAlive(arrowType)
	runtime.KeepAlive(shadowType)
}

// ArrowAccessibleOverrides contains methods that are overridable.
type ArrowAccessibleOverrides struct {
}

func defaultArrowAccessibleOverrides(v *ArrowAccessible) ArrowAccessibleOverrides {
	return ArrowAccessibleOverrides{}
}

type ArrowAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Image
}

var (
	_ coreglib.Objector = (*ArrowAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ArrowAccessible, *ArrowAccessibleClass, ArrowAccessibleOverrides](
		GTypeArrowAccessible,
		initArrowAccessibleClass,
		wrapArrowAccessible,
		defaultArrowAccessibleOverrides,
	)
}

func initArrowAccessibleClass(gclass unsafe.Pointer, overrides ArrowAccessibleOverrides, classInitFunc func(*ArrowAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ArrowAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapArrowAccessible(obj *coreglib.Object) *ArrowAccessible {
	return &ArrowAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Image: atk.Image{
			Object: obj,
		},
	}
}

func marshalArrowAccessible(p uintptr) (interface{}, error) {
	return wrapArrowAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// AspectFrameOverrides contains methods that are overridable.
type AspectFrameOverrides struct {
}

func defaultAspectFrameOverrides(v *AspectFrame) AspectFrameOverrides {
	return AspectFrameOverrides{}
}

// AspectFrame is useful when you want pack a widget so that it can resize but
// always retains the same aspect ratio. For instance, one might be drawing a
// small preview of a larger image. AspectFrame derives from Frame, so it can
// draw a label and a frame around the child. The frame will be “shrink-wrapped”
// to the size of the child.
//
// # CSS nodes
//
// GtkAspectFrame uses a CSS node with name frame.
type AspectFrame struct {
	_ [0]func() // equal guard
	Frame
}

var (
	_ Binner = (*AspectFrame)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*AspectFrame, *AspectFrameClass, AspectFrameOverrides](
		GTypeAspectFrame,
		initAspectFrameClass,
		wrapAspectFrame,
		defaultAspectFrameOverrides,
	)
}

func initAspectFrameClass(gclass unsafe.Pointer, overrides AspectFrameOverrides, classInitFunc func(*AspectFrameClass)) {
	if classInitFunc != nil {
		class := (*AspectFrameClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAspectFrame(obj *coreglib.Object) *AspectFrame {
	return &AspectFrame{
		Frame: Frame{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalAspectFrame(p uintptr) (interface{}, error) {
	return wrapAspectFrame(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewAspectFrame: create a new AspectFrame.
//
// The function takes the following parameters:
//
//   - label (optional): label text.
//   - xalign: horizontal alignment of the child within the allocation of the
//     AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
//   - yalign: vertical alignment of the child within the allocation of the
//     AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
//   - ratio: desired aspect ratio.
//   - obeyChild: if TRUE, ratio is ignored, and the aspect ratio is taken from
//     the requistion of the child.
//
// The function returns the following values:
//
//   - aspectFrame: new AspectFrame.
func NewAspectFrame(label string, xalign, yalign, ratio float32, obeyChild bool) *AspectFrame {
	var _arg1 *C.gchar     // out
	var _arg2 C.gfloat     // out
	var _arg3 C.gfloat     // out
	var _arg4 C.gfloat     // out
	var _arg5 C.gboolean   // out
	var _cret *C.GtkWidget // in

	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.gfloat(xalign)
	_arg3 = C.gfloat(yalign)
	_arg4 = C.gfloat(ratio)
	if obeyChild {
		_arg5 = C.TRUE
	}

	_cret = C.gtk_aspect_frame_new(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(label)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
	runtime.KeepAlive(ratio)
	runtime.KeepAlive(obeyChild)

	var _aspectFrame *AspectFrame // out

	_aspectFrame = wrapAspectFrame(coreglib.Take(unsafe.Pointer(_cret)))

	return _aspectFrame
}

// Set parameters for an existing AspectFrame.
//
// The function takes the following parameters:
//
//   - xalign: horizontal alignment of the child within the allocation of the
//     AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
//   - yalign: vertical alignment of the child within the allocation of the
//     AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
//   - ratio: desired aspect ratio.
//   - obeyChild: if TRUE, ratio is ignored, and the aspect ratio is taken from
//     the requistion of the child.
func (aspectFrame *AspectFrame) Set(xalign, yalign, ratio float32, obeyChild bool) {
	var _arg0 *C.GtkAspectFrame // out
	var _arg1 C.gfloat          // out
	var _arg2 C.gfloat          // out
	var _arg3 C.gfloat          // out
	var _arg4 C.gboolean        // out

	_arg0 = (*C.GtkAspectFrame)(unsafe.Pointer(coreglib.InternObject(aspectFrame).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)
	_arg3 = C.gfloat(ratio)
	if obeyChild {
		_arg4 = C.TRUE
	}

	C.gtk_aspect_frame_set(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(aspectFrame)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
	runtime.KeepAlive(ratio)
	runtime.KeepAlive(obeyChild)
}

// AssistantOverrides contains methods that are overridable.
type AssistantOverrides struct {
	// Apply: signal emitted when the apply button is clicked.
	Apply func()
	// Cancel: signal emitted when the cancel button is clicked.
	Cancel func()
	// Close: signal emitted either when the close button or last page apply
	// button is clicked.
	Close func()
	// Prepare: signal emitted when a new page is set as the assistant’s current
	// page, before making the new page visible.
	Prepare func(page Widgetter)
}

func defaultAssistantOverrides(v *Assistant) AssistantOverrides {
	return AssistantOverrides{
		Apply:   v.apply,
		Cancel:  v.cancel,
		Close:   v.close,
		Prepare: v.prepare,
	}
}

// Assistant is a widget used to represent a generally complex operation
// splitted in several steps, guiding the user through its pages and controlling
// the page flow to collect the necessary data.
//
// The design of GtkAssistant is that it controls what buttons to show
// and to make sensitive, based on what it knows about the page sequence
// and the [type][GtkAssistantPageType] of each page, in addition to state
// information like the page [completion][gtk-assistant-set-page-complete] and
// [committed][gtk-assistant-commit] status.
//
// If you have a case that doesn’t quite fit in Assistants way of handling
// buttons, you can use the K_ASSISTANT_PAGE_CUSTOM page type and handle buttons
// yourself.
//
// # GtkAssistant as GtkBuildable
//
// The GtkAssistant implementation of the Buildable interface exposes the
// action_area as internal children with the name “action_area”.
//
// To add pages to an assistant in Builder, simply add it as a child to the
// GtkAssistant object, and set its child properties as necessary.
//
// # CSS nodes
//
// GtkAssistant has a single CSS node with the name assistant.
type Assistant struct {
	_ [0]func() // equal guard
	Window
}

var (
	_ Binner = (*Assistant)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Assistant, *AssistantClass, AssistantOverrides](
		GTypeAssistant,
		initAssistantClass,
		wrapAssistant,
		defaultAssistantOverrides,
	)
}

func initAssistantClass(gclass unsafe.Pointer, overrides AssistantOverrides, classInitFunc func(*AssistantClass)) {
	pclass := (*C.GtkAssistantClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeAssistant))))

	if overrides.Apply != nil {
		pclass.apply = (*[0]byte)(C._gotk4_gtk3_AssistantClass_apply)
	}

	if overrides.Cancel != nil {
		pclass.cancel = (*[0]byte)(C._gotk4_gtk3_AssistantClass_cancel)
	}

	if overrides.Close != nil {
		pclass.close = (*[0]byte)(C._gotk4_gtk3_AssistantClass_close)
	}

	if overrides.Prepare != nil {
		pclass.prepare = (*[0]byte)(C._gotk4_gtk3_AssistantClass_prepare)
	}

	if classInitFunc != nil {
		class := (*AssistantClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapAssistant(obj *coreglib.Object) *Assistant {
	return &Assistant{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalAssistant(p uintptr) (interface{}, error) {
	return wrapAssistant(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectApply signal is emitted when the apply button is clicked.
//
// The default behavior of the Assistant 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 Assistant::prepare
// signal of the progress page.
func (assistant *Assistant) ConnectApply(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(assistant, "apply", false, unsafe.Pointer(C._gotk4_gtk3_Assistant_ConnectApply), f)
}

// ConnectCancel signal is emitted when then the cancel button is clicked.
func (assistant *Assistant) ConnectCancel(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(assistant, "cancel", false, unsafe.Pointer(C._gotk4_gtk3_Assistant_ConnectCancel), f)
}

// ConnectClose signal is 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 (assistant *Assistant) ConnectClose(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(assistant, "close", false, unsafe.Pointer(C._gotk4_gtk3_Assistant_ConnectClose), f)
}

func (assistant *Assistant) ConnectEscape(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(assistant, "escape", false, unsafe.Pointer(C._gotk4_gtk3_Assistant_ConnectEscape), f)
}

// ConnectPrepare signal is 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 (assistant *Assistant) ConnectPrepare(f func(page Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(assistant, "prepare", false, unsafe.Pointer(C._gotk4_gtk3_Assistant_ConnectPrepare), f)
}

// NewAssistant creates a new Assistant.
//
// The function returns the following values:
//
//   - assistant: newly created Assistant.
func NewAssistant() *Assistant {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_assistant_new()

	var _assistant *Assistant // out

	_assistant = wrapAssistant(coreglib.Take(unsafe.Pointer(_cret)))

	return _assistant
}

// AddActionWidget adds a widget to the action area of a Assistant.
//
// The function takes the following parameters:
//
//   - child: Widget.
func (assistant *Assistant) AddActionWidget(child Widgetter) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_assistant_add_action_widget(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(child)
}

// AppendPage appends a page to the assistant.
//
// The function takes the following parameters:
//
//   - page: Widget.
//
// The function returns the following values:
//
//   - gint: index (starting at 0) of the inserted page.
func (assistant *Assistant) AppendPage(page Widgetter) int {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_append_page(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Commit erases the visited page history so the back button is not shown 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 (assistant *Assistant) Commit() {
	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C.gtk_assistant_commit(_arg0)
	runtime.KeepAlive(assistant)
}

// CurrentPage returns the page number of the current page.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the current page in the assistant,
//     or -1 if the assistant has no pages, or no current page.
func (assistant *Assistant) CurrentPage() int {
	var _arg0 *C.GtkAssistant // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	_cret = C.gtk_assistant_get_current_page(_arg0)
	runtime.KeepAlive(assistant)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NPages returns the number of pages in the assistant.
//
// The function returns the following values:
//
//   - gint: number of pages in the assistant.
func (assistant *Assistant) NPages() int {
	var _arg0 *C.GtkAssistant // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	_cret = C.gtk_assistant_get_n_pages(_arg0)
	runtime.KeepAlive(assistant)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NthPage returns the child widget contained in page number page_num.
//
// The function takes the following parameters:
//
//   - pageNum: index of a page in the assistant, or -1 to get the last page.
//
// The function returns the following values:
//
//   - widget (optional): child widget, or NULL if page_num is out of bounds.
func (assistant *Assistant) NthPage(pageNum int) Widgetter {
	var _arg0 *C.GtkAssistant // out
	var _arg1 C.gint          // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = C.gint(pageNum)

	_cret = C.gtk_assistant_get_nth_page(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(pageNum)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// PageComplete gets whether page is complete.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - ok: TRUE if page is complete.
func (assistant *Assistant) PageComplete(page Widgetter) bool {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_complete(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PageHasPadding gets whether page has padding.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - ok: TRUE if page has padding.
func (assistant *Assistant) PageHasPadding(page Widgetter) bool {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_has_padding(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PageHeaderImage gets the header image for page.
//
// Deprecated: Since GTK+ 3.2, a header is no longer shown; add your header
// decoration to the page content instead.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - pixbuf: header image for page, or NULL if there’s no header image for the
//     page.
func (assistant *Assistant) PageHeaderImage(page Widgetter) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret *C.GdkPixbuf    // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_header_image(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// PageSideImage gets the side image for page.
//
// Deprecated: Since GTK+ 3.2, sidebar images are not shown anymore.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - pixbuf: side image for page, or NULL if there’s no side image for the
//     page.
func (assistant *Assistant) PageSideImage(page Widgetter) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret *C.GdkPixbuf    // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_side_image(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// PageTitle gets the title for page.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - utf8: title for page.
func (assistant *Assistant) PageTitle(page Widgetter) string {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_title(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PageType gets the page type of page.
//
// The function takes the following parameters:
//
//   - page of assistant.
//
// The function returns the following values:
//
//   - assistantPageType: page type of page.
func (assistant *Assistant) PageType(page Widgetter) AssistantPageType {
	var _arg0 *C.GtkAssistant        // out
	var _arg1 *C.GtkWidget           // out
	var _cret C.GtkAssistantPageType // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_get_page_type(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _assistantPageType AssistantPageType // out

	_assistantPageType = AssistantPageType(_cret)

	return _assistantPageType
}

// InsertPage inserts a page in the assistant at a given position.
//
// The function takes the following parameters:
//
//   - page: Widget.
//   - position: index (starting at 0) at which to insert the page, or -1 to
//     append the page to the assistant.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the inserted page.
func (assistant *Assistant) InsertPage(page Widgetter, position int) int {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gint          // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	_arg2 = C.gint(position)

	_cret = C.gtk_assistant_insert_page(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(position)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NextPage: 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 K_ASSISTANT_PAGE_CUSTOM
// type.
func (assistant *Assistant) NextPage() {
	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C.gtk_assistant_next_page(_arg0)
	runtime.KeepAlive(assistant)
}

// PrependPage prepends a page to the assistant.
//
// The function takes the following parameters:
//
//   - page: Widget.
//
// The function returns the following values:
//
//   - gint: index (starting at 0) of the inserted page.
func (assistant *Assistant) PrependPage(page Widgetter) int {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	_cret = C.gtk_assistant_prepend_page(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PreviousPage: 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 K_ASSISTANT_PAGE_CUSTOM
// type.
func (assistant *Assistant) PreviousPage() {
	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C.gtk_assistant_previous_page(_arg0)
	runtime.KeepAlive(assistant)
}

// RemoveActionWidget removes a widget from the action area of a Assistant.
//
// The function takes the following parameters:
//
//   - child: Widget.
func (assistant *Assistant) RemoveActionWidget(child Widgetter) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_assistant_remove_action_widget(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(child)
}

// RemovePage removes the page_num’s page from assistant.
//
// The function takes the following parameters:
//
//   - pageNum: index of a page in the assistant, or -1 to remove the last page.
func (assistant *Assistant) RemovePage(pageNum int) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 C.gint          // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = C.gint(pageNum)

	C.gtk_assistant_remove_page(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(pageNum)
}

// SetCurrentPage 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().
//
// The function takes the following parameters:
//
//   - pageNum: index of the page to switch to, starting from 0. If negative,
//     the last page will be used. If greater than the number of pages in the
//     assistant, nothing will be done.
func (assistant *Assistant) SetCurrentPage(pageNum int) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 C.gint          // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = C.gint(pageNum)

	C.gtk_assistant_set_current_page(_arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(pageNum)
}

// SetForwardPageFunc 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.
//
// The function takes the following parameters:
//
//   - pageFunc (optional) or NULL to use the default one.
func (assistant *Assistant) SetForwardPageFunc(pageFunc AssistantPageFunc) {
	var _arg0 *C.GtkAssistant        // out
	var _arg1 C.GtkAssistantPageFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	if pageFunc != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_AssistantPageFunc)
		_arg2 = C.gpointer(gbox.Assign(pageFunc))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_assistant_set_forward_page_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(pageFunc)
}

// SetPageComplete sets whether page contents are complete.
//
// This will make assistant update the buttons state to be able to continue the
// task.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - complete completeness status of the page.
func (assistant *Assistant) SetPageComplete(page Widgetter, complete bool) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	if complete {
		_arg2 = C.TRUE
	}

	C.gtk_assistant_set_page_complete(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(complete)
}

// SetPageHasPadding sets whether the assistant is adding padding around the
// page.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - hasPadding: whether this page has padding.
func (assistant *Assistant) SetPageHasPadding(page Widgetter, hasPadding bool) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	if hasPadding {
		_arg2 = C.TRUE
	}

	C.gtk_assistant_set_page_has_padding(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(hasPadding)
}

// SetPageHeaderImage sets a header image for page.
//
// Deprecated: Since GTK+ 3.2, a header is no longer shown; add your header
// decoration to the page content instead.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - pixbuf (optional): new header image page.
func (assistant *Assistant) SetPageHeaderImage(page Widgetter, pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.GdkPixbuf    // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	if pixbuf != nil {
		_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_assistant_set_page_header_image(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(pixbuf)
}

// SetPageSideImage sets a side image for page.
//
// This image used to be displayed in the side area of the assistant when page
// is the current page.
//
// Deprecated: Since GTK+ 3.2, sidebar images are not shown anymore.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - pixbuf (optional): new side image page.
func (assistant *Assistant) SetPageSideImage(page Widgetter, pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.GdkPixbuf    // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	if pixbuf != nil {
		_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_assistant_set_page_side_image(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(pixbuf)
}

// SetPageTitle sets a title for page.
//
// The title is displayed in the header area of the assistant when page is the
// current page.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - title: new title for page.
func (assistant *Assistant) SetPageTitle(page Widgetter, title string) {
	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_assistant_set_page_title(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(title)
}

// SetPageType sets the page type for page.
//
// The page type determines the page behavior in the assistant.
//
// The function takes the following parameters:
//
//   - page of assistant.
//   - typ: new type for page.
func (assistant *Assistant) SetPageType(page Widgetter, typ AssistantPageType) {
	var _arg0 *C.GtkAssistant        // out
	var _arg1 *C.GtkWidget           // out
	var _arg2 C.GtkAssistantPageType // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	_arg2 = C.GtkAssistantPageType(typ)

	C.gtk_assistant_set_page_type(_arg0, _arg1, _arg2)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
	runtime.KeepAlive(typ)
}

// UpdateButtonsState 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 (assistant *Assistant) UpdateButtonsState() {
	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C.gtk_assistant_update_buttons_state(_arg0)
	runtime.KeepAlive(assistant)
}

// Apply: signal emitted when the apply button is clicked.
func (assistant *Assistant) apply() {
	gclass := (*C.GtkAssistantClass)(coreglib.PeekParentClass(assistant))
	fnarg := gclass.apply

	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C._gotk4_gtk3_Assistant_virtual_apply(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(assistant)
}

// Cancel: signal emitted when the cancel button is clicked.
func (assistant *Assistant) cancel() {
	gclass := (*C.GtkAssistantClass)(coreglib.PeekParentClass(assistant))
	fnarg := gclass.cancel

	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C._gotk4_gtk3_Assistant_virtual_cancel(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(assistant)
}

// Close: signal emitted either when the close button or last page apply button
// is clicked.
func (assistant *Assistant) close() {
	gclass := (*C.GtkAssistantClass)(coreglib.PeekParentClass(assistant))
	fnarg := gclass.close

	var _arg0 *C.GtkAssistant // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))

	C._gotk4_gtk3_Assistant_virtual_close(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(assistant)
}

// Prepare: signal emitted when a new page is set as the assistant’s current
// page, before making the new page visible.
func (assistant *Assistant) prepare(page Widgetter) {
	gclass := (*C.GtkAssistantClass)(coreglib.PeekParentClass(assistant))
	fnarg := gclass.prepare

	var _arg0 *C.GtkAssistant // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkAssistant)(unsafe.Pointer(coreglib.InternObject(assistant).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	C._gotk4_gtk3_Assistant_virtual_prepare(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(assistant)
	runtime.KeepAlive(page)
}

// BinOverrides contains methods that are overridable.
type BinOverrides struct {
}

func defaultBinOverrides(v *Bin) BinOverrides {
	return BinOverrides{}
}

// Bin widget is a container with just one child. It is not very useful itself,
// but it is useful for deriving subclasses, since it provides common code
// needed for handling a single child widget.
//
// Many GTK+ widgets are subclasses of Bin, including Window, Button, Frame,
// HandleBox or ScrolledWindow.
type Bin struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Bin)(nil)
)

// Binner describes types inherited from class Bin.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Binner interface {
	coreglib.Objector
	baseBin() *Bin
}

var _ Binner = (*Bin)(nil)

func init() {
	coreglib.RegisterClassInfo[*Bin, *BinClass, BinOverrides](
		GTypeBin,
		initBinClass,
		wrapBin,
		defaultBinOverrides,
	)
}

func initBinClass(gclass unsafe.Pointer, overrides BinOverrides, classInitFunc func(*BinClass)) {
	if classInitFunc != nil {
		class := (*BinClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapBin(obj *coreglib.Object) *Bin {
	return &Bin{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalBin(p uintptr) (interface{}, error) {
	return wrapBin(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (bin *Bin) baseBin() *Bin {
	return bin
}

// BaseBin returns the underlying base object.
func BaseBin(obj Binner) *Bin {
	return obj.baseBin()
}

// Child gets the child of the Bin, or NULL if the bin contains no child widget.
// The returned widget does not have a reference added, so you do not need to
// unref it.
//
// The function returns the following values:
//
//   - widget (optional): child of bin, or NULL if it does not have a child.
func (bin *Bin) Child() Widgetter {
	var _arg0 *C.GtkBin    // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkBin)(unsafe.Pointer(coreglib.InternObject(bin).Native()))

	_cret = C.gtk_bin_get_child(_arg0)
	runtime.KeepAlive(bin)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// BooleanCellAccessibleOverrides contains methods that are overridable.
type BooleanCellAccessibleOverrides struct {
}

func defaultBooleanCellAccessibleOverrides(v *BooleanCellAccessible) BooleanCellAccessibleOverrides {
	return BooleanCellAccessibleOverrides{}
}

type BooleanCellAccessible struct {
	_ [0]func() // equal guard
	RendererCellAccessible
}

var (
	_ coreglib.Objector = (*BooleanCellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*BooleanCellAccessible, *BooleanCellAccessibleClass, BooleanCellAccessibleOverrides](
		GTypeBooleanCellAccessible,
		initBooleanCellAccessibleClass,
		wrapBooleanCellAccessible,
		defaultBooleanCellAccessibleOverrides,
	)
}

func initBooleanCellAccessibleClass(gclass unsafe.Pointer, overrides BooleanCellAccessibleOverrides, classInitFunc func(*BooleanCellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*BooleanCellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapBooleanCellAccessible(obj *coreglib.Object) *BooleanCellAccessible {
	return &BooleanCellAccessible{
		RendererCellAccessible: RendererCellAccessible{
			CellAccessible: CellAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				AtkObject: atk.AtkObject{
					Object: obj,
				},
				Component: atk.Component{
					Object: obj,
				},
				TableCell: atk.TableCell{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalBooleanCellAccessible(p uintptr) (interface{}, error) {
	return wrapBooleanCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// BoxOverrides contains methods that are overridable.
type BoxOverrides struct {
}

func defaultBoxOverrides(v *Box) BoxOverrides {
	return BoxOverrides{}
}

// Box widget arranges child widgets into a single row or column, depending upon
// the value of its Orientable:orientation property. Within the other dimension,
// all children are allocated the same size. Of course, the Widget:halign and
// Widget:valign properties can be used on the children to influence their
// allocation.
//
// GtkBox uses a notion of packing. Packing refers to adding widgets with
// reference to a particular position in a Container. For a GtkBox, there are
// two reference positions: the start and the end of the box. For a vertical
// Box, the start is defined as the top of the box and the end is defined as the
// bottom. For a horizontal Box the start is defined as the left side and the
// end is defined as the right side.
//
// Use repeated calls to gtk_box_pack_start() to pack widgets into a GtkBox
// from start to end. Use gtk_box_pack_end() to add widgets from end to start.
// You may intersperse these calls and add widgets from both ends of the same
// GtkBox.
//
// Because GtkBox is a Container, you may also use gtk_container_add() to
// insert widgets into the box, and they will be packed with the default values
// for expand and fill child properties. Use gtk_container_remove() to remove
// widgets from the GtkBox.
//
// Use gtk_box_set_homogeneous() to specify whether or not all children of the
// GtkBox are forced to get the same amount of space.
//
// Use gtk_box_set_spacing() to determine how much space will be minimally
// placed between all children in the GtkBox. Note that spacing is added
// between the children, while padding added by gtk_box_pack_start() or
// gtk_box_pack_end() is added on either side of the widget it belongs to.
//
// Use gtk_box_reorder_child() to move a GtkBox child to a different place in
// the box.
//
// Use gtk_box_set_child_packing() to reset the expand, fill and padding child
// properties. Use gtk_box_query_child_packing() to query these fields.
//
// # CSS nodes
//
// GtkBox uses a single CSS node with name box.
//
// In horizontal orientation, the nodes of the children are always arranged
// from left to right. So :first-child will always select the leftmost child,
// regardless of text direction.
type Box struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Orientable
}

var (
	_ Containerer       = (*Box)(nil)
	_ coreglib.Objector = (*Box)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Box, *BoxClass, BoxOverrides](
		GTypeBox,
		initBoxClass,
		wrapBox,
		defaultBoxOverrides,
	)
}

func initBoxClass(gclass unsafe.Pointer, overrides BoxOverrides, classInitFunc func(*BoxClass)) {
	if classInitFunc != nil {
		class := (*BoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapBox(obj *coreglib.Object) *Box {
	return &Box{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalBox(p uintptr) (interface{}, error) {
	return wrapBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewBox creates a new Box.
//
// The function takes the following parameters:
//
//   - orientation box’s orientation.
//   - spacing: number of pixels to place by default between children.
//
// The function returns the following values:
//
//   - box: new Box.
func NewBox(orientation Orientation, spacing int) *Box {
	var _arg1 C.GtkOrientation // out
	var _arg2 C.gint           // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)
	_arg2 = C.gint(spacing)

	_cret = C.gtk_box_new(_arg1, _arg2)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(spacing)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// BaselinePosition gets the value set by gtk_box_set_baseline_position().
//
// The function returns the following values:
//
//   - baselinePosition: baseline position.
func (box *Box) BaselinePosition() BaselinePosition {
	var _arg0 *C.GtkBox             // out
	var _cret C.GtkBaselinePosition // in

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_box_get_baseline_position(_arg0)
	runtime.KeepAlive(box)

	var _baselinePosition BaselinePosition // out

	_baselinePosition = BaselinePosition(_cret)

	return _baselinePosition
}

// CenterWidget retrieves the center widget of the box.
//
// The function returns the following values:
//
//   - widget (optional): center widget or NULL in case no center widget is set.
func (box *Box) CenterWidget() Widgetter {
	var _arg0 *C.GtkBox    // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_box_get_center_widget(_arg0)
	runtime.KeepAlive(box)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Homogeneous returns whether the box is homogeneous (all children are the same
// size). See gtk_box_set_homogeneous().
//
// The function returns the following values:
//
//   - ok: TRUE if the box is homogeneous.
func (box *Box) Homogeneous() bool {
	var _arg0 *C.GtkBox  // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_box_get_homogeneous(_arg0)
	runtime.KeepAlive(box)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Spacing gets the value set by gtk_box_set_spacing().
//
// The function returns the following values:
//
//   - gint: spacing between children.
func (box *Box) Spacing() int {
	var _arg0 *C.GtkBox // out
	var _cret C.gint    // in

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_box_get_spacing(_arg0)
	runtime.KeepAlive(box)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PackEnd adds child to box, packed with reference to the end of box. The child
// is packed after (away from end of) any other child packed with reference to
// the end of box.
//
// The function takes the following parameters:
//
//   - child to be added to box.
//   - expand: TRUE if the new child is to be given extra space allocated to
//     box. The extra space will be divided evenly between all children of box
//     that use this option.
//   - fill: TRUE if space given to child by the expand option is actually
//     allocated to child, rather than just padding it. This parameter has
//     no effect if expand is set to FALSE. A child is always allocated the
//     full height of a horizontal Box and the full width of a vertical Box.
//     This option affects the other dimension.
//   - padding: extra space in pixels to put between this child and its
//     neighbors, over and above the global amount specified by Box:spacing
//     property. If child is a widget at one of the reference ends of box, then
//     padding pixels are also put between child and the reference edge of box.
func (box *Box) PackEnd(child Widgetter, expand, fill bool, padding uint) {
	var _arg0 *C.GtkBox    // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gboolean   // out
	var _arg3 C.gboolean   // out
	var _arg4 C.guint      // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if expand {
		_arg2 = C.TRUE
	}
	if fill {
		_arg3 = C.TRUE
	}
	_arg4 = C.guint(padding)

	C.gtk_box_pack_end(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(fill)
	runtime.KeepAlive(padding)
}

// PackStart adds child to box, packed with reference to the start of box.
// The child is packed after any other child packed with reference to the start
// of box.
//
// The function takes the following parameters:
//
//   - child to be added to box.
//   - expand: TRUE if the new child is to be given extra space allocated to
//     box. The extra space will be divided evenly between all children that use
//     this option.
//   - fill: TRUE if space given to child by the expand option is actually
//     allocated to child, rather than just padding it. This parameter has
//     no effect if expand is set to FALSE. A child is always allocated the
//     full height of a horizontal Box and the full width of a vertical Box.
//     This option affects the other dimension.
//   - padding: extra space in pixels to put between this child and its
//     neighbors, over and above the global amount specified by Box:spacing
//     property. If child is a widget at one of the reference ends of box, then
//     padding pixels are also put between child and the reference edge of box.
func (box *Box) PackStart(child Widgetter, expand, fill bool, padding uint) {
	var _arg0 *C.GtkBox    // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gboolean   // out
	var _arg3 C.gboolean   // out
	var _arg4 C.guint      // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if expand {
		_arg2 = C.TRUE
	}
	if fill {
		_arg3 = C.TRUE
	}
	_arg4 = C.guint(padding)

	C.gtk_box_pack_start(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(fill)
	runtime.KeepAlive(padding)
}

// QueryChildPacking obtains information about how child is packed into box.
//
// The function takes the following parameters:
//
//   - child of the child to query.
//
// The function returns the following values:
//
//   - expand: pointer to return location for expand child property.
//   - fill: pointer to return location for fill child property.
//   - padding: pointer to return location for padding child property.
//   - packType: pointer to return location for pack-type child property.
func (box *Box) QueryChildPacking(child Widgetter) (expand, fill bool, padding uint, packType PackType) {
	var _arg0 *C.GtkBox     // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gboolean    // in
	var _arg3 C.gboolean    // in
	var _arg4 C.guint       // in
	var _arg5 C.GtkPackType // in

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_box_query_child_packing(_arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)

	var _expand bool       // out
	var _fill bool         // out
	var _padding uint      // out
	var _packType PackType // out

	if _arg2 != 0 {
		_expand = true
	}
	if _arg3 != 0 {
		_fill = true
	}
	_padding = uint(_arg4)
	_packType = PackType(_arg5)

	return _expand, _fill, _padding, _packType
}

// ReorderChild moves child to a new position in the list of box children.
// The list contains widgets packed K_PACK_START as well as widgets packed
// K_PACK_END, in the order that these widgets were added to box.
//
// A widget’s position in the box children list determines where the widget is
// packed into box. A child widget at some position in the list will be packed
// just after all other widgets of the same packing type that appear earlier in
// the list.
//
// The function takes the following parameters:
//
//   - child to move.
//   - position: new position for child in the list of children of box, starting
//     from 0. If negative, indicates the end of the list.
func (box *Box) ReorderChild(child Widgetter, position int) {
	var _arg0 *C.GtkBox    // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C.gtk_box_reorder_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

// SetBaselinePosition sets the baseline position of a box. This affects only
// horizontal boxes with at least one baseline aligned child. If there is more
// vertical space available than requested, and the baseline is not allocated by
// the parent then position is used to allocate the baseline wrt the extra space
// available.
//
// The function takes the following parameters:
//
//   - position: BaselinePosition.
func (box *Box) SetBaselinePosition(position BaselinePosition) {
	var _arg0 *C.GtkBox             // out
	var _arg1 C.GtkBaselinePosition // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.GtkBaselinePosition(position)

	C.gtk_box_set_baseline_position(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(position)
}

// SetCenterWidget sets a center widget; that is a child widget that will be
// centered with respect to the full width of the box, even if the children at
// either side take up different amounts of space.
//
// The function takes the following parameters:
//
//   - widget (optional) to center.
func (box *Box) SetCenterWidget(widget Widgetter) {
	var _arg0 *C.GtkBox    // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}

	C.gtk_box_set_center_widget(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(widget)
}

// SetChildPacking sets the way child is packed into box.
//
// The function takes the following parameters:
//
//   - child of the child to set.
//   - expand: new value of the expand child property.
//   - fill: new value of the fill child property.
//   - padding: new value of the padding child property.
//   - packType: new value of the pack-type child property.
func (box *Box) SetChildPacking(child Widgetter, expand, fill bool, padding uint, packType PackType) {
	var _arg0 *C.GtkBox     // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gboolean    // out
	var _arg3 C.gboolean    // out
	var _arg4 C.guint       // out
	var _arg5 C.GtkPackType // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if expand {
		_arg2 = C.TRUE
	}
	if fill {
		_arg3 = C.TRUE
	}
	_arg4 = C.guint(padding)
	_arg5 = C.GtkPackType(packType)

	C.gtk_box_set_child_packing(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(fill)
	runtime.KeepAlive(padding)
	runtime.KeepAlive(packType)
}

// SetHomogeneous sets the Box:homogeneous property of box, controlling whether
// or not all children of box are given equal space in the box.
//
// The function takes the following parameters:
//
//   - homogeneous: boolean value, TRUE to create equal allotments, FALSE for
//     variable allotments.
func (box *Box) SetHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkBox  // out
	var _arg1 C.gboolean // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_box_set_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(homogeneous)
}

// SetSpacing sets the Box:spacing property of box, which is the number of
// pixels to place between children of box.
//
// The function takes the following parameters:
//
//   - spacing: number of pixels to put between children.
func (box *Box) SetSpacing(spacing int) {
	var _arg0 *C.GtkBox // out
	var _arg1 C.gint    // out

	_arg0 = (*C.GtkBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(spacing)

	C.gtk_box_set_spacing(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(spacing)
}

// BuilderOverrides contains methods that are overridable.
type BuilderOverrides struct {
	// TypeFromName looks up a type by name, using the virtual function that
	// Builder has for that purpose. This is mainly used when implementing the
	// Buildable interface on a type.
	//
	// The function takes the following parameters:
	//
	//   - typeName: type name to lookup.
	//
	// The function returns the following values:
	//
	//   - gType found for type_name or TYPE_INVALID if no type was found.
	TypeFromName func(typeName string) coreglib.Type
}

func defaultBuilderOverrides(v *Builder) BuilderOverrides {
	return BuilderOverrides{
		TypeFromName: v.typeFromName,
	}
}

// Builder is an auxiliary object that reads textual descriptions of a user
// interface and instantiates the described objects. To create a GtkBuilder
// from a user interface description, call gtk_builder_new_from_file(),
// gtk_builder_new_from_resource() or gtk_builder_new_from_string().
//
// In the (unusual) case that you want to add user interface descriptions from
// multiple sources to the same GtkBuilder you can call gtk_builder_new()
// to get an empty builder and populate it by (multiple) calls to
// gtk_builder_add_from_file(), gtk_builder_add_from_resource() or
// gtk_builder_add_from_string().
//
// A GtkBuilder holds a reference to all objects that it has constructed and
// drops these references when it is finalized. This finalization can cause the
// destruction of non-widget objects or widgets which are not contained in a
// toplevel window. For toplevel windows constructed by a builder, it is the
// responsibility of the user to call gtk_widget_destroy() to get rid of them
// and all the widgets they contain.
//
// The functions gtk_builder_get_object() and gtk_builder_get_objects() can
// be used to access the widgets in the interface by the names assigned
// to them inside the UI description. Toplevel windows returned by these
// functions will stay around until the user explicitly destroys them with
// gtk_widget_destroy(). Other widgets will either be part of a larger hierarchy
// constructed by the builder (in which case you should not have to worry about
// their lifecycle), or without a parent, in which case they have to be added to
// some container to make use of them. Non-widget objects need to be reffed with
// g_object_ref() to keep them beyond the lifespan of the builder.
//
// The function gtk_builder_connect_signals() and variants thereof can be used
// to connect handlers to the named signals in the description.
//
// # GtkBuilder UI Definitions
//
// GtkBuilder parses textual descriptions of user interfaces which are specified
// in an XML format which can be roughly described by the RELAX NG schema below.
// We refer to these descriptions as “GtkBuilder UI definitions” or just
// “UI definitions” if the context is clear. Do not confuse GtkBuilder UI
// Definitions with [GtkUIManager UI Definitions][XML-UI], which are more
// limited in scope. It is common to use .ui as the filename extension for files
// containing GtkBuilder UI definitions.
//
// RELAX NG Compact Syntax
// (https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkbuilder.rnc)
//
// The toplevel element is <interface>. It optionally takes a “domain”
// attribute, which will make the builder look for translated strings using
// dgettext() in the domain specified. This can also be done by calling
// gtk_builder_set_translation_domain() on the builder. Objects are described by
// <object> elements, which can contain <property> elements to set properties,
// <signal> elements which connect signals to handlers, and <child> elements,
// which describe child objects (most often widgets inside a container,
// but also e.g. actions in an action group, or columns in a tree model).
// A <child> element contains an <object> element which describes the child
// object. The target toolkit version(s) are described by <requires> elements,
// the “lib” attribute specifies the widget library in question (currently the
// only supported value is “gtk+”) and the “version” attribute specifies the
// target version in the form <major>.<minor>. The builder will error out if the
// version requirements are not met.
//
// Typically, the specific kind of object represented by an <object> element
// is specified by the “class” attribute. If the type has not been loaded yet,
// GTK+ tries to find the get_type() function from the class name by applying
// heuristics. This works in most cases, but if necessary, it is possible to
// specify the name of the get_type() function explictly with the "type-func"
// attribute. As a special case, GtkBuilder allows to use an object that has
// been constructed by a UIManager in another part of the UI definition by
// specifying the id of the UIManager in the “constructor” attribute and the
// name of the object in the “id” attribute.
//
// Objects may be given a name with the “id” attribute, which allows the
// application to retrieve them from the builder with gtk_builder_get_object().
// An id is also necessary to use the object as property value in other parts
// of the UI definition. GTK+ reserves ids starting and ending with ___ (3
// underscores) for its own purposes.
//
// Setting properties of objects is pretty straightforward with the <property>
// element: the “name” attribute specifies the name of the property, and the
// content of the element specifies the value. If the “translatable” attribute
// is set to a true value, GTK+ uses gettext() (or dgettext() if the builder has
// a translation domain set) to find a translation for the value. This happens
// before the value is parsed, so it can be used for properties of any type,
// but it is probably most useful for string properties. It is also possible to
// specify a context to disambiguate short strings, and comments which may help
// the translators.
//
// GtkBuilder can parse textual representations for the most common property
// types: characters, strings, integers, floating-point numbers, booleans
// (strings like “TRUE”, “t”, “yes”, “y”, “1” are interpreted as TRUE, strings
// like “FALSE”, “f”, “no”, “n”, “0” are interpreted as FALSE), enumerations
// (can be specified by their name, nick or integer value), flags (can be
// specified by their name, nick, integer value, optionally combined with “|”,
// e.g. “GTK_VISIBLE|GTK_REALIZED”) and colors (in a format understood by
// gdk_rgba_parse()).
//
// GVariants can be specified in the format understood by g_variant_parse(),
// and pixbufs can be specified as a filename of an image file to load.
//
// Objects can be referred to by their name and by default refer to
// objects declared in the local xml fragment and objects exposed via
// gtk_builder_expose_object(). In general, GtkBuilder allows forward references
// to objects — declared in the local xml; an object doesn’t have to be
// constructed before it can be referred to. The exception to this rule is
// that an object has to be constructed before it can be used as the value of a
// construct-only property.
//
// It is also possible to bind a property value to another object's property
// value using the attributes "bind-source" to specify the source object of
// the binding, "bind-property" to specify the source property and optionally
// "bind-flags" to specify the binding flags. Internally builder implements this
// using GBinding objects. For more information see g_object_bind_property()
//
// Signal handlers are set up with the <signal> element. The “name” attribute
// specifies the name of the signal, and the “handler” attribute specifies
// the function to connect to the signal. By default, GTK+ tries to find
// the handler using g_module_symbol(), but this can be changed by passing
// a custom BuilderConnectFunc to gtk_builder_connect_signals_full().
// The remaining attributes, “after”, “swapped” and “object”, have the same
// meaning as the corresponding parameters of the g_signal_connect_object() or
// g_signal_connect_data() functions. A “last_modification_time” attribute is
// also allowed, but it does not have a meaning to the builder.
//
// Sometimes it is necessary to refer to widgets which have implicitly been
// constructed by GTK+ as part of a composite widget, to set properties on
// them or to add further children (e.g. the vbox of a Dialog). This can be
// achieved by setting the “internal-child” property of the <child> element to
// a true value. Note that GtkBuilder still requires an <object> element for the
// internal child, even if it has already been constructed.
//
// A number of widgets have different places where a child can be added (e.g.
// tabs vs. page content in notebooks). This can be reflected in a UI definition
// by specifying the “type” attribute on a <child> The possible values for the
// “type” attribute are described in the sections describing the widget-specific
// portions of UI definitions.
//
// A GtkBuilder UI Definition
//
//	<interface>
//	  <object class="GtkDialog" id="dialog1">
//	    <child internal-child="vbox">
//	      <object class="GtkBox" id="vbox1">
//	        <property name="border-width">10</property>
//	        <child internal-child="action_area">
//	          <object class="GtkButtonBox" id="hbuttonbox1">
//	            <property name="border-width">20</property>
//	            <child>
//	              <object class="GtkButton" id="ok_button">
//	                <property name="label">gtk-ok</property>
//	                <property name="use-stock">TRUE</property>
//	                <signal name="clicked" handler="ok_button_clicked"/>
//	              </object>
//	            </child>
//	          </object>
//	        </child>
//	      </object>
//	    </child>
//	  </object>
//	</interface>
//
// Beyond this general structure, several object classes define their own
// XML DTD fragments for filling in the ANY placeholders in the DTD above.
// Note that a custom element in a <child> element gets parsed by the custom tag
// handler of the parent object, while a custom element in an <object> element
// gets parsed by the custom tag handler of the object.
//
// These XML fragments are explained in the documentation of the respective
// objects.
//
// Additionally, since 3.10 a special <template> tag has been added to the
// format allowing one to define a widget class’s components. See the [GtkWidget
// documentation][composite-templates] for details.
type Builder struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Builder)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Builder, *BuilderClass, BuilderOverrides](
		GTypeBuilder,
		initBuilderClass,
		wrapBuilder,
		defaultBuilderOverrides,
	)
}

func initBuilderClass(gclass unsafe.Pointer, overrides BuilderOverrides, classInitFunc func(*BuilderClass)) {
	pclass := (*C.GtkBuilderClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeBuilder))))

	if overrides.TypeFromName != nil {
		pclass.get_type_from_name = (*[0]byte)(C._gotk4_gtk3_BuilderClass_get_type_from_name)
	}

	if classInitFunc != nil {
		class := (*BuilderClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapBuilder(obj *coreglib.Object) *Builder {
	return &Builder{
		Object: obj,
	}
}

func marshalBuilder(p uintptr) (interface{}, error) {
	return wrapBuilder(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewBuilder creates a new empty builder object.
//
// This function is only useful if you intend to make multiple calls
// to gtk_builder_add_from_file(), gtk_builder_add_from_resource() or
// gtk_builder_add_from_string() in order to merge multiple UI descriptions into
// a single builder.
//
// Most users will probably want to use gtk_builder_new_from_file(),
// gtk_builder_new_from_resource() or gtk_builder_new_from_string().
//
// The function returns the following values:
//
//   - builder: new (empty) Builder object.
func NewBuilder() *Builder {
	var _cret *C.GtkBuilder // in

	_cret = C.gtk_builder_new()

	var _builder *Builder // out

	_builder = wrapBuilder(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _builder
}

// NewBuilderFromFile builds the [GtkBuilder UI definition][BUILDER-UI] in the
// file filename.
//
// If there is an error opening the file or parsing the description then the
// program will be aborted. You should only ever attempt to parse user interface
// descriptions that are shipped as part of your program.
//
// The function takes the following parameters:
//
//   - filename of user interface description file.
//
// The function returns the following values:
//
//   - builder containing the described interface.
func NewBuilderFromFile(filename string) *Builder {
	var _arg1 *C.gchar      // out
	var _cret *C.GtkBuilder // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_new_from_file(_arg1)
	runtime.KeepAlive(filename)

	var _builder *Builder // out

	_builder = wrapBuilder(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _builder
}

// NewBuilderFromResource builds the [GtkBuilder UI definition][BUILDER-UI] at
// resource_path.
//
// If there is an error locating the resource or parsing the description,
// then the program will be aborted.
//
// The function takes the following parameters:
//
//   - resourcePath resource path.
//
// The function returns the following values:
//
//   - builder containing the described interface.
func NewBuilderFromResource(resourcePath string) *Builder {
	var _arg1 *C.gchar      // out
	var _cret *C.GtkBuilder // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_new_from_resource(_arg1)
	runtime.KeepAlive(resourcePath)

	var _builder *Builder // out

	_builder = wrapBuilder(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _builder
}

// NewBuilderFromString builds the user interface described by string (in the
// [GtkBuilder UI definition][BUILDER-UI] format).
//
// If string is NULL-terminated, then length should be -1. If length is not -1,
// then it is the length of string.
//
// If there is an error parsing string then the program will be aborted.
// You should not attempt to parse user interface description from untrusted
// sources.
//
// The function takes the following parameters:
//
//   - str: user interface (XML) description.
//
// The function returns the following values:
//
//   - builder containing the interface described by string.
func NewBuilderFromString(str string) *Builder {
	var _arg1 *C.gchar // out
	var _arg2 C.gssize
	var _cret *C.GtkBuilder // in

	_arg2 = (C.gssize)(len(str))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(str) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(str)), str)
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_new_from_string(_arg1, _arg2)
	runtime.KeepAlive(str)

	var _builder *Builder // out

	_builder = wrapBuilder(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _builder
}

// AddFromFile parses a file containing a [GtkBuilder UI definition][BUILDER-UI]
// and merges it with the current contents of builder.
//
// Most users will probably want to use gtk_builder_new_from_file().
//
// If an error occurs, 0 will be returned and error will be assigned a #GError
// from the K_BUILDER_ERROR, MARKUP_ERROR or FILE_ERROR domain.
//
// It’s not really reasonable to attempt to handle failures of this call.
// You should not use this function with untrusted files (ie: files that are
// not part of your application). Broken Builder files can easily crash your
// program, and it’s possible that memory was leaked leading up to the reported
// failure. The only reasonable thing to do when an error is detected is to call
// g_error().
//
// The function takes the following parameters:
//
//   - filename: name of the file to parse.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddFromFile(filename string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _cret C.guint       // in
	var _cerr *C.GError     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_add_from_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(filename)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddFromResource parses a resource file containing a [GtkBuilder UI
// definition][BUILDER-UI] and merges it with the current contents of builder.
//
// Most users will probably want to use gtk_builder_new_from_resource().
//
// If an error occurs, 0 will be returned and error will be assigned a #GError
// from the K_BUILDER_ERROR, MARKUP_ERROR or RESOURCE_ERROR domain.
//
// It’s not really reasonable to attempt to handle failures of this call. The
// only reasonable thing to do when an error is detected is to call g_error().
//
// The function takes the following parameters:
//
//   - resourcePath: path of the resource file to parse.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddFromResource(resourcePath string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _cret C.guint       // in
	var _cerr *C.GError     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_add_from_resource(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(resourcePath)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddFromString parses a string containing a [GtkBuilder UI
// definition][BUILDER-UI] and merges it with the current contents of builder.
//
// Most users will probably want to use gtk_builder_new_from_string().
//
// Upon errors 0 will be returned and error will be assigned a #GError from the
// K_BUILDER_ERROR, MARKUP_ERROR or VARIANT_PARSE_ERROR domain.
//
// It’s not really reasonable to attempt to handle failures of this call. The
// only reasonable thing to do when an error is detected is to call g_error().
//
// The function takes the following parameters:
//
//   - buffer: string to parse.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddFromString(buffer string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _arg2 C.gsize
	var _cret C.guint   // in
	var _cerr *C.GError // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (C.gsize)(len(buffer))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(buffer) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(buffer)), buffer)
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_add_from_string(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(buffer)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddObjectsFromFile parses a file containing a [GtkBuilder UI
// definition][BUILDER-UI] building only the requested objects and merges them
// with the current contents of builder.
//
// Upon errors 0 will be returned and error will be assigned a #GError from the
// K_BUILDER_ERROR, MARKUP_ERROR or FILE_ERROR domain.
//
// If you are adding an object that depends on an object that is not its
// child (for instance a TreeView that depends on its TreeModel), you have to
// explicitly list all of them in object_ids.
//
// The function takes the following parameters:
//
//   - filename: name of the file to parse.
//   - objectIds: nul-terminated array of objects to build.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddObjectsFromFile(filename string, objectIds []string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _arg2 **C.gchar     // out
	var _cret C.guint       // in
	var _cerr *C.GError     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		_arg2 = (**C.gchar)(C.calloc(C.size_t((len(objectIds) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg2))
		{
			out := unsafe.Slice(_arg2, len(objectIds)+1)
			var zero *C.gchar
			out[len(objectIds)] = zero
			for i := range objectIds {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(objectIds[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	_cret = C.gtk_builder_add_objects_from_file(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(filename)
	runtime.KeepAlive(objectIds)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddObjectsFromResource parses a resource file containing a [GtkBuilder UI
// definition][BUILDER-UI] building only the requested objects and merges them
// with the current contents of builder.
//
// Upon errors 0 will be returned and error will be assigned a #GError from the
// K_BUILDER_ERROR, MARKUP_ERROR or RESOURCE_ERROR domain.
//
// If you are adding an object that depends on an object that is not its
// child (for instance a TreeView that depends on its TreeModel), you have to
// explicitly list all of them in object_ids.
//
// The function takes the following parameters:
//
//   - resourcePath: path of the resource file to parse.
//   - objectIds: nul-terminated array of objects to build.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddObjectsFromResource(resourcePath string, objectIds []string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _arg2 **C.gchar     // out
	var _cret C.guint       // in
	var _cerr *C.GError     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		_arg2 = (**C.gchar)(C.calloc(C.size_t((len(objectIds) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg2))
		{
			out := unsafe.Slice(_arg2, len(objectIds)+1)
			var zero *C.gchar
			out[len(objectIds)] = zero
			for i := range objectIds {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(objectIds[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	_cret = C.gtk_builder_add_objects_from_resource(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(resourcePath)
	runtime.KeepAlive(objectIds)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddObjectsFromString parses a string containing a [GtkBuilder UI
// definition][BUILDER-UI] building only the requested objects and merges them
// with the current contents of builder.
//
// Upon errors 0 will be returned and error will be assigned a #GError from the
// K_BUILDER_ERROR or MARKUP_ERROR domain.
//
// If you are adding an object that depends on an object that is not its
// child (for instance a TreeView that depends on its TreeModel), you have to
// explicitly list all of them in object_ids.
//
// The function takes the following parameters:
//
//   - buffer: string to parse.
//   - objectIds: nul-terminated array of objects to build.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) AddObjectsFromString(buffer string, objectIds []string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _arg2 C.gsize
	var _arg3 **C.gchar // out
	var _cret C.guint   // in
	var _cerr *C.GError // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg2 = (C.gsize)(len(buffer))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(buffer) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(buffer)), buffer)
	defer C.free(unsafe.Pointer(_arg1))
	{
		_arg3 = (**C.gchar)(C.calloc(C.size_t((len(objectIds) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg3))
		{
			out := unsafe.Slice(_arg3, len(objectIds)+1)
			var zero *C.gchar
			out[len(objectIds)] = zero
			for i := range objectIds {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(objectIds[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	_cret = C.gtk_builder_add_objects_from_string(_arg0, _arg1, _arg2, _arg3, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(objectIds)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// ConnectSignals: this method is a simpler variation of
// gtk_builder_connect_signals_full(). It uses symbols explicitly added to
// builder with prior calls to gtk_builder_add_callback_symbol(). In the case
// that symbols are not explicitly added; it uses #GModule’s introspective
// features (by opening the module NULL) to look at the application’s symbol
// table. From here it tries to match the signal handler names given in the
// interface description with symbols in the application and connects the
// signals. Note that this function can only be called once, subsequent calls
// will do nothing.
//
// Note that unless gtk_builder_add_callback_symbol() is called for all signal
// callbacks which are referenced by the loaded XML, this function will require
// that #GModule be supported on the platform.
//
// If you rely on #GModule support to lookup callbacks in the symbol table,
// the following details should be noted:
//
// When compiling applications for Windows, you must declare signal callbacks
// with MODULE_EXPORT, or they will not be put in the symbol table. On Linux and
// Unices, this is not necessary; applications should instead be compiled with
// the -Wl,--export-dynamic CFLAGS, and linked against gmodule-export-2.0.
//
// The function takes the following parameters:
//
//   - userData (optional): user data to pass back with all signals.
func (builder *Builder) ConnectSignals(userData unsafe.Pointer) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 C.gpointer    // out

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (C.gpointer)(unsafe.Pointer(userData))

	C.gtk_builder_connect_signals(_arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(userData)
}

// ExposeObject: add object to the builder object pool so it can be referenced
// just like any other object built by builder.
//
// The function takes the following parameters:
//
//   - name of the object exposed to the builder.
//   - object to expose.
func (builder *Builder) ExposeObject(name string, object *coreglib.Object) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _arg2 *C.GObject    // out

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GObject)(unsafe.Pointer(object.Native()))

	C.gtk_builder_expose_object(_arg0, _arg1, _arg2)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)
	runtime.KeepAlive(object)
}

// ExtendWithTemplate: main private entry point for building composite container
// components from template XML.
//
// This is exported purely to let gtk-builder-tool validate templates,
// applications have no need to call this function.
//
// The function takes the following parameters:
//
//   - widget that is being extended.
//   - templateType: type that the template is for.
//   - buffer: string to parse.
//
// The function returns the following values:
//
//   - guint: positive value on success, 0 if an error occurred.
func (builder *Builder) ExtendWithTemplate(widget Widgetter, templateType coreglib.Type, buffer string) (uint, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.GType       // out
	var _arg3 *C.gchar      // out
	var _arg4 C.gsize
	var _cret C.guint   // in
	var _cerr *C.GError // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GType(templateType)
	_arg4 = (C.gsize)(len(buffer))
	_arg3 = (*C.gchar)(C.calloc(C.size_t((len(buffer) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg3)), len(buffer)), buffer)
	defer C.free(unsafe.Pointer(_arg3))

	_cret = C.gtk_builder_extend_with_template(_arg0, _arg1, _arg2, _arg3, _arg4, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(templateType)
	runtime.KeepAlive(buffer)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// Application gets the Application associated with the builder.
//
// The Application is used for creating action proxies as requested from XML
// that the builder is loading.
//
// By default, the builder uses the default application: the one from
// g_application_get_default(). If you want to use another application for
// constructing proxies, use gtk_builder_set_application().
//
// The function returns the following values:
//
//   - application (optional) being used by the builder, or NULL.
func (builder *Builder) Application() *Application {
	var _arg0 *C.GtkBuilder     // out
	var _cret *C.GtkApplication // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))

	_cret = C.gtk_builder_get_application(_arg0)
	runtime.KeepAlive(builder)

	var _application *Application // out

	if _cret != nil {
		_application = wrapApplication(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _application
}

// GetObject gets the object named name. Note that this function does not
// increment the reference count of the returned object.
//
// The function takes the following parameters:
//
//   - name of object to get.
//
// The function returns the following values:
//
//   - object (optional) named name or NULL if it could not be found in the
//     object tree.
func (builder *Builder) GetObject(name string) *coreglib.Object {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out
	var _cret *C.GObject    // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_get_object(_arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(name)

	var _object *coreglib.Object // out

	if _cret != nil {
		_object = coreglib.Take(unsafe.Pointer(_cret))
	}

	return _object
}

// Objects gets all objects that have been constructed by builder. Note that
// this function does not increment the reference counts of the returned
// objects.
//
// The function returns the following values:
//
//   - sList: newly-allocated List containing all the objects constructed by the
//     Builder instance. It should be freed by g_slist_free().
func (builder *Builder) Objects() []*coreglib.Object {
	var _arg0 *C.GtkBuilder // out
	var _cret *C.GSList     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))

	_cret = C.gtk_builder_get_objects(_arg0)
	runtime.KeepAlive(builder)

	var _sList []*coreglib.Object // out

	_sList = make([]*coreglib.Object, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GObject)(v)
		var dst *coreglib.Object // out
		dst = coreglib.Take(unsafe.Pointer(src))
		_sList = append(_sList, dst)
	})

	return _sList
}

// TranslationDomain gets the translation domain of builder.
//
// The function returns the following values:
//
//   - utf8: translation domain. This string is owned by the builder object and
//     must not be modified or freed.
func (builder *Builder) TranslationDomain() string {
	var _arg0 *C.GtkBuilder // out
	var _cret *C.gchar      // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))

	_cret = C.gtk_builder_get_translation_domain(_arg0)
	runtime.KeepAlive(builder)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TypeFromName looks up a type by name, using the virtual function that Builder
// has for that purpose. This is mainly used when implementing the Buildable
// interface on a type.
//
// The function takes the following parameters:
//
//   - typeName: type name to lookup.
//
// The function returns the following values:
//
//   - gType found for type_name or TYPE_INVALID if no type was found.
func (builder *Builder) TypeFromName(typeName string) coreglib.Type {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.char       // out
	var _cret C.GType       // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(typeName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_builder_get_type_from_name(_arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(typeName)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// SetApplication sets the application associated with builder.
//
// You only need this function if there is more than one #GApplication in your
// process. application cannot be NULL.
//
// The function takes the following parameters:
//
//   - application: Application.
func (builder *Builder) SetApplication(application *Application) {
	var _arg0 *C.GtkBuilder     // out
	var _arg1 *C.GtkApplication // out

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))

	C.gtk_builder_set_application(_arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(application)
}

// SetTranslationDomain sets the translation domain of builder. See
// Builder:translation-domain.
//
// The function takes the following parameters:
//
//   - domain (optional): translation domain or NULL.
func (builder *Builder) SetTranslationDomain(domain string) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.gchar      // out

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	if domain != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(domain)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_builder_set_translation_domain(_arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(domain)
}

// ValueFromStringType: like gtk_builder_value_from_string(), this function
// demarshals a value from a string, but takes a #GType instead of Spec.
// This function calls g_value_init() on the value argument, so it need not be
// initialised beforehand.
//
// Upon errors FALSE will be returned and error will be assigned a #GError from
// the K_BUILDER_ERROR domain.
//
// The function takes the following parameters:
//
//   - typ of the value.
//   - str: string representation of the value.
//
// The function returns the following values:
//
//   - value to store the result in.
func (builder *Builder) ValueFromStringType(typ coreglib.Type, str string) (coreglib.Value, error) {
	var _arg0 *C.GtkBuilder // out
	var _arg1 C.GType       // out
	var _arg2 *C.gchar      // out
	var _arg3 C.GValue      // in
	var _cerr *C.GError     // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = C.GType(typ)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_builder_value_from_string_type(_arg0, _arg1, _arg2, &_arg3, &_cerr)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(str)

	var _value coreglib.Value // out
	var _goerr error          // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _value, _goerr
}

// typeFromName looks up a type by name, using the virtual function that Builder
// has for that purpose. This is mainly used when implementing the Buildable
// interface on a type.
//
// The function takes the following parameters:
//
//   - typeName: type name to lookup.
//
// The function returns the following values:
//
//   - gType found for type_name or TYPE_INVALID if no type was found.
func (builder *Builder) typeFromName(typeName string) coreglib.Type {
	gclass := (*C.GtkBuilderClass)(coreglib.PeekParentClass(builder))
	fnarg := gclass.get_type_from_name

	var _arg0 *C.GtkBuilder // out
	var _arg1 *C.char       // out
	var _cret C.GType       // in

	_arg0 = (*C.GtkBuilder)(unsafe.Pointer(coreglib.InternObject(builder).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(typeName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_Builder_virtual_get_type_from_name(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(builder)
	runtime.KeepAlive(typeName)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// ButtonOverrides contains methods that are overridable.
type ButtonOverrides struct {
	// Activate: signal that causes the button to animate press then release.
	// Applications should never connect to this signal, but use the clicked
	// signal.
	Activate func()
	// Clicked emits a Button::clicked signal to the given Button.
	Clicked func()
	// Enter emits a Button::enter signal to the given Button.
	//
	// Deprecated: Use the Widget::enter-notify-event signal.
	Enter func()
	// Leave emits a Button::leave signal to the given Button.
	//
	// Deprecated: Use the Widget::leave-notify-event signal.
	Leave func()
	// Pressed emits a Button::pressed signal to the given Button.
	//
	// Deprecated: Use the Widget::button-press-event signal.
	Pressed func()
	// Released emits a Button::released signal to the given Button.
	//
	// Deprecated: Use the Widget::button-release-event signal.
	Released func()
}

func defaultButtonOverrides(v *Button) ButtonOverrides {
	return ButtonOverrides{
		Activate: v.activate,
		Clicked:  v.clicked,
		Enter:    v.enter,
		Leave:    v.leave,
		Pressed:  v.pressed,
		Released: v.released,
	}
}

// Button widget is generally used to trigger a callback function that is called
// when the button is pressed. The various signals and how to use them are
// outlined below.
//
// The Button widget can hold any valid child widget. That is, it can hold
// almost any other standard Widget. The most commonly used child is the Label.
//
// # CSS nodes
//
// GtkButton has a single CSS node with name button. The node will get the style
// classes .image-button or .text-button, if the content is just an image or
// label, respectively. It may also receive the .flat style class.
//
// Other style classes that are commonly used with GtkButton include
// .suggested-action and .destructive-action. In special cases, buttons can be
// made round by adding the .circular style class.
//
// Button-like widgets like ToggleButton, MenuButton, VolumeButton, LockButton,
// ColorButton, FontButton or FileChooserButton use style classes such as
// .toggle, .popup, .scale, .lock, .color, .font, .file to differentiate
// themselves from a plain GtkButton.
type Button struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	Actionable
	Activatable
}

var (
	_ Binner            = (*Button)(nil)
	_ coreglib.Objector = (*Button)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Button, *ButtonClass, ButtonOverrides](
		GTypeButton,
		initButtonClass,
		wrapButton,
		defaultButtonOverrides,
	)
}

func initButtonClass(gclass unsafe.Pointer, overrides ButtonOverrides, classInitFunc func(*ButtonClass)) {
	pclass := (*C.GtkButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeButton))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_ButtonClass_activate)
	}

	if overrides.Clicked != nil {
		pclass.clicked = (*[0]byte)(C._gotk4_gtk3_ButtonClass_clicked)
	}

	if overrides.Enter != nil {
		pclass.enter = (*[0]byte)(C._gotk4_gtk3_ButtonClass_enter)
	}

	if overrides.Leave != nil {
		pclass.leave = (*[0]byte)(C._gotk4_gtk3_ButtonClass_leave)
	}

	if overrides.Pressed != nil {
		pclass.pressed = (*[0]byte)(C._gotk4_gtk3_ButtonClass_pressed)
	}

	if overrides.Released != nil {
		pclass.released = (*[0]byte)(C._gotk4_gtk3_ButtonClass_released)
	}

	if classInitFunc != nil {
		class := (*ButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapButton(obj *coreglib.Object) *Button {
	return &Button{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		Actionable: Actionable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Activatable: Activatable{
			Object: obj,
		},
	}
}

func marshalButton(p uintptr) (interface{}, error) {
	return wrapButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate signal on GtkButton is an action signal and emitting it
// causes the button to animate press then release. Applications should never
// connect to this signal, but use the Button::clicked signal.
func (button *Button) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "activate", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectActivate), f)
}

// ConnectClicked is emitted when the button has been activated (pressed and
// released).
func (button *Button) ConnectClicked(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "clicked", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectClicked), f)
}

// ConnectEnter is emitted when the pointer enters the button.
func (button *Button) ConnectEnter(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "enter", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectEnter), f)
}

// ConnectLeave is emitted when the pointer leaves the button.
func (button *Button) ConnectLeave(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "leave", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectLeave), f)
}

// ConnectPressed is emitted when the button is pressed.
func (button *Button) ConnectPressed(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "pressed", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectPressed), f)
}

// ConnectReleased is emitted when the button is released.
func (button *Button) ConnectReleased(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "released", false, unsafe.Pointer(C._gotk4_gtk3_Button_ConnectReleased), f)
}

// NewButton creates a new Button widget. To add a child widget to the button,
// use gtk_container_add().
//
// The function returns the following values:
//
//   - button: newly created Button widget.
func NewButton() *Button {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_button_new()

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// NewButtonFromIconName creates a new button containing an icon from the
// current icon theme.
//
// If the icon name isn’t known, a “broken image” icon will be displayed
// instead. If the current icon theme is changed, the icon will be updated
// appropriately.
//
// This function is a convenience wrapper around gtk_button_new() and
// gtk_button_set_image().
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name or NULL.
//   - size: icon size (IconSize).
//
// The function returns the following values:
//
//   - button: new Button displaying the themed icon.
func NewButtonFromIconName(iconName string, size int) *Button {
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_button_new_from_icon_name(_arg1, _arg2)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// NewButtonFromStock creates a new Button containing the image and text from
// a [stock item][gtkstock]. Some stock ids have preprocessor macros like
// K_STOCK_OK and K_STOCK_APPLY.
//
// If stock_id is unknown, then it will be treated as a mnemonic label (as for
// gtk_button_new_with_mnemonic()).
//
// Deprecated: Stock items are deprecated. Use gtk_button_new_with_label()
// instead.
//
// The function takes the following parameters:
//
//   - stockId: name of the stock item.
//
// The function returns the following values:
//
//   - button: new Button.
func NewButtonFromStock(stockId string) *Button {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_button_new_from_stock(_arg1)
	runtime.KeepAlive(stockId)

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// NewButtonWithLabel creates a Button widget with a Label child containing the
// given text.
//
// The function takes the following parameters:
//
//   - label: text you want the Label to hold.
//
// The function returns the following values:
//
//   - button: newly created Button widget.
func NewButtonWithLabel(label string) *Button {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_button_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// NewButtonWithMnemonic creates a new Button containing a label. If characters
// in label are preceded by an underscore, they are underlined. If you need
// a literal underscore character in a label, use “__” (two underscores).
// The first underlined character represents a keyboard accelerator called a
// mnemonic. Pressing Alt and that key activates the button.
//
// The function takes the following parameters:
//
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - button: new Button.
func NewButtonWithMnemonic(label string) *Button {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_button_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// Clicked emits a Button::clicked signal to the given Button.
func (button *Button) Clicked() {
	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_clicked(_arg0)
	runtime.KeepAlive(button)
}

// Enter emits a Button::enter signal to the given Button.
//
// Deprecated: Use the Widget::enter-notify-event signal.
func (button *Button) Enter() {
	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_enter(_arg0)
	runtime.KeepAlive(button)
}

// Alignment gets the alignment of the child in the button.
//
// Deprecated: Access the child widget directly if you need to control its
// alignment.
//
// The function returns the following values:
//
//   - xalign: return location for horizontal alignment.
//   - yalign: return location for vertical alignment.
func (button *Button) Alignment() (xalign, yalign float32) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gfloat     // in
	var _arg2 C.gfloat     // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_get_alignment(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(button)

	var _xalign float32 // out
	var _yalign float32 // out

	_xalign = float32(_arg1)
	_yalign = float32(_arg2)

	return _xalign, _yalign
}

// AlwaysShowImage returns whether the button will ignore the
// Settings:gtk-button-images setting and always show the image, if available.
//
// The function returns the following values:
//
//   - ok: TRUE if the button will always show the image.
func (button *Button) AlwaysShowImage() bool {
	var _arg0 *C.GtkButton // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_always_show_image(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EventWindow returns the button’s event window if it is realized, NULL
// otherwise. This function should be rarely needed.
//
// The function returns the following values:
//
//   - window button’s event window.
func (button *Button) EventWindow() gdk.Windower {
	var _arg0 *C.GtkButton // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_event_window(_arg0)
	runtime.KeepAlive(button)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// FocusOnClick returns whether the button grabs focus when it is clicked with
// the mouse. See gtk_button_set_focus_on_click().
//
// Deprecated: Use gtk_widget_get_focus_on_click() instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the button grabs focus when it is clicked with the mouse.
func (button *Button) FocusOnClick() bool {
	var _arg0 *C.GtkButton // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_focus_on_click(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Image gets the widget that is currenty set as the image of button.
// This may have been explicitly set by gtk_button_set_image() or constructed by
// gtk_button_new_from_stock().
//
// The function returns the following values:
//
//   - widget (optional) or NULL in case there is no image.
func (button *Button) Image() Widgetter {
	var _arg0 *C.GtkButton // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_image(_arg0)
	runtime.KeepAlive(button)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// ImagePosition gets the position of the image relative to the text inside the
// button.
//
// The function returns the following values:
//
//   - positionType: position.
func (button *Button) ImagePosition() PositionType {
	var _arg0 *C.GtkButton      // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_image_position(_arg0)
	runtime.KeepAlive(button)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// Label fetches the text from the label of the button, as set by
// gtk_button_set_label(). If the label text has not been set the return value
// will be NULL. This will be the case if you create an empty button with
// gtk_button_new() to use as a container.
//
// The function returns the following values:
//
//   - utf8: text of the label widget. This string is owned by the widget and
//     must not be modified or freed.
func (button *Button) Label() string {
	var _arg0 *C.GtkButton // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_label(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Relief returns the current relief style of the given Button.
//
// The function returns the following values:
//
//   - reliefStyle: current ReliefStyle.
func (button *Button) Relief() ReliefStyle {
	var _arg0 *C.GtkButton     // out
	var _cret C.GtkReliefStyle // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_relief(_arg0)
	runtime.KeepAlive(button)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// UseStock returns whether the button label is a stock item.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the button label is used to select a stock item instead of
//     being used directly as the label text.
func (button *Button) UseStock() bool {
	var _arg0 *C.GtkButton // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_use_stock(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UseUnderline returns whether an embedded underline in the button label
// indicates a mnemonic. See gtk_button_set_use_underline ().
//
// The function returns the following values:
//
//   - ok: TRUE if an embedded underline in the button label indicates the
//     mnemonic accelerator keys.
func (button *Button) UseUnderline() bool {
	var _arg0 *C.GtkButton // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_button_get_use_underline(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Leave emits a Button::leave signal to the given Button.
//
// Deprecated: Use the Widget::leave-notify-event signal.
func (button *Button) Leave() {
	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_leave(_arg0)
	runtime.KeepAlive(button)
}

// Pressed emits a Button::pressed signal to the given Button.
//
// Deprecated: Use the Widget::button-press-event signal.
func (button *Button) Pressed() {
	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_pressed(_arg0)
	runtime.KeepAlive(button)
}

// Released emits a Button::released signal to the given Button.
//
// Deprecated: Use the Widget::button-release-event signal.
func (button *Button) Released() {
	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_button_released(_arg0)
	runtime.KeepAlive(button)
}

// SetAlignment sets the alignment of the child. This property has no effect
// unless the child is a Misc or a Alignment.
//
// Deprecated: Access the child widget directly if you need to control its
// alignment.
//
// The function takes the following parameters:
//
//   - xalign: horizontal position of the child, 0.0 is left aligned, 1.0 is
//     right aligned.
//   - yalign: vertical position of the child, 0.0 is top aligned, 1.0 is bottom
//     aligned.
func (button *Button) SetAlignment(xalign, yalign float32) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gfloat     // out
	var _arg2 C.gfloat     // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)

	C.gtk_button_set_alignment(_arg0, _arg1, _arg2)
	runtime.KeepAlive(button)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
}

// SetAlwaysShowImage: if TRUE, the button will ignore the
// Settings:gtk-button-images setting and always show the image, if available.
//
// Use this property if the button would be useless or hard to use without the
// image.
//
// The function takes the following parameters:
//
//   - alwaysShow: TRUE if the menuitem should always show the image.
func (button *Button) SetAlwaysShowImage(alwaysShow bool) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if alwaysShow {
		_arg1 = C.TRUE
	}

	C.gtk_button_set_always_show_image(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(alwaysShow)
}

// SetFocusOnClick sets whether the button will grab focus when it is clicked
// with the mouse. Making mouse clicks not grab focus is useful in places like
// toolbars where you don’t want the keyboard focus removed from the main area
// of the application.
//
// Deprecated: Use gtk_widget_set_focus_on_click() instead.
//
// The function takes the following parameters:
//
//   - focusOnClick: whether the button grabs focus when clicked with the mouse.
func (button *Button) SetFocusOnClick(focusOnClick bool) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if focusOnClick {
		_arg1 = C.TRUE
	}

	C.gtk_button_set_focus_on_click(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(focusOnClick)
}

// SetImage: set the image of button to the given widget. The image will be
// displayed if the label text is NULL or if Button:always-show-image is TRUE.
// You don’t have to call gtk_widget_show() on image yourself.
//
// The function takes the following parameters:
//
//   - image (optional): widget to set as the image for the button, or NULL to
//     unset.
func (button *Button) SetImage(image Widgetter) {
	var _arg0 *C.GtkButton // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if image != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	}

	C.gtk_button_set_image(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(image)
}

// SetImagePosition sets the position of the image relative to the text inside
// the button.
//
// The function takes the following parameters:
//
//   - position: position.
func (button *Button) SetImagePosition(position PositionType) {
	var _arg0 *C.GtkButton      // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.GtkPositionType(position)

	C.gtk_button_set_image_position(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(position)
}

// SetLabel sets the text of the label of the button to str. This text is also
// used to select the stock item if gtk_button_set_use_stock() is used.
//
// This will also clear any previously set labels.
//
// The function takes the following parameters:
//
//   - label: string.
func (button *Button) SetLabel(label string) {
	var _arg0 *C.GtkButton // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_button_set_label(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(label)
}

// SetRelief sets the relief style of the edges of the given Button widget. Two
// styles exist, GTK_RELIEF_NORMAL and GTK_RELIEF_NONE. The default style is,
// as one can guess, GTK_RELIEF_NORMAL. The deprecated value GTK_RELIEF_HALF
// behaves the same as GTK_RELIEF_NORMAL.
//
// The function takes the following parameters:
//
//   - relief: gtkReliefStyle as described above.
func (button *Button) SetRelief(relief ReliefStyle) {
	var _arg0 *C.GtkButton     // out
	var _arg1 C.GtkReliefStyle // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.GtkReliefStyle(relief)

	C.gtk_button_set_relief(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(relief)
}

// SetUseStock: if TRUE, the label set on the button is used as a stock id to
// select the stock item for the button.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - useStock: TRUE if the button should use a stock item.
func (button *Button) SetUseStock(useStock bool) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if useStock {
		_arg1 = C.TRUE
	}

	C.gtk_button_set_use_stock(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(useStock)
}

// SetUseUnderline: if true, an underline in the text of the button label
// indicates the next character should be used for the mnemonic accelerator key.
//
// The function takes the following parameters:
//
//   - useUnderline: TRUE if underlines in the text indicate mnemonics.
func (button *Button) SetUseUnderline(useUnderline bool) {
	var _arg0 *C.GtkButton // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if useUnderline {
		_arg1 = C.TRUE
	}

	C.gtk_button_set_use_underline(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(useUnderline)
}

// Activate: signal that causes the button to animate press then release.
// Applications should never connect to this signal, but use the clicked signal.
func (button *Button) activate() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.activate

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// Clicked emits a Button::clicked signal to the given Button.
func (button *Button) clicked() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.clicked

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_clicked(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// Enter emits a Button::enter signal to the given Button.
//
// Deprecated: Use the Widget::enter-notify-event signal.
func (button *Button) enter() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.enter

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_enter(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// Leave emits a Button::leave signal to the given Button.
//
// Deprecated: Use the Widget::leave-notify-event signal.
func (button *Button) leave() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.leave

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_leave(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// Pressed emits a Button::pressed signal to the given Button.
//
// Deprecated: Use the Widget::button-press-event signal.
func (button *Button) pressed() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.pressed

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_pressed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// Released emits a Button::released signal to the given Button.
//
// Deprecated: Use the Widget::button-release-event signal.
func (button *Button) released() {
	gclass := (*C.GtkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.released

	var _arg0 *C.GtkButton // out

	_arg0 = (*C.GtkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_Button_virtual_released(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// ButtonAccessibleOverrides contains methods that are overridable.
type ButtonAccessibleOverrides struct {
}

func defaultButtonAccessibleOverrides(v *ButtonAccessible) ButtonAccessibleOverrides {
	return ButtonAccessibleOverrides{}
}

type ButtonAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	*coreglib.Object
	atk.Action
	atk.Image
}

var (
	_ coreglib.Objector = (*ButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ButtonAccessible, *ButtonAccessibleClass, ButtonAccessibleOverrides](
		GTypeButtonAccessible,
		initButtonAccessibleClass,
		wrapButtonAccessible,
		defaultButtonAccessibleOverrides,
	)
}

func initButtonAccessibleClass(gclass unsafe.Pointer, overrides ButtonAccessibleOverrides, classInitFunc func(*ButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapButtonAccessible(obj *coreglib.Object) *ButtonAccessible {
	return &ButtonAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		Image: atk.Image{
			Object: obj,
		},
	}
}

func marshalButtonAccessible(p uintptr) (interface{}, error) {
	return wrapButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ButtonBoxOverrides contains methods that are overridable.
type ButtonBoxOverrides struct {
}

func defaultButtonBoxOverrides(v *ButtonBox) ButtonBoxOverrides {
	return ButtonBoxOverrides{}
}

type ButtonBox struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ButtonBox)(nil)
	_ coreglib.Objector = (*ButtonBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ButtonBox, *ButtonBoxClass, ButtonBoxOverrides](
		GTypeButtonBox,
		initButtonBoxClass,
		wrapButtonBox,
		defaultButtonBoxOverrides,
	)
}

func initButtonBoxClass(gclass unsafe.Pointer, overrides ButtonBoxOverrides, classInitFunc func(*ButtonBoxClass)) {
	if classInitFunc != nil {
		class := (*ButtonBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapButtonBox(obj *coreglib.Object) *ButtonBox {
	return &ButtonBox{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalButtonBox(p uintptr) (interface{}, error) {
	return wrapButtonBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewButtonBox creates a new ButtonBox.
//
// The function takes the following parameters:
//
//   - orientation box's orientation.
//
// The function returns the following values:
//
//   - buttonBox: new ButtonBox.
func NewButtonBox(orientation Orientation) *ButtonBox {
	var _arg1 C.GtkOrientation // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)

	_cret = C.gtk_button_box_new(_arg1)
	runtime.KeepAlive(orientation)

	var _buttonBox *ButtonBox // out

	_buttonBox = wrapButtonBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _buttonBox
}

// ChildNonHomogeneous returns whether the child is exempted from homogenous
// sizing.
//
// The function takes the following parameters:
//
//   - child of widget.
//
// The function returns the following values:
//
//   - ok: TRUE if the child is not subject to homogenous sizing.
func (widget *ButtonBox) ChildNonHomogeneous(child Widgetter) bool {
	var _arg0 *C.GtkButtonBox // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_button_box_get_child_non_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(child)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ChildSecondary returns whether child should appear in a secondary group of
// children.
//
// The function takes the following parameters:
//
//   - child of widget.
//
// The function returns the following values:
//
//   - ok: whether child should appear in a secondary group of children.
func (widget *ButtonBox) ChildSecondary(child Widgetter) bool {
	var _arg0 *C.GtkButtonBox // out
	var _arg1 *C.GtkWidget    // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_button_box_get_child_secondary(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(child)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Layout retrieves the method being used to arrange the buttons in a button
// box.
//
// The function returns the following values:
//
//   - buttonBoxStyle: method used to lay out buttons in widget.
func (widget *ButtonBox) Layout() ButtonBoxStyle {
	var _arg0 *C.GtkButtonBox     // out
	var _cret C.GtkButtonBoxStyle // in

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_button_box_get_layout(_arg0)
	runtime.KeepAlive(widget)

	var _buttonBoxStyle ButtonBoxStyle // out

	_buttonBoxStyle = ButtonBoxStyle(_cret)

	return _buttonBoxStyle
}

// SetChildNonHomogeneous sets whether the child is exempted from homogeous
// sizing.
//
// The function takes the following parameters:
//
//   - child of widget.
//   - nonHomogeneous: new value.
func (widget *ButtonBox) SetChildNonHomogeneous(child Widgetter, nonHomogeneous bool) {
	var _arg0 *C.GtkButtonBox // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if nonHomogeneous {
		_arg2 = C.TRUE
	}

	C.gtk_button_box_set_child_non_homogeneous(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(child)
	runtime.KeepAlive(nonHomogeneous)
}

// SetChildSecondary sets whether child should appear in a secondary group of
// children. A typical use of a secondary child is the help button in a dialog.
//
// This group appears after the other children if the style is
// GTK_BUTTONBOX_START, GTK_BUTTONBOX_SPREAD or GTK_BUTTONBOX_EDGE, and before
// the other children if the style is GTK_BUTTONBOX_END. For horizontal button
// boxes, the definition of before/after depends on direction of the widget
// (see gtk_widget_set_direction()). If the style is GTK_BUTTONBOX_START or
// GTK_BUTTONBOX_END, then the secondary children are aligned at the other end
// of the button box from the main children. For the other styles, they appear
// immediately next to the main children.
//
// The function takes the following parameters:
//
//   - child of widget.
//   - isSecondary: if TRUE, the child appears in a secondary group of the
//     button box.
func (widget *ButtonBox) SetChildSecondary(child Widgetter, isSecondary bool) {
	var _arg0 *C.GtkButtonBox // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if isSecondary {
		_arg2 = C.TRUE
	}

	C.gtk_button_box_set_child_secondary(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(child)
	runtime.KeepAlive(isSecondary)
}

// SetLayout changes the way buttons are arranged in their container.
//
// The function takes the following parameters:
//
//   - layoutStyle: new layout style.
func (widget *ButtonBox) SetLayout(layoutStyle ButtonBoxStyle) {
	var _arg0 *C.GtkButtonBox     // out
	var _arg1 C.GtkButtonBoxStyle // out

	_arg0 = (*C.GtkButtonBox)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkButtonBoxStyle(layoutStyle)

	C.gtk_button_box_set_layout(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(layoutStyle)
}

// CalendarOverrides contains methods that are overridable.
type CalendarOverrides struct {
	DaySelected            func()
	DaySelectedDoubleClick func()
	MonthChanged           func()
	NextMonth              func()
	NextYear               func()
	PrevMonth              func()
	PrevYear               func()
}

func defaultCalendarOverrides(v *Calendar) CalendarOverrides {
	return CalendarOverrides{
		DaySelected:            v.daySelected,
		DaySelectedDoubleClick: v.daySelectedDoubleClick,
		MonthChanged:           v.monthChanged,
		NextMonth:              v.nextMonth,
		NextYear:               v.nextYear,
		PrevMonth:              v.prevMonth,
		PrevYear:               v.prevYear,
	}
}

// Calendar is a widget that displays a Gregorian calendar, one month at a time.
// It can be created with gtk_calendar_new().
//
// The month and year currently displayed can be altered with
// gtk_calendar_select_month(). The exact day can be selected from the displayed
// month using gtk_calendar_select_day().
//
// To place a visual marker on a particular day, use gtk_calendar_mark_day() and
// to remove the marker, gtk_calendar_unmark_day(). Alternative, all marks can
// be cleared with gtk_calendar_clear_marks().
//
// The way in which the calendar itself is displayed can be altered using
// gtk_calendar_set_display_options().
//
// The selected date can be retrieved from a Calendar using
// gtk_calendar_get_date().
//
// Users should be aware that, although the Gregorian calendar is the legal
// calendar in most countries, it was adopted progressively between 1582 and
// 1929. Display before these dates is likely to be historically incorrect.
type Calendar struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Calendar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Calendar, *CalendarClass, CalendarOverrides](
		GTypeCalendar,
		initCalendarClass,
		wrapCalendar,
		defaultCalendarOverrides,
	)
}

func initCalendarClass(gclass unsafe.Pointer, overrides CalendarOverrides, classInitFunc func(*CalendarClass)) {
	pclass := (*C.GtkCalendarClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCalendar))))

	if overrides.DaySelected != nil {
		pclass.day_selected = (*[0]byte)(C._gotk4_gtk3_CalendarClass_day_selected)
	}

	if overrides.DaySelectedDoubleClick != nil {
		pclass.day_selected_double_click = (*[0]byte)(C._gotk4_gtk3_CalendarClass_day_selected_double_click)
	}

	if overrides.MonthChanged != nil {
		pclass.month_changed = (*[0]byte)(C._gotk4_gtk3_CalendarClass_month_changed)
	}

	if overrides.NextMonth != nil {
		pclass.next_month = (*[0]byte)(C._gotk4_gtk3_CalendarClass_next_month)
	}

	if overrides.NextYear != nil {
		pclass.next_year = (*[0]byte)(C._gotk4_gtk3_CalendarClass_next_year)
	}

	if overrides.PrevMonth != nil {
		pclass.prev_month = (*[0]byte)(C._gotk4_gtk3_CalendarClass_prev_month)
	}

	if overrides.PrevYear != nil {
		pclass.prev_year = (*[0]byte)(C._gotk4_gtk3_CalendarClass_prev_year)
	}

	if classInitFunc != nil {
		class := (*CalendarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCalendar(obj *coreglib.Object) *Calendar {
	return &Calendar{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalCalendar(p uintptr) (interface{}, error) {
	return wrapCalendar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDaySelected is emitted when the user selects a day.
func (calendar *Calendar) ConnectDaySelected(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "day-selected", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectDaySelected), f)
}

// ConnectDaySelectedDoubleClick is emitted when the user double-clicks a day.
func (calendar *Calendar) ConnectDaySelectedDoubleClick(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "day-selected-double-click", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectDaySelectedDoubleClick), f)
}

// ConnectMonthChanged is emitted when the user clicks a button to change the
// selected month on a calendar.
func (calendar *Calendar) ConnectMonthChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "month-changed", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectMonthChanged), f)
}

// ConnectNextMonth is emitted when the user switched to the next month.
func (calendar *Calendar) ConnectNextMonth(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "next-month", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectNextMonth), f)
}

// ConnectNextYear is emitted when user switched to the next year.
func (calendar *Calendar) ConnectNextYear(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "next-year", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectNextYear), f)
}

// ConnectPrevMonth is emitted when the user switched to the previous month.
func (calendar *Calendar) ConnectPrevMonth(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "prev-month", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectPrevMonth), f)
}

// ConnectPrevYear is emitted when user switched to the previous year.
func (calendar *Calendar) ConnectPrevYear(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(calendar, "prev-year", false, unsafe.Pointer(C._gotk4_gtk3_Calendar_ConnectPrevYear), f)
}

// NewCalendar creates a new calendar, with the current date being selected.
//
// The function returns the following values:
//
//   - calendar: newly Calendar widget.
func NewCalendar() *Calendar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_calendar_new()

	var _calendar *Calendar // out

	_calendar = wrapCalendar(coreglib.Take(unsafe.Pointer(_cret)))

	return _calendar
}

// ClearMarks: remove all visual markers.
func (calendar *Calendar) ClearMarks() {
	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C.gtk_calendar_clear_marks(_arg0)
	runtime.KeepAlive(calendar)
}

// Date obtains the selected date from a Calendar.
//
// The function returns the following values:
//
//   - year (optional): location to store the year as a decimal number (e.g.
//     2011), or NULL.
//   - month (optional): location to store the month number (between 0 and 11),
//     or NULL.
//   - day (optional): location to store the day number (between 1 and 31),
//     or NULL.
func (calendar *Calendar) Date() (year, month, day uint) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // in
	var _arg2 C.guint        // in
	var _arg3 C.guint        // in

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C.gtk_calendar_get_date(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(calendar)

	var _year uint  // out
	var _month uint // out
	var _day uint   // out

	_year = uint(_arg1)
	_month = uint(_arg2)
	_day = uint(_arg3)

	return _year, _month, _day
}

// DayIsMarked returns if the day of the calendar is already marked.
//
// The function takes the following parameters:
//
//   - day number between 1 and 31.
//
// The function returns the following values:
//
//   - ok: whether the day is marked.
func (calendar *Calendar) DayIsMarked(day uint) bool {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.guint(day)

	_cret = C.gtk_calendar_get_day_is_marked(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(day)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DetailHeightRows queries the height of detail cells, in rows. See
// Calendar:detail-width-chars.
//
// The function returns the following values:
//
//   - gint: height of detail cells, in rows.
func (calendar *Calendar) DetailHeightRows() int {
	var _arg0 *C.GtkCalendar // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	_cret = C.gtk_calendar_get_detail_height_rows(_arg0)
	runtime.KeepAlive(calendar)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// DetailWidthChars queries the width of detail cells, in characters. See
// Calendar:detail-width-chars.
//
// The function returns the following values:
//
//   - gint: width of detail cells, in characters.
func (calendar *Calendar) DetailWidthChars() int {
	var _arg0 *C.GtkCalendar // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	_cret = C.gtk_calendar_get_detail_width_chars(_arg0)
	runtime.KeepAlive(calendar)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// DisplayOptions returns the current display options of calendar.
//
// The function returns the following values:
//
//   - calendarDisplayOptions: display options.
func (calendar *Calendar) DisplayOptions() CalendarDisplayOptions {
	var _arg0 *C.GtkCalendar              // out
	var _cret C.GtkCalendarDisplayOptions // in

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	_cret = C.gtk_calendar_get_display_options(_arg0)
	runtime.KeepAlive(calendar)

	var _calendarDisplayOptions CalendarDisplayOptions // out

	_calendarDisplayOptions = CalendarDisplayOptions(_cret)

	return _calendarDisplayOptions
}

// MarkDay places a visual marker on a particular day.
//
// The function takes the following parameters:
//
//   - day number to mark between 1 and 31.
func (calendar *Calendar) MarkDay(day uint) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.guint(day)

	C.gtk_calendar_mark_day(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(day)
}

// SelectDay selects a day from the current month.
//
// The function takes the following parameters:
//
//   - day number between 1 and 31, or 0 to unselect the currently selected day.
func (calendar *Calendar) SelectDay(day uint) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.guint(day)

	C.gtk_calendar_select_day(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(day)
}

// SelectMonth shifts the calendar to a different month.
//
// The function takes the following parameters:
//
//   - month number between 0 and 11.
//   - year the month is in.
func (calendar *Calendar) SelectMonth(month, year uint) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // out
	var _arg2 C.guint        // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.guint(month)
	_arg2 = C.guint(year)

	C.gtk_calendar_select_month(_arg0, _arg1, _arg2)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(month)
	runtime.KeepAlive(year)
}

// SetDetailFunc installs a function which provides Pango markup with
// detail information for each day. Examples for such details are
// holidays or appointments. That information is shown below each day when
// Calendar:show-details is set. A tooltip containing with full detail
// information is provided, if the entire text should not fit into the details
// area, or if Calendar:show-details is not set.
//
// The size of the details area can be restricted by setting the
// Calendar:detail-width-chars and Calendar:detail-height-rows properties.
//
// The function takes the following parameters:
//
//   - fn: function providing details for each day.
func (calendar *Calendar) SetDetailFunc(fn CalendarDetailFunc) {
	var _arg0 *C.GtkCalendar          // out
	var _arg1 C.GtkCalendarDetailFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_CalendarDetailFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_calendar_set_detail_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(fn)
}

// SetDetailHeightRows updates the height of detail cells. See
// Calendar:detail-height-rows.
//
// The function takes the following parameters:
//
//   - rows: detail height in rows.
func (calendar *Calendar) SetDetailHeightRows(rows int) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.gint(rows)

	C.gtk_calendar_set_detail_height_rows(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(rows)
}

// SetDetailWidthChars updates the width of detail cells. See
// Calendar:detail-width-chars.
//
// The function takes the following parameters:
//
//   - chars: detail width in characters.
func (calendar *Calendar) SetDetailWidthChars(chars int) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.gint(chars)

	C.gtk_calendar_set_detail_width_chars(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(chars)
}

// SetDisplayOptions sets display options (whether to display the heading and
// the month headings).
//
// The function takes the following parameters:
//
//   - flags: display options to set.
func (calendar *Calendar) SetDisplayOptions(flags CalendarDisplayOptions) {
	var _arg0 *C.GtkCalendar              // out
	var _arg1 C.GtkCalendarDisplayOptions // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.GtkCalendarDisplayOptions(flags)

	C.gtk_calendar_set_display_options(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(flags)
}

// UnmarkDay removes the visual marker from a particular day.
//
// The function takes the following parameters:
//
//   - day number to unmark between 1 and 31.
func (calendar *Calendar) UnmarkDay(day uint) {
	var _arg0 *C.GtkCalendar // out
	var _arg1 C.guint        // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))
	_arg1 = C.guint(day)

	C.gtk_calendar_unmark_day(_arg0, _arg1)
	runtime.KeepAlive(calendar)
	runtime.KeepAlive(day)
}

func (calendar *Calendar) daySelected() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.day_selected

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_day_selected(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) daySelectedDoubleClick() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.day_selected_double_click

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_day_selected_double_click(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) monthChanged() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.month_changed

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_month_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) nextMonth() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.next_month

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_next_month(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) nextYear() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.next_year

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_next_year(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) prevMonth() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.prev_month

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_prev_month(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

func (calendar *Calendar) prevYear() {
	gclass := (*C.GtkCalendarClass)(coreglib.PeekParentClass(calendar))
	fnarg := gclass.prev_year

	var _arg0 *C.GtkCalendar // out

	_arg0 = (*C.GtkCalendar)(unsafe.Pointer(coreglib.InternObject(calendar).Native()))

	C._gotk4_gtk3_Calendar_virtual_prev_year(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(calendar)
}

// CellAccessibleOverrides contains methods that are overridable.
type CellAccessibleOverrides struct {
	UpdateCache func(emitSignal bool)
}

func defaultCellAccessibleOverrides(v *CellAccessible) CellAccessibleOverrides {
	return CellAccessibleOverrides{
		UpdateCache: v.updateCache,
	}
}

type CellAccessible struct {
	_ [0]func() // equal guard
	Accessible

	*coreglib.Object
	atk.Action
	atk.AtkObject
	atk.Component
	atk.TableCell
}

var (
	_ coreglib.Objector = (*CellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellAccessible, *CellAccessibleClass, CellAccessibleOverrides](
		GTypeCellAccessible,
		initCellAccessibleClass,
		wrapCellAccessible,
		defaultCellAccessibleOverrides,
	)
}

func initCellAccessibleClass(gclass unsafe.Pointer, overrides CellAccessibleOverrides, classInitFunc func(*CellAccessibleClass)) {
	pclass := (*C.GtkCellAccessibleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellAccessible))))

	if overrides.UpdateCache != nil {
		pclass.update_cache = (*[0]byte)(C._gotk4_gtk3_CellAccessibleClass_update_cache)
	}

	if classInitFunc != nil {
		class := (*CellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellAccessible(obj *coreglib.Object) *CellAccessible {
	return &CellAccessible{
		Accessible: Accessible{
			AtkObject: atk.AtkObject{
				Object: obj,
			},
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		AtkObject: atk.AtkObject{
			Object: obj,
		},
		Component: atk.Component{
			Object: obj,
		},
		TableCell: atk.TableCell{
			AtkObject: atk.AtkObject{
				Object: obj,
			},
		},
	}
}

func marshalCellAccessible(p uintptr) (interface{}, error) {
	return wrapCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (cell *CellAccessible) updateCache(emitSignal bool) {
	gclass := (*C.GtkCellAccessibleClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.update_cache

	var _arg0 *C.GtkCellAccessible // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if emitSignal {
		_arg1 = C.TRUE
	}

	C._gotk4_gtk3_CellAccessible_virtual_update_cache(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(emitSignal)
}

// CellAreaOverrides contains methods that are overridable.
type CellAreaOverrides struct {
	// Activate activates area, usually by activating the currently focused
	// cell, however some subclasses which embed widgets in the area can also
	// activate a widget if it currently has the focus.
	//
	// The function takes the following parameters:
	//
	//   - context in context with the current row data.
	//   - widget that area is rendering on.
	//   - cellArea: size and location of area relative to widget’s allocation.
	//   - flags flags for area for this row of data.
	//   - editOnly: if TRUE then only cell renderers that are
	//     GTK_CELL_RENDERER_MODE_EDITABLE will be activated.
	//
	// The function returns the following values:
	//
	//   - ok: whether area was successfully activated.
	Activate func(context *CellAreaContext, widget Widgetter, cellArea *gdk.Rectangle, flags CellRendererState, editOnly bool) bool
	// Add adds renderer to area with the default child cell properties.
	//
	// The function takes the following parameters:
	//
	//   - renderer to add to area.
	Add func(renderer CellRendererer)
	// ApplyAttributes applies any connected attributes to the renderers in area
	// by pulling the values from tree_model.
	//
	// The function takes the following parameters:
	//
	//   - treeModel to pull values from.
	//   - iter in tree_model to apply values for.
	//   - isExpander: whether iter has children.
	//   - isExpanded: whether iter is expanded in the view and children are
	//     visible.
	ApplyAttributes func(treeModel TreeModeller, iter *TreeIter, isExpander, isExpanded bool)
	// CopyContext: this is sometimes needed for cases where rows need to
	// share alignments in one orientation but may be separately grouped in the
	// opposing orientation.
	//
	// For instance, IconView creates all icons (rows) to have the same
	// width and the cells theirin to have the same horizontal alignments.
	// However each row of icons may have a separate collective height. IconView
	// uses this to request the heights of each row based on a context which was
	// already used to request all the row widths that are to be displayed.
	//
	// The function takes the following parameters:
	//
	//   - context to copy.
	//
	// The function returns the following values:
	//
	//   - cellAreaContext: newly created CellAreaContext copy of context.
	CopyContext func(context *CellAreaContext) *CellAreaContext
	// CreateContext creates a CellAreaContext to be used with area for all
	// purposes. CellAreaContext stores geometry information for rows for which
	// it was operated on, it is important to use the same context for the same
	// row of data at all times (i.e. one should render and handle events with
	// the same CellAreaContext which was used to request the size of those rows
	// of data).
	//
	// The function returns the following values:
	//
	//   - cellAreaContext: newly created CellAreaContext which can be used with
	//     area.
	CreateContext func() *CellAreaContext
	// Event delegates event handling to a CellArea.
	//
	// The function takes the following parameters:
	//
	//   - context for this row of data.
	//   - widget that area is rendering to.
	//   - event to handle.
	//   - cellArea: widget relative coordinates for area.
	//   - flags for area in this row.
	//
	// The function returns the following values:
	//
	//   - gint: TRUE if the event was handled by area.
	Event func(context *CellAreaContext, widget Widgetter, event *gdk.Event, cellArea *gdk.Rectangle, flags CellRendererState) int
	// Focus: this should be called by the area’s owning layout widget when
	// focus is to be passed to area, or moved within area for a given direction
	// and row data.
	//
	// Implementing CellArea classes should implement this method to receive and
	// navigate focus in its own way particular to how it lays out cells.
	//
	// The function takes the following parameters:
	//
	//   - direction: DirectionType.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if focus remains inside area as a result of this call.
	Focus func(direction DirectionType) bool
	// PreferredHeight retrieves a cell area’s initial minimum and natural
	// height.
	//
	// area will store some geometrical information in context along the way;
	// when requesting sizes over an arbitrary number of rows, it’s not
	// important to check the minimum_height and natural_height of this call but
	// rather to consult gtk_cell_area_context_get_preferred_height() after a
	// series of requests.
	//
	// The function takes the following parameters:
	//
	//   - context to perform this request with.
	//   - widget where area will be rendering.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location to store the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location to store the natural height,
	//     or NULL.
	PreferredHeight func(context *CellAreaContext, widget Widgetter) (minimumHeight, naturalHeight int)
	// PreferredHeightForWidth retrieves a cell area’s minimum and natural
	// height if it would be given the specified width.
	//
	// area stores some geometrical information in context along the way while
	// calling gtk_cell_area_get_preferred_width(). It’s important to perform a
	// series of gtk_cell_area_get_preferred_width() requests with context first
	// and then call gtk_cell_area_get_preferred_height_for_width() on each cell
	// area individually to get the height for width of each fully requested
	// row.
	//
	// If at some point, the width of a single row changes, it should
	// be requested with gtk_cell_area_get_preferred_width() again and
	// then the full width of the requested rows checked again with
	// gtk_cell_area_context_get_preferred_width().
	//
	// The function takes the following parameters:
	//
	//   - context which has already been requested for widths.
	//   - widget where area will be rendering.
	//   - width for which to check the height of this area.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location to store the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location to store the natural height,
	//     or NULL.
	PreferredHeightForWidth func(context *CellAreaContext, widget Widgetter, width int) (minimumHeight, naturalHeight int)
	// PreferredWidth retrieves a cell area’s initial minimum and natural width.
	//
	// area will store some geometrical information in context along the way;
	// when requesting sizes over an arbitrary number of rows, it’s not
	// important to check the minimum_width and natural_width of this call but
	// rather to consult gtk_cell_area_context_get_preferred_width() after a
	// series of requests.
	//
	// The function takes the following parameters:
	//
	//   - context to perform this request with.
	//   - widget where area will be rendering.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location to store the minimum width,
	//     or NULL.
	//   - naturalWidth (optional): location to store the natural width,
	//     or NULL.
	PreferredWidth func(context *CellAreaContext, widget Widgetter) (minimumWidth, naturalWidth int)
	// PreferredWidthForHeight retrieves a cell area’s minimum and natural width
	// if it would be given the specified height.
	//
	// area stores some geometrical information in context along the way while
	// calling gtk_cell_area_get_preferred_height(). It’s important to perform
	// a series of gtk_cell_area_get_preferred_height() requests with context
	// first and then call gtk_cell_area_get_preferred_width_for_height() on
	// each cell area individually to get the height for width of each fully
	// requested row.
	//
	// If at some point, the height of a single row changes, it should
	// be requested with gtk_cell_area_get_preferred_height() again and
	// then the full height of the requested rows checked again with
	// gtk_cell_area_context_get_preferred_height().
	//
	// The function takes the following parameters:
	//
	//   - context which has already been requested for widths.
	//   - widget where area will be rendering.
	//   - height for which to check the width of this area.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location to store the minimum width,
	//     or NULL.
	//   - naturalWidth (optional): location to store the natural width,
	//     or NULL.
	PreferredWidthForHeight func(context *CellAreaContext, widget Widgetter, height int) (minimumWidth, naturalWidth int)
	// RequestMode gets whether the area prefers a height-for-width layout or a
	// width-for-height layout.
	//
	// The function returns the following values:
	//
	//   - sizeRequestMode preferred by area.
	RequestMode func() SizeRequestMode
	// IsActivatable returns whether the area can do anything when activated,
	// after applying new attributes to area.
	//
	// The function returns the following values:
	//
	//   - ok: whether area can do anything when activated.
	IsActivatable func() bool
	// Remove removes renderer from area.
	//
	// The function takes the following parameters:
	//
	//   - renderer to remove from area.
	Remove func(renderer CellRendererer)
	// Render renders area’s cells according to area’s layout onto widget at the
	// given coordinates.
	//
	// The function takes the following parameters:
	//
	//   - context for this row of data.
	//   - widget that area is rendering to.
	//   - cr to render with.
	//   - backgroundArea: widget relative coordinates for area’s background.
	//   - cellArea: widget relative coordinates for area.
	//   - flags for area in this row.
	//   - paintFocus: whether area should paint focus on focused cells for
	//     focused rows or not.
	Render func(context *CellAreaContext, widget Widgetter, cr *cairo.Context, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState, paintFocus bool)
}

func defaultCellAreaOverrides(v *CellArea) CellAreaOverrides {
	return CellAreaOverrides{
		Activate:                v.activate,
		Add:                     v.add,
		ApplyAttributes:         v.applyAttributes,
		CopyContext:             v.copyContext,
		CreateContext:           v.createContext,
		Event:                   v.event,
		Focus:                   v.focus,
		PreferredHeight:         v.preferredHeight,
		PreferredHeightForWidth: v.preferredHeightForWidth,
		PreferredWidth:          v.preferredWidth,
		PreferredWidthForHeight: v.preferredWidthForHeight,
		RequestMode:             v.requestMode,
		IsActivatable:           v.isActivatable,
		Remove:                  v.remove,
		Render:                  v.render,
	}
}

// CellArea is an abstract class for CellLayout widgets (also referred to as
// "layouting widgets") to interface with an arbitrary number of CellRenderers
// and interact with the user for a given TreeModel row.
//
// The cell area handles events, focus navigation, drawing and size requests and
// allocations for a given row of data.
//
// Usually users dont have to interact with the CellArea directly unless they
// are implementing a cell-layouting widget themselves.
//
// # Requesting area sizes
//
// As outlined in [GtkWidget’s geometry management
// section][geometry-management], GTK+ uses a height-for-width geometry
// management system to compute the sizes of widgets and user interfaces.
// CellArea uses the same semantics to calculate the size of an area for an
// arbitrary number of TreeModel rows.
//
// When requesting the size of a cell area one needs to calculate the size for
// a handful of rows, and this will be done differently by different layouting
// widgets. For instance a TreeViewColumn always lines up the areas from top
// to bottom while a IconView on the other hand might enforce that all areas
// received the same width and wrap the areas around, requesting height for more
// cell areas when allocated less width.
//
// It’s also important for areas to maintain some cell alignments with areas
// rendered for adjacent rows (cells can appear “columnized” inside an area
// even when the size of cells are different in each row). For this reason the
// CellArea uses a CellAreaContext object to store the alignments and sizes
// along the way (as well as the overall largest minimum and natural size for
// all the rows which have been calculated with the said context).
//
// The CellAreaContext is an opaque object specific to the CellArea which
// created it (see gtk_cell_area_create_context()). The owning cell-layouting
// widget can create as many contexts as it wishes to calculate sizes of rows
// which should receive the same size in at least one orientation (horizontally
// or vertically), However, it’s important that the same CellAreaContext
// which was used to request the sizes for a given TreeModel row be used when
// rendering or processing events for that row.
//
// In order to request the width of all the rows at the root level of a
// TreeModel one would do the following:
//
//	static gboolean
//	foo_focus (GtkWidget       *widget,
//	           GtkDirectionType direction)
//	{
//	  Foo        *foo  = FOO (widget);
//	  FooPrivate *priv = foo->priv;
//	  gint        focus_row;
//	  gboolean    have_focus = FALSE;
//
//	  focus_row = priv->focus_row;
//
//	  if (!gtk_widget_has_focus (widget))
//	    gtk_widget_grab_focus (widget);
//
//	  valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, priv->focus_row);
//	  while (valid)
//	    {
//	      gtk_cell_area_apply_attributes (priv->area, priv->model, &iter, FALSE, FALSE);
//
//	      if (gtk_cell_area_focus (priv->area, direction))
//	        {
//	           priv->focus_row = focus_row;
//	           have_focus = TRUE;
//	           break;
//	        }
//	      else
//	        {
//	          if (direction == GTK_DIR_RIGHT ||
//	              direction == GTK_DIR_LEFT)
//	            break;
//	          else if (direction == GTK_DIR_UP ||
//	                   direction == GTK_DIR_TAB_BACKWARD)
//	           {
//	              if (focus_row == 0)
//	                break;
//	              else
//	               {
//	                  focus_row--;
//	                  valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, focus_row);
//	               }
//	            }
//	          else
//	            {
//	              if (focus_row == last_row)
//	                break;
//	              else
//	                {
//	                  focus_row++;
//	                  valid = gtk_tree_model_iter_next (priv->model, &iter);
//	                }
//	            }
//	        }
//	    }
//	    return have_focus;
//	}
//
// Note that the layouting widget is responsible for matching the
// GtkDirectionType values to the way it lays out its cells.
//
// # Cell Properties
//
// The CellArea introduces cell properties for CellRenderers in very much the
// same way that Container introduces [child properties][child-properties] for
// Widgets. This provides some general interfaces for defining the relationship
// cell areas have with their cells. For instance in a CellAreaBox a cell might
// “expand” and receive extra space when the area is allocated more than its
// full natural request, or a cell might be configured to “align” with adjacent
// rows which were requested and rendered with the same CellAreaContext.
//
// Use gtk_cell_area_class_install_cell_property() to install cell properties
// for a cell area class and gtk_cell_area_class_find_cell_property() or
// gtk_cell_area_class_list_cell_properties() to get information about existing
// cell properties.
//
// To set the value of a cell property, use gtk_cell_area_cell_set_property(),
// gtk_cell_area_cell_set() or gtk_cell_area_cell_set_valist(). To obtain
// the value of a cell property, use gtk_cell_area_cell_get_property(),
// gtk_cell_area_cell_get() or gtk_cell_area_cell_get_valist().
type CellArea struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned

	*coreglib.Object
	Buildable
	CellLayout
}

var (
	_ coreglib.Objector = (*CellArea)(nil)
)

// CellAreaer describes types inherited from class CellArea.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type CellAreaer interface {
	coreglib.Objector
	baseCellArea() *CellArea
}

var _ CellAreaer = (*CellArea)(nil)

func init() {
	coreglib.RegisterClassInfo[*CellArea, *CellAreaClass, CellAreaOverrides](
		GTypeCellArea,
		initCellAreaClass,
		wrapCellArea,
		defaultCellAreaOverrides,
	)
}

func initCellAreaClass(gclass unsafe.Pointer, overrides CellAreaOverrides, classInitFunc func(*CellAreaClass)) {
	pclass := (*C.GtkCellAreaClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellArea))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_activate)
	}

	if overrides.Add != nil {
		pclass.add = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_add)
	}

	if overrides.ApplyAttributes != nil {
		pclass.apply_attributes = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_apply_attributes)
	}

	if overrides.CopyContext != nil {
		pclass.copy_context = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_copy_context)
	}

	if overrides.CreateContext != nil {
		pclass.create_context = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_create_context)
	}

	if overrides.Event != nil {
		pclass.event = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_event)
	}

	if overrides.Focus != nil {
		pclass.focus = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_focus)
	}

	if overrides.PreferredHeight != nil {
		pclass.get_preferred_height = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_get_preferred_height)
	}

	if overrides.PreferredHeightForWidth != nil {
		pclass.get_preferred_height_for_width = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_get_preferred_height_for_width)
	}

	if overrides.PreferredWidth != nil {
		pclass.get_preferred_width = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_get_preferred_width)
	}

	if overrides.PreferredWidthForHeight != nil {
		pclass.get_preferred_width_for_height = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_get_preferred_width_for_height)
	}

	if overrides.RequestMode != nil {
		pclass.get_request_mode = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_get_request_mode)
	}

	if overrides.IsActivatable != nil {
		pclass.is_activatable = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_is_activatable)
	}

	if overrides.Remove != nil {
		pclass.remove = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_remove)
	}

	if overrides.Render != nil {
		pclass.render = (*[0]byte)(C._gotk4_gtk3_CellAreaClass_render)
	}

	if classInitFunc != nil {
		class := (*CellAreaClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellArea(obj *coreglib.Object) *CellArea {
	return &CellArea{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
		CellLayout: CellLayout{
			Object: obj,
		},
	}
}

func marshalCellArea(p uintptr) (interface{}, error) {
	return wrapCellArea(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (area *CellArea) baseCellArea() *CellArea {
	return area
}

// BaseCellArea returns the underlying base object.
func BaseCellArea(obj CellAreaer) *CellArea {
	return obj.baseCellArea()
}

// ConnectAddEditable indicates that editing has started on renderer and that
// editable should be added to the owning cell-layouting widget at cell_area.
func (area *CellArea) ConnectAddEditable(f func(renderer CellRendererer, editable CellEditabler, cellArea *gdk.Rectangle, path string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "add-editable", false, unsafe.Pointer(C._gotk4_gtk3_CellArea_ConnectAddEditable), f)
}

// ConnectApplyAttributes: this signal is emitted whenever applying attributes
// to area from model.
func (area *CellArea) ConnectApplyAttributes(f func(model TreeModeller, iter *TreeIter, isExpander, isExpanded bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "apply-attributes", false, unsafe.Pointer(C._gotk4_gtk3_CellArea_ConnectApplyAttributes), f)
}

// ConnectFocusChanged indicates that focus changed on this area. This signal is
// emitted either as a result of focus handling or event handling.
//
// It's possible that the signal is emitted even if the currently focused
// renderer did not change, this is because focus may change to the same
// renderer in the same cell area for a different row of data.
func (area *CellArea) ConnectFocusChanged(f func(renderer CellRendererer, path string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "focus-changed", false, unsafe.Pointer(C._gotk4_gtk3_CellArea_ConnectFocusChanged), f)
}

// ConnectRemoveEditable indicates that editing finished on renderer and that
// editable should be removed from the owning cell-layouting widget.
func (area *CellArea) ConnectRemoveEditable(f func(renderer CellRendererer, editable CellEditabler)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "remove-editable", false, unsafe.Pointer(C._gotk4_gtk3_CellArea_ConnectRemoveEditable), f)
}

// Activate activates area, usually by activating the currently focused cell,
// however some subclasses which embed widgets in the area can also activate a
// widget if it currently has the focus.
//
// The function takes the following parameters:
//
//   - context in context with the current row data.
//   - widget that area is rendering on.
//   - cellArea: size and location of area relative to widget’s allocation.
//   - flags flags for area for this row of data.
//   - editOnly: if TRUE then only cell renderers that are
//     GTK_CELL_RENDERER_MODE_EDITABLE will be activated.
//
// The function returns the following values:
//
//   - ok: whether area was successfully activated.
func (area *CellArea) Activate(context *CellAreaContext, widget Widgetter, cellArea *gdk.Rectangle, flags CellRendererState, editOnly bool) bool {
	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 C.GtkCellRendererState // out
	var _arg5 C.gboolean             // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg4 = C.GtkCellRendererState(flags)
	if editOnly {
		_arg5 = C.TRUE
	}

	_cret = C.gtk_cell_area_activate(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(editOnly)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ActivateCell: this is used by CellArea subclasses when handling events to
// activate cells, the base CellArea class activates cells for keyboard events
// for free in its own GtkCellArea->activate() implementation.
//
// The function takes the following parameters:
//
//   - widget that area is rendering onto.
//   - renderer in area to activate.
//   - event for which cell activation should occur.
//   - cellArea in widget relative coordinates of renderer for the current row.
//   - flags for renderer.
//
// The function returns the following values:
//
//   - ok: whether cell activation was successful.
func (area *CellArea) ActivateCell(widget Widgetter, renderer CellRendererer, event *gdk.Event, cellArea *gdk.Rectangle, flags CellRendererState) bool {
	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkWidget           // out
	var _arg2 *C.GtkCellRenderer     // out
	var _arg3 *C.GdkEvent            // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellRendererState // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg3 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg5 = C.GtkCellRendererState(flags)

	_cret = C.gtk_cell_area_activate_cell(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(event)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Add adds renderer to area with the default child cell properties.
//
// The function takes the following parameters:
//
//   - renderer to add to area.
func (area *CellArea) Add(renderer CellRendererer) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	C.gtk_cell_area_add(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
}

// AddFocusSibling adds sibling to renderer’s focusable area, focus will be
// drawn around renderer and all of its siblings if renderer can focus for a
// given row.
//
// Events handled by focus siblings can also activate the given focusable
// renderer.
//
// The function takes the following parameters:
//
//   - renderer expected to have focus.
//   - sibling to add to renderer’s focus area.
func (area *CellArea) AddFocusSibling(renderer, sibling CellRendererer) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(sibling).Native()))

	C.gtk_cell_area_add_focus_sibling(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(sibling)
}

// ApplyAttributes applies any connected attributes to the renderers in area by
// pulling the values from tree_model.
//
// The function takes the following parameters:
//
//   - treeModel to pull values from.
//   - iter in tree_model to apply values for.
//   - isExpander: whether iter has children.
//   - isExpanded: whether iter is expanded in the view and children are
//     visible.
func (area *CellArea) ApplyAttributes(treeModel TreeModeller, iter *TreeIter, isExpander, isExpanded bool) {
	var _arg0 *C.GtkCellArea  // out
	var _arg1 *C.GtkTreeModel // out
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gboolean      // out
	var _arg4 C.gboolean      // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if isExpander {
		_arg3 = C.TRUE
	}
	if isExpanded {
		_arg4 = C.TRUE
	}

	C.gtk_cell_area_apply_attributes(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(isExpander)
	runtime.KeepAlive(isExpanded)
}

// AttributeConnect connects an attribute to apply values from column for the
// TreeModel in use.
//
// The function takes the following parameters:
//
//   - renderer to connect an attribute for.
//   - attribute name.
//   - column column to fetch attribute values from.
func (area *CellArea) AttributeConnect(renderer CellRendererer, attribute string, column int) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _arg3 C.gint             // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(column)

	C.gtk_cell_area_attribute_connect(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(attribute)
	runtime.KeepAlive(column)
}

// AttributeDisconnect disconnects attribute for the renderer in area so that
// attribute will no longer be updated with values from the model.
//
// The function takes the following parameters:
//
//   - renderer to disconnect an attribute for.
//   - attribute name.
func (area *CellArea) AttributeDisconnect(renderer CellRendererer, attribute string) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_cell_area_attribute_disconnect(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(attribute)
}

// AttributeGetColumn returns the model column that an attribute has been mapped
// to, or -1 if the attribute is not mapped.
//
// The function takes the following parameters:
//
//   - renderer: CellRenderer.
//   - attribute on the renderer.
//
// The function returns the following values:
//
//   - gint: model column, or -1.
func (area *CellArea) AttributeGetColumn(renderer CellRendererer, attribute string) int {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _cret C.gint             // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_cell_area_attribute_get_column(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(attribute)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// CellGetProperty gets the value of a cell property for renderer in area.
//
// The function takes the following parameters:
//
//   - renderer inside area.
//   - propertyName: name of the property to get.
//   - value: location to return the value.
func (area *CellArea) CellGetProperty(renderer CellRendererer, propertyName string, value *coreglib.Value) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _arg3 *C.GValue          // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_cell_area_cell_get_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(propertyName)
	runtime.KeepAlive(value)
}

// CellSetProperty sets a cell property for renderer in area.
//
// The function takes the following parameters:
//
//   - renderer inside area.
//   - propertyName: name of the cell property to set.
//   - value to set the cell property to.
func (area *CellArea) CellSetProperty(renderer CellRendererer, propertyName string, value *coreglib.Value) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.gchar           // out
	var _arg3 *C.GValue          // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_cell_area_cell_set_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(propertyName)
	runtime.KeepAlive(value)
}

// CopyContext: this is sometimes needed for cases where rows need to share
// alignments in one orientation but may be separately grouped in the opposing
// orientation.
//
// For instance, IconView creates all icons (rows) to have the same width and
// the cells theirin to have the same horizontal alignments. However each row of
// icons may have a separate collective height. IconView uses this to request
// the heights of each row based on a context which was already used to request
// all the row widths that are to be displayed.
//
// The function takes the following parameters:
//
//   - context to copy.
//
// The function returns the following values:
//
//   - cellAreaContext: newly created CellAreaContext copy of context.
func (area *CellArea) CopyContext(context *CellAreaContext) *CellAreaContext {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _cret *C.GtkCellAreaContext // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_cell_area_copy_context(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)

	var _cellAreaContext *CellAreaContext // out

	_cellAreaContext = wrapCellAreaContext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _cellAreaContext
}

// CreateContext creates a CellAreaContext to be used with area for all
// purposes. CellAreaContext stores geometry information for rows for which it
// was operated on, it is important to use the same context for the same row of
// data at all times (i.e. one should render and handle events with the same
// CellAreaContext which was used to request the size of those rows of data).
//
// The function returns the following values:
//
//   - cellAreaContext: newly created CellAreaContext which can be used with
//     area.
func (area *CellArea) CreateContext() *CellAreaContext {
	var _arg0 *C.GtkCellArea        // out
	var _cret *C.GtkCellAreaContext // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_create_context(_arg0)
	runtime.KeepAlive(area)

	var _cellAreaContext *CellAreaContext // out

	_cellAreaContext = wrapCellAreaContext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _cellAreaContext
}

// Event delegates event handling to a CellArea.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - event to handle.
//   - cellArea: widget relative coordinates for area.
//   - flags for area in this row.
//
// The function returns the following values:
//
//   - gint: TRUE if the event was handled by area.
func (area *CellArea) Event(context *CellAreaContext, widget Widgetter, event *gdk.Event, cellArea *gdk.Rectangle, flags CellRendererState) int {
	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkEvent            // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellRendererState // out
	var _cret C.gint                 // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg5 = C.GtkCellRendererState(flags)

	_cret = C.gtk_cell_area_event(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Focus: this should be called by the area’s owning layout widget when focus
// is to be passed to area, or moved within area for a given direction and row
// data.
//
// Implementing CellArea classes should implement this method to receive and
// navigate focus in its own way particular to how it lays out cells.
//
// The function takes the following parameters:
//
//   - direction: DirectionType.
//
// The function returns the following values:
//
//   - ok: TRUE if focus remains inside area as a result of this call.
func (area *CellArea) Focus(direction DirectionType) bool {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C.gtk_cell_area_focus(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForEach calls callback for every CellRenderer in area.
//
// The function takes the following parameters:
//
//   - callback to call.
func (area *CellArea) ForEach(callback CellCallback) {
	var _arg0 *C.GtkCellArea    // out
	var _arg1 C.GtkCellCallback // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_CellCallback)
	_arg2 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_cell_area_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(callback)
}

// ForEachAlloc calls callback for every CellRenderer in area with the allocated
// rectangle inside cell_area.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - cellArea: widget relative coordinates and size for area.
//   - backgroundArea: widget relative coordinates of the background area.
//   - callback to call.
func (area *CellArea) ForEachAlloc(context *CellAreaContext, widget Widgetter, cellArea, backgroundArea *gdk.Rectangle, callback CellAllocCallback) {
	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellAllocCallback // out
	var _arg6 C.gpointer

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*[0]byte)(C._gotk4_gtk3_CellAllocCallback)
	_arg6 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg6))

	C.gtk_cell_area_foreach_alloc(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(callback)
}

// CellAllocation derives the allocation of renderer inside area if area were to
// be renderered in cell_area.
//
// The function takes the following parameters:
//
//   - context used to hold sizes for area.
//   - widget that area is rendering on.
//   - renderer to get the allocation for.
//   - cellArea: whole allocated area for area in widget for this row.
//
// The function returns the following values:
//
//   - allocation: where to store the allocation for renderer.
func (area *CellArea) CellAllocation(context *CellAreaContext, widget Widgetter, renderer CellRendererer, cellArea *gdk.Rectangle) *gdk.Rectangle {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 *C.GtkCellRenderer    // out
	var _arg4 *C.GdkRectangle       // out
	var _arg5 C.GdkRectangle        // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))

	C.gtk_cell_area_get_cell_allocation(_arg0, _arg1, _arg2, _arg3, _arg4, &_arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(cellArea)

	var _allocation *gdk.Rectangle // out

	_allocation = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg5))))

	return _allocation
}

// CellAtPosition gets the CellRenderer at x and y coordinates inside area and
// optionally returns the full cell allocation for it inside cell_area.
//
// The function takes the following parameters:
//
//   - context used to hold sizes for area.
//   - widget that area is rendering on.
//   - cellArea: whole allocated area for area in widget for this row.
//   - x position.
//   - y position.
//
// The function returns the following values:
//
//   - allocArea (optional): where to store the inner allocated area of the
//     returned cell renderer, or NULL.
//   - cellRenderer at x and y.
func (area *CellArea) CellAtPosition(context *CellAreaContext, widget Widgetter, cellArea *gdk.Rectangle, x, y int) (*gdk.Rectangle, CellRendererer) {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 *C.GdkRectangle       // out
	var _arg4 C.gint                // out
	var _arg5 C.gint                // out
	var _arg6 C.GdkRectangle        // in
	var _cret *C.GtkCellRenderer    // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg4 = C.gint(x)
	_arg5 = C.gint(y)

	_cret = C.gtk_cell_area_get_cell_at_position(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, &_arg6)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _allocArea *gdk.Rectangle    // out
	var _cellRenderer CellRendererer // out

	_allocArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg6))))
	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.CellRendererer is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(CellRendererer)
			return ok
		})
		rv, ok := casted.(CellRendererer)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
		}
		_cellRenderer = rv
	}

	return _allocArea, _cellRenderer
}

// CurrentPathString gets the current TreePath string for the currently applied
// TreeIter, this is implicitly updated when gtk_cell_area_apply_attributes() is
// called and can be used to interact with renderers from CellArea subclasses.
//
// The function returns the following values:
//
//   - utf8: current TreePath string for the current attributes applied to area.
//     This string belongs to the area and should not be freed.
func (area *CellArea) CurrentPathString() string {
	var _arg0 *C.GtkCellArea // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_get_current_path_string(_arg0)
	runtime.KeepAlive(area)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// EditWidget gets the CellEditable widget currently used to edit the currently
// edited cell.
//
// The function returns the following values:
//
//   - cellEditable: currently active CellEditable widget.
func (area *CellArea) EditWidget() *CellEditable {
	var _arg0 *C.GtkCellArea     // out
	var _cret *C.GtkCellEditable // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_get_edit_widget(_arg0)
	runtime.KeepAlive(area)

	var _cellEditable *CellEditable // out

	_cellEditable = wrapCellEditable(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellEditable
}

// EditedCell gets the CellRenderer in area that is currently being edited.
//
// The function returns the following values:
//
//   - cellRenderer: currently edited CellRenderer.
func (area *CellArea) EditedCell() CellRendererer {
	var _arg0 *C.GtkCellArea     // out
	var _cret *C.GtkCellRenderer // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_get_edited_cell(_arg0)
	runtime.KeepAlive(area)

	var _cellRenderer CellRendererer // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.CellRendererer is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(CellRendererer)
			return ok
		})
		rv, ok := casted.(CellRendererer)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
		}
		_cellRenderer = rv
	}

	return _cellRenderer
}

// FocusCell retrieves the currently focused cell for area.
//
// The function returns the following values:
//
//   - cellRenderer: currently focused cell in area.
func (area *CellArea) FocusCell() CellRendererer {
	var _arg0 *C.GtkCellArea     // out
	var _cret *C.GtkCellRenderer // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_get_focus_cell(_arg0)
	runtime.KeepAlive(area)

	var _cellRenderer CellRendererer // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.CellRendererer is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(CellRendererer)
			return ok
		})
		rv, ok := casted.(CellRendererer)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
		}
		_cellRenderer = rv
	}

	return _cellRenderer
}

// FocusFromSibling gets the CellRenderer which is expected to be focusable for
// which renderer is, or may be a sibling.
//
// This is handy for CellArea subclasses when handling events, after determining
// the renderer at the event location it can then chose to activate the focus
// cell for which the event cell may have been a sibling.
//
// The function takes the following parameters:
//
//   - renderer: CellRenderer.
//
// The function returns the following values:
//
//   - cellRenderer (optional) for which renderer is a sibling, or NULL.
func (area *CellArea) FocusFromSibling(renderer CellRendererer) CellRendererer {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _cret *C.GtkCellRenderer // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	_cret = C.gtk_cell_area_get_focus_from_sibling(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)

	var _cellRenderer CellRendererer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			_cellRenderer = rv
		}
	}

	return _cellRenderer
}

// FocusSiblings gets the focus sibling cell renderers for renderer.
//
// The function takes the following parameters:
//
//   - renderer expected to have focus.
//
// The function returns the following values:
//
//   - list of CellRenderers. The returned list is internal and should not be
//     freed.
func (area *CellArea) FocusSiblings(renderer CellRendererer) []CellRendererer {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _cret *C.GList           // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	_cret = C.gtk_cell_area_get_focus_siblings(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)

	var _list []CellRendererer // out

	_list = make([]CellRendererer, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkCellRenderer)(v)
		var dst CellRendererer // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.CellRendererer is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// PreferredHeight retrieves a cell area’s initial minimum and natural height.
//
// area will store some geometrical information in context along the way;
// when requesting sizes over an arbitrary number of rows, it’s not important
// to check the minimum_height and natural_height of this call but rather
// to consult gtk_cell_area_context_get_preferred_height() after a series of
// requests.
//
// The function takes the following parameters:
//
//   - context to perform this request with.
//   - widget where area will be rendering.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (area *CellArea) PreferredHeight(context *CellAreaContext, widget Widgetter) (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // in
	var _arg4 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_cell_area_get_preferred_height(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg3)
	_naturalHeight = int(_arg4)

	return _minimumHeight, _naturalHeight
}

// PreferredHeightForWidth retrieves a cell area’s minimum and natural height if
// it would be given the specified width.
//
// area stores some geometrical information in context along the way while
// calling gtk_cell_area_get_preferred_width(). It’s important to perform a
// series of gtk_cell_area_get_preferred_width() requests with context first and
// then call gtk_cell_area_get_preferred_height_for_width() on each cell area
// individually to get the height for width of each fully requested row.
//
// If at some point, the width of a single row changes, it should
// be requested with gtk_cell_area_get_preferred_width() again and
// then the full width of the requested rows checked again with
// gtk_cell_area_context_get_preferred_width().
//
// The function takes the following parameters:
//
//   - context which has already been requested for widths.
//   - widget where area will be rendering.
//   - width for which to check the height of this area.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (area *CellArea) PreferredHeightForWidth(context *CellAreaContext, widget Widgetter, width int) (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // out
	var _arg4 C.gint                // in
	var _arg5 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = C.gint(width)

	C.gtk_cell_area_get_preferred_height_for_width(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg4)
	_naturalHeight = int(_arg5)

	return _minimumHeight, _naturalHeight
}

// PreferredWidth retrieves a cell area’s initial minimum and natural width.
//
// area will store some geometrical information in context along the way;
// when requesting sizes over an arbitrary number of rows, it’s not important to
// check the minimum_width and natural_width of this call but rather to consult
// gtk_cell_area_context_get_preferred_width() after a series of requests.
//
// The function takes the following parameters:
//
//   - context to perform this request with.
//   - widget where area will be rendering.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (area *CellArea) PreferredWidth(context *CellAreaContext, widget Widgetter) (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // in
	var _arg4 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_cell_area_get_preferred_width(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg3)
	_naturalWidth = int(_arg4)

	return _minimumWidth, _naturalWidth
}

// PreferredWidthForHeight retrieves a cell area’s minimum and natural width if
// it would be given the specified height.
//
// area stores some geometrical information in context along the way while
// calling gtk_cell_area_get_preferred_height(). It’s important to perform a
// series of gtk_cell_area_get_preferred_height() requests with context first
// and then call gtk_cell_area_get_preferred_width_for_height() on each cell
// area individually to get the height for width of each fully requested row.
//
// If at some point, the height of a single row changes, it should
// be requested with gtk_cell_area_get_preferred_height() again and
// then the full height of the requested rows checked again with
// gtk_cell_area_context_get_preferred_height().
//
// The function takes the following parameters:
//
//   - context which has already been requested for widths.
//   - widget where area will be rendering.
//   - height for which to check the width of this area.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (area *CellArea) PreferredWidthForHeight(context *CellAreaContext, widget Widgetter, height int) (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // out
	var _arg4 C.gint                // in
	var _arg5 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = C.gint(height)

	C.gtk_cell_area_get_preferred_width_for_height(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg4)
	_naturalWidth = int(_arg5)

	return _minimumWidth, _naturalWidth
}

// RequestMode gets whether the area prefers a height-for-width layout or a
// width-for-height layout.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by area.
func (area *CellArea) RequestMode() SizeRequestMode {
	var _arg0 *C.GtkCellArea       // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_get_request_mode(_arg0)
	runtime.KeepAlive(area)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// HasRenderer checks if area contains renderer.
//
// The function takes the following parameters:
//
//   - renderer to check.
//
// The function returns the following values:
//
//   - ok: TRUE if renderer is in the area.
func (area *CellArea) HasRenderer(renderer CellRendererer) bool {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	_cret = C.gtk_cell_area_has_renderer(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InnerCellArea: this is a convenience function for CellArea implementations
// to get the inner area where a given CellRenderer will be rendered. It removes
// any padding previously added by gtk_cell_area_request_renderer().
//
// The function takes the following parameters:
//
//   - widget that area is rendering onto.
//   - cellArea: widget relative coordinates where one of area’s cells is to be
//     placed.
//
// The function returns the following values:
//
//   - innerArea: return location for the inner cell area.
func (area *CellArea) InnerCellArea(widget Widgetter, cellArea *gdk.Rectangle) *gdk.Rectangle {
	var _arg0 *C.GtkCellArea  // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.GdkRectangle // out
	var _arg3 C.GdkRectangle  // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))

	C.gtk_cell_area_inner_cell_area(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(area)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)

	var _innerArea *gdk.Rectangle // out

	_innerArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))

	return _innerArea
}

// IsActivatable returns whether the area can do anything when activated,
// after applying new attributes to area.
//
// The function returns the following values:
//
//   - ok: whether area can do anything when activated.
func (area *CellArea) IsActivatable() bool {
	var _arg0 *C.GtkCellArea // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_cell_area_is_activatable(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsFocusSibling returns whether sibling is one of renderer’s focus siblings
// (see gtk_cell_area_add_focus_sibling()).
//
// The function takes the following parameters:
//
//   - renderer expected to have focus.
//   - sibling to check against renderer’s sibling list.
//
// The function returns the following values:
//
//   - ok: TRUE if sibling is a focus sibling of renderer.
func (area *CellArea) IsFocusSibling(renderer, sibling CellRendererer) bool {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.GtkCellRenderer // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(sibling).Native()))

	_cret = C.gtk_cell_area_is_focus_sibling(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(sibling)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Remove removes renderer from area.
//
// The function takes the following parameters:
//
//   - renderer to remove from area.
func (area *CellArea) Remove(renderer CellRendererer) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	C.gtk_cell_area_remove(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
}

// RemoveFocusSibling removes sibling from renderer’s focus sibling list (see
// gtk_cell_area_add_focus_sibling()).
//
// The function takes the following parameters:
//
//   - renderer expected to have focus.
//   - sibling to remove from renderer’s focus area.
func (area *CellArea) RemoveFocusSibling(renderer, sibling CellRendererer) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(sibling).Native()))

	C.gtk_cell_area_remove_focus_sibling(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(sibling)
}

// Render renders area’s cells according to area’s layout onto widget at the
// given coordinates.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - cr to render with.
//   - backgroundArea: widget relative coordinates for area’s background.
//   - cellArea: widget relative coordinates for area.
//   - flags for area in this row.
//   - paintFocus: whether area should paint focus on focused cells for focused
//     rows or not.
func (area *CellArea) Render(context *CellAreaContext, widget Widgetter, cr *cairo.Context, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState, paintFocus bool) {
	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.cairo_t             // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _arg7 C.gboolean             // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)
	if paintFocus {
		_arg7 = C.TRUE
	}

	C.gtk_cell_area_render(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(paintFocus)
}

// RequestRenderer: this is a convenience function for CellArea implementations
// to request size for cell renderers. It’s important to use this function to
// request size and then use gtk_cell_area_inner_cell_area() at render and event
// time since this function will add padding around the cell for focus painting.
//
// The function takes the following parameters:
//
//   - renderer to request size for.
//   - orientation in which to request size.
//   - widget that area is rendering onto.
//   - forSize: allocation contextual size to request for, or -1 if the base
//     request for the orientation is to be returned.
//
// The function returns the following values:
//
//   - minimumSize (optional): location to store the minimum size, or NULL.
//   - naturalSize (optional): location to store the natural size, or NULL.
func (area *CellArea) RequestRenderer(renderer CellRendererer, orientation Orientation, widget Widgetter, forSize int) (minimumSize, naturalSize int) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.GtkOrientation   // out
	var _arg3 *C.GtkWidget       // out
	var _arg4 C.gint             // out
	var _arg5 C.gint             // in
	var _arg6 C.gint             // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg2 = C.GtkOrientation(orientation)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = C.gint(forSize)

	C.gtk_cell_area_request_renderer(_arg0, _arg1, _arg2, _arg3, _arg4, &_arg5, &_arg6)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(forSize)

	var _minimumSize int // out
	var _naturalSize int // out

	_minimumSize = int(_arg5)
	_naturalSize = int(_arg6)

	return _minimumSize, _naturalSize
}

// SetFocusCell: explicitly sets the currently focused cell to renderer.
//
// This is generally called by implementations of CellAreaClass.focus() or
// CellAreaClass.event(), however it can also be used to implement functions
// such as gtk_tree_view_set_cursor_on_cell().
//
// The function takes the following parameters:
//
//   - renderer to give focus to.
func (area *CellArea) SetFocusCell(renderer CellRendererer) {
	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	C.gtk_cell_area_set_focus_cell(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
}

// StopEditing: explicitly stops the editing of the currently edited cell.
//
// If canceled is TRUE, the currently edited cell renderer will emit the
// ::editing-canceled signal, otherwise the the ::editing-done signal will be
// emitted on the current edit widget.
//
// See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().
//
// The function takes the following parameters:
//
//   - canceled: whether editing was canceled.
func (area *CellArea) StopEditing(canceled bool) {
	var _arg0 *C.GtkCellArea // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if canceled {
		_arg1 = C.TRUE
	}

	C.gtk_cell_area_stop_editing(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(canceled)
}

// Activate activates area, usually by activating the currently focused cell,
// however some subclasses which embed widgets in the area can also activate a
// widget if it currently has the focus.
//
// The function takes the following parameters:
//
//   - context in context with the current row data.
//   - widget that area is rendering on.
//   - cellArea: size and location of area relative to widget’s allocation.
//   - flags flags for area for this row of data.
//   - editOnly: if TRUE then only cell renderers that are
//     GTK_CELL_RENDERER_MODE_EDITABLE will be activated.
//
// The function returns the following values:
//
//   - ok: whether area was successfully activated.
func (area *CellArea) activate(context *CellAreaContext, widget Widgetter, cellArea *gdk.Rectangle, flags CellRendererState, editOnly bool) bool {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.activate

	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 C.GtkCellRendererState // out
	var _arg5 C.gboolean             // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg4 = C.GtkCellRendererState(flags)
	if editOnly {
		_arg5 = C.TRUE
	}

	_cret = C._gotk4_gtk3_CellArea_virtual_activate(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(editOnly)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Add adds renderer to area with the default child cell properties.
//
// The function takes the following parameters:
//
//   - renderer to add to area.
func (area *CellArea) add(renderer CellRendererer) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.add

	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	C._gotk4_gtk3_CellArea_virtual_add(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
}

// applyAttributes applies any connected attributes to the renderers in area by
// pulling the values from tree_model.
//
// The function takes the following parameters:
//
//   - treeModel to pull values from.
//   - iter in tree_model to apply values for.
//   - isExpander: whether iter has children.
//   - isExpanded: whether iter is expanded in the view and children are
//     visible.
func (area *CellArea) applyAttributes(treeModel TreeModeller, iter *TreeIter, isExpander, isExpanded bool) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.apply_attributes

	var _arg0 *C.GtkCellArea  // out
	var _arg1 *C.GtkTreeModel // out
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gboolean      // out
	var _arg4 C.gboolean      // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if isExpander {
		_arg3 = C.TRUE
	}
	if isExpanded {
		_arg4 = C.TRUE
	}

	C._gotk4_gtk3_CellArea_virtual_apply_attributes(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(isExpander)
	runtime.KeepAlive(isExpanded)
}

// copyContext: this is sometimes needed for cases where rows need to share
// alignments in one orientation but may be separately grouped in the opposing
// orientation.
//
// For instance, IconView creates all icons (rows) to have the same width and
// the cells theirin to have the same horizontal alignments. However each row of
// icons may have a separate collective height. IconView uses this to request
// the heights of each row based on a context which was already used to request
// all the row widths that are to be displayed.
//
// The function takes the following parameters:
//
//   - context to copy.
//
// The function returns the following values:
//
//   - cellAreaContext: newly created CellAreaContext copy of context.
func (area *CellArea) copyContext(context *CellAreaContext) *CellAreaContext {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.copy_context

	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _cret *C.GtkCellAreaContext // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C._gotk4_gtk3_CellArea_virtual_copy_context(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)

	var _cellAreaContext *CellAreaContext // out

	_cellAreaContext = wrapCellAreaContext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _cellAreaContext
}

// createContext creates a CellAreaContext to be used with area for all
// purposes. CellAreaContext stores geometry information for rows for which it
// was operated on, it is important to use the same context for the same row of
// data at all times (i.e. one should render and handle events with the same
// CellAreaContext which was used to request the size of those rows of data).
//
// The function returns the following values:
//
//   - cellAreaContext: newly created CellAreaContext which can be used with
//     area.
func (area *CellArea) createContext() *CellAreaContext {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.create_context

	var _arg0 *C.GtkCellArea        // out
	var _cret *C.GtkCellAreaContext // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C._gotk4_gtk3_CellArea_virtual_create_context(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(area)

	var _cellAreaContext *CellAreaContext // out

	_cellAreaContext = wrapCellAreaContext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _cellAreaContext
}

// Event delegates event handling to a CellArea.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - event to handle.
//   - cellArea: widget relative coordinates for area.
//   - flags for area in this row.
//
// The function returns the following values:
//
//   - gint: TRUE if the event was handled by area.
func (area *CellArea) event(context *CellAreaContext, widget Widgetter, event *gdk.Event, cellArea *gdk.Rectangle, flags CellRendererState) int {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.event

	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkEvent            // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellRendererState // out
	var _cret C.gint                 // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg5 = C.GtkCellRendererState(flags)

	_cret = C._gotk4_gtk3_CellArea_virtual_event(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Focus: this should be called by the area’s owning layout widget when focus
// is to be passed to area, or moved within area for a given direction and row
// data.
//
// Implementing CellArea classes should implement this method to receive and
// navigate focus in its own way particular to how it lays out cells.
//
// The function takes the following parameters:
//
//   - direction: DirectionType.
//
// The function returns the following values:
//
//   - ok: TRUE if focus remains inside area as a result of this call.
func (area *CellArea) focus(direction DirectionType) bool {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.focus

	var _arg0 *C.GtkCellArea     // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C._gotk4_gtk3_CellArea_virtual_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// forEach calls callback for every CellRenderer in area.
//
// The function takes the following parameters:
//
//   - callback to call.
func (area *CellArea) forEach(callback CellCallback) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.foreach

	var _arg0 *C.GtkCellArea    // out
	var _arg1 C.GtkCellCallback // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_CellCallback)
	_arg2 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg2))

	C._gotk4_gtk3_CellArea_virtual_foreach(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(callback)
}

// forEachAlloc calls callback for every CellRenderer in area with the allocated
// rectangle inside cell_area.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - cellArea: widget relative coordinates and size for area.
//   - backgroundArea: widget relative coordinates of the background area.
//   - callback to call.
func (area *CellArea) forEachAlloc(context *CellAreaContext, widget Widgetter, cellArea, backgroundArea *gdk.Rectangle, callback CellAllocCallback) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.foreach_alloc

	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellAllocCallback // out
	var _arg6 C.gpointer

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*[0]byte)(C._gotk4_gtk3_CellAllocCallback)
	_arg6 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg6))

	C._gotk4_gtk3_CellArea_virtual_foreach_alloc(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(callback)
}

// preferredHeight retrieves a cell area’s initial minimum and natural height.
//
// area will store some geometrical information in context along the way;
// when requesting sizes over an arbitrary number of rows, it’s not important
// to check the minimum_height and natural_height of this call but rather
// to consult gtk_cell_area_context_get_preferred_height() after a series of
// requests.
//
// The function takes the following parameters:
//
//   - context to perform this request with.
//   - widget where area will be rendering.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (area *CellArea) preferredHeight(context *CellAreaContext, widget Widgetter) (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.get_preferred_height

	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // in
	var _arg4 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_CellArea_virtual_get_preferred_height(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg3)
	_naturalHeight = int(_arg4)

	return _minimumHeight, _naturalHeight
}

// preferredHeightForWidth retrieves a cell area’s minimum and natural height if
// it would be given the specified width.
//
// area stores some geometrical information in context along the way while
// calling gtk_cell_area_get_preferred_width(). It’s important to perform a
// series of gtk_cell_area_get_preferred_width() requests with context first and
// then call gtk_cell_area_get_preferred_height_for_width() on each cell area
// individually to get the height for width of each fully requested row.
//
// If at some point, the width of a single row changes, it should
// be requested with gtk_cell_area_get_preferred_width() again and
// then the full width of the requested rows checked again with
// gtk_cell_area_context_get_preferred_width().
//
// The function takes the following parameters:
//
//   - context which has already been requested for widths.
//   - widget where area will be rendering.
//   - width for which to check the height of this area.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (area *CellArea) preferredHeightForWidth(context *CellAreaContext, widget Widgetter, width int) (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.get_preferred_height_for_width

	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // out
	var _arg4 C.gint                // in
	var _arg5 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = C.gint(width)

	C._gotk4_gtk3_CellArea_virtual_get_preferred_height_for_width(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg4)
	_naturalHeight = int(_arg5)

	return _minimumHeight, _naturalHeight
}

// preferredWidth retrieves a cell area’s initial minimum and natural width.
//
// area will store some geometrical information in context along the way;
// when requesting sizes over an arbitrary number of rows, it’s not important to
// check the minimum_width and natural_width of this call but rather to consult
// gtk_cell_area_context_get_preferred_width() after a series of requests.
//
// The function takes the following parameters:
//
//   - context to perform this request with.
//   - widget where area will be rendering.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (area *CellArea) preferredWidth(context *CellAreaContext, widget Widgetter) (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.get_preferred_width

	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // in
	var _arg4 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_CellArea_virtual_get_preferred_width(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg3)
	_naturalWidth = int(_arg4)

	return _minimumWidth, _naturalWidth
}

// preferredWidthForHeight retrieves a cell area’s minimum and natural width if
// it would be given the specified height.
//
// area stores some geometrical information in context along the way while
// calling gtk_cell_area_get_preferred_height(). It’s important to perform a
// series of gtk_cell_area_get_preferred_height() requests with context first
// and then call gtk_cell_area_get_preferred_width_for_height() on each cell
// area individually to get the height for width of each fully requested row.
//
// If at some point, the height of a single row changes, it should
// be requested with gtk_cell_area_get_preferred_height() again and
// then the full height of the requested rows checked again with
// gtk_cell_area_context_get_preferred_height().
//
// The function takes the following parameters:
//
//   - context which has already been requested for widths.
//   - widget where area will be rendering.
//   - height for which to check the width of this area.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (area *CellArea) preferredWidthForHeight(context *CellAreaContext, widget Widgetter, height int) (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.get_preferred_width_for_height

	var _arg0 *C.GtkCellArea        // out
	var _arg1 *C.GtkCellAreaContext // out
	var _arg2 *C.GtkWidget          // out
	var _arg3 C.gint                // out
	var _arg4 C.gint                // in
	var _arg5 C.gint                // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = C.gint(height)

	C._gotk4_gtk3_CellArea_virtual_get_preferred_width_for_height(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg4)
	_naturalWidth = int(_arg5)

	return _minimumWidth, _naturalWidth
}

// requestMode gets whether the area prefers a height-for-width layout or a
// width-for-height layout.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by area.
func (area *CellArea) requestMode() SizeRequestMode {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.get_request_mode

	var _arg0 *C.GtkCellArea       // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C._gotk4_gtk3_CellArea_virtual_get_request_mode(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(area)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// isActivatable returns whether the area can do anything when activated,
// after applying new attributes to area.
//
// The function returns the following values:
//
//   - ok: whether area can do anything when activated.
func (area *CellArea) isActivatable() bool {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.is_activatable

	var _arg0 *C.GtkCellArea // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C._gotk4_gtk3_CellArea_virtual_is_activatable(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Remove removes renderer from area.
//
// The function takes the following parameters:
//
//   - renderer to remove from area.
func (area *CellArea) remove(renderer CellRendererer) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.remove

	var _arg0 *C.GtkCellArea     // out
	var _arg1 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	C._gotk4_gtk3_CellArea_virtual_remove(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(renderer)
}

// Render renders area’s cells according to area’s layout onto widget at the
// given coordinates.
//
// The function takes the following parameters:
//
//   - context for this row of data.
//   - widget that area is rendering to.
//   - cr to render with.
//   - backgroundArea: widget relative coordinates for area’s background.
//   - cellArea: widget relative coordinates for area.
//   - flags for area in this row.
//   - paintFocus: whether area should paint focus on focused cells for focused
//     rows or not.
func (area *CellArea) render(context *CellAreaContext, widget Widgetter, cr *cairo.Context, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState, paintFocus bool) {
	gclass := (*C.GtkCellAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.render

	var _arg0 *C.GtkCellArea         // out
	var _arg1 *C.GtkCellAreaContext  // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.cairo_t             // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _arg7 C.gboolean             // out

	_arg0 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)
	if paintFocus {
		_arg7 = C.TRUE
	}

	C._gotk4_gtk3_CellArea_virtual_render(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(paintFocus)
}

// CellAreaBoxOverrides contains methods that are overridable.
type CellAreaBoxOverrides struct {
}

func defaultCellAreaBoxOverrides(v *CellAreaBox) CellAreaBoxOverrides {
	return CellAreaBoxOverrides{}
}

// CellAreaBox renders cell renderers into a row or a column depending on its
// Orientation.
//
// GtkCellAreaBox uses a notion of packing. Packing refers to adding cell
// renderers with reference to a particular position in a CellAreaBox.
// There are two reference positions: the start and the end of the box. When
// the CellAreaBox is oriented in the GTK_ORIENTATION_VERTICAL orientation, the
// start is defined as the top of the box and the end is defined as the bottom.
// In the GTK_ORIENTATION_HORIZONTAL orientation start is defined as the left
// side and the end is defined as the right side.
//
// Alignments of CellRenderers rendered in adjacent rows can be configured
// by configuring the CellAreaBox align child cell property with
// gtk_cell_area_cell_set_property() or by specifying the "align" argument to
// gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().
type CellAreaBox struct {
	_ [0]func() // equal guard
	CellArea

	*coreglib.Object
	Orientable
}

var (
	_ CellAreaer        = (*CellAreaBox)(nil)
	_ coreglib.Objector = (*CellAreaBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellAreaBox, *CellAreaBoxClass, CellAreaBoxOverrides](
		GTypeCellAreaBox,
		initCellAreaBoxClass,
		wrapCellAreaBox,
		defaultCellAreaBoxOverrides,
	)
}

func initCellAreaBoxClass(gclass unsafe.Pointer, overrides CellAreaBoxOverrides, classInitFunc func(*CellAreaBoxClass)) {
	if classInitFunc != nil {
		class := (*CellAreaBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellAreaBox(obj *coreglib.Object) *CellAreaBox {
	return &CellAreaBox{
		CellArea: CellArea{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			Buildable: Buildable{
				Object: obj,
			},
			CellLayout: CellLayout{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalCellAreaBox(p uintptr) (interface{}, error) {
	return wrapCellAreaBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellAreaBox creates a new CellAreaBox.
//
// The function returns the following values:
//
//   - cellAreaBox: newly created CellAreaBox.
func NewCellAreaBox() *CellAreaBox {
	var _cret *C.GtkCellArea // in

	_cret = C.gtk_cell_area_box_new()

	var _cellAreaBox *CellAreaBox // out

	_cellAreaBox = wrapCellAreaBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellAreaBox
}

// Spacing gets the spacing added between cell renderers.
//
// The function returns the following values:
//
//   - gint: space added between cell renderers in box.
func (box *CellAreaBox) Spacing() int {
	var _arg0 *C.GtkCellAreaBox // out
	var _cret C.gint            // in

	_arg0 = (*C.GtkCellAreaBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_cell_area_box_get_spacing(_arg0)
	runtime.KeepAlive(box)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PackEnd adds renderer to box, packed with reference to the end of box.
//
// The renderer is packed after (away from end of) any other CellRenderer packed
// with reference to the end of box.
//
// The function takes the following parameters:
//
//   - renderer to add.
//   - expand: whether renderer should receive extra space when the area
//     receives more than its natural size.
//   - align: whether renderer should be aligned in adjacent rows.
//   - fixed: whether renderer should have the same size in all rows.
func (box *CellAreaBox) PackEnd(renderer CellRendererer, expand, align, fixed bool) {
	var _arg0 *C.GtkCellAreaBox  // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out
	var _arg3 C.gboolean         // out
	var _arg4 C.gboolean         // out

	_arg0 = (*C.GtkCellAreaBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	if expand {
		_arg2 = C.TRUE
	}
	if align {
		_arg3 = C.TRUE
	}
	if fixed {
		_arg4 = C.TRUE
	}

	C.gtk_cell_area_box_pack_end(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(align)
	runtime.KeepAlive(fixed)
}

// PackStart adds renderer to box, packed with reference to the start of box.
//
// The renderer is packed after any other CellRenderer packed with reference to
// the start of box.
//
// The function takes the following parameters:
//
//   - renderer to add.
//   - expand: whether renderer should receive extra space when the area
//     receives more than its natural size.
//   - align: whether renderer should be aligned in adjacent rows.
//   - fixed: whether renderer should have the same size in all rows.
func (box *CellAreaBox) PackStart(renderer CellRendererer, expand, align, fixed bool) {
	var _arg0 *C.GtkCellAreaBox  // out
	var _arg1 *C.GtkCellRenderer // out
	var _arg2 C.gboolean         // out
	var _arg3 C.gboolean         // out
	var _arg4 C.gboolean         // out

	_arg0 = (*C.GtkCellAreaBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	if expand {
		_arg2 = C.TRUE
	}
	if align {
		_arg3 = C.TRUE
	}
	if fixed {
		_arg4 = C.TRUE
	}

	C.gtk_cell_area_box_pack_start(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(align)
	runtime.KeepAlive(fixed)
}

// SetSpacing sets the spacing to add between cell renderers in box.
//
// The function takes the following parameters:
//
//   - spacing: space to add between CellRenderers.
func (box *CellAreaBox) SetSpacing(spacing int) {
	var _arg0 *C.GtkCellAreaBox // out
	var _arg1 C.gint            // out

	_arg0 = (*C.GtkCellAreaBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(spacing)

	C.gtk_cell_area_box_set_spacing(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(spacing)
}

// CellAreaContextOverrides contains methods that are overridable.
type CellAreaContextOverrides struct {
	// Allocate allocates a width and/or a height for all rows which are to be
	// rendered with context.
	//
	// Usually allocation is performed only horizontally or sometimes vertically
	// since a group of rows are usually rendered side by side vertically
	// or horizontally and share either the same width or the same height.
	// Sometimes they are allocated in both horizontal and vertical orientations
	// producing a homogeneous effect of the rows. This is generally the case
	// for TreeView when TreeView:fixed-height-mode is enabled.
	//
	// Since 3.0.
	//
	// The function takes the following parameters:
	//
	//   - width: allocated width for all TreeModel rows rendered with context,
	//     or -1.
	//   - height: allocated height for all TreeModel rows rendered with
	//     context, or -1.
	Allocate func(width, height int)
	// PreferredHeightForWidth gets the accumulative preferred height for width
	// for all rows which have been requested for the same said width with this
	// context.
	//
	// After gtk_cell_area_context_reset() is called and/or before ever
	// requesting the size of a CellArea, the returned values are -1.
	//
	// The function takes the following parameters:
	//
	//   - width: proposed width for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location to store the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location to store the natural height,
	//     or NULL.
	PreferredHeightForWidth func(width int) (minimumHeight, naturalHeight int)
	// PreferredWidthForHeight gets the accumulative preferred width for height
	// for all rows which have been requested for the same said height with this
	// context.
	//
	// After gtk_cell_area_context_reset() is called and/or before ever
	// requesting the size of a CellArea, the returned values are -1.
	//
	// The function takes the following parameters:
	//
	//   - height: proposed height for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location to store the minimum width,
	//     or NULL.
	//   - naturalWidth (optional): location to store the natural width,
	//     or NULL.
	PreferredWidthForHeight func(height int) (minimumWidth, naturalWidth int)
	// Reset resets any previously cached request and allocation data.
	//
	// When underlying TreeModel data changes its important to reset the
	// context if the content size is allowed to shrink. If the content
	// size is only allowed to grow (this is usually an option for views
	// rendering large data stores as a measure of optimization), then only
	// the row that changed or was inserted needs to be (re)requested with
	// gtk_cell_area_get_preferred_width().
	//
	// When the new overall size of the context requires that the allocated size
	// changes (or whenever this allocation changes at all), the variable row
	// sizes need to be re-requested for every row.
	//
	// For instance, if the rows are displayed all with the same
	// width from top to bottom then a change in the allocated width
	// necessitates a recalculation of all the displayed row heights using
	// gtk_cell_area_get_preferred_height_for_width().
	//
	// Since 3.0.
	Reset func()
}

func defaultCellAreaContextOverrides(v *CellAreaContext) CellAreaContextOverrides {
	return CellAreaContextOverrides{
		Allocate:                v.allocate,
		PreferredHeightForWidth: v.preferredHeightForWidth,
		PreferredWidthForHeight: v.preferredWidthForHeight,
		Reset:                   v.reset,
	}
}

// CellAreaContext object is created by a given CellArea implementation via its
// CellAreaClass.create_context() virtual method and is used to store cell sizes
// and alignments for a series of TreeModel rows that are requested and rendered
// in the same context.
//
// CellLayout widgets can create any number of contexts in which to request and
// render groups of data rows. However, it’s important that the same context
// which was used to request sizes for a given TreeModel row also be used for
// the same row when calling other CellArea APIs such as gtk_cell_area_render()
// and gtk_cell_area_event().
type CellAreaContext struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*CellAreaContext)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellAreaContext, *CellAreaContextClass, CellAreaContextOverrides](
		GTypeCellAreaContext,
		initCellAreaContextClass,
		wrapCellAreaContext,
		defaultCellAreaContextOverrides,
	)
}

func initCellAreaContextClass(gclass unsafe.Pointer, overrides CellAreaContextOverrides, classInitFunc func(*CellAreaContextClass)) {
	pclass := (*C.GtkCellAreaContextClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellAreaContext))))

	if overrides.Allocate != nil {
		pclass.allocate = (*[0]byte)(C._gotk4_gtk3_CellAreaContextClass_allocate)
	}

	if overrides.PreferredHeightForWidth != nil {
		pclass.get_preferred_height_for_width = (*[0]byte)(C._gotk4_gtk3_CellAreaContextClass_get_preferred_height_for_width)
	}

	if overrides.PreferredWidthForHeight != nil {
		pclass.get_preferred_width_for_height = (*[0]byte)(C._gotk4_gtk3_CellAreaContextClass_get_preferred_width_for_height)
	}

	if overrides.Reset != nil {
		pclass.reset = (*[0]byte)(C._gotk4_gtk3_CellAreaContextClass_reset)
	}

	if classInitFunc != nil {
		class := (*CellAreaContextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellAreaContext(obj *coreglib.Object) *CellAreaContext {
	return &CellAreaContext{
		Object: obj,
	}
}

func marshalCellAreaContext(p uintptr) (interface{}, error) {
	return wrapCellAreaContext(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Allocate allocates a width and/or a height for all rows which are to be
// rendered with context.
//
// Usually allocation is performed only horizontally or sometimes vertically
// since a group of rows are usually rendered side by side vertically or
// horizontally and share either the same width or the same height. Sometimes
// they are allocated in both horizontal and vertical orientations producing a
// homogeneous effect of the rows. This is generally the case for TreeView when
// TreeView:fixed-height-mode is enabled.
//
// Since 3.0.
//
// The function takes the following parameters:
//
//   - width: allocated width for all TreeModel rows rendered with context,
//     or -1.
//   - height: allocated height for all TreeModel rows rendered with context,
//     or -1.
func (context *CellAreaContext) Allocate(width, height int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_cell_area_context_allocate(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// Allocation fetches the current allocation size for context.
//
// If the context was not allocated in width or height, or if the context was
// recently reset with gtk_cell_area_context_reset(), the returned value will be
// -1.
//
// The function returns the following values:
//
//   - width (optional): location to store the allocated width, or NULL.
//   - height (optional): location to store the allocated height, or NULL.
func (context *CellAreaContext) Allocation() (width, height int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // in
	var _arg2 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_cell_area_context_get_allocation(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(context)

	var _width int  // out
	var _height int // out

	_width = int(_arg1)
	_height = int(_arg2)

	return _width, _height
}

// Area fetches the CellArea this context was created by.
//
// This is generally unneeded by layouting widgets; however, it is important for
// the context implementation itself to fetch information about the area it is
// being used for.
//
// For instance at CellAreaContextClass.allocate() time it’s important to know
// details about any cell spacing that the CellArea is configured with in order
// to compute a proper allocation.
//
// The function returns the following values:
//
//   - cellArea this context was created by.
func (context *CellAreaContext) Area() CellAreaer {
	var _arg0 *C.GtkCellAreaContext // out
	var _cret *C.GtkCellArea        // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_cell_area_context_get_area(_arg0)
	runtime.KeepAlive(context)

	var _cellArea CellAreaer // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.CellAreaer is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(CellAreaer)
			return ok
		})
		rv, ok := casted.(CellAreaer)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellAreaer")
		}
		_cellArea = rv
	}

	return _cellArea
}

// PreferredHeight gets the accumulative preferred height for all rows which
// have been requested with this context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are 0.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (context *CellAreaContext) PreferredHeight() (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // in
	var _arg2 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_cell_area_context_get_preferred_height(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(context)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg1)
	_naturalHeight = int(_arg2)

	return _minimumHeight, _naturalHeight
}

// PreferredHeightForWidth gets the accumulative preferred height for width for
// all rows which have been requested for the same said width with this context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are -1.
//
// The function takes the following parameters:
//
//   - width: proposed width for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (context *CellAreaContext) PreferredHeightForWidth(width int) (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // in
	var _arg3 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(width)

	C.gtk_cell_area_context_get_preferred_height_for_width(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)

	return _minimumHeight, _naturalHeight
}

// PreferredWidth gets the accumulative preferred width for all rows which have
// been requested with this context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are 0.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (context *CellAreaContext) PreferredWidth() (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // in
	var _arg2 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_cell_area_context_get_preferred_width(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(context)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg1)
	_naturalWidth = int(_arg2)

	return _minimumWidth, _naturalWidth
}

// PreferredWidthForHeight gets the accumulative preferred width for height
// for all rows which have been requested for the same said height with this
// context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are -1.
//
// The function takes the following parameters:
//
//   - height: proposed height for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (context *CellAreaContext) PreferredWidthForHeight(height int) (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // in
	var _arg3 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(height)

	C.gtk_cell_area_context_get_preferred_width_for_height(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg2)
	_naturalWidth = int(_arg3)

	return _minimumWidth, _naturalWidth
}

// PushPreferredHeight causes the minimum and/or natural height to grow if the
// new proposed sizes exceed the current minimum and natural height.
//
// This is used by CellAreaContext implementations during the request process
// over a series of TreeModel rows to progressively push the requested height
// over a series of gtk_cell_area_get_preferred_height() requests.
//
// The function takes the following parameters:
//
//   - minimumHeight: proposed new minimum height for context.
//   - naturalHeight: proposed new natural height for context.
func (context *CellAreaContext) PushPreferredHeight(minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(minimumHeight)
	_arg2 = C.gint(naturalHeight)

	C.gtk_cell_area_context_push_preferred_height(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(minimumHeight)
	runtime.KeepAlive(naturalHeight)
}

// PushPreferredWidth causes the minimum and/or natural width to grow if the new
// proposed sizes exceed the current minimum and natural width.
//
// This is used by CellAreaContext implementations during the request process
// over a series of TreeModel rows to progressively push the requested width
// over a series of gtk_cell_area_get_preferred_width() requests.
//
// The function takes the following parameters:
//
//   - minimumWidth: proposed new minimum width for context.
//   - naturalWidth: proposed new natural width for context.
func (context *CellAreaContext) PushPreferredWidth(minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(minimumWidth)
	_arg2 = C.gint(naturalWidth)

	C.gtk_cell_area_context_push_preferred_width(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(minimumWidth)
	runtime.KeepAlive(naturalWidth)
}

// Reset resets any previously cached request and allocation data.
//
// When underlying TreeModel data changes its important to reset the context if
// the content size is allowed to shrink. If the content size is only allowed
// to grow (this is usually an option for views rendering large data stores as
// a measure of optimization), then only the row that changed or was inserted
// needs to be (re)requested with gtk_cell_area_get_preferred_width().
//
// When the new overall size of the context requires that the allocated size
// changes (or whenever this allocation changes at all), the variable row sizes
// need to be re-requested for every row.
//
// For instance, if the rows are displayed all with the same
// width from top to bottom then a change in the allocated width
// necessitates a recalculation of all the displayed row heights using
// gtk_cell_area_get_preferred_height_for_width().
//
// Since 3.0.
func (context *CellAreaContext) Reset() {
	var _arg0 *C.GtkCellAreaContext // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_cell_area_context_reset(_arg0)
	runtime.KeepAlive(context)
}

// Allocate allocates a width and/or a height for all rows which are to be
// rendered with context.
//
// Usually allocation is performed only horizontally or sometimes vertically
// since a group of rows are usually rendered side by side vertically or
// horizontally and share either the same width or the same height. Sometimes
// they are allocated in both horizontal and vertical orientations producing a
// homogeneous effect of the rows. This is generally the case for TreeView when
// TreeView:fixed-height-mode is enabled.
//
// Since 3.0.
//
// The function takes the following parameters:
//
//   - width: allocated width for all TreeModel rows rendered with context,
//     or -1.
//   - height: allocated height for all TreeModel rows rendered with context,
//     or -1.
func (context *CellAreaContext) allocate(width, height int) {
	gclass := (*C.GtkCellAreaContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.allocate

	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C._gotk4_gtk3_CellAreaContext_virtual_allocate(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// preferredHeightForWidth gets the accumulative preferred height for width for
// all rows which have been requested for the same said width with this context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are -1.
//
// The function takes the following parameters:
//
//   - width: proposed width for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (context *CellAreaContext) preferredHeightForWidth(width int) (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkCellAreaContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.get_preferred_height_for_width

	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // in
	var _arg3 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(width)

	C._gotk4_gtk3_CellAreaContext_virtual_get_preferred_height_for_width(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)

	return _minimumHeight, _naturalHeight
}

// preferredWidthForHeight gets the accumulative preferred width for height
// for all rows which have been requested for the same said height with this
// context.
//
// After gtk_cell_area_context_reset() is called and/or before ever requesting
// the size of a CellArea, the returned values are -1.
//
// The function takes the following parameters:
//
//   - height: proposed height for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (context *CellAreaContext) preferredWidthForHeight(height int) (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkCellAreaContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.get_preferred_width_for_height

	var _arg0 *C.GtkCellAreaContext // out
	var _arg1 C.gint                // out
	var _arg2 C.gint                // in
	var _arg3 C.gint                // in

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(height)

	C._gotk4_gtk3_CellAreaContext_virtual_get_preferred_width_for_height(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg2)
	_naturalWidth = int(_arg3)

	return _minimumWidth, _naturalWidth
}

// Reset resets any previously cached request and allocation data.
//
// When underlying TreeModel data changes its important to reset the context if
// the content size is allowed to shrink. If the content size is only allowed
// to grow (this is usually an option for views rendering large data stores as
// a measure of optimization), then only the row that changed or was inserted
// needs to be (re)requested with gtk_cell_area_get_preferred_width().
//
// When the new overall size of the context requires that the allocated size
// changes (or whenever this allocation changes at all), the variable row sizes
// need to be re-requested for every row.
//
// For instance, if the rows are displayed all with the same
// width from top to bottom then a change in the allocated width
// necessitates a recalculation of all the displayed row heights using
// gtk_cell_area_get_preferred_height_for_width().
//
// Since 3.0.
func (context *CellAreaContext) reset() {
	gclass := (*C.GtkCellAreaContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.reset

	var _arg0 *C.GtkCellAreaContext // out

	_arg0 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_CellAreaContext_virtual_reset(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// CellRendererOverrides contains methods that are overridable.
type CellRendererOverrides struct {
	// Activate passes an activate event to the cell renderer for possible
	// processing. Some cell renderers may use events; for example,
	// CellRendererToggle toggles when it gets a mouse click.
	//
	// The function takes the following parameters:
	//
	//   - event: Event.
	//   - widget that received the event.
	//   - path: widget-dependent string representation of the event location;
	//     e.g. for TreeView, a string representation of TreePath.
	//   - backgroundArea: background area as passed to
	//     gtk_cell_renderer_render().
	//   - cellArea: cell area as passed to gtk_cell_renderer_render().
	//   - flags: render flags.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if the event was consumed/handled.
	Activate func(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) bool
	// EditingCanceled: signal gets emitted when the user cancels the process of
	// editing a cell.
	EditingCanceled func()
	// EditingStarted: signal gets emitted when a cell starts to be edited.
	//
	// The function takes the following parameters:
	//
	//   - editable
	//   - path
	EditingStarted func(editable CellEditabler, path string)
	// AlignedArea gets the aligned area used by cell inside cell_area. Used for
	// finding the appropriate edit and focus rectangle.
	//
	// The function takes the following parameters:
	//
	//   - widget this cell will be rendering to.
	//   - flags: render flags.
	//   - cellArea: cell area which would be passed to
	//     gtk_cell_renderer_render().
	//
	// The function returns the following values:
	//
	//   - alignedArea: return location for the space inside cell_area that
	//     would acually be used to render.
	AlignedArea func(widget Widgetter, flags CellRendererState, cellArea *gdk.Rectangle) *gdk.Rectangle
	// PreferredHeight retreives a renderer’s natural size when rendered to
	// widget.
	//
	// The function takes the following parameters:
	//
	//   - widget this cell will be rendering to.
	//
	// The function returns the following values:
	//
	//   - minimumSize (optional): location to store the minimum size, or NULL.
	//   - naturalSize (optional): location to store the natural size, or NULL.
	PreferredHeight func(widget Widgetter) (minimumSize, naturalSize int)
	// PreferredHeightForWidth retreives a cell renderers’s minimum and natural
	// height if it were rendered to widget with the specified width.
	//
	// The function takes the following parameters:
	//
	//   - widget this cell will be rendering to.
	//   - width: size which is available for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location for storing the minimum size,
	//     or NULL.
	//   - naturalHeight (optional): location for storing the preferred size,
	//     or NULL.
	PreferredHeightForWidth func(widget Widgetter, width int) (minimumHeight, naturalHeight int)
	// PreferredWidth retreives a renderer’s natural size when rendered to
	// widget.
	//
	// The function takes the following parameters:
	//
	//   - widget this cell will be rendering to.
	//
	// The function returns the following values:
	//
	//   - minimumSize (optional): location to store the minimum size, or NULL.
	//   - naturalSize (optional): location to store the natural size, or NULL.
	PreferredWidth func(widget Widgetter) (minimumSize, naturalSize int)
	// PreferredWidthForHeight retreives a cell renderers’s minimum and natural
	// width if it were rendered to widget with the specified height.
	//
	// The function takes the following parameters:
	//
	//   - widget this cell will be rendering to.
	//   - height: size which is available for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location for storing the minimum size,
	//     or NULL.
	//   - naturalWidth (optional): location for storing the preferred size,
	//     or NULL.
	PreferredWidthForHeight func(widget Widgetter, height int) (minimumWidth, naturalWidth int)
	// RequestMode gets whether the cell renderer prefers a height-for-width
	// layout or a width-for-height layout.
	//
	// The function returns the following values:
	//
	//   - sizeRequestMode preferred by this renderer.
	RequestMode func() SizeRequestMode
	// Size obtains the width and height needed to render the cell. Used by view
	// widgets to determine the appropriate size for the cell_area passed to
	// gtk_cell_renderer_render(). If cell_area is not NULL, fills in the x and
	// y offsets (if set) of the cell relative to this location.
	//
	// Please note that the values set in width and height, as well as those in
	// x_offset and y_offset are inclusive of the xpad and ypad properties.
	//
	// Deprecated: Use gtk_cell_renderer_get_preferred_size() instead.
	//
	// The function takes the following parameters:
	//
	//   - widget the renderer is rendering to.
	//   - cellArea (optional): area a cell will be allocated, or NULL.
	//
	// The function returns the following values:
	//
	//   - xOffset (optional): location to return x offset of cell relative to
	//     cell_area, or NULL.
	//   - yOffset (optional): location to return y offset of cell relative to
	//     cell_area, or NULL.
	//   - width (optional): location to return width needed to render a cell,
	//     or NULL.
	//   - height (optional): location to return height needed to render a cell,
	//     or NULL.
	Size func(widget Widgetter, cellArea *gdk.Rectangle) (xOffset, yOffset, width, height int)
	// Render invokes the virtual render function of the CellRenderer. The three
	// passed-in rectangles are areas in cr. Most renderers will draw within
	// cell_area; the xalign, yalign, xpad, and ypad fields of the CellRenderer
	// should be honored with respect to cell_area. background_area includes
	// the blank space around the cell, and also the area containing the tree
	// expander; so the background_area rectangles for all cells tile to cover
	// the entire window.
	//
	// The function takes the following parameters:
	//
	//   - cr: cairo context to draw to.
	//   - widget owning window.
	//   - backgroundArea: entire cell area (including tree expanders and maybe
	//     padding on the sides).
	//   - cellArea: area normally rendered by a cell renderer.
	//   - flags that affect rendering.
	Render func(cr *cairo.Context, widget Widgetter, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState)
	// StartEditing starts editing the contents of this cell, through a new
	// CellEditable widget created by the CellRendererClass.start_editing
	// virtual function.
	//
	// The function takes the following parameters:
	//
	//   - event (optional): Event.
	//   - widget that received the event.
	//   - path: widget-dependent string representation of the event location;
	//     e.g. for TreeView, a string representation of TreePath.
	//   - backgroundArea: background area as passed to
	//     gtk_cell_renderer_render().
	//   - cellArea: cell area as passed to gtk_cell_renderer_render().
	//   - flags: render flags.
	//
	// The function returns the following values:
	//
	//   - cellEditable (optional): new CellEditable for editing this cell,
	//     or NULL if editing is not possible.
	StartEditing func(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) *CellEditable
}

func defaultCellRendererOverrides(v *CellRenderer) CellRendererOverrides {
	return CellRendererOverrides{
		Activate:                v.activate,
		EditingCanceled:         v.editingCanceled,
		EditingStarted:          v.editingStarted,
		AlignedArea:             v.alignedArea,
		PreferredHeight:         v.preferredHeight,
		PreferredHeightForWidth: v.preferredHeightForWidth,
		PreferredWidth:          v.preferredWidth,
		PreferredWidthForHeight: v.preferredWidthForHeight,
		RequestMode:             v.requestMode,
		Size:                    v.size,
		Render:                  v.render,
		StartEditing:            v.startEditing,
	}
}

// CellRenderer is a base class of a set of objects used for rendering a cell
// to a #cairo_t. These objects are used primarily by the TreeView widget,
// though they aren’t tied to them in any specific way. It is worth noting that
// CellRenderer is not a Widget and cannot be treated as such.
//
// The primary use of a CellRenderer is for drawing a certain graphical
// elements on a #cairo_t. Typically, one cell renderer is used to draw many
// cells on the screen. To this extent, it isn’t expected that a CellRenderer
// keep any permanent state around. Instead, any state is set just prior
// to use using #GObjects property system. Then, the cell is measured using
// gtk_cell_renderer_get_size(). Finally, the cell is rendered in the correct
// location using gtk_cell_renderer_render().
//
// There are a number of rules that must be followed when writing a new
// CellRenderer. First and foremost, it’s important that a certain set of
// properties will always yield a cell renderer of the same size, barring a
// Style change. The CellRenderer also has a number of generic properties that
// are expected to be honored by all children.
//
// Beyond merely rendering a cell, cell renderers can optionally provide
// active user interface elements. A cell renderer can be “activatable” like
// CellRendererToggle, which toggles when it gets activated by a mouse click,
// or it can be “editable” like CellRendererText, which allows the user to
// edit the text using a widget implementing the CellEditable interface, e.g.
// Entry. To make a cell renderer activatable or editable, you have to implement
// the CellRendererClass.activate or CellRendererClass.start_editing virtual
// functions, respectively.
//
// Many properties of CellRenderer and its subclasses have a corresponding
// “set” property, e.g. “cell-background-set” corresponds to “cell-background”.
// These “set” properties reflect whether a property has been set or not.
// You should not set them independently.
type CellRenderer struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned
}

var ()

// CellRendererer describes types inherited from class CellRenderer.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type CellRendererer interface {
	coreglib.Objector
	baseCellRenderer() *CellRenderer
}

var _ CellRendererer = (*CellRenderer)(nil)

func init() {
	coreglib.RegisterClassInfo[*CellRenderer, *CellRendererClass, CellRendererOverrides](
		GTypeCellRenderer,
		initCellRendererClass,
		wrapCellRenderer,
		defaultCellRendererOverrides,
	)
}

func initCellRendererClass(gclass unsafe.Pointer, overrides CellRendererOverrides, classInitFunc func(*CellRendererClass)) {
	pclass := (*C.GtkCellRendererClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellRenderer))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_activate)
	}

	if overrides.EditingCanceled != nil {
		pclass.editing_canceled = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_editing_canceled)
	}

	if overrides.EditingStarted != nil {
		pclass.editing_started = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_editing_started)
	}

	if overrides.AlignedArea != nil {
		pclass.get_aligned_area = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_aligned_area)
	}

	if overrides.PreferredHeight != nil {
		pclass.get_preferred_height = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_preferred_height)
	}

	if overrides.PreferredHeightForWidth != nil {
		pclass.get_preferred_height_for_width = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_preferred_height_for_width)
	}

	if overrides.PreferredWidth != nil {
		pclass.get_preferred_width = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_preferred_width)
	}

	if overrides.PreferredWidthForHeight != nil {
		pclass.get_preferred_width_for_height = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_preferred_width_for_height)
	}

	if overrides.RequestMode != nil {
		pclass.get_request_mode = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_request_mode)
	}

	if overrides.Size != nil {
		pclass.get_size = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_get_size)
	}

	if overrides.Render != nil {
		pclass.render = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_render)
	}

	if overrides.StartEditing != nil {
		pclass.start_editing = (*[0]byte)(C._gotk4_gtk3_CellRendererClass_start_editing)
	}

	if classInitFunc != nil {
		class := (*CellRendererClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRenderer(obj *coreglib.Object) *CellRenderer {
	return &CellRenderer{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
	}
}

func marshalCellRenderer(p uintptr) (interface{}, error) {
	return wrapCellRenderer(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (cell *CellRenderer) baseCellRenderer() *CellRenderer {
	return cell
}

// BaseCellRenderer returns the underlying base object.
func BaseCellRenderer(obj CellRendererer) *CellRenderer {
	return obj.baseCellRenderer()
}

// ConnectEditingCanceled: this signal gets emitted when the user cancels the
// process of editing a cell. For example, an editable cell renderer could be
// written to cancel editing when the user presses Escape.
//
// See also: gtk_cell_renderer_stop_editing().
func (cell *CellRenderer) ConnectEditingCanceled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(cell, "editing-canceled", false, unsafe.Pointer(C._gotk4_gtk3_CellRenderer_ConnectEditingCanceled), f)
}

// ConnectEditingStarted: this signal gets emitted when a cell starts to be
// edited. The intended use of this signal is to do special setup on editable,
// e.g. adding a EntryCompletion or setting up additional columns in a ComboBox.
//
// See gtk_cell_editable_start_editing() for information on the lifecycle of the
// editable and a way to do setup that doesn’t depend on the renderer.
//
// Note that GTK+ doesn't guarantee that cell renderers will continue to use
// the same kind of widget for editing in future releases, therefore you
// should check the type of editable before doing any specific setup, as in the
// following example:
//
//	static void
//	text_editing_started (GtkCellRenderer *cell,
//	                      GtkCellEditable *editable,
//	                      const gchar     *path,
//	                      gpointer         data)
//	{
//	  if (GTK_IS_ENTRY (editable))
//	    {
//	      GtkEntry *entry = GTK_ENTRY (editable);
//
//	      // ... create a GtkEntryCompletion
//
//	      gtk_entry_set_completion (entry, completion);
//	    }
//	}.
func (cell *CellRenderer) ConnectEditingStarted(f func(editable CellEditabler, path string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(cell, "editing-started", false, unsafe.Pointer(C._gotk4_gtk3_CellRenderer_ConnectEditingStarted), f)
}

// Activate passes an activate event to the cell renderer for possible
// processing. Some cell renderers may use events; for example,
// CellRendererToggle toggles when it gets a mouse click.
//
// The function takes the following parameters:
//
//   - event: Event.
//   - widget that received the event.
//   - path: widget-dependent string representation of the event location; e.g.
//     for TreeView, a string representation of TreePath.
//   - backgroundArea: background area as passed to gtk_cell_renderer_render().
//   - cellArea: cell area as passed to gtk_cell_renderer_render().
//   - flags: render flags.
//
// The function returns the following values:
//
//   - ok: TRUE if the event was consumed/handled.
func (cell *CellRenderer) Activate(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) bool {
	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GdkEvent            // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.gchar               // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)

	_cret = C.gtk_cell_renderer_activate(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(event)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(path)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AlignedArea gets the aligned area used by cell inside cell_area. Used for
// finding the appropriate edit and focus rectangle.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - flags: render flags.
//   - cellArea: cell area which would be passed to gtk_cell_renderer_render().
//
// The function returns the following values:
//
//   - alignedArea: return location for the space inside cell_area that would
//     acually be used to render.
func (cell *CellRenderer) AlignedArea(widget Widgetter, flags CellRendererState, cellArea *gdk.Rectangle) *gdk.Rectangle {
	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GtkWidget           // out
	var _arg2 C.GtkCellRendererState // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 C.GdkRectangle         // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkCellRendererState(flags)
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))

	C.gtk_cell_renderer_get_aligned_area(_arg0, _arg1, _arg2, _arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(cellArea)

	var _alignedArea *gdk.Rectangle // out

	_alignedArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))

	return _alignedArea
}

// Alignment fills in xalign and yalign with the appropriate values of cell.
//
// The function returns the following values:
//
//   - xalign (optional): location to fill in with the x alignment of the cell,
//     or NULL.
//   - yalign (optional): location to fill in with the y alignment of the cell,
//     or NULL.
func (cell *CellRenderer) Alignment() (xalign, yalign float32) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gfloat           // in
	var _arg2 C.gfloat           // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_renderer_get_alignment(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(cell)

	var _xalign float32 // out
	var _yalign float32 // out

	_xalign = float32(_arg1)
	_yalign = float32(_arg2)

	return _xalign, _yalign
}

// FixedSize fills in width and height with the appropriate size of cell.
//
// The function returns the following values:
//
//   - width (optional): location to fill in with the fixed width of the cell,
//     or NULL.
//   - height (optional): location to fill in with the fixed height of the cell,
//     or NULL.
func (cell *CellRenderer) FixedSize() (width, height int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gint             // in
	var _arg2 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_renderer_get_fixed_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(cell)

	var _width int  // out
	var _height int // out

	_width = int(_arg1)
	_height = int(_arg2)

	return _width, _height
}

// Padding fills in xpad and ypad with the appropriate values of cell.
//
// The function returns the following values:
//
//   - xpad (optional): location to fill in with the x padding of the cell,
//     or NULL.
//   - ypad (optional): location to fill in with the y padding of the cell,
//     or NULL.
func (cell *CellRenderer) Padding() (xpad, ypad int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gint             // in
	var _arg2 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_cell_renderer_get_padding(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(cell)

	var _xpad int // out
	var _ypad int // out

	_xpad = int(_arg1)
	_ypad = int(_arg2)

	return _xpad, _ypad
}

// PreferredHeight retreives a renderer’s natural size when rendered to widget.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//
// The function returns the following values:
//
//   - minimumSize (optional): location to store the minimum size, or NULL.
//   - naturalSize (optional): location to store the natural size, or NULL.
func (cell *CellRenderer) PreferredHeight(widget Widgetter) (minimumSize, naturalSize int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // in
	var _arg3 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_cell_renderer_get_preferred_height(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)

	var _minimumSize int // out
	var _naturalSize int // out

	_minimumSize = int(_arg2)
	_naturalSize = int(_arg3)

	return _minimumSize, _naturalSize
}

// PreferredHeightForWidth retreives a cell renderers’s minimum and natural
// height if it were rendered to widget with the specified width.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - width: size which is available for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum size, or NULL.
//   - naturalHeight (optional): location for storing the preferred size,
//     or NULL.
func (cell *CellRenderer) PreferredHeightForWidth(widget Widgetter, width int) (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(width)

	C.gtk_cell_renderer_get_preferred_height_for_width(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg3)
	_naturalHeight = int(_arg4)

	return _minimumHeight, _naturalHeight
}

// PreferredSize retrieves the minimum and natural size of a cell taking into
// account the widget’s preference for height-for-width management.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//
// The function returns the following values:
//
//   - minimumSize (optional): location for storing the minimum size, or NULL.
//   - naturalSize (optional): location for storing the natural size, or NULL.
func (cell *CellRenderer) PreferredSize(widget Widgetter) (minimumSize, naturalSize *Requisition) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.GtkRequisition   // in
	var _arg3 C.GtkRequisition   // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_cell_renderer_get_preferred_size(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)

	var _minimumSize *Requisition // out
	var _naturalSize *Requisition // out

	_minimumSize = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	_naturalSize = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))

	return _minimumSize, _naturalSize
}

// PreferredWidth retreives a renderer’s natural size when rendered to widget.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//
// The function returns the following values:
//
//   - minimumSize (optional): location to store the minimum size, or NULL.
//   - naturalSize (optional): location to store the natural size, or NULL.
func (cell *CellRenderer) PreferredWidth(widget Widgetter) (minimumSize, naturalSize int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // in
	var _arg3 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_cell_renderer_get_preferred_width(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)

	var _minimumSize int // out
	var _naturalSize int // out

	_minimumSize = int(_arg2)
	_naturalSize = int(_arg3)

	return _minimumSize, _naturalSize
}

// PreferredWidthForHeight retreives a cell renderers’s minimum and natural
// width if it were rendered to widget with the specified height.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - height: size which is available for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location for storing the minimum size, or NULL.
//   - naturalWidth (optional): location for storing the preferred size,
//     or NULL.
func (cell *CellRenderer) PreferredWidthForHeight(widget Widgetter, height int) (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(height)

	C.gtk_cell_renderer_get_preferred_width_for_height(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg3)
	_naturalWidth = int(_arg4)

	return _minimumWidth, _naturalWidth
}

// RequestMode gets whether the cell renderer prefers a height-for-width layout
// or a width-for-height layout.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by this renderer.
func (cell *CellRenderer) RequestMode() SizeRequestMode {
	var _arg0 *C.GtkCellRenderer   // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_renderer_get_request_mode(_arg0)
	runtime.KeepAlive(cell)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// Sensitive returns the cell renderer’s sensitivity.
//
// The function returns the following values:
//
//   - ok: TRUE if the cell renderer is sensitive.
func (cell *CellRenderer) Sensitive() bool {
	var _arg0 *C.GtkCellRenderer // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_renderer_get_sensitive(_arg0)
	runtime.KeepAlive(cell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Size obtains the width and height needed to render the cell. Used by view
// widgets to determine the appropriate size for the cell_area passed to
// gtk_cell_renderer_render(). If cell_area is not NULL, fills in the x and y
// offsets (if set) of the cell relative to this location.
//
// Please note that the values set in width and height, as well as those in
// x_offset and y_offset are inclusive of the xpad and ypad properties.
//
// Deprecated: Use gtk_cell_renderer_get_preferred_size() instead.
//
// The function takes the following parameters:
//
//   - widget the renderer is rendering to.
//   - cellArea (optional): area a cell will be allocated, or NULL.
//
// The function returns the following values:
//
//   - xOffset (optional): location to return x offset of cell relative to
//     cell_area, or NULL.
//   - yOffset (optional): location to return y offset of cell relative to
//     cell_area, or NULL.
//   - width (optional): location to return width needed to render a cell,
//     or NULL.
//   - height (optional): location to return height needed to render a cell,
//     or NULL.
func (cell *CellRenderer) Size(widget Widgetter, cellArea *gdk.Rectangle) (xOffset, yOffset, width, height int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 *C.GdkRectangle    // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in
	var _arg5 C.gint             // in
	var _arg6 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if cellArea != nil {
		_arg2 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	}

	C.gtk_cell_renderer_get_size(_arg0, _arg1, _arg2, &_arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)

	var _xOffset int // out
	var _yOffset int // out
	var _width int   // out
	var _height int  // out

	_xOffset = int(_arg3)
	_yOffset = int(_arg4)
	_width = int(_arg5)
	_height = int(_arg6)

	return _xOffset, _yOffset, _width, _height
}

// State translates the cell renderer state to StateFlags, based on the cell
// renderer and widget sensitivity, and the given CellRendererState.
//
// The function takes the following parameters:
//
//   - widget (optional) or NULL.
//   - cellState: cell renderer state.
//
// The function returns the following values:
//
//   - stateFlags: widget state flags applying to cell.
func (cell *CellRenderer) State(widget Widgetter, cellState CellRendererState) StateFlags {
	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GtkWidget           // out
	var _arg2 C.GtkCellRendererState // out
	var _cret C.GtkStateFlags        // in

	if cell != nil {
		_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	}
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	_arg2 = C.GtkCellRendererState(cellState)

	_cret = C.gtk_cell_renderer_get_state(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellState)

	var _stateFlags StateFlags // out

	_stateFlags = StateFlags(_cret)

	return _stateFlags
}

// Visible returns the cell renderer’s visibility.
//
// The function returns the following values:
//
//   - ok: TRUE if the cell renderer is visible.
func (cell *CellRenderer) Visible() bool {
	var _arg0 *C.GtkCellRenderer // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_renderer_get_visible(_arg0)
	runtime.KeepAlive(cell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsActivatable checks whether the cell renderer can do something when
// activated.
//
// The function returns the following values:
//
//   - ok: TRUE if the cell renderer can do anything when activated.
func (cell *CellRenderer) IsActivatable() bool {
	var _arg0 *C.GtkCellRenderer // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C.gtk_cell_renderer_is_activatable(_arg0)
	runtime.KeepAlive(cell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Render invokes the virtual render function of the CellRenderer. The three
// passed-in rectangles are areas in cr. Most renderers will draw within
// cell_area; the xalign, yalign, xpad, and ypad fields of the CellRenderer
// should be honored with respect to cell_area. background_area includes the
// blank space around the cell, and also the area containing the tree expander;
// so the background_area rectangles for all cells tile to cover the entire
// window.
//
// The function takes the following parameters:
//
//   - cr: cairo context to draw to.
//   - widget owning window.
//   - backgroundArea: entire cell area (including tree expanders and maybe
//     padding on the sides).
//   - cellArea: area normally rendered by a cell renderer.
//   - flags that affect rendering.
func (cell *CellRenderer) Render(cr *cairo.Context, widget Widgetter, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) {
	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.cairo_t             // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellRendererState // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg5 = C.GtkCellRendererState(flags)

	C.gtk_cell_renderer_render(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
}

// SetAlignment sets the renderer’s alignment within its available space.
//
// The function takes the following parameters:
//
//   - xalign: x alignment of the cell renderer.
//   - yalign: y alignment of the cell renderer.
func (cell *CellRenderer) SetAlignment(xalign, yalign float32) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gfloat           // out
	var _arg2 C.gfloat           // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)

	C.gtk_cell_renderer_set_alignment(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
}

// SetFixedSize sets the renderer size to be explicit, independent of the
// properties set.
//
// The function takes the following parameters:
//
//   - width of the cell renderer, or -1.
//   - height of the cell renderer, or -1.
func (cell *CellRenderer) SetFixedSize(width, height int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gint             // out
	var _arg2 C.gint             // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_cell_renderer_set_fixed_size(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetPadding sets the renderer’s padding.
//
// The function takes the following parameters:
//
//   - xpad: x padding of the cell renderer.
//   - ypad: y padding of the cell renderer.
func (cell *CellRenderer) SetPadding(xpad, ypad int) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gint             // out
	var _arg2 C.gint             // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = C.gint(xpad)
	_arg2 = C.gint(ypad)

	C.gtk_cell_renderer_set_padding(_arg0, _arg1, _arg2)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(xpad)
	runtime.KeepAlive(ypad)
}

// SetSensitive sets the cell renderer’s sensitivity.
//
// The function takes the following parameters:
//
//   - sensitive: sensitivity of the cell.
func (cell *CellRenderer) SetSensitive(sensitive bool) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if sensitive {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_set_sensitive(_arg0, _arg1)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(sensitive)
}

// SetVisible sets the cell renderer’s visibility.
//
// The function takes the following parameters:
//
//   - visible: visibility of the cell.
func (cell *CellRenderer) SetVisible(visible bool) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_set_visible(_arg0, _arg1)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(visible)
}

// StartEditing starts editing the contents of this cell, through a new
// CellEditable widget created by the CellRendererClass.start_editing virtual
// function.
//
// The function takes the following parameters:
//
//   - event (optional): Event.
//   - widget that received the event.
//   - path: widget-dependent string representation of the event location; e.g.
//     for TreeView, a string representation of TreePath.
//   - backgroundArea: background area as passed to gtk_cell_renderer_render().
//   - cellArea: cell area as passed to gtk_cell_renderer_render().
//   - flags: render flags.
//
// The function returns the following values:
//
//   - cellEditable (optional): new CellEditable for editing this cell, or NULL
//     if editing is not possible.
func (cell *CellRenderer) StartEditing(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) *CellEditable {
	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GdkEvent            // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.gchar               // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _cret *C.GtkCellEditable     // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if event != nil {
		_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)

	_cret = C.gtk_cell_renderer_start_editing(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(event)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(path)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _cellEditable *CellEditable // out

	if _cret != nil {
		_cellEditable = wrapCellEditable(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _cellEditable
}

// StopEditing informs the cell renderer that the editing is
// stopped. If canceled is TRUE, the cell renderer will emit the
// CellRenderer::editing-canceled signal.
//
// This function should be called by cell renderer implementations in response
// to the CellEditable::editing-done signal of CellEditable.
//
// The function takes the following parameters:
//
//   - canceled: TRUE if the editing has been canceled.
func (cell *CellRenderer) StopEditing(canceled bool) {
	var _arg0 *C.GtkCellRenderer // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if canceled {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_stop_editing(_arg0, _arg1)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(canceled)
}

// Activate passes an activate event to the cell renderer for possible
// processing. Some cell renderers may use events; for example,
// CellRendererToggle toggles when it gets a mouse click.
//
// The function takes the following parameters:
//
//   - event: Event.
//   - widget that received the event.
//   - path: widget-dependent string representation of the event location; e.g.
//     for TreeView, a string representation of TreePath.
//   - backgroundArea: background area as passed to gtk_cell_renderer_render().
//   - cellArea: cell area as passed to gtk_cell_renderer_render().
//   - flags: render flags.
//
// The function returns the following values:
//
//   - ok: TRUE if the event was consumed/handled.
func (cell *CellRenderer) activate(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) bool {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.activate

	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GdkEvent            // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.gchar               // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)

	_cret = C._gotk4_gtk3_CellRenderer_virtual_activate(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(event)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(path)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// editingCanceled: signal gets emitted when the user cancels the process of
// editing a cell.
func (cell *CellRenderer) editingCanceled() {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.editing_canceled

	var _arg0 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C._gotk4_gtk3_CellRenderer_virtual_editing_canceled(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cell)
}

// editingStarted: signal gets emitted when a cell starts to be edited.
//
// The function takes the following parameters:
//
//   - editable
//   - path
func (cell *CellRenderer) editingStarted(editable CellEditabler, path string) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.editing_started

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkCellEditable // out
	var _arg2 *C.gchar           // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkCellEditable)(unsafe.Pointer(coreglib.InternObject(editable).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg2))

	C._gotk4_gtk3_CellRenderer_virtual_editing_started(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(editable)
	runtime.KeepAlive(path)
}

// alignedArea gets the aligned area used by cell inside cell_area. Used for
// finding the appropriate edit and focus rectangle.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - flags: render flags.
//   - cellArea: cell area which would be passed to gtk_cell_renderer_render().
//
// The function returns the following values:
//
//   - alignedArea: return location for the space inside cell_area that would
//     acually be used to render.
func (cell *CellRenderer) alignedArea(widget Widgetter, flags CellRendererState, cellArea *gdk.Rectangle) *gdk.Rectangle {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_aligned_area

	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GtkWidget           // out
	var _arg2 C.GtkCellRendererState // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 C.GdkRectangle         // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkCellRendererState(flags)
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))

	C._gotk4_gtk3_CellRenderer_virtual_get_aligned_area(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(cellArea)

	var _alignedArea *gdk.Rectangle // out

	_alignedArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))

	return _alignedArea
}

// preferredHeight retreives a renderer’s natural size when rendered to widget.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//
// The function returns the following values:
//
//   - minimumSize (optional): location to store the minimum size, or NULL.
//   - naturalSize (optional): location to store the natural size, or NULL.
func (cell *CellRenderer) preferredHeight(widget Widgetter) (minimumSize, naturalSize int) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_preferred_height

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // in
	var _arg3 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_CellRenderer_virtual_get_preferred_height(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)

	var _minimumSize int // out
	var _naturalSize int // out

	_minimumSize = int(_arg2)
	_naturalSize = int(_arg3)

	return _minimumSize, _naturalSize
}

// preferredHeightForWidth retreives a cell renderers’s minimum and natural
// height if it were rendered to widget with the specified width.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - width: size which is available for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum size, or NULL.
//   - naturalHeight (optional): location for storing the preferred size,
//     or NULL.
func (cell *CellRenderer) preferredHeightForWidth(widget Widgetter, width int) (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_preferred_height_for_width

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(width)

	C._gotk4_gtk3_CellRenderer_virtual_get_preferred_height_for_width(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg3)
	_naturalHeight = int(_arg4)

	return _minimumHeight, _naturalHeight
}

// preferredWidth retreives a renderer’s natural size when rendered to widget.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//
// The function returns the following values:
//
//   - minimumSize (optional): location to store the minimum size, or NULL.
//   - naturalSize (optional): location to store the natural size, or NULL.
func (cell *CellRenderer) preferredWidth(widget Widgetter) (minimumSize, naturalSize int) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_preferred_width

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // in
	var _arg3 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_CellRenderer_virtual_get_preferred_width(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)

	var _minimumSize int // out
	var _naturalSize int // out

	_minimumSize = int(_arg2)
	_naturalSize = int(_arg3)

	return _minimumSize, _naturalSize
}

// preferredWidthForHeight retreives a cell renderers’s minimum and natural
// width if it were rendered to widget with the specified height.
//
// The function takes the following parameters:
//
//   - widget this cell will be rendering to.
//   - height: size which is available for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location for storing the minimum size, or NULL.
//   - naturalWidth (optional): location for storing the preferred size,
//     or NULL.
func (cell *CellRenderer) preferredWidthForHeight(widget Widgetter, height int) (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_preferred_width_for_height

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.gint             // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(height)

	C._gotk4_gtk3_CellRenderer_virtual_get_preferred_width_for_height(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg3)
	_naturalWidth = int(_arg4)

	return _minimumWidth, _naturalWidth
}

// requestMode gets whether the cell renderer prefers a height-for-width layout
// or a width-for-height layout.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by this renderer.
func (cell *CellRenderer) requestMode() SizeRequestMode {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_request_mode

	var _arg0 *C.GtkCellRenderer   // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	_cret = C._gotk4_gtk3_CellRenderer_virtual_get_request_mode(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cell)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// Size obtains the width and height needed to render the cell. Used by view
// widgets to determine the appropriate size for the cell_area passed to
// gtk_cell_renderer_render(). If cell_area is not NULL, fills in the x and y
// offsets (if set) of the cell relative to this location.
//
// Please note that the values set in width and height, as well as those in
// x_offset and y_offset are inclusive of the xpad and ypad properties.
//
// Deprecated: Use gtk_cell_renderer_get_preferred_size() instead.
//
// The function takes the following parameters:
//
//   - widget the renderer is rendering to.
//   - cellArea (optional): area a cell will be allocated, or NULL.
//
// The function returns the following values:
//
//   - xOffset (optional): location to return x offset of cell relative to
//     cell_area, or NULL.
//   - yOffset (optional): location to return y offset of cell relative to
//     cell_area, or NULL.
//   - width (optional): location to return width needed to render a cell,
//     or NULL.
//   - height (optional): location to return height needed to render a cell,
//     or NULL.
func (cell *CellRenderer) size(widget Widgetter, cellArea *gdk.Rectangle) (xOffset, yOffset, width, height int) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.get_size

	var _arg0 *C.GtkCellRenderer // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 *C.GdkRectangle    // out
	var _arg3 C.gint             // in
	var _arg4 C.gint             // in
	var _arg5 C.gint             // in
	var _arg6 C.gint             // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if cellArea != nil {
		_arg2 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	}

	C._gotk4_gtk3_CellRenderer_virtual_get_size(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, &_arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cellArea)

	var _xOffset int // out
	var _yOffset int // out
	var _width int   // out
	var _height int  // out

	_xOffset = int(_arg3)
	_yOffset = int(_arg4)
	_width = int(_arg5)
	_height = int(_arg6)

	return _xOffset, _yOffset, _width, _height
}

// Render invokes the virtual render function of the CellRenderer. The three
// passed-in rectangles are areas in cr. Most renderers will draw within
// cell_area; the xalign, yalign, xpad, and ypad fields of the CellRenderer
// should be honored with respect to cell_area. background_area includes the
// blank space around the cell, and also the area containing the tree expander;
// so the background_area rectangles for all cells tile to cover the entire
// window.
//
// The function takes the following parameters:
//
//   - cr: cairo context to draw to.
//   - widget owning window.
//   - backgroundArea: entire cell area (including tree expanders and maybe
//     padding on the sides).
//   - cellArea: area normally rendered by a cell renderer.
//   - flags that affect rendering.
func (cell *CellRenderer) render(cr *cairo.Context, widget Widgetter, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.render

	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.cairo_t             // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.GdkRectangle        // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 C.GtkCellRendererState // out

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg5 = C.GtkCellRendererState(flags)

	C._gotk4_gtk3_CellRenderer_virtual_render(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)
}

// startEditing starts editing the contents of this cell, through a new
// CellEditable widget created by the CellRendererClass.start_editing virtual
// function.
//
// The function takes the following parameters:
//
//   - event (optional): Event.
//   - widget that received the event.
//   - path: widget-dependent string representation of the event location; e.g.
//     for TreeView, a string representation of TreePath.
//   - backgroundArea: background area as passed to gtk_cell_renderer_render().
//   - cellArea: cell area as passed to gtk_cell_renderer_render().
//   - flags: render flags.
//
// The function returns the following values:
//
//   - cellEditable (optional): new CellEditable for editing this cell, or NULL
//     if editing is not possible.
func (cell *CellRenderer) startEditing(event *gdk.Event, widget Widgetter, path string, backgroundArea, cellArea *gdk.Rectangle, flags CellRendererState) *CellEditable {
	gclass := (*C.GtkCellRendererClass)(coreglib.PeekParentClass(cell))
	fnarg := gclass.start_editing

	var _arg0 *C.GtkCellRenderer     // out
	var _arg1 *C.GdkEvent            // out
	var _arg2 *C.GtkWidget           // out
	var _arg3 *C.gchar               // out
	var _arg4 *C.GdkRectangle        // out
	var _arg5 *C.GdkRectangle        // out
	var _arg6 C.GtkCellRendererState // out
	var _cret *C.GtkCellEditable     // in

	_arg0 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if event != nil {
		_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg3))
	_arg4 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(backgroundArea)))
	_arg5 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	_arg6 = C.GtkCellRendererState(flags)

	_cret = C._gotk4_gtk3_CellRenderer_virtual_start_editing(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(event)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(path)
	runtime.KeepAlive(backgroundArea)
	runtime.KeepAlive(cellArea)
	runtime.KeepAlive(flags)

	var _cellEditable *CellEditable // out

	if _cret != nil {
		_cellEditable = wrapCellEditable(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _cellEditable
}

// CellRendererAccelOverrides contains methods that are overridable.
type CellRendererAccelOverrides struct {
	AccelCleared func(pathString string)
	// The function takes the following parameters:
	//
	//   - pathString
	//   - accelKey
	//   - accelMods
	//   - hardwareKeycode
	AccelEdited func(pathString string, accelKey uint, accelMods gdk.ModifierType, hardwareKeycode uint)
}

func defaultCellRendererAccelOverrides(v *CellRendererAccel) CellRendererAccelOverrides {
	return CellRendererAccelOverrides{
		AccelCleared: v.accelCleared,
		AccelEdited:  v.accelEdited,
	}
}

// CellRendererAccel displays a keyboard accelerator (i.e. a key combination
// like Control + a). If the cell renderer is editable, the accelerator can be
// changed by simply typing the new combination.
//
// The CellRendererAccel cell renderer was added in GTK+ 2.10.
type CellRendererAccel struct {
	_ [0]func() // equal guard
	CellRendererText
}

var (
	_ CellRendererer = (*CellRendererAccel)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererAccel, *CellRendererAccelClass, CellRendererAccelOverrides](
		GTypeCellRendererAccel,
		initCellRendererAccelClass,
		wrapCellRendererAccel,
		defaultCellRendererAccelOverrides,
	)
}

func initCellRendererAccelClass(gclass unsafe.Pointer, overrides CellRendererAccelOverrides, classInitFunc func(*CellRendererAccelClass)) {
	pclass := (*C.GtkCellRendererAccelClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellRendererAccel))))

	if overrides.AccelCleared != nil {
		pclass.accel_cleared = (*[0]byte)(C._gotk4_gtk3_CellRendererAccelClass_accel_cleared)
	}

	if overrides.AccelEdited != nil {
		pclass.accel_edited = (*[0]byte)(C._gotk4_gtk3_CellRendererAccelClass_accel_edited)
	}

	if classInitFunc != nil {
		class := (*CellRendererAccelClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererAccel(obj *coreglib.Object) *CellRendererAccel {
	return &CellRendererAccel{
		CellRendererText: CellRendererText{
			CellRenderer: CellRenderer{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
			},
		},
	}
}

func marshalCellRendererAccel(p uintptr) (interface{}, error) {
	return wrapCellRendererAccel(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectAccelCleared gets emitted when the user has removed the accelerator.
func (v *CellRendererAccel) ConnectAccelCleared(f func(pathString string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "accel-cleared", false, unsafe.Pointer(C._gotk4_gtk3_CellRendererAccel_ConnectAccelCleared), f)
}

// ConnectAccelEdited gets emitted when the user has selected a new accelerator.
func (v *CellRendererAccel) ConnectAccelEdited(f func(pathString string, accelKey uint, accelMods gdk.ModifierType, hardwareKeycode uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "accel-edited", false, unsafe.Pointer(C._gotk4_gtk3_CellRendererAccel_ConnectAccelEdited), f)
}

// NewCellRendererAccel creates a new CellRendererAccel.
//
// The function returns the following values:
//
//   - cellRendererAccel: new cell renderer.
func NewCellRendererAccel() *CellRendererAccel {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_accel_new()

	var _cellRendererAccel *CellRendererAccel // out

	_cellRendererAccel = wrapCellRendererAccel(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererAccel
}

func (accel *CellRendererAccel) accelCleared(pathString string) {
	gclass := (*C.GtkCellRendererAccelClass)(coreglib.PeekParentClass(accel))
	fnarg := gclass.accel_cleared

	var _arg0 *C.GtkCellRendererAccel // out
	var _arg1 *C.gchar                // out

	_arg0 = (*C.GtkCellRendererAccel)(unsafe.Pointer(coreglib.InternObject(accel).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(pathString)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_CellRendererAccel_virtual_accel_cleared(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(accel)
	runtime.KeepAlive(pathString)
}

// The function takes the following parameters:
//
//   - pathString
//   - accelKey
//   - accelMods
//   - hardwareKeycode
func (accel *CellRendererAccel) accelEdited(pathString string, accelKey uint, accelMods gdk.ModifierType, hardwareKeycode uint) {
	gclass := (*C.GtkCellRendererAccelClass)(coreglib.PeekParentClass(accel))
	fnarg := gclass.accel_edited

	var _arg0 *C.GtkCellRendererAccel // out
	var _arg1 *C.gchar                // out
	var _arg2 C.guint                 // out
	var _arg3 C.GdkModifierType       // out
	var _arg4 C.guint                 // out

	_arg0 = (*C.GtkCellRendererAccel)(unsafe.Pointer(coreglib.InternObject(accel).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(pathString)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.guint(accelKey)
	_arg3 = C.GdkModifierType(accelMods)
	_arg4 = C.guint(hardwareKeycode)

	C._gotk4_gtk3_CellRendererAccel_virtual_accel_edited(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(accel)
	runtime.KeepAlive(pathString)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)
	runtime.KeepAlive(hardwareKeycode)
}

// CellRendererComboOverrides contains methods that are overridable.
type CellRendererComboOverrides struct {
}

func defaultCellRendererComboOverrides(v *CellRendererCombo) CellRendererComboOverrides {
	return CellRendererComboOverrides{}
}

// CellRendererCombo renders text in a cell like CellRendererText from which
// it is derived. But while CellRendererText offers a simple entry to edit the
// text, CellRendererCombo offers a ComboBox widget to edit the text. The values
// to display in the combo box are taken from the tree model specified in the
// CellRendererCombo:model property.
//
// The combo cell renderer takes care of adding a text cell renderer
// to the combo box and sets it to display the column specified by its
// CellRendererCombo:text-column property. Further properties of the combo box
// can be set in a handler for the CellRenderer::editing-started signal.
//
// The CellRendererCombo cell renderer was added in GTK+ 2.6.
type CellRendererCombo struct {
	_ [0]func() // equal guard
	CellRendererText
}

var (
	_ CellRendererer = (*CellRendererCombo)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererCombo, *CellRendererComboClass, CellRendererComboOverrides](
		GTypeCellRendererCombo,
		initCellRendererComboClass,
		wrapCellRendererCombo,
		defaultCellRendererComboOverrides,
	)
}

func initCellRendererComboClass(gclass unsafe.Pointer, overrides CellRendererComboOverrides, classInitFunc func(*CellRendererComboClass)) {
	if classInitFunc != nil {
		class := (*CellRendererComboClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererCombo(obj *coreglib.Object) *CellRendererCombo {
	return &CellRendererCombo{
		CellRendererText: CellRendererText{
			CellRenderer: CellRenderer{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
			},
		},
	}
}

func marshalCellRendererCombo(p uintptr) (interface{}, error) {
	return wrapCellRendererCombo(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged: this signal is emitted each time after the user selected an
// item in the combo box, either by using the mouse or the arrow keys. Contrary
// to GtkComboBox, GtkCellRendererCombo::changed is not emitted for changes made
// to a selected item in the entry. The argument new_iter corresponds to the
// newly selected item in the combo box and it is relative to the GtkTreeModel
// set via the model property on GtkCellRendererCombo.
//
// Note that as soon as you change the model displayed in the tree view,
// the tree view will immediately cease the editing operating. This means that
// you most probably want to refrain from changing the model until the combo
// cell renderer emits the edited or editing_canceled signal.
func (v *CellRendererCombo) ConnectChanged(f func(pathString string, newIter *TreeIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "changed", false, unsafe.Pointer(C._gotk4_gtk3_CellRendererCombo_ConnectChanged), f)
}

// NewCellRendererCombo creates a new CellRendererCombo. Adjust how text is
// drawn using object properties. Object properties can be set globally (with
// g_object_set()). Also, with TreeViewColumn, you can bind a property to a
// value in a TreeModel. For example, you can bind the “text” property on the
// cell renderer to a string value in the model, thus rendering a different
// string in each row of the TreeView.
//
// The function returns the following values:
//
//   - cellRendererCombo: new cell renderer.
func NewCellRendererCombo() *CellRendererCombo {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_combo_new()

	var _cellRendererCombo *CellRendererCombo // out

	_cellRendererCombo = wrapCellRendererCombo(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererCombo
}

// CellRendererPixbufOverrides contains methods that are overridable.
type CellRendererPixbufOverrides struct {
}

func defaultCellRendererPixbufOverrides(v *CellRendererPixbuf) CellRendererPixbufOverrides {
	return CellRendererPixbufOverrides{}
}

// CellRendererPixbuf can be used to render an image in a cell. It allows to
// render either a given Pixbuf (set via the CellRendererPixbuf:pixbuf property)
// or a named icon (set via the CellRendererPixbuf:icon-name property).
//
// To support the tree view, CellRendererPixbuf also supports rendering
// two alternative pixbufs, when the CellRenderer:is-expander property
// is TRUE. If the CellRenderer:is-expanded property is TRUE and the
// CellRendererPixbuf:pixbuf-expander-open property is set to a pixbuf,
// it renders that pixbuf, if the CellRenderer:is-expanded property is FALSE and
// the CellRendererPixbuf:pixbuf-expander-closed property is set to a pixbuf,
// it renders that one.
type CellRendererPixbuf struct {
	_ [0]func() // equal guard
	CellRenderer
}

var (
	_ CellRendererer = (*CellRendererPixbuf)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererPixbuf, *CellRendererPixbufClass, CellRendererPixbufOverrides](
		GTypeCellRendererPixbuf,
		initCellRendererPixbufClass,
		wrapCellRendererPixbuf,
		defaultCellRendererPixbufOverrides,
	)
}

func initCellRendererPixbufClass(gclass unsafe.Pointer, overrides CellRendererPixbufOverrides, classInitFunc func(*CellRendererPixbufClass)) {
	if classInitFunc != nil {
		class := (*CellRendererPixbufClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererPixbuf(obj *coreglib.Object) *CellRendererPixbuf {
	return &CellRendererPixbuf{
		CellRenderer: CellRenderer{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
		},
	}
}

func marshalCellRendererPixbuf(p uintptr) (interface{}, error) {
	return wrapCellRendererPixbuf(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellRendererPixbuf creates a new CellRendererPixbuf. Adjust rendering
// parameters using object properties. Object properties can be set globally
// (with g_object_set()). Also, with TreeViewColumn, you can bind a property to
// a value in a TreeModel. For example, you can bind the “pixbuf” property on
// the cell renderer to a pixbuf value in the model, thus rendering a different
// image in each row of the TreeView.
//
// The function returns the following values:
//
//   - cellRendererPixbuf: new cell renderer.
func NewCellRendererPixbuf() *CellRendererPixbuf {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_pixbuf_new()

	var _cellRendererPixbuf *CellRendererPixbuf // out

	_cellRendererPixbuf = wrapCellRendererPixbuf(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererPixbuf
}

// CellRendererProgressOverrides contains methods that are overridable.
type CellRendererProgressOverrides struct {
}

func defaultCellRendererProgressOverrides(v *CellRendererProgress) CellRendererProgressOverrides {
	return CellRendererProgressOverrides{}
}

// CellRendererProgress renders a numeric value as a progress par in a cell.
// Additionally, it can display a text on top of the progress bar.
//
// The CellRendererProgress cell renderer was added in GTK+ 2.6.
type CellRendererProgress struct {
	_ [0]func() // equal guard
	CellRenderer

	Orientable
}

var (
	_ CellRendererer = (*CellRendererProgress)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererProgress, *CellRendererProgressClass, CellRendererProgressOverrides](
		GTypeCellRendererProgress,
		initCellRendererProgressClass,
		wrapCellRendererProgress,
		defaultCellRendererProgressOverrides,
	)
}

func initCellRendererProgressClass(gclass unsafe.Pointer, overrides CellRendererProgressOverrides, classInitFunc func(*CellRendererProgressClass)) {
	if classInitFunc != nil {
		class := (*CellRendererProgressClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererProgress(obj *coreglib.Object) *CellRendererProgress {
	return &CellRendererProgress{
		CellRenderer: CellRenderer{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
		},
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalCellRendererProgress(p uintptr) (interface{}, error) {
	return wrapCellRendererProgress(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellRendererProgress creates a new CellRendererProgress.
//
// The function returns the following values:
//
//   - cellRendererProgress: new cell renderer.
func NewCellRendererProgress() *CellRendererProgress {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_progress_new()

	var _cellRendererProgress *CellRendererProgress // out

	_cellRendererProgress = wrapCellRendererProgress(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererProgress
}

// CellRendererSpinOverrides contains methods that are overridable.
type CellRendererSpinOverrides struct {
}

func defaultCellRendererSpinOverrides(v *CellRendererSpin) CellRendererSpinOverrides {
	return CellRendererSpinOverrides{}
}

// CellRendererSpin renders text in a cell like CellRendererText from which
// it is derived. But while CellRendererText offers a simple entry to edit the
// text, CellRendererSpin offers a SpinButton widget. Of course, that means that
// the text has to be parseable as a floating point number.
//
// The range of the spinbutton is taken from the adjustment property of the
// cell renderer, which can be set explicitly or mapped to a column in the
// tree model, like all properties of cell renders. CellRendererSpin also
// has properties for the CellRendererSpin:climb-rate and the number of
// CellRendererSpin:digits to display. Other SpinButton properties can be set in
// a handler for the CellRenderer::editing-started signal.
//
// The CellRendererSpin cell renderer was added in GTK+ 2.10.
type CellRendererSpin struct {
	_ [0]func() // equal guard
	CellRendererText
}

var (
	_ CellRendererer = (*CellRendererSpin)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererSpin, *CellRendererSpinClass, CellRendererSpinOverrides](
		GTypeCellRendererSpin,
		initCellRendererSpinClass,
		wrapCellRendererSpin,
		defaultCellRendererSpinOverrides,
	)
}

func initCellRendererSpinClass(gclass unsafe.Pointer, overrides CellRendererSpinOverrides, classInitFunc func(*CellRendererSpinClass)) {
	if classInitFunc != nil {
		class := (*CellRendererSpinClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererSpin(obj *coreglib.Object) *CellRendererSpin {
	return &CellRendererSpin{
		CellRendererText: CellRendererText{
			CellRenderer: CellRenderer{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
			},
		},
	}
}

func marshalCellRendererSpin(p uintptr) (interface{}, error) {
	return wrapCellRendererSpin(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellRendererSpin creates a new CellRendererSpin.
//
// The function returns the following values:
//
//   - cellRendererSpin: new CellRendererSpin.
func NewCellRendererSpin() *CellRendererSpin {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_spin_new()

	var _cellRendererSpin *CellRendererSpin // out

	_cellRendererSpin = wrapCellRendererSpin(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererSpin
}

// CellRendererSpinnerOverrides contains methods that are overridable.
type CellRendererSpinnerOverrides struct {
}

func defaultCellRendererSpinnerOverrides(v *CellRendererSpinner) CellRendererSpinnerOverrides {
	return CellRendererSpinnerOverrides{}
}

// CellRendererSpinner renders a spinning animation in a cell, very similar to
// Spinner. It can often be used as an alternative to a CellRendererProgress for
// displaying indefinite activity, instead of actual progress.
//
// To start the animation in a cell, set the CellRendererSpinner:active
// property to TRUE and increment the CellRendererSpinner:pulse property
// at regular intervals. The usual way to set the cell renderer properties
// for each cell is to bind them to columns in your tree model using e.g.
// gtk_tree_view_column_add_attribute().
type CellRendererSpinner struct {
	_ [0]func() // equal guard
	CellRenderer
}

var (
	_ CellRendererer = (*CellRendererSpinner)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererSpinner, *CellRendererSpinnerClass, CellRendererSpinnerOverrides](
		GTypeCellRendererSpinner,
		initCellRendererSpinnerClass,
		wrapCellRendererSpinner,
		defaultCellRendererSpinnerOverrides,
	)
}

func initCellRendererSpinnerClass(gclass unsafe.Pointer, overrides CellRendererSpinnerOverrides, classInitFunc func(*CellRendererSpinnerClass)) {
	if classInitFunc != nil {
		class := (*CellRendererSpinnerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererSpinner(obj *coreglib.Object) *CellRendererSpinner {
	return &CellRendererSpinner{
		CellRenderer: CellRenderer{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
		},
	}
}

func marshalCellRendererSpinner(p uintptr) (interface{}, error) {
	return wrapCellRendererSpinner(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellRendererSpinner returns a new cell renderer which will show a spinner
// to indicate activity.
//
// The function returns the following values:
//
//   - cellRendererSpinner: new CellRenderer.
func NewCellRendererSpinner() *CellRendererSpinner {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_spinner_new()

	var _cellRendererSpinner *CellRendererSpinner // out

	_cellRendererSpinner = wrapCellRendererSpinner(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererSpinner
}

// CellRendererTextOverrides contains methods that are overridable.
type CellRendererTextOverrides struct {
	// The function takes the following parameters:
	//
	//   - path
	//   - newText
	Edited func(path, newText string)
}

func defaultCellRendererTextOverrides(v *CellRendererText) CellRendererTextOverrides {
	return CellRendererTextOverrides{
		Edited: v.edited,
	}
}

// CellRendererText renders a given text in its cell, using the font, color and
// style information provided by its properties. The text will be ellipsized if
// it is too long and the CellRendererText:ellipsize property allows it.
//
// If the CellRenderer:mode is GTK_CELL_RENDERER_MODE_EDITABLE, the
// CellRendererText allows to edit its text using an entry.
type CellRendererText struct {
	_ [0]func() // equal guard
	CellRenderer
}

var (
	_ CellRendererer = (*CellRendererText)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererText, *CellRendererTextClass, CellRendererTextOverrides](
		GTypeCellRendererText,
		initCellRendererTextClass,
		wrapCellRendererText,
		defaultCellRendererTextOverrides,
	)
}

func initCellRendererTextClass(gclass unsafe.Pointer, overrides CellRendererTextOverrides, classInitFunc func(*CellRendererTextClass)) {
	pclass := (*C.GtkCellRendererTextClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellRendererText))))

	if overrides.Edited != nil {
		pclass.edited = (*[0]byte)(C._gotk4_gtk3_CellRendererTextClass_edited)
	}

	if classInitFunc != nil {
		class := (*CellRendererTextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererText(obj *coreglib.Object) *CellRendererText {
	return &CellRendererText{
		CellRenderer: CellRenderer{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
		},
	}
}

func marshalCellRendererText(p uintptr) (interface{}, error) {
	return wrapCellRendererText(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEdited: this signal is emitted after renderer has been edited.
//
// It is the responsibility of the application to update the model and store
// new_text at the position indicated by path.
func (renderer *CellRendererText) ConnectEdited(f func(path, newText string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(renderer, "edited", false, unsafe.Pointer(C._gotk4_gtk3_CellRendererText_ConnectEdited), f)
}

// NewCellRendererText creates a new CellRendererText. Adjust how text is
// drawn using object properties. Object properties can be set globally (with
// g_object_set()). Also, with TreeViewColumn, you can bind a property to a
// value in a TreeModel. For example, you can bind the “text” property on the
// cell renderer to a string value in the model, thus rendering a different
// string in each row of the TreeView.
//
// The function returns the following values:
//
//   - cellRendererText: new cell renderer.
func NewCellRendererText() *CellRendererText {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_text_new()

	var _cellRendererText *CellRendererText // out

	_cellRendererText = wrapCellRendererText(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererText
}

// SetFixedHeightFromFont sets the height of a renderer to explicitly be
// determined by the “font” and “y_pad” property set on it. Further changes in
// these properties do not affect the height, so they must be accompanied by
// a subsequent call to this function. Using this function is unflexible, and
// should really only be used if calculating the size of a cell is too slow (ie,
// a massive number of cells displayed). If number_of_rows is -1, then the fixed
// height is unset, and the height is determined by the properties again.
//
// The function takes the following parameters:
//
//   - numberOfRows: number of rows of text each cell renderer is allocated,
//     or -1.
func (renderer *CellRendererText) SetFixedHeightFromFont(numberOfRows int) {
	var _arg0 *C.GtkCellRendererText // out
	var _arg1 C.gint                 // out

	_arg0 = (*C.GtkCellRendererText)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))
	_arg1 = C.gint(numberOfRows)

	C.gtk_cell_renderer_text_set_fixed_height_from_font(_arg0, _arg1)
	runtime.KeepAlive(renderer)
	runtime.KeepAlive(numberOfRows)
}

// The function takes the following parameters:
//
//   - path
//   - newText
func (cellRendererText *CellRendererText) edited(path, newText string) {
	gclass := (*C.GtkCellRendererTextClass)(coreglib.PeekParentClass(cellRendererText))
	fnarg := gclass.edited

	var _arg0 *C.GtkCellRendererText // out
	var _arg1 *C.gchar               // out
	var _arg2 *C.gchar               // out

	_arg0 = (*C.GtkCellRendererText)(unsafe.Pointer(coreglib.InternObject(cellRendererText).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(newText)))
	defer C.free(unsafe.Pointer(_arg2))

	C._gotk4_gtk3_CellRendererText_virtual_edited(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(cellRendererText)
	runtime.KeepAlive(path)
	runtime.KeepAlive(newText)
}

// CellRendererToggleOverrides contains methods that are overridable.
type CellRendererToggleOverrides struct {
	Toggled func(path string)
}

func defaultCellRendererToggleOverrides(v *CellRendererToggle) CellRendererToggleOverrides {
	return CellRendererToggleOverrides{
		Toggled: v.toggled,
	}
}

// CellRendererToggle renders a toggle button in a cell. The button is drawn as
// a radio or a checkbutton, depending on the CellRendererToggle:radio property.
// When activated, it emits the CellRendererToggle::toggled signal.
type CellRendererToggle struct {
	_ [0]func() // equal guard
	CellRenderer
}

var (
	_ CellRendererer = (*CellRendererToggle)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellRendererToggle, *CellRendererToggleClass, CellRendererToggleOverrides](
		GTypeCellRendererToggle,
		initCellRendererToggleClass,
		wrapCellRendererToggle,
		defaultCellRendererToggleOverrides,
	)
}

func initCellRendererToggleClass(gclass unsafe.Pointer, overrides CellRendererToggleOverrides, classInitFunc func(*CellRendererToggleClass)) {
	pclass := (*C.GtkCellRendererToggleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCellRendererToggle))))

	if overrides.Toggled != nil {
		pclass.toggled = (*[0]byte)(C._gotk4_gtk3_CellRendererToggleClass_toggled)
	}

	if classInitFunc != nil {
		class := (*CellRendererToggleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellRendererToggle(obj *coreglib.Object) *CellRendererToggle {
	return &CellRendererToggle{
		CellRenderer: CellRenderer{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
		},
	}
}

func marshalCellRendererToggle(p uintptr) (interface{}, error) {
	return wrapCellRendererToggle(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectToggled signal is emitted when the cell is toggled.
//
// It is the responsibility of the application to update the model with the
// correct value to store at path. Often this is simply the opposite of the
// value currently stored at path.
func (toggle *CellRendererToggle) ConnectToggled(f func(path string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toggle, "toggled", false, unsafe.Pointer(C._gotk4_gtk3_CellRendererToggle_ConnectToggled), f)
}

// NewCellRendererToggle creates a new CellRendererToggle. Adjust rendering
// parameters using object properties. Object properties can be set globally
// (with g_object_set()). Also, with TreeViewColumn, you can bind a property
// to a value in a TreeModel. For example, you can bind the “active” property
// on the cell renderer to a boolean value in the model, thus causing the check
// button to reflect the state of the model.
//
// The function returns the following values:
//
//   - cellRendererToggle: new cell renderer.
func NewCellRendererToggle() *CellRendererToggle {
	var _cret *C.GtkCellRenderer // in

	_cret = C.gtk_cell_renderer_toggle_new()

	var _cellRendererToggle *CellRendererToggle // out

	_cellRendererToggle = wrapCellRendererToggle(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellRendererToggle
}

// Activatable returns whether the cell renderer is activatable. See
// gtk_cell_renderer_toggle_set_activatable().
//
// The function returns the following values:
//
//   - ok: TRUE if the cell renderer is activatable.
func (toggle *CellRendererToggle) Activatable() bool {
	var _arg0 *C.GtkCellRendererToggle // out
	var _cret C.gboolean               // in

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))

	_cret = C.gtk_cell_renderer_toggle_get_activatable(_arg0)
	runtime.KeepAlive(toggle)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Active returns whether the cell renderer is active. See
// gtk_cell_renderer_toggle_set_active().
//
// The function returns the following values:
//
//   - ok: TRUE if the cell renderer is active.
func (toggle *CellRendererToggle) Active() bool {
	var _arg0 *C.GtkCellRendererToggle // out
	var _cret C.gboolean               // in

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))

	_cret = C.gtk_cell_renderer_toggle_get_active(_arg0)
	runtime.KeepAlive(toggle)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Radio returns whether we’re rendering radio toggles rather than checkboxes.
//
// The function returns the following values:
//
//   - ok: TRUE if we’re rendering radio toggles rather than checkboxes.
func (toggle *CellRendererToggle) Radio() bool {
	var _arg0 *C.GtkCellRendererToggle // out
	var _cret C.gboolean               // in

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))

	_cret = C.gtk_cell_renderer_toggle_get_radio(_arg0)
	runtime.KeepAlive(toggle)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActivatable makes the cell renderer activatable.
//
// The function takes the following parameters:
//
//   - setting: value to set.
func (toggle *CellRendererToggle) SetActivatable(setting bool) {
	var _arg0 *C.GtkCellRendererToggle // out
	var _arg1 C.gboolean               // out

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_toggle_set_activatable(_arg0, _arg1)
	runtime.KeepAlive(toggle)
	runtime.KeepAlive(setting)
}

// SetActive activates or deactivates a cell renderer.
//
// The function takes the following parameters:
//
//   - setting: value to set.
func (toggle *CellRendererToggle) SetActive(setting bool) {
	var _arg0 *C.GtkCellRendererToggle // out
	var _arg1 C.gboolean               // out

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_toggle_set_active(_arg0, _arg1)
	runtime.KeepAlive(toggle)
	runtime.KeepAlive(setting)
}

// SetRadio: if radio is TRUE, the cell renderer renders a radio toggle (i.e.
// a toggle in a group of mutually-exclusive toggles). If FALSE, it renders a
// check toggle (a standalone boolean option). This can be set globally for the
// cell renderer, or changed just before rendering each cell in the model (for
// TreeView, you set up a per-row setting using TreeViewColumn to associate
// model columns with cell renderer properties).
//
// The function takes the following parameters:
//
//   - radio: TRUE to make the toggle look like a radio button.
func (toggle *CellRendererToggle) SetRadio(radio bool) {
	var _arg0 *C.GtkCellRendererToggle // out
	var _arg1 C.gboolean               // out

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(toggle).Native()))
	if radio {
		_arg1 = C.TRUE
	}

	C.gtk_cell_renderer_toggle_set_radio(_arg0, _arg1)
	runtime.KeepAlive(toggle)
	runtime.KeepAlive(radio)
}

func (cellRendererToggle *CellRendererToggle) toggled(path string) {
	gclass := (*C.GtkCellRendererToggleClass)(coreglib.PeekParentClass(cellRendererToggle))
	fnarg := gclass.toggled

	var _arg0 *C.GtkCellRendererToggle // out
	var _arg1 *C.gchar                 // out

	_arg0 = (*C.GtkCellRendererToggle)(unsafe.Pointer(coreglib.InternObject(cellRendererToggle).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_CellRendererToggle_virtual_toggled(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(cellRendererToggle)
	runtime.KeepAlive(path)
}

// CellViewOverrides contains methods that are overridable.
type CellViewOverrides struct {
}

func defaultCellViewOverrides(v *CellView) CellViewOverrides {
	return CellViewOverrides{}
}

// CellView displays a single row of a TreeModel using a CellArea and
// CellAreaContext. A CellAreaContext can be provided to the CellView at
// construction time in order to keep the cellview in context of a group of cell
// views, this ensures that the renderers displayed will be properly aligned
// with eachother (like the aligned cells in the menus of ComboBox).
//
// CellView is Orientable in order to decide in which orientation the underlying
// CellAreaContext should be allocated. Taking the ComboBox menu as an example,
// cellviews should be oriented horizontally if the menus are listed
// top-to-bottom and thus all share the same width but may have separate
// individual heights (left-to-right menus should be allocated vertically since
// they all share the same height but may have variable widths).
//
// # CSS nodes
//
// GtkCellView has a single CSS node with name cellview.
type CellView struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	CellLayout
	Orientable
}

var (
	_ Widgetter         = (*CellView)(nil)
	_ coreglib.Objector = (*CellView)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CellView, *CellViewClass, CellViewOverrides](
		GTypeCellView,
		initCellViewClass,
		wrapCellView,
		defaultCellViewOverrides,
	)
}

func initCellViewClass(gclass unsafe.Pointer, overrides CellViewOverrides, classInitFunc func(*CellViewClass)) {
	if classInitFunc != nil {
		class := (*CellViewClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCellView(obj *coreglib.Object) *CellView {
	return &CellView{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		CellLayout: CellLayout{
			Object: obj,
		},
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalCellView(p uintptr) (interface{}, error) {
	return wrapCellView(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCellView creates a new CellView widget.
//
// The function returns the following values:
//
//   - cellView: newly created CellView widget.
func NewCellView() *CellView {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_cell_view_new()

	var _cellView *CellView // out

	_cellView = wrapCellView(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellView
}

// NewCellViewWithContext creates a new CellView widget with a specific CellArea
// to layout cells and a specific CellAreaContext.
//
// Specifying the same context for a handfull of cells lets the underlying
// area synchronize the geometry for those cells, in this way alignments with
// cellviews for other rows are possible.
//
// The function takes the following parameters:
//
//   - area to layout cells.
//   - context in which to calculate cell geometry.
//
// The function returns the following values:
//
//   - cellView: newly created CellView widget.
func NewCellViewWithContext(area CellAreaer, context *CellAreaContext) *CellView {
	var _arg1 *C.GtkCellArea        // out
	var _arg2 *C.GtkCellAreaContext // out
	var _cret *C.GtkWidget          // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg2 = (*C.GtkCellAreaContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_cell_view_new_with_context(_arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)

	var _cellView *CellView // out

	_cellView = wrapCellView(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellView
}

// NewCellViewWithMarkup creates a new CellView widget, adds a CellRendererText
// to it, and makes it show markup. The text can be marked up with the [Pango
// text markup language][PangoMarkupFormat].
//
// The function takes the following parameters:
//
//   - markup: text to display in the cell view.
//
// The function returns the following values:
//
//   - cellView: newly created CellView widget.
func NewCellViewWithMarkup(markup string) *CellView {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_cell_view_new_with_markup(_arg1)
	runtime.KeepAlive(markup)

	var _cellView *CellView // out

	_cellView = wrapCellView(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellView
}

// NewCellViewWithPixbuf creates a new CellView widget, adds a
// CellRendererPixbuf to it, and makes it show pixbuf.
//
// The function takes the following parameters:
//
//   - pixbuf: image to display in the cell view.
//
// The function returns the following values:
//
//   - cellView: newly created CellView widget.
func NewCellViewWithPixbuf(pixbuf *gdkpixbuf.Pixbuf) *CellView {
	var _arg1 *C.GdkPixbuf // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	_cret = C.gtk_cell_view_new_with_pixbuf(_arg1)
	runtime.KeepAlive(pixbuf)

	var _cellView *CellView // out

	_cellView = wrapCellView(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellView
}

// NewCellViewWithText creates a new CellView widget, adds a CellRendererText to
// it, and makes it show text.
//
// The function takes the following parameters:
//
//   - text to display in the cell view.
//
// The function returns the following values:
//
//   - cellView: newly created CellView widget.
func NewCellViewWithText(text string) *CellView {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_cell_view_new_with_text(_arg1)
	runtime.KeepAlive(text)

	var _cellView *CellView // out

	_cellView = wrapCellView(coreglib.Take(unsafe.Pointer(_cret)))

	return _cellView
}

// DisplayedRow returns a TreePath referring to the currently displayed row.
// If no row is currently displayed, NULL is returned.
//
// The function returns the following values:
//
//   - treePath (optional): currently displayed row or NULL.
func (cellView *CellView) DisplayedRow() *TreePath {
	var _arg0 *C.GtkCellView // out
	var _cret *C.GtkTreePath // in

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))

	_cret = C.gtk_cell_view_get_displayed_row(_arg0)
	runtime.KeepAlive(cellView)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// DrawSensitive gets whether cell_view is configured to draw all of its cells
// in a sensitive state.
//
// The function returns the following values:
//
//   - ok: whether cell_view draws all of its cells in a sensitive state.
func (cellView *CellView) DrawSensitive() bool {
	var _arg0 *C.GtkCellView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))

	_cret = C.gtk_cell_view_get_draw_sensitive(_arg0)
	runtime.KeepAlive(cellView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FitModel gets whether cell_view is configured to request space to fit the
// entire TreeModel.
//
// The function returns the following values:
//
//   - ok: whether cell_view requests space to fit the entire TreeModel.
func (cellView *CellView) FitModel() bool {
	var _arg0 *C.GtkCellView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))

	_cret = C.gtk_cell_view_get_fit_model(_arg0)
	runtime.KeepAlive(cellView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Model returns the model for cell_view. If no model is used NULL is returned.
//
// The function returns the following values:
//
//   - treeModel (optional) used or NULL.
func (cellView *CellView) Model() *TreeModel {
	var _arg0 *C.GtkCellView  // out
	var _cret *C.GtkTreeModel // in

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))

	_cret = C.gtk_cell_view_get_model(_arg0)
	runtime.KeepAlive(cellView)

	var _treeModel *TreeModel // out

	if _cret != nil {
		_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _treeModel
}

// SizeOfRow sets requisition to the size needed by cell_view to display the
// model row pointed to by path.
//
// Deprecated: Combo box formerly used this to calculate the sizes for
// cellviews, now you can achieve this by either using the CellView:fit-model
// property or by setting the currently displayed row of the CellView and using
// gtk_widget_get_preferred_size().
//
// The function takes the following parameters:
//
//   - path: TreePath.
//
// The function returns the following values:
//
//   - requisition: return location for the size.
//   - ok: TRUE.
func (cellView *CellView) SizeOfRow(path *TreePath) (*Requisition, bool) {
	var _arg0 *C.GtkCellView   // out
	var _arg1 *C.GtkTreePath   // out
	var _arg2 C.GtkRequisition // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_cell_view_get_size_of_row(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(path)

	var _requisition *Requisition // out
	var _ok bool                  // out

	_requisition = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _requisition, _ok
}

// SetBackgroundColor sets the background color of view.
//
// Deprecated: Use gtk_cell_view_set_background_rgba() instead.
//
// The function takes the following parameters:
//
//   - color: new background color.
func (cellView *CellView) SetBackgroundColor(color *gdk.Color) {
	var _arg0 *C.GtkCellView // out
	var _arg1 *C.GdkColor    // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_cell_view_set_background_color(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(color)
}

// SetBackgroundRGBA sets the background color of cell_view.
//
// The function takes the following parameters:
//
//   - rgba: new background color.
func (cellView *CellView) SetBackgroundRGBA(rgba *gdk.RGBA) {
	var _arg0 *C.GtkCellView // out
	var _arg1 *C.GdkRGBA     // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(rgba)))

	C.gtk_cell_view_set_background_rgba(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(rgba)
}

// SetDisplayedRow sets the row of the model that is currently displayed by the
// CellView. If the path is unset, then the contents of the cellview “stick” at
// their last value; this is not normally a desired result, but may be a needed
// intermediate state if say, the model for the CellView becomes temporarily
// empty.
//
// The function takes the following parameters:
//
//   - path (optional) or NULL to unset.
func (cellView *CellView) SetDisplayedRow(path *TreePath) {
	var _arg0 *C.GtkCellView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}

	C.gtk_cell_view_set_displayed_row(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(path)
}

// SetDrawSensitive sets whether cell_view should draw all of its cells in a
// sensitive state, this is used by ComboBox menus to ensure that rows with
// insensitive cells that contain children appear sensitive in the parent menu
// item.
//
// The function takes the following parameters:
//
//   - drawSensitive: whether to draw all cells in a sensitive state.
func (cellView *CellView) SetDrawSensitive(drawSensitive bool) {
	var _arg0 *C.GtkCellView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	if drawSensitive {
		_arg1 = C.TRUE
	}

	C.gtk_cell_view_set_draw_sensitive(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(drawSensitive)
}

// SetFitModel sets whether cell_view should request space to fit the entire
// TreeModel.
//
// This is used by ComboBox to ensure that the cell view displayed on the combo
// box’s button always gets enough space and does not resize when selection
// changes.
//
// The function takes the following parameters:
//
//   - fitModel: whether cell_view should request space for the whole model.
func (cellView *CellView) SetFitModel(fitModel bool) {
	var _arg0 *C.GtkCellView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	if fitModel {
		_arg1 = C.TRUE
	}

	C.gtk_cell_view_set_fit_model(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(fitModel)
}

// SetModel sets the model for cell_view. If cell_view already has a model set,
// it will remove it before setting the new model. If model is NULL, then it
// will unset the old model.
//
// The function takes the following parameters:
//
//   - model (optional): TreeModel.
func (cellView *CellView) SetModel(model TreeModeller) {
	var _arg0 *C.GtkCellView  // out
	var _arg1 *C.GtkTreeModel // out

	_arg0 = (*C.GtkCellView)(unsafe.Pointer(coreglib.InternObject(cellView).Native()))
	if model != nil {
		_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}

	C.gtk_cell_view_set_model(_arg0, _arg1)
	runtime.KeepAlive(cellView)
	runtime.KeepAlive(model)
}

// CheckButtonOverrides contains methods that are overridable.
type CheckButtonOverrides struct {
	DrawIndicator func(cr *cairo.Context)
}

func defaultCheckButtonOverrides(v *CheckButton) CheckButtonOverrides {
	return CheckButtonOverrides{
		DrawIndicator: v.drawIndicator,
	}
}

// CheckButton places a discrete ToggleButton next to a widget, (usually a
// Label). See the section on ToggleButton widgets for more information about
// toggle/check buttons.
//
// The important signal ( ToggleButton::toggled ) is also inherited from
// ToggleButton.
//
// CSS nodes
//
//	button.check
//	├── check
//	╰── <child>
//
// A GtkCheckButton without indicator changes the name of its main node to
// button and adds a .check style class to it. The subnode is invisible in this
// case.
type CheckButton struct {
	_ [0]func() // equal guard
	ToggleButton
}

var (
	_ Binner            = (*CheckButton)(nil)
	_ coreglib.Objector = (*CheckButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CheckButton, *CheckButtonClass, CheckButtonOverrides](
		GTypeCheckButton,
		initCheckButtonClass,
		wrapCheckButton,
		defaultCheckButtonOverrides,
	)
}

func initCheckButtonClass(gclass unsafe.Pointer, overrides CheckButtonOverrides, classInitFunc func(*CheckButtonClass)) {
	pclass := (*C.GtkCheckButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCheckButton))))

	if overrides.DrawIndicator != nil {
		pclass.draw_indicator = (*[0]byte)(C._gotk4_gtk3_CheckButtonClass_draw_indicator)
	}

	if classInitFunc != nil {
		class := (*CheckButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCheckButton(obj *coreglib.Object) *CheckButton {
	return &CheckButton{
		ToggleButton: ToggleButton{
			Button: Button{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Actionable: Actionable{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Activatable: Activatable{
					Object: obj,
				},
			},
		},
	}
}

func marshalCheckButton(p uintptr) (interface{}, error) {
	return wrapCheckButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewCheckButton creates a new CheckButton.
//
// The function returns the following values:
//
//   - checkButton: Widget.
func NewCheckButton() *CheckButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_check_button_new()

	var _checkButton *CheckButton // out

	_checkButton = wrapCheckButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkButton
}

// NewCheckButtonWithLabel creates a new CheckButton with a Label to the right
// of it.
//
// The function takes the following parameters:
//
//   - label: text for the check button.
//
// The function returns the following values:
//
//   - checkButton: Widget.
func NewCheckButtonWithLabel(label string) *CheckButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_check_button_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _checkButton *CheckButton // out

	_checkButton = wrapCheckButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkButton
}

// NewCheckButtonWithMnemonic creates a new CheckButton containing a label.
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the check button.
//
// The function takes the following parameters:
//
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - checkButton: new CheckButton.
func NewCheckButtonWithMnemonic(label string) *CheckButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_check_button_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _checkButton *CheckButton // out

	_checkButton = wrapCheckButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkButton
}

func (checkButton *CheckButton) drawIndicator(cr *cairo.Context) {
	gclass := (*C.GtkCheckButtonClass)(coreglib.PeekParentClass(checkButton))
	fnarg := gclass.draw_indicator

	var _arg0 *C.GtkCheckButton // out
	var _arg1 *C.cairo_t        // out

	_arg0 = (*C.GtkCheckButton)(unsafe.Pointer(coreglib.InternObject(checkButton).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	C._gotk4_gtk3_CheckButton_virtual_draw_indicator(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(checkButton)
	runtime.KeepAlive(cr)
}

// CheckMenuItemOverrides contains methods that are overridable.
type CheckMenuItemOverrides struct {
	// DrawIndicator: called to draw the check indicator.
	DrawIndicator func(cr *cairo.Context)
	// Toggled emits the CheckMenuItem::toggled signal.
	Toggled func()
}

func defaultCheckMenuItemOverrides(v *CheckMenuItem) CheckMenuItemOverrides {
	return CheckMenuItemOverrides{
		DrawIndicator: v.drawIndicator,
		Toggled:       v.toggled,
	}
}

// CheckMenuItem is a menu item that maintains the state of a boolean value in
// addition to a MenuItem usual role in activating application code.
//
// A check box indicating the state of the boolean value is displayed at the
// left side of the MenuItem. Activating the MenuItem toggles the value.
//
// CSS nodes
//
//	menuitem
//	├── check.left
//	╰── <child>
//
// GtkCheckMenuItem has a main CSS node with name menuitem, and a subnode with
// name check, which gets the .left or .right style class.
type CheckMenuItem struct {
	_ [0]func() // equal guard
	MenuItem
}

var (
	_ Binner            = (*CheckMenuItem)(nil)
	_ coreglib.Objector = (*CheckMenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CheckMenuItem, *CheckMenuItemClass, CheckMenuItemOverrides](
		GTypeCheckMenuItem,
		initCheckMenuItemClass,
		wrapCheckMenuItem,
		defaultCheckMenuItemOverrides,
	)
}

func initCheckMenuItemClass(gclass unsafe.Pointer, overrides CheckMenuItemOverrides, classInitFunc func(*CheckMenuItemClass)) {
	pclass := (*C.GtkCheckMenuItemClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCheckMenuItem))))

	if overrides.DrawIndicator != nil {
		pclass.draw_indicator = (*[0]byte)(C._gotk4_gtk3_CheckMenuItemClass_draw_indicator)
	}

	if overrides.Toggled != nil {
		pclass.toggled = (*[0]byte)(C._gotk4_gtk3_CheckMenuItemClass_toggled)
	}

	if classInitFunc != nil {
		class := (*CheckMenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCheckMenuItem(obj *coreglib.Object) *CheckMenuItem {
	return &CheckMenuItem{
		MenuItem: MenuItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalCheckMenuItem(p uintptr) (interface{}, error) {
	return wrapCheckMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectToggled: this signal is emitted when the state of the check box is
// changed.
//
// A signal handler can use gtk_check_menu_item_get_active() to discover the new
// state.
func (checkMenuItem *CheckMenuItem) ConnectToggled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(checkMenuItem, "toggled", false, unsafe.Pointer(C._gotk4_gtk3_CheckMenuItem_ConnectToggled), f)
}

// NewCheckMenuItem creates a new CheckMenuItem.
//
// The function returns the following values:
//
//   - checkMenuItem: new CheckMenuItem.
func NewCheckMenuItem() *CheckMenuItem {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_check_menu_item_new()

	var _checkMenuItem *CheckMenuItem // out

	_checkMenuItem = wrapCheckMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkMenuItem
}

// NewCheckMenuItemWithLabel creates a new CheckMenuItem with a label.
//
// The function takes the following parameters:
//
//   - label: string to use for the label.
//
// The function returns the following values:
//
//   - checkMenuItem: new CheckMenuItem.
func NewCheckMenuItemWithLabel(label string) *CheckMenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_check_menu_item_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _checkMenuItem *CheckMenuItem // out

	_checkMenuItem = wrapCheckMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkMenuItem
}

// NewCheckMenuItemWithMnemonic creates a new CheckMenuItem containing a label.
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the menu item.
//
// The function takes the following parameters:
//
//   - label: text of the button, with an underscore in front of the character.
//
// The function returns the following values:
//
//   - checkMenuItem: new CheckMenuItem.
func NewCheckMenuItemWithMnemonic(label string) *CheckMenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_check_menu_item_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _checkMenuItem *CheckMenuItem // out

	_checkMenuItem = wrapCheckMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _checkMenuItem
}

// Active returns whether the check menu item is active. See
// gtk_check_menu_item_set_active ().
//
// The function returns the following values:
//
//   - ok: TRUE if the menu item is checked.
func (checkMenuItem *CheckMenuItem) Active() bool {
	var _arg0 *C.GtkCheckMenuItem // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))

	_cret = C.gtk_check_menu_item_get_active(_arg0)
	runtime.KeepAlive(checkMenuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DrawAsRadio returns whether check_menu_item looks like a RadioMenuItem.
//
// The function returns the following values:
//
//   - ok: whether check_menu_item looks like a RadioMenuItem.
func (checkMenuItem *CheckMenuItem) DrawAsRadio() bool {
	var _arg0 *C.GtkCheckMenuItem // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))

	_cret = C.gtk_check_menu_item_get_draw_as_radio(_arg0)
	runtime.KeepAlive(checkMenuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Inconsistent retrieves the value set by
// gtk_check_menu_item_set_inconsistent().
//
// The function returns the following values:
//
//   - ok: TRUE if inconsistent.
func (checkMenuItem *CheckMenuItem) Inconsistent() bool {
	var _arg0 *C.GtkCheckMenuItem // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))

	_cret = C.gtk_check_menu_item_get_inconsistent(_arg0)
	runtime.KeepAlive(checkMenuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActive sets the active state of the menu item’s check box.
//
// The function takes the following parameters:
//
//   - isActive: boolean value indicating whether the check box is active.
func (checkMenuItem *CheckMenuItem) SetActive(isActive bool) {
	var _arg0 *C.GtkCheckMenuItem // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))
	if isActive {
		_arg1 = C.TRUE
	}

	C.gtk_check_menu_item_set_active(_arg0, _arg1)
	runtime.KeepAlive(checkMenuItem)
	runtime.KeepAlive(isActive)
}

// SetDrawAsRadio sets whether check_menu_item is drawn like a RadioMenuItem.
//
// The function takes the following parameters:
//
//   - drawAsRadio: whether check_menu_item is drawn like a RadioMenuItem.
func (checkMenuItem *CheckMenuItem) SetDrawAsRadio(drawAsRadio bool) {
	var _arg0 *C.GtkCheckMenuItem // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))
	if drawAsRadio {
		_arg1 = C.TRUE
	}

	C.gtk_check_menu_item_set_draw_as_radio(_arg0, _arg1)
	runtime.KeepAlive(checkMenuItem)
	runtime.KeepAlive(drawAsRadio)
}

// SetInconsistent: if the user has selected a range of elements (such as
// some text or spreadsheet cells) that are affected by a boolean setting,
// and the current values in that range are inconsistent, you may want to
// display the check in an “in between” state. This function turns on “in
// between” display. Normally you would turn off the inconsistent state again
// if the user explicitly selects a setting. This has to be done manually,
// gtk_check_menu_item_set_inconsistent() only affects visual appearance,
// it doesn’t affect the semantics of the widget.
//
// The function takes the following parameters:
//
//   - setting: TRUE to display an “inconsistent” third state check.
func (checkMenuItem *CheckMenuItem) SetInconsistent(setting bool) {
	var _arg0 *C.GtkCheckMenuItem // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_check_menu_item_set_inconsistent(_arg0, _arg1)
	runtime.KeepAlive(checkMenuItem)
	runtime.KeepAlive(setting)
}

// Toggled emits the CheckMenuItem::toggled signal.
func (checkMenuItem *CheckMenuItem) Toggled() {
	var _arg0 *C.GtkCheckMenuItem // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))

	C.gtk_check_menu_item_toggled(_arg0)
	runtime.KeepAlive(checkMenuItem)
}

// drawIndicator: called to draw the check indicator.
func (checkMenuItem *CheckMenuItem) drawIndicator(cr *cairo.Context) {
	gclass := (*C.GtkCheckMenuItemClass)(coreglib.PeekParentClass(checkMenuItem))
	fnarg := gclass.draw_indicator

	var _arg0 *C.GtkCheckMenuItem // out
	var _arg1 *C.cairo_t          // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	C._gotk4_gtk3_CheckMenuItem_virtual_draw_indicator(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(checkMenuItem)
	runtime.KeepAlive(cr)
}

// Toggled emits the CheckMenuItem::toggled signal.
func (checkMenuItem *CheckMenuItem) toggled() {
	gclass := (*C.GtkCheckMenuItemClass)(coreglib.PeekParentClass(checkMenuItem))
	fnarg := gclass.toggled

	var _arg0 *C.GtkCheckMenuItem // out

	_arg0 = (*C.GtkCheckMenuItem)(unsafe.Pointer(coreglib.InternObject(checkMenuItem).Native()))

	C._gotk4_gtk3_CheckMenuItem_virtual_toggled(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(checkMenuItem)
}

// CheckMenuItemAccessibleOverrides contains methods that are overridable.
type CheckMenuItemAccessibleOverrides struct {
}

func defaultCheckMenuItemAccessibleOverrides(v *CheckMenuItemAccessible) CheckMenuItemAccessibleOverrides {
	return CheckMenuItemAccessibleOverrides{}
}

type CheckMenuItemAccessible struct {
	_ [0]func() // equal guard
	MenuItemAccessible
}

var (
	_ coreglib.Objector = (*CheckMenuItemAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CheckMenuItemAccessible, *CheckMenuItemAccessibleClass, CheckMenuItemAccessibleOverrides](
		GTypeCheckMenuItemAccessible,
		initCheckMenuItemAccessibleClass,
		wrapCheckMenuItemAccessible,
		defaultCheckMenuItemAccessibleOverrides,
	)
}

func initCheckMenuItemAccessibleClass(gclass unsafe.Pointer, overrides CheckMenuItemAccessibleOverrides, classInitFunc func(*CheckMenuItemAccessibleClass)) {
	if classInitFunc != nil {
		class := (*CheckMenuItemAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCheckMenuItemAccessible(obj *coreglib.Object) *CheckMenuItemAccessible {
	return &CheckMenuItemAccessible{
		MenuItemAccessible: MenuItemAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			Selection: atk.Selection{
				Object: obj,
			},
		},
	}
}

func marshalCheckMenuItemAccessible(p uintptr) (interface{}, error) {
	return wrapCheckMenuItemAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Clipboard object represents a clipboard of data shared between different
// processes or between different widgets in the same process. Each clipboard is
// identified by a name encoded as a Atom. (Conversion to and from strings can
// be done with gdk_atom_intern() and gdk_atom_name().) The default clipboard
// corresponds to the “CLIPBOARD” atom; another commonly used clipboard is
// the “PRIMARY” clipboard, which, in X, traditionally contains the currently
// selected text.
//
// To support having a number of different formats on the clipboard at the
// same time, the clipboard mechanism allows providing callbacks instead of
// the actual data. When you set the contents of the clipboard, you can either
// supply the data directly (via functions like gtk_clipboard_set_text()),
// or you can supply a callback to be called at a later time when the data is
// needed (via gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().)
// Providing a callback also avoids having to make copies of the data when it is
// not needed.
//
// gtk_clipboard_set_with_data() and gtk_clipboard_set_with_owner() are
// quite similar; the choice between the two depends mostly on which is more
// convenient in a particular situation. The former is most useful when you
// want to have a blob of data with callbacks to convert it into the various
// data types that you advertise. When the clear_func you provided is called,
// you simply free the data blob. The latter is more useful when the contents
// of clipboard reflect the internal state of a #GObject (As an example,
// for the PRIMARY clipboard, when an entry widget provides the clipboard’s
// contents the contents are simply the text within the selected region.) If the
// contents change, the entry widget can call gtk_clipboard_set_with_owner() to
// update the timestamp for clipboard ownership, without having to worry about
// clear_func being called.
//
// Requesting the data from the clipboard is essentially asynchronous. If the
// contents of the clipboard are provided within the same process, then a direct
// function call will be made to retrieve the data, but if they are provided by
// another process, then the data needs to be retrieved from the other process,
// which may take some time. To avoid blocking the user interface, the call to
// request the selection, gtk_clipboard_request_contents() takes a callback that
// will be called when the contents are received (or when the request fails.)
// If you don’t want to deal with providing a separate callback, you can also
// use gtk_clipboard_wait_for_contents(). What this does is run the GLib main
// loop recursively waiting for the contents. This can simplify the code flow,
// but you still have to be aware that other callbacks in your program can be
// called while this recursive mainloop is running.
//
// Along with the functions to get the clipboard contents as an
// arbitrary data chunk, there are also functions to retrieve it as text,
// gtk_clipboard_request_text() and gtk_clipboard_wait_for_text(). These
// functions take care of determining which formats are advertised by the
// clipboard provider, asking for the clipboard in the best available format
// and converting the results into the UTF-8 encoding. (The standard form for
// representing strings in GTK+.).
type Clipboard struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Clipboard)(nil)
)

func wrapClipboard(obj *coreglib.Object) *Clipboard {
	return &Clipboard{
		Object: obj,
	}
}

func marshalClipboard(p uintptr) (interface{}, error) {
	return wrapClipboard(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectOwnerChange signal is emitted when GTK+ receives an event that
// indicates that the ownership of the selection associated with clipboard has
// changed.
func (clipboard *Clipboard) ConnectOwnerChange(f func(event *gdk.EventOwnerChange)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(clipboard, "owner-change", false, unsafe.Pointer(C._gotk4_gtk3_Clipboard_ConnectOwnerChange), f)
}

// Clear clears the contents of the clipboard. Generally this should only
// be called between the time you call gtk_clipboard_set_with_owner() or
// gtk_clipboard_set_with_data(), and when the clear_func you supplied is
// called. Otherwise, the clipboard may be owned by someone else.
func (clipboard *Clipboard) Clear() {
	var _arg0 *C.GtkClipboard // out

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C.gtk_clipboard_clear(_arg0)
	runtime.KeepAlive(clipboard)
}

// Display gets the Display associated with clipboard.
//
// The function returns the following values:
//
//   - display associated with clipboard.
func (clipboard *Clipboard) Display() *gdk.Display {
	var _arg0 *C.GtkClipboard // out
	var _cret *C.GdkDisplay   // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_get_display(_arg0)
	runtime.KeepAlive(clipboard)

	var _display *gdk.Display // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_display = &gdk.Display{
			Object: obj,
		}
	}

	return _display
}

// Owner: if the clipboard contents callbacks were set with
// gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
// gtk_clipboard_clear() has not subsequently called, returns the owner set by
// gtk_clipboard_set_with_owner().
//
// The function returns the following values:
//
//   - object (optional): owner of the clipboard, if any; otherwise NULL.
func (clipboard *Clipboard) Owner() *coreglib.Object {
	var _arg0 *C.GtkClipboard // out
	var _cret *C.GObject      // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_get_owner(_arg0)
	runtime.KeepAlive(clipboard)

	var _object *coreglib.Object // out

	if _cret != nil {
		_object = coreglib.Take(unsafe.Pointer(_cret))
	}

	return _object
}

// RequestImage requests the contents of the clipboard as image. When the image
// is later received, it will be converted to a Pixbuf, and callback will be
// called.
//
// The pixbuf parameter to callback will contain the resulting Pixbuf if the
// request succeeded, or NULL if it failed. This could happen for various
// reasons, in particular if the clipboard was empty or if the contents of the
// clipboard could not be converted into an image.
//
// The function takes the following parameters:
//
//   - callback: function to call when the image is received, or the retrieval
//     fails. (It will always be called one way or the other.).
func (clipboard *Clipboard) RequestImage(callback ClipboardImageReceivedFunc) {
	var _arg0 *C.GtkClipboard                 // out
	var _arg1 C.GtkClipboardImageReceivedFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_ClipboardImageReceivedFunc)
	_arg2 = C.gpointer(gbox.AssignOnce(callback))

	C.gtk_clipboard_request_image(_arg0, _arg1, _arg2)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(callback)
}

// RequestText requests the contents of the clipboard as text. When the text is
// later received, it will be converted to UTF-8 if necessary, and callback will
// be called.
//
// The text parameter to callback will contain the resulting text if the request
// succeeded, or NULL if it failed. This could happen for various reasons,
// in particular if the clipboard was empty or if the contents of the clipboard
// could not be converted into text form.
//
// The function takes the following parameters:
//
//   - callback: function to call when the text is received, or the retrieval
//     fails. (It will always be called one way or the other.).
func (clipboard *Clipboard) RequestText(callback ClipboardTextReceivedFunc) {
	var _arg0 *C.GtkClipboard                // out
	var _arg1 C.GtkClipboardTextReceivedFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_ClipboardTextReceivedFunc)
	_arg2 = C.gpointer(gbox.AssignOnce(callback))

	C.gtk_clipboard_request_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(callback)
}

// RequestURIs requests the contents of the clipboard as URIs. When the URIs are
// later received callback will be called.
//
// The uris parameter to callback will contain the resulting array of URIs if
// the request succeeded, or NULL if it failed. This could happen for various
// reasons, in particular if the clipboard was empty or if the contents of the
// clipboard could not be converted into URI form.
//
// The function takes the following parameters:
//
//   - callback: function to call when the URIs are received, or the retrieval
//     fails. (It will always be called one way or the other.).
func (clipboard *Clipboard) RequestURIs(callback ClipboardURIReceivedFunc) {
	var _arg0 *C.GtkClipboard               // out
	var _arg1 C.GtkClipboardURIReceivedFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_ClipboardURIReceivedFunc)
	_arg2 = C.gpointer(gbox.AssignOnce(callback))

	C.gtk_clipboard_request_uris(_arg0, _arg1, _arg2)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(callback)
}

// SetCanStore hints that the clipboard data should be stored somewhere when the
// application exits or when gtk_clipboard_store () is called.
//
// This value is reset when the clipboard owner changes. Where the clipboard
// data is stored is platform dependent, see gdk_display_store_clipboard () for
// more information.
//
// The function takes the following parameters:
//
//   - targets (optional): array containing information about which forms should
//     be stored or NULL to indicate that all forms should be stored.
func (clipboard *Clipboard) SetCanStore(targets []TargetEntry) {
	var _arg0 *C.GtkClipboard   // out
	var _arg1 *C.GtkTargetEntry // out
	var _arg2 C.gint

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg2 = (C.gint)(len(targets))
	_arg1 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg1), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}

	C.gtk_clipboard_set_can_store(_arg0, _arg1, _arg2)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(targets)
}

// SetImage sets the contents of the clipboard to the given Pixbuf. GTK+ will
// take responsibility for responding for requests for the image, and for
// converting the image into the requested format.
//
// The function takes the following parameters:
//
//   - pixbuf: Pixbuf.
func (clipboard *Clipboard) SetImage(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkClipboard // out
	var _arg1 *C.GdkPixbuf    // out

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C.gtk_clipboard_set_image(_arg0, _arg1)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(pixbuf)
}

// SetText sets the contents of the clipboard to the given UTF-8 string.
// GTK+ will make a copy of the text and take responsibility for responding for
// requests for the text, and for converting the text into the requested format.
//
// The function takes the following parameters:
//
//   - text: UTF-8 string.
func (clipboard *Clipboard) SetText(text string) {
	var _arg0 *C.GtkClipboard // out
	var _arg1 *C.gchar        // out
	var _arg2 C.gint

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_clipboard_set_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(text)
}

// Store stores the current clipboard data somewhere so that it will stay around
// after the application has quit.
func (clipboard *Clipboard) Store() {
	var _arg0 *C.GtkClipboard // out

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C.gtk_clipboard_store(_arg0)
	runtime.KeepAlive(clipboard)
}

// WaitForImage requests the contents of the clipboard as image and converts the
// result to a Pixbuf. This function waits for the data to be received using the
// main loop, so events, timeouts, etc, may be dispatched during the wait.
//
// The function returns the following values:
//
//   - pixbuf (optional): newly-allocated Pixbuf object which must be disposed
//     with g_object_unref(), or NULL if retrieving the selection data failed.
//     (This could happen for various reasons, in particular if the clipboard
//     was empty or if the contents of the clipboard could not be converted into
//     an image.).
func (clipboard *Clipboard) WaitForImage() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkClipboard // out
	var _cret *C.GdkPixbuf    // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_for_image(_arg0)
	runtime.KeepAlive(clipboard)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// WaitForText requests the contents of the clipboard as text and converts the
// result to UTF-8 if necessary. This function waits for the data to be received
// using the main loop, so events, timeouts, etc, may be dispatched during the
// wait.
//
// The function returns the following values:
//
//   - utf8 (optional): newly-allocated UTF-8 string which must be freed with
//     g_free(), or NULL if retrieving the selection data failed. (This could
//     happen for various reasons, in particular if the clipboard was empty or
//     if the contents of the clipboard could not be converted into text form.).
func (clipboard *Clipboard) WaitForText() string {
	var _arg0 *C.GtkClipboard // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_for_text(_arg0)
	runtime.KeepAlive(clipboard)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// WaitForURIs requests the contents of the clipboard as URIs. This function
// waits for the data to be received using the main loop, so events, timeouts,
// etc, may be dispatched during the wait.
//
// The function returns the following values:
//
//   - utf8s (optional): a newly-allocated NULL-terminated array of strings
//     which must be freed with g_strfreev(), or NULL if retrieving the
//     selection data failed. (This could happen for various reasons, in
//     particular if the clipboard was empty or if the contents of the clipboard
//     could not be converted into URI form.).
func (clipboard *Clipboard) WaitForURIs() []string {
	var _arg0 *C.GtkClipboard // out
	var _cret **C.gchar       // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_for_uris(_arg0)
	runtime.KeepAlive(clipboard)

	var _utf8s []string // out

	if _cret != nil {
		defer C.free(unsafe.Pointer(_cret))
		{
			var i int
			var z *C.gchar
			for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
				i++
			}

			src := unsafe.Slice(_cret, i)
			_utf8s = make([]string, i)
			for i := range src {
				_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
				defer C.free(unsafe.Pointer(src[i]))
			}
		}
	}

	return _utf8s
}

// WaitIsImageAvailable: test to see if there is an image available to be pasted
// This is done by requesting the TARGETS atom and checking if it contains
// any of the supported image targets. This function waits for the data to be
// received using the main loop, so events, timeouts, etc, may be dispatched
// during the wait.
//
// This function is a little faster than calling gtk_clipboard_wait_for_image()
// since it doesn’t need to retrieve the actual image data.
//
// The function returns the following values:
//
//   - ok: TRUE is there is an image available, FALSE otherwise.
func (clipboard *Clipboard) WaitIsImageAvailable() bool {
	var _arg0 *C.GtkClipboard // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_is_image_available(_arg0)
	runtime.KeepAlive(clipboard)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WaitIsRichTextAvailable: test to see if there is rich text available to
// be pasted This is done by requesting the TARGETS atom and checking if it
// contains any of the supported rich text targets. This function waits for
// the data to be received using the main loop, so events, timeouts, etc,
// may be dispatched during the wait.
//
// This function is a little faster than calling
// gtk_clipboard_wait_for_rich_text() since it doesn’t need to retrieve the
// actual text.
//
// The function takes the following parameters:
//
//   - buffer: TextBuffer.
//
// The function returns the following values:
//
//   - ok: TRUE is there is rich text available, FALSE otherwise.
func (clipboard *Clipboard) WaitIsRichTextAvailable(buffer *TextBuffer) bool {
	var _arg0 *C.GtkClipboard  // out
	var _arg1 *C.GtkTextBuffer // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	_arg1 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_clipboard_wait_is_rich_text_available(_arg0, _arg1)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(buffer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WaitIsTextAvailable: test to see if there is text available to be pasted This
// is done by requesting the TARGETS atom and checking if it contains any of the
// supported text targets. This function waits for the data to be received using
// the main loop, so events, timeouts, etc, may be dispatched during the wait.
//
// This function is a little faster than calling gtk_clipboard_wait_for_text()
// since it doesn’t need to retrieve the actual text.
//
// The function returns the following values:
//
//   - ok: TRUE is there is text available, FALSE otherwise.
func (clipboard *Clipboard) WaitIsTextAvailable() bool {
	var _arg0 *C.GtkClipboard // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_is_text_available(_arg0)
	runtime.KeepAlive(clipboard)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WaitIsURIsAvailable: test to see if there is a list of URIs available to
// be pasted This is done by requesting the TARGETS atom and checking if it
// contains the URI targets. This function waits for the data to be received
// using the main loop, so events, timeouts, etc, may be dispatched during the
// wait.
//
// This function is a little faster than calling gtk_clipboard_wait_for_uris()
// since it doesn’t need to retrieve the actual URI data.
//
// The function returns the following values:
//
//   - ok: TRUE is there is an URI list available, FALSE otherwise.
func (clipboard *Clipboard) WaitIsURIsAvailable() bool {
	var _arg0 *C.GtkClipboard // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	_cret = C.gtk_clipboard_wait_is_uris_available(_arg0)
	runtime.KeepAlive(clipboard)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ClipboardGetDefault returns the default clipboard object for use with
// cut/copy/paste menu items and keyboard shortcuts.
//
// The function takes the following parameters:
//
//   - display for which the clipboard is to be retrieved.
//
// The function returns the following values:
//
//   - clipboard: default clipboard object.
func ClipboardGetDefault(display *gdk.Display) *Clipboard {
	var _arg1 *C.GdkDisplay   // out
	var _cret *C.GtkClipboard // in

	_arg1 = (*C.GdkDisplay)(unsafe.Pointer(coreglib.InternObject(display).Native()))

	_cret = C.gtk_clipboard_get_default(_arg1)
	runtime.KeepAlive(display)

	var _clipboard *Clipboard // out

	_clipboard = wrapClipboard(coreglib.Take(unsafe.Pointer(_cret)))

	return _clipboard
}

// ColorButtonOverrides contains methods that are overridable.
type ColorButtonOverrides struct {
	ColorSet func()
}

func defaultColorButtonOverrides(v *ColorButton) ColorButtonOverrides {
	return ColorButtonOverrides{
		ColorSet: v.colorSet,
	}
}

// ColorButton is a button which displays the currently selected color and
// allows to open a color selection dialog to change the color. It is suitable
// widget for selecting a color in a preference dialog.
//
// # CSS nodes
//
// GtkColorButton has a single CSS node with name button. To differentiate it
// from a plain Button, it gets the .color style class.
type ColorButton struct {
	_ [0]func() // equal guard
	Button

	*coreglib.Object
	ColorChooser
}

var (
	_ coreglib.Objector = (*ColorButton)(nil)
	_ Binner            = (*ColorButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ColorButton, *ColorButtonClass, ColorButtonOverrides](
		GTypeColorButton,
		initColorButtonClass,
		wrapColorButton,
		defaultColorButtonOverrides,
	)
}

func initColorButtonClass(gclass unsafe.Pointer, overrides ColorButtonOverrides, classInitFunc func(*ColorButtonClass)) {
	pclass := (*C.GtkColorButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeColorButton))))

	if overrides.ColorSet != nil {
		pclass.color_set = (*[0]byte)(C._gotk4_gtk3_ColorButtonClass_color_set)
	}

	if classInitFunc != nil {
		class := (*ColorButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapColorButton(obj *coreglib.Object) *ColorButton {
	return &ColorButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
		Object: obj,
		ColorChooser: ColorChooser{
			Object: obj,
		},
	}
}

func marshalColorButton(p uintptr) (interface{}, error) {
	return wrapColorButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectColorSet signal is emitted when the user selects a color. When
// handling this signal, use gtk_color_button_get_rgba() to find out which color
// was just selected.
//
// Note that this signal is only emitted when the user changes the color. If you
// need to react to programmatic color changes as well, use the notify::color
// signal.
func (button *ColorButton) ConnectColorSet(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "color-set", false, unsafe.Pointer(C._gotk4_gtk3_ColorButton_ConnectColorSet), f)
}

// NewColorButton creates a new color button.
//
// This returns a widget in the form of a small button containing a swatch
// representing the current selected color. When the button is clicked,
// a color-selection dialog will open, allowing the user to select a color.
// The swatch will be updated to reflect the new color when the user finishes.
//
// The function returns the following values:
//
//   - colorButton: new color button.
func NewColorButton() *ColorButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_color_button_new()

	var _colorButton *ColorButton // out

	_colorButton = wrapColorButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorButton
}

// NewColorButtonWithColor creates a new color button.
//
// Deprecated: Use gtk_color_button_new_with_rgba() instead.
//
// The function takes the following parameters:
//
//   - color to set the current color with.
//
// The function returns the following values:
//
//   - colorButton: new color button.
func NewColorButtonWithColor(color *gdk.Color) *ColorButton {
	var _arg1 *C.GdkColor  // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))

	_cret = C.gtk_color_button_new_with_color(_arg1)
	runtime.KeepAlive(color)

	var _colorButton *ColorButton // out

	_colorButton = wrapColorButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorButton
}

// NewColorButtonWithRGBA creates a new color button.
//
// The function takes the following parameters:
//
//   - rgba to set the current color with.
//
// The function returns the following values:
//
//   - colorButton: new color button.
func NewColorButtonWithRGBA(rgba *gdk.RGBA) *ColorButton {
	var _arg1 *C.GdkRGBA   // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(rgba)))

	_cret = C.gtk_color_button_new_with_rgba(_arg1)
	runtime.KeepAlive(rgba)

	var _colorButton *ColorButton // out

	_colorButton = wrapColorButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorButton
}

// Alpha returns the current alpha value.
//
// Deprecated: Use gtk_color_chooser_get_rgba() instead.
//
// The function returns the following values:
//
//   - guint16: integer between 0 and 65535.
func (button *ColorButton) Alpha() uint16 {
	var _arg0 *C.GtkColorButton // out
	var _cret C.guint16         // in

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_color_button_get_alpha(_arg0)
	runtime.KeepAlive(button)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// Color sets color to be the current color in the ColorButton widget.
//
// Deprecated: Use gtk_color_chooser_get_rgba() instead.
//
// The function returns the following values:
//
//   - color to fill in with the current color.
func (button *ColorButton) Color() *gdk.Color {
	var _arg0 *C.GtkColorButton // out
	var _arg1 C.GdkColor        // in

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C.gtk_color_button_get_color(_arg0, &_arg1)
	runtime.KeepAlive(button)

	var _color *gdk.Color // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _color
}

// Title gets the title of the color selection dialog.
//
// The function returns the following values:
//
//   - utf8: internal string, do not free the return value.
func (button *ColorButton) Title() string {
	var _arg0 *C.GtkColorButton // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_color_button_get_title(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// UseAlpha does the color selection dialog use the alpha channel ?
//
// Deprecated: Use gtk_color_chooser_get_use_alpha() instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the color sample uses alpha channel, FALSE if not.
func (button *ColorButton) UseAlpha() bool {
	var _arg0 *C.GtkColorButton // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_color_button_get_use_alpha(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAlpha sets the current opacity to be alpha.
//
// Deprecated: Use gtk_color_chooser_set_rgba() instead.
//
// The function takes the following parameters:
//
//   - alpha: integer between 0 and 65535.
func (button *ColorButton) SetAlpha(alpha uint16) {
	var _arg0 *C.GtkColorButton // out
	var _arg1 C.guint16         // out

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.guint16(alpha)

	C.gtk_color_button_set_alpha(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(alpha)
}

// SetColor sets the current color to be color.
//
// Deprecated: Use gtk_color_chooser_set_rgba() instead.
//
// The function takes the following parameters:
//
//   - color to set the current color with.
func (button *ColorButton) SetColor(color *gdk.Color) {
	var _arg0 *C.GtkColorButton // out
	var _arg1 *C.GdkColor       // out

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_color_button_set_color(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(color)
}

// SetTitle sets the title for the color selection dialog.
//
// The function takes the following parameters:
//
//   - title: string containing new window title.
func (button *ColorButton) SetTitle(title string) {
	var _arg0 *C.GtkColorButton // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_color_button_set_title(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(title)
}

// SetUseAlpha sets whether or not the color button should use the alpha
// channel.
//
// Deprecated: Use gtk_color_chooser_set_use_alpha() instead.
//
// The function takes the following parameters:
//
//   - useAlpha: TRUE if color button should use alpha channel, FALSE if not.
func (button *ColorButton) SetUseAlpha(useAlpha bool) {
	var _arg0 *C.GtkColorButton // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if useAlpha {
		_arg1 = C.TRUE
	}

	C.gtk_color_button_set_use_alpha(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(useAlpha)
}

func (cp *ColorButton) colorSet() {
	gclass := (*C.GtkColorButtonClass)(coreglib.PeekParentClass(cp))
	fnarg := gclass.color_set

	var _arg0 *C.GtkColorButton // out

	_arg0 = (*C.GtkColorButton)(unsafe.Pointer(coreglib.InternObject(cp).Native()))

	C._gotk4_gtk3_ColorButton_virtual_color_set(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(cp)
}

// ColorChooserDialogOverrides contains methods that are overridable.
type ColorChooserDialogOverrides struct {
}

func defaultColorChooserDialogOverrides(v *ColorChooserDialog) ColorChooserDialogOverrides {
	return ColorChooserDialogOverrides{}
}

// ColorChooserDialog widget is a dialog for choosing a color. It implements the
// ColorChooser interface.
type ColorChooserDialog struct {
	_ [0]func() // equal guard
	Dialog

	*coreglib.Object
	ColorChooser
}

var (
	_ coreglib.Objector = (*ColorChooserDialog)(nil)
	_ Binner            = (*ColorChooserDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ColorChooserDialog, *ColorChooserDialogClass, ColorChooserDialogOverrides](
		GTypeColorChooserDialog,
		initColorChooserDialogClass,
		wrapColorChooserDialog,
		defaultColorChooserDialogOverrides,
	)
}

func initColorChooserDialogClass(gclass unsafe.Pointer, overrides ColorChooserDialogOverrides, classInitFunc func(*ColorChooserDialogClass)) {
	if classInitFunc != nil {
		class := (*ColorChooserDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapColorChooserDialog(obj *coreglib.Object) *ColorChooserDialog {
	return &ColorChooserDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
		Object: obj,
		ColorChooser: ColorChooser{
			Object: obj,
		},
	}
}

func marshalColorChooserDialog(p uintptr) (interface{}, error) {
	return wrapColorChooserDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewColorChooserDialog creates a new ColorChooserDialog.
//
// The function takes the following parameters:
//
//   - title (optional): title of the dialog, or NULL.
//   - parent (optional): transient parent of the dialog, or NULL.
//
// The function returns the following values:
//
//   - colorChooserDialog: new ColorChooserDialog.
func NewColorChooserDialog(title string, parent *Window) *ColorChooserDialog {
	var _arg1 *C.gchar     // out
	var _arg2 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	if title != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	if parent != nil {
		_arg2 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	_cret = C.gtk_color_chooser_dialog_new(_arg1, _arg2)
	runtime.KeepAlive(title)
	runtime.KeepAlive(parent)

	var _colorChooserDialog *ColorChooserDialog // out

	_colorChooserDialog = wrapColorChooserDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorChooserDialog
}

// ColorChooserWidgetOverrides contains methods that are overridable.
type ColorChooserWidgetOverrides struct {
}

func defaultColorChooserWidgetOverrides(v *ColorChooserWidget) ColorChooserWidgetOverrides {
	return ColorChooserWidgetOverrides{}
}

// ColorChooserWidget widget lets the user select a color. By default,
// the chooser presents a predefined palette of colors, plus a small number of
// settable custom colors. It is also possible to select a different color with
// the single-color editor. To enter the single-color editing mode, use the
// context menu of any color of the palette, or use the '+' button to add a new
// custom color.
//
// The chooser automatically remembers the last selection, as well as custom
// colors.
//
// To change the initially selected color, use gtk_color_chooser_set_rgba().
// To get the selected color use gtk_color_chooser_get_rgba().
//
// The ColorChooserWidget is used in the ColorChooserDialog to provide a dialog
// for selecting colors.
//
// # CSS names
//
// GtkColorChooserWidget has a single CSS node with name colorchooser.
type ColorChooserWidget struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	ColorChooser
}

var (
	_ coreglib.Objector = (*ColorChooserWidget)(nil)
	_ Containerer       = (*ColorChooserWidget)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ColorChooserWidget, *ColorChooserWidgetClass, ColorChooserWidgetOverrides](
		GTypeColorChooserWidget,
		initColorChooserWidgetClass,
		wrapColorChooserWidget,
		defaultColorChooserWidgetOverrides,
	)
}

func initColorChooserWidgetClass(gclass unsafe.Pointer, overrides ColorChooserWidgetOverrides, classInitFunc func(*ColorChooserWidgetClass)) {
	if classInitFunc != nil {
		class := (*ColorChooserWidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapColorChooserWidget(obj *coreglib.Object) *ColorChooserWidget {
	return &ColorChooserWidget{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		ColorChooser: ColorChooser{
			Object: obj,
		},
	}
}

func marshalColorChooserWidget(p uintptr) (interface{}, error) {
	return wrapColorChooserWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewColorChooserWidget creates a new ColorChooserWidget.
//
// The function returns the following values:
//
//   - colorChooserWidget: new ColorChooserWidget.
func NewColorChooserWidget() *ColorChooserWidget {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_color_chooser_widget_new()

	var _colorChooserWidget *ColorChooserWidget // out

	_colorChooserWidget = wrapColorChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorChooserWidget
}

// ColorSelectionOverrides contains methods that are overridable.
type ColorSelectionOverrides struct {
	ColorChanged func()
}

func defaultColorSelectionOverrides(v *ColorSelection) ColorSelectionOverrides {
	return ColorSelectionOverrides{
		ColorChanged: v.colorChanged,
	}
}

type ColorSelection struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ColorSelection)(nil)
	_ coreglib.Objector = (*ColorSelection)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ColorSelection, *ColorSelectionClass, ColorSelectionOverrides](
		GTypeColorSelection,
		initColorSelectionClass,
		wrapColorSelection,
		defaultColorSelectionOverrides,
	)
}

func initColorSelectionClass(gclass unsafe.Pointer, overrides ColorSelectionOverrides, classInitFunc func(*ColorSelectionClass)) {
	pclass := (*C.GtkColorSelectionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeColorSelection))))

	if overrides.ColorChanged != nil {
		pclass.color_changed = (*[0]byte)(C._gotk4_gtk3_ColorSelectionClass_color_changed)
	}

	if classInitFunc != nil {
		class := (*ColorSelectionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapColorSelection(obj *coreglib.Object) *ColorSelection {
	return &ColorSelection{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalColorSelection(p uintptr) (interface{}, error) {
	return wrapColorSelection(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectColorChanged: this signal is emitted when the color changes in the
// ColorSelection according to its update policy.
func (colorsel *ColorSelection) ConnectColorChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(colorsel, "color-changed", false, unsafe.Pointer(C._gotk4_gtk3_ColorSelection_ConnectColorChanged), f)
}

// NewColorSelection creates a new GtkColorSelection.
//
// The function returns the following values:
//
//   - colorSelection: new ColorSelection.
func NewColorSelection() *ColorSelection {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_color_selection_new()

	var _colorSelection *ColorSelection // out

	_colorSelection = wrapColorSelection(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorSelection
}

// CurrentAlpha returns the current alpha value.
//
// The function returns the following values:
//
//   - guint16: integer between 0 and 65535.
func (colorsel *ColorSelection) CurrentAlpha() uint16 {
	var _arg0 *C.GtkColorSelection // out
	var _cret C.guint16            // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_get_current_alpha(_arg0)
	runtime.KeepAlive(colorsel)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// CurrentColor sets color to be the current color in the GtkColorSelection
// widget.
//
// Deprecated: Use gtk_color_selection_get_current_rgba() instead.
//
// The function returns the following values:
//
//   - color to fill in with the current color.
func (colorsel *ColorSelection) CurrentColor() *gdk.Color {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.GdkColor           // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	C.gtk_color_selection_get_current_color(_arg0, &_arg1)
	runtime.KeepAlive(colorsel)

	var _color *gdk.Color // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _color
}

// CurrentRGBA sets rgba to be the current color in the GtkColorSelection
// widget.
//
// The function returns the following values:
//
//   - rgba to fill in with the current color.
func (colorsel *ColorSelection) CurrentRGBA() *gdk.RGBA {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.GdkRGBA            // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	C.gtk_color_selection_get_current_rgba(_arg0, &_arg1)
	runtime.KeepAlive(colorsel)

	var _rgba *gdk.RGBA // out

	_rgba = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _rgba
}

// HasOpacityControl determines whether the colorsel has an opacity control.
//
// The function returns the following values:
//
//   - ok: TRUE if the colorsel has an opacity control, FALSE if it does't.
func (colorsel *ColorSelection) HasOpacityControl() bool {
	var _arg0 *C.GtkColorSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_get_has_opacity_control(_arg0)
	runtime.KeepAlive(colorsel)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasPalette determines whether the color selector has a color palette.
//
// The function returns the following values:
//
//   - ok: TRUE if the selector has a palette, FALSE if it hasn't.
func (colorsel *ColorSelection) HasPalette() bool {
	var _arg0 *C.GtkColorSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_get_has_palette(_arg0)
	runtime.KeepAlive(colorsel)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PreviousAlpha returns the previous alpha value.
//
// The function returns the following values:
//
//   - guint16: integer between 0 and 65535.
func (colorsel *ColorSelection) PreviousAlpha() uint16 {
	var _arg0 *C.GtkColorSelection // out
	var _cret C.guint16            // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_get_previous_alpha(_arg0)
	runtime.KeepAlive(colorsel)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// PreviousColor fills color in with the original color value.
//
// Deprecated: Use gtk_color_selection_get_previous_rgba() instead.
//
// The function returns the following values:
//
//   - color to fill in with the original color value.
func (colorsel *ColorSelection) PreviousColor() *gdk.Color {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.GdkColor           // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	C.gtk_color_selection_get_previous_color(_arg0, &_arg1)
	runtime.KeepAlive(colorsel)

	var _color *gdk.Color // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _color
}

// PreviousRGBA fills rgba in with the original color value.
//
// The function returns the following values:
//
//   - rgba to fill in with the original color value.
func (colorsel *ColorSelection) PreviousRGBA() *gdk.RGBA {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.GdkRGBA            // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	C.gtk_color_selection_get_previous_rgba(_arg0, &_arg1)
	runtime.KeepAlive(colorsel)

	var _rgba *gdk.RGBA // out

	_rgba = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _rgba
}

// IsAdjusting gets the current state of the colorsel.
//
// The function returns the following values:
//
//   - ok: TRUE if the user is currently dragging a color around, and FALSE if
//     the selection has stopped.
func (colorsel *ColorSelection) IsAdjusting() bool {
	var _arg0 *C.GtkColorSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_is_adjusting(_arg0)
	runtime.KeepAlive(colorsel)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetCurrentAlpha sets the current opacity to be alpha.
//
// The first time this is called, it will also set the original opacity to be
// alpha too.
//
// The function takes the following parameters:
//
//   - alpha: integer between 0 and 65535.
func (colorsel *ColorSelection) SetCurrentAlpha(alpha uint16) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.guint16            // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = C.guint16(alpha)

	C.gtk_color_selection_set_current_alpha(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(alpha)
}

// SetCurrentColor sets the current color to be color.
//
// The first time this is called, it will also set the original color to be
// color too.
//
// Deprecated: Use gtk_color_selection_set_current_rgba() instead.
//
// The function takes the following parameters:
//
//   - color to set the current color with.
func (colorsel *ColorSelection) SetCurrentColor(color *gdk.Color) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 *C.GdkColor          // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_color_selection_set_current_color(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(color)
}

// SetCurrentRGBA sets the current color to be rgba.
//
// The first time this is called, it will also set the original color to be rgba
// too.
//
// The function takes the following parameters:
//
//   - rgba to set the current color with.
func (colorsel *ColorSelection) SetCurrentRGBA(rgba *gdk.RGBA) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 *C.GdkRGBA           // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(rgba)))

	C.gtk_color_selection_set_current_rgba(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(rgba)
}

// SetHasOpacityControl sets the colorsel to use or not use opacity.
//
// The function takes the following parameters:
//
//   - hasOpacity: TRUE if colorsel can set the opacity, FALSE otherwise.
func (colorsel *ColorSelection) SetHasOpacityControl(hasOpacity bool) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	if hasOpacity {
		_arg1 = C.TRUE
	}

	C.gtk_color_selection_set_has_opacity_control(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(hasOpacity)
}

// SetHasPalette shows and hides the palette based upon the value of
// has_palette.
//
// The function takes the following parameters:
//
//   - hasPalette: TRUE if palette is to be visible, FALSE otherwise.
func (colorsel *ColorSelection) SetHasPalette(hasPalette bool) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	if hasPalette {
		_arg1 = C.TRUE
	}

	C.gtk_color_selection_set_has_palette(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(hasPalette)
}

// SetPreviousAlpha sets the “previous” alpha to be alpha.
//
// This function should be called with some hesitations, as it might seem
// confusing to have that alpha change.
//
// The function takes the following parameters:
//
//   - alpha: integer between 0 and 65535.
func (colorsel *ColorSelection) SetPreviousAlpha(alpha uint16) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 C.guint16            // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = C.guint16(alpha)

	C.gtk_color_selection_set_previous_alpha(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(alpha)
}

// SetPreviousColor sets the “previous” color to be color.
//
// This function should be called with some hesitations,
// as it might seem confusing to have that color change. Calling
// gtk_color_selection_set_current_color() will also set this color the first
// time it is called.
//
// Deprecated: Use gtk_color_selection_set_previous_rgba() instead.
//
// The function takes the following parameters:
//
//   - color to set the previous color with.
func (colorsel *ColorSelection) SetPreviousColor(color *gdk.Color) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 *C.GdkColor          // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_color_selection_set_previous_color(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(color)
}

// SetPreviousRGBA sets the “previous” color to be rgba.
//
// This function should be called with some hesitations,
// as it might seem confusing to have that color change. Calling
// gtk_color_selection_set_current_rgba() will also set this color the first
// time it is called.
//
// The function takes the following parameters:
//
//   - rgba to set the previous color with.
func (colorsel *ColorSelection) SetPreviousRGBA(rgba *gdk.RGBA) {
	var _arg0 *C.GtkColorSelection // out
	var _arg1 *C.GdkRGBA           // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(rgba)))

	C.gtk_color_selection_set_previous_rgba(_arg0, _arg1)
	runtime.KeepAlive(colorsel)
	runtime.KeepAlive(rgba)
}

func (colorSelection *ColorSelection) colorChanged() {
	gclass := (*C.GtkColorSelectionClass)(coreglib.PeekParentClass(colorSelection))
	fnarg := gclass.color_changed

	var _arg0 *C.GtkColorSelection // out

	_arg0 = (*C.GtkColorSelection)(unsafe.Pointer(coreglib.InternObject(colorSelection).Native()))

	C._gotk4_gtk3_ColorSelection_virtual_color_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(colorSelection)
}

// ColorSelectionPaletteFromString parses a color palette string; the string is
// a colon-separated list of color names readable by gdk_color_parse().
//
// The function takes the following parameters:
//
//   - str: string encoding a color palette.
//
// The function returns the following values:
//
//   - colors: return location for allocated array of Color.
//   - ok: TRUE if a palette was successfully parsed.
func ColorSelectionPaletteFromString(str string) ([]gdk.Color, bool) {
	var _arg1 *C.gchar    // out
	var _arg2 *C.GdkColor // in
	var _arg3 C.gint      // in
	var _cret C.gboolean  // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_color_selection_palette_from_string(_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(str)

	var _colors []gdk.Color // out
	var _ok bool            // out

	defer C.free(unsafe.Pointer(_arg2))
	{
		src := unsafe.Slice((*C.GdkColor)(_arg2), _arg3)
		_colors = make([]gdk.Color, _arg3)
		for i := 0; i < int(_arg3); i++ {
			_colors[i] = *(*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&src[i]))))
			runtime.SetFinalizer(
				gextras.StructIntern(unsafe.Pointer(&_colors[i])),
				func(intern *struct{ C unsafe.Pointer }) {
					C.gdk_color_free((*C.GdkColor)(intern.C))
				},
			)
		}
	}
	if _cret != 0 {
		_ok = true
	}

	return _colors, _ok
}

// ColorSelectionPaletteToString encodes a palette as a string, useful for
// persistent storage.
//
// The function takes the following parameters:
//
//   - colors: array of colors.
//
// The function returns the following values:
//
//   - utf8: allocated string encoding the palette.
func ColorSelectionPaletteToString(colors []gdk.Color) string {
	var _arg1 *C.GdkColor // out
	var _arg2 C.gint
	var _cret *C.gchar // in

	_arg2 = (C.gint)(len(colors))
	_arg1 = (*C.GdkColor)(C.calloc(C.size_t(len(colors)), C.size_t(C.sizeof_GdkColor)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GdkColor)(_arg1), len(colors))
		for i := range colors {
			out[i] = *(*C.GdkColor)(gextras.StructNative(unsafe.Pointer((&colors[i]))))
		}
	}

	_cret = C.gtk_color_selection_palette_to_string(_arg1, _arg2)
	runtime.KeepAlive(colors)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// ColorSelectionDialogOverrides contains methods that are overridable.
type ColorSelectionDialogOverrides struct {
}

func defaultColorSelectionDialogOverrides(v *ColorSelectionDialog) ColorSelectionDialogOverrides {
	return ColorSelectionDialogOverrides{}
}

type ColorSelectionDialog struct {
	_ [0]func() // equal guard
	Dialog
}

var (
	_ Binner = (*ColorSelectionDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ColorSelectionDialog, *ColorSelectionDialogClass, ColorSelectionDialogOverrides](
		GTypeColorSelectionDialog,
		initColorSelectionDialogClass,
		wrapColorSelectionDialog,
		defaultColorSelectionDialogOverrides,
	)
}

func initColorSelectionDialogClass(gclass unsafe.Pointer, overrides ColorSelectionDialogOverrides, classInitFunc func(*ColorSelectionDialogClass)) {
	if classInitFunc != nil {
		class := (*ColorSelectionDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapColorSelectionDialog(obj *coreglib.Object) *ColorSelectionDialog {
	return &ColorSelectionDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
	}
}

func marshalColorSelectionDialog(p uintptr) (interface{}, error) {
	return wrapColorSelectionDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewColorSelectionDialog creates a new ColorSelectionDialog.
//
// The function takes the following parameters:
//
//   - title: string containing the title text for the dialog.
//
// The function returns the following values:
//
//   - colorSelectionDialog: ColorSelectionDialog.
func NewColorSelectionDialog(title string) *ColorSelectionDialog {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_color_selection_dialog_new(_arg1)
	runtime.KeepAlive(title)

	var _colorSelectionDialog *ColorSelectionDialog // out

	_colorSelectionDialog = wrapColorSelectionDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _colorSelectionDialog
}

// ColorSelection retrieves the ColorSelection widget embedded in the dialog.
//
// The function returns the following values:
//
//   - widget: embedded ColorSelection.
func (colorsel *ColorSelectionDialog) ColorSelection() Widgetter {
	var _arg0 *C.GtkColorSelectionDialog // out
	var _cret *C.GtkWidget               // in

	_arg0 = (*C.GtkColorSelectionDialog)(unsafe.Pointer(coreglib.InternObject(colorsel).Native()))

	_cret = C.gtk_color_selection_dialog_get_color_selection(_arg0)
	runtime.KeepAlive(colorsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// ComboBoxOverrides contains methods that are overridable.
type ComboBoxOverrides struct {
	// Changed: signal is emitted when the active item is changed.
	Changed func()
	// FormatEntryText: signal which allows you to change how the text displayed
	// in a combo box’s entry is displayed.
	FormatEntryText func(path string) string
}

func defaultComboBoxOverrides(v *ComboBox) ComboBoxOverrides {
	return ComboBoxOverrides{
		Changed:         v.changed,
		FormatEntryText: v.formatEntryText,
	}
}

// ComboBox is a widget that allows the user to choose from a list of valid
// choices. The GtkComboBox displays the selected choice. When activated, the
// GtkComboBox displays a popup which allows the user to make a new choice. The
// style in which the selected value is displayed, and the style of the popup is
// determined by the current theme. It may be similar to a Windows-style combo
// box.
//
// The GtkComboBox uses the model-view pattern; the list of valid choices is
// specified in the form of a tree model, and the display of the choices can be
// adapted to the data in the model by using cell renderers, as you would in
// a tree view. This is possible since GtkComboBox implements the CellLayout
// interface. The tree model holding the valid choices is not restricted to
// a flat list, it can be a real tree, and the popup will reflect the tree
// structure.
//
// To allow the user to enter values not in the model, the “has-entry” property
// allows the GtkComboBox to contain a Entry. This entry can be accessed by
// calling gtk_bin_get_child() on the combo box.
//
// For a simple list of textual choices, the model-view API of GtkComboBox
// can be a bit overwhelming. In this case, ComboBoxText offers a simple
// alternative. Both GtkComboBox and ComboBoxText can contain an entry.
//
// CSS nodes
//
//	combobox
//	├── box.linked
//	│   ├── entry.combo
//	│   ╰── button.combo
//	│       ╰── box
//	│           ╰── arrow
//	╰── window.popup
//
// A GtkComboBox with an entry has a single CSS node with name combobox.
// It contains a box with the .linked class. That box contains an entry and a
// button, both with the .combo class added. The button also contains another
// node with name arrow.
type ComboBox struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	CellEditable
	CellLayout
}

var (
	_ Binner            = (*ComboBox)(nil)
	_ coreglib.Objector = (*ComboBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ComboBox, *ComboBoxClass, ComboBoxOverrides](
		GTypeComboBox,
		initComboBoxClass,
		wrapComboBox,
		defaultComboBoxOverrides,
	)
}

func initComboBoxClass(gclass unsafe.Pointer, overrides ComboBoxOverrides, classInitFunc func(*ComboBoxClass)) {
	pclass := (*C.GtkComboBoxClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeComboBox))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_ComboBoxClass_changed)
	}

	if overrides.FormatEntryText != nil {
		pclass.format_entry_text = (*[0]byte)(C._gotk4_gtk3_ComboBoxClass_format_entry_text)
	}

	if classInitFunc != nil {
		class := (*ComboBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapComboBox(obj *coreglib.Object) *ComboBox {
	return &ComboBox{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		CellEditable: CellEditable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		CellLayout: CellLayout{
			Object: obj,
		},
	}
}

func marshalComboBox(p uintptr) (interface{}, error) {
	return wrapComboBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged signal is emitted when the active item is changed. The can be
// due to the user selecting a different item from the list, or due to a call
// to gtk_combo_box_set_active_iter(). It will also be emitted while typing into
// the entry of a combo box with an entry.
func (comboBox *ComboBox) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(comboBox, "changed", false, unsafe.Pointer(C._gotk4_gtk3_ComboBox_ConnectChanged), f)
}

// ConnectFormatEntryText: for combo boxes that are created with an entry (See
// GtkComboBox:has-entry).
//
// A signal which allows you to change how the text displayed in a combo box's
// entry is displayed.
//
// Connect a signal handler which returns an allocated string representing path.
// That string will then be used to set the text in the combo box's entry. The
// default signal handler uses the text from the GtkComboBox::entry-text-column
// model column.
//
// Here's an example signal handler which fetches data from the model and
// displays it in the entry.
//
//	static gchar*
//	format_entry_text_callback (GtkComboBox *combo,
//	                            const gchar *path,
//	                            gpointer     user_data)
//	{
//	  GtkTreeIter iter;
//	  GtkTreeModel model;
//	  gdouble      value;
//
//	  model = gtk_combo_box_get_model (combo);
//
//	  gtk_tree_model_get_iter_from_string (model, &iter, path);
//	  gtk_tree_model_get (model, &iter,
//	                      THE_DOUBLE_VALUE_COLUMN, &value,
//	                      -1);
//
//	  return g_strdup_printf ("g", value);
//	}.
func (comboBox *ComboBox) ConnectFormatEntryText(f func(path string) (utf8 string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(comboBox, "format-entry-text", false, unsafe.Pointer(C._gotk4_gtk3_ComboBox_ConnectFormatEntryText), f)
}

// ConnectMoveActive signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to move the active selection.
func (comboBox *ComboBox) ConnectMoveActive(f func(scrollType ScrollType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(comboBox, "move-active", false, unsafe.Pointer(C._gotk4_gtk3_ComboBox_ConnectMoveActive), f)
}

// ConnectPopdown signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to popdown the combo box list.
//
// The default bindings for this signal are Alt+Up and Escape.
func (comboBox *ComboBox) ConnectPopdown(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(comboBox, "popdown", false, unsafe.Pointer(C._gotk4_gtk3_ComboBox_ConnectPopdown), f)
}

// ConnectPopup signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to popup the combo box list.
//
// The default binding for this signal is Alt+Down.
func (comboBox *ComboBox) ConnectPopup(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(comboBox, "popup", false, unsafe.Pointer(C._gotk4_gtk3_ComboBox_ConnectPopup), f)
}

// NewComboBox creates a new empty ComboBox.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBox() *ComboBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_combo_box_new()

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// NewComboBoxWithArea creates a new empty ComboBox using area to layout cells.
//
// The function takes the following parameters:
//
//   - area to use to layout cell renderers.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBoxWithArea(area CellAreaer) *ComboBox {
	var _arg1 *C.GtkCellArea // out
	var _cret *C.GtkWidget   // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_combo_box_new_with_area(_arg1)
	runtime.KeepAlive(area)

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// NewComboBoxWithAreaAndEntry creates a new empty ComboBox with an entry.
//
// The new combo box will use area to layout cells.
//
// The function takes the following parameters:
//
//   - area to use to layout cell renderers.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBoxWithAreaAndEntry(area CellAreaer) *ComboBox {
	var _arg1 *C.GtkCellArea // out
	var _cret *C.GtkWidget   // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_combo_box_new_with_area_and_entry(_arg1)
	runtime.KeepAlive(area)

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// NewComboBoxWithEntry creates a new empty ComboBox with an entry.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBoxWithEntry() *ComboBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_combo_box_new_with_entry()

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// NewComboBoxWithModel creates a new ComboBox with the model initialized to
// model.
//
// The function takes the following parameters:
//
//   - model: TreeModel.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBoxWithModel(model TreeModeller) *ComboBox {
	var _arg1 *C.GtkTreeModel // out
	var _cret *C.GtkWidget    // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_combo_box_new_with_model(_arg1)
	runtime.KeepAlive(model)

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// NewComboBoxWithModelAndEntry creates a new empty ComboBox with an entry and
// with the model initialized to model.
//
// The function takes the following parameters:
//
//   - model: TreeModel.
//
// The function returns the following values:
//
//   - comboBox: new ComboBox.
func NewComboBoxWithModelAndEntry(model TreeModeller) *ComboBox {
	var _arg1 *C.GtkTreeModel // out
	var _cret *C.GtkWidget    // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_combo_box_new_with_model_and_entry(_arg1)
	runtime.KeepAlive(model)

	var _comboBox *ComboBox // out

	_comboBox = wrapComboBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBox
}

// Active returns the index of the currently active item, or -1 if there’s
// no active item. If the model is a non-flat treemodel, and the active item
// is not an immediate child of the root of the tree, this function returns
// gtk_tree_path_get_indices (path)[0], where path is the TreePath of the active
// item.
//
// The function returns the following values:
//
//   - gint: integer which is the index of the currently active item, or -1 if
//     there’s no active item.
func (comboBox *ComboBox) Active() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_active(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ActiveID returns the ID of the active row of combo_box. This value is taken
// from the active row and the column specified by the ComboBox:id-column
// property of combo_box (see gtk_combo_box_set_id_column()).
//
// The returned value is an interned string which means that you can compare the
// pointer by value to other interned strings and that you must not free it.
//
// If the ComboBox:id-column property of combo_box is not set, or if no row is
// active, or if the active row has a NULL ID value, then NULL is returned.
//
// The function returns the following values:
//
//   - utf8 (optional): ID of the active row, or NULL.
func (comboBox *ComboBox) ActiveID() string {
	var _arg0 *C.GtkComboBox // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_active_id(_arg0)
	runtime.KeepAlive(comboBox)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// ActiveIter sets iter to point to the currently active item, if any item is
// active. Otherwise, iter is left unchanged.
//
// The function returns the following values:
//
//   - iter: TreeIter.
//   - ok: TRUE if iter was set, FALSE otherwise.
func (comboBox *ComboBox) ActiveIter() (*TreeIter, bool) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.GtkTreeIter  // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_active_iter(_arg0, &_arg1)
	runtime.KeepAlive(comboBox)

	var _iter *TreeIter // out
	var _ok bool        // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// AddTearoffs gets the current value of the :add-tearoffs property.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: current value of the :add-tearoffs property.
func (comboBox *ComboBox) AddTearoffs() bool {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_add_tearoffs(_arg0)
	runtime.KeepAlive(comboBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ButtonSensitivity returns whether the combo box sets the dropdown button
// sensitive or not when there are no items in the model.
//
// The function returns the following values:
//
//   - sensitivityType: GTK_SENSITIVITY_ON if the dropdown button is sensitive
//     when the model is empty, GTK_SENSITIVITY_OFF if the button is always
//     insensitive or GTK_SENSITIVITY_AUTO if it is only sensitive as long as
//     the model has one item to be selected.
func (comboBox *ComboBox) ButtonSensitivity() SensitivityType {
	var _arg0 *C.GtkComboBox       // out
	var _cret C.GtkSensitivityType // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_button_sensitivity(_arg0)
	runtime.KeepAlive(comboBox)

	var _sensitivityType SensitivityType // out

	_sensitivityType = SensitivityType(_cret)

	return _sensitivityType
}

// ColumnSpanColumn returns the column with column span information for
// combo_box.
//
// The function returns the following values:
//
//   - gint: column span column.
func (comboBox *ComboBox) ColumnSpanColumn() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_column_span_column(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// EntryTextColumn returns the column which combo_box is using to get the
// strings from to display in the internal entry.
//
// The function returns the following values:
//
//   - gint: column in the data source model of combo_box.
func (comboBox *ComboBox) EntryTextColumn() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_entry_text_column(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// FocusOnClick returns whether the combo box grabs focus when it is clicked
// with the mouse. See gtk_combo_box_set_focus_on_click().
//
// Deprecated: Use gtk_widget_get_focus_on_click() instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the combo box grabs focus when it is clicked with the mouse.
func (combo *ComboBox) FocusOnClick() bool {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(combo).Native()))

	_cret = C.gtk_combo_box_get_focus_on_click(_arg0)
	runtime.KeepAlive(combo)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasEntry returns whether the combo box has an entry.
//
// The function returns the following values:
//
//   - ok: whether there is an entry in combo_box.
func (comboBox *ComboBox) HasEntry() bool {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_has_entry(_arg0)
	runtime.KeepAlive(comboBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IDColumn returns the column which combo_box is using to get string IDs for
// values from.
//
// The function returns the following values:
//
//   - gint: column in the data source model of combo_box.
func (comboBox *ComboBox) IDColumn() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_id_column(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Model returns the TreeModel which is acting as data source for combo_box.
//
// The function returns the following values:
//
//   - treeModel which was passed during construction.
func (comboBox *ComboBox) Model() *TreeModel {
	var _arg0 *C.GtkComboBox  // out
	var _cret *C.GtkTreeModel // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_model(_arg0)
	runtime.KeepAlive(comboBox)

	var _treeModel *TreeModel // out

	_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeModel
}

// PopupAccessible gets the accessible object corresponding to the combo box’s
// popup.
//
// This function is mostly intended for use by accessibility technologies;
// applications should have little use for it.
//
// The function returns the following values:
//
//   - object: accessible object corresponding to the combo box’s popup.
func (comboBox *ComboBox) PopupAccessible() *atk.AtkObject {
	var _arg0 *C.GtkComboBox // out
	var _cret *C.AtkObject   // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_popup_accessible(_arg0)
	runtime.KeepAlive(comboBox)

	var _object *atk.AtkObject // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_object = &atk.AtkObject{
			Object: obj,
		}
	}

	return _object
}

// PopupFixedWidth gets whether the popup uses a fixed width matching the
// allocated width of the combo box.
//
// The function returns the following values:
//
//   - ok: TRUE if the popup uses a fixed width.
func (comboBox *ComboBox) PopupFixedWidth() bool {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_popup_fixed_width(_arg0)
	runtime.KeepAlive(comboBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowSpanColumn returns the column with row span information for combo_box.
//
// The function returns the following values:
//
//   - gint: row span column.
func (comboBox *ComboBox) RowSpanColumn() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_row_span_column(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Title gets the current title of the menu in tearoff mode. See
// gtk_combo_box_set_add_tearoffs().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - utf8 menu’s title in tearoff mode. This is an internal copy of the string
//     which must not be freed.
func (comboBox *ComboBox) Title() string {
	var _arg0 *C.GtkComboBox // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_title(_arg0)
	runtime.KeepAlive(comboBox)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// WrapWidth returns the wrap width which is used to determine the number of
// columns for the popup menu. If the wrap width is larger than 1, the combo box
// is in table mode.
//
// The function returns the following values:
//
//   - gint: wrap width.
func (comboBox *ComboBox) WrapWidth() int {
	var _arg0 *C.GtkComboBox // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_get_wrap_width(_arg0)
	runtime.KeepAlive(comboBox)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Popdown hides the menu or dropdown list of combo_box.
//
// This function is mostly intended for use by accessibility technologies;
// applications should have little use for it.
func (comboBox *ComboBox) Popdown() {
	var _arg0 *C.GtkComboBox // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	C.gtk_combo_box_popdown(_arg0)
	runtime.KeepAlive(comboBox)
}

// Popup pops up the menu or dropdown list of combo_box.
//
// This function is mostly intended for use by accessibility technologies;
// applications should have little use for it.
//
// Before calling this, combo_box must be mapped, or nothing will happen.
func (comboBox *ComboBox) Popup() {
	var _arg0 *C.GtkComboBox // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	C.gtk_combo_box_popup(_arg0)
	runtime.KeepAlive(comboBox)
}

// PopupForDevice pops up the menu or dropdown list of combo_box, the popup
// window will be grabbed so only device and its associated pointer/keyboard are
// the only Devices able to send events to it.
//
// The function takes the following parameters:
//
//   - device: Device.
func (comboBox *ComboBox) PopupForDevice(device gdk.Devicer) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 *C.GdkDevice   // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	C.gtk_combo_box_popup_for_device(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(device)
}

// SetActive sets the active item of combo_box to be the item at index.
//
// The function takes the following parameters:
//
//   - index_: index in the model passed during construction, or -1 to have no
//     active item.
func (comboBox *ComboBox) SetActive(index_ int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(index_)

	C.gtk_combo_box_set_active(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(index_)
}

// SetActiveID changes the active row of combo_box to the one that has an
// ID equal to active_id, or unsets the active row if active_id is NULL.
// Rows having a NULL ID string cannot be made active by this function.
//
// If the ComboBox:id-column property of combo_box is unset or if no row has the
// given ID then the function does nothing and returns FALSE.
//
// The function takes the following parameters:
//
//   - activeId (optional): ID of the row to select, or NULL.
//
// The function returns the following values:
//
//   - ok: TRUE if a row with a matching ID was found. If a NULL active_id was
//     given to unset the active row, the function always returns TRUE.
func (comboBox *ComboBox) SetActiveID(activeId string) bool {
	var _arg0 *C.GtkComboBox // out
	var _arg1 *C.gchar       // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if activeId != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(activeId)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_combo_box_set_active_id(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(activeId)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActiveIter sets the current active item to be the one referenced by iter,
// or unsets the active item if iter is NULL.
//
// The function takes the following parameters:
//
//   - iter (optional) or NULL.
func (comboBox *ComboBox) SetActiveIter(iter *TreeIter) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 *C.GtkTreeIter // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if iter != nil {
		_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	}

	C.gtk_combo_box_set_active_iter(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(iter)
}

// SetAddTearoffs sets whether the popup menu should have a tearoff menu item.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - addTearoffs: TRUE to add tearoff menu items.
func (comboBox *ComboBox) SetAddTearoffs(addTearoffs bool) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if addTearoffs {
		_arg1 = C.TRUE
	}

	C.gtk_combo_box_set_add_tearoffs(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(addTearoffs)
}

// SetButtonSensitivity sets whether the dropdown button of the combo
// box should be always sensitive (GTK_SENSITIVITY_ON), never sensitive
// (GTK_SENSITIVITY_OFF) or only if there is at least one item to display
// (GTK_SENSITIVITY_AUTO).
//
// The function takes the following parameters:
//
//   - sensitivity: specify the sensitivity of the dropdown button.
func (comboBox *ComboBox) SetButtonSensitivity(sensitivity SensitivityType) {
	var _arg0 *C.GtkComboBox       // out
	var _arg1 C.GtkSensitivityType // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.GtkSensitivityType(sensitivity)

	C.gtk_combo_box_set_button_sensitivity(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(sensitivity)
}

// SetColumnSpanColumn sets the column with column span information for
// combo_box to be column_span. The column span column contains integers which
// indicate how many columns an item should span.
//
// The function takes the following parameters:
//
//   - columnSpan: column in the model passed during construction.
func (comboBox *ComboBox) SetColumnSpanColumn(columnSpan int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(columnSpan)

	C.gtk_combo_box_set_column_span_column(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(columnSpan)
}

// SetEntryTextColumn sets the model column which combo_box should use to
// get strings from to be text_column. The column text_column in the model of
// combo_box must be of type G_TYPE_STRING.
//
// This is only relevant if combo_box has been created with ComboBox:has-entry
// as TRUE.
//
// The function takes the following parameters:
//
//   - textColumn: column in model to get the strings from for the internal
//     entry.
func (comboBox *ComboBox) SetEntryTextColumn(textColumn int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(textColumn)

	C.gtk_combo_box_set_entry_text_column(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(textColumn)
}

// SetFocusOnClick sets whether the combo box will grab focus when it is clicked
// with the mouse. Making mouse clicks not grab focus is useful in places like
// toolbars where you don’t want the keyboard focus removed from the main area
// of the application.
//
// Deprecated: Use gtk_widget_set_focus_on_click() instead.
//
// The function takes the following parameters:
//
//   - focusOnClick: whether the combo box grabs focus when clicked with the
//     mouse.
func (combo *ComboBox) SetFocusOnClick(focusOnClick bool) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(combo).Native()))
	if focusOnClick {
		_arg1 = C.TRUE
	}

	C.gtk_combo_box_set_focus_on_click(_arg0, _arg1)
	runtime.KeepAlive(combo)
	runtime.KeepAlive(focusOnClick)
}

// SetIDColumn sets the model column which combo_box should use to get string
// IDs for values from. The column id_column in the model of combo_box must be
// of type G_TYPE_STRING.
//
// The function takes the following parameters:
//
//   - idColumn: column in model to get string IDs for values from.
func (comboBox *ComboBox) SetIDColumn(idColumn int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(idColumn)

	C.gtk_combo_box_set_id_column(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(idColumn)
}

// SetModel sets the model used by combo_box to be model. Will unset a
// previously set model (if applicable). If model is NULL, then it will unset
// the model.
//
// Note that this function does not clear the cell renderers, you have to
// call gtk_cell_layout_clear() yourself if you need to set up different cell
// renderers for the new model.
//
// The function takes the following parameters:
//
//   - model (optional): TreeModel.
func (comboBox *ComboBox) SetModel(model TreeModeller) {
	var _arg0 *C.GtkComboBox  // out
	var _arg1 *C.GtkTreeModel // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if model != nil {
		_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}

	C.gtk_combo_box_set_model(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(model)
}

// SetPopupFixedWidth specifies whether the popup’s width should be a fixed
// width matching the allocated width of the combo box.
//
// The function takes the following parameters:
//
//   - fixed: whether to use a fixed popup width.
func (comboBox *ComboBox) SetPopupFixedWidth(fixed bool) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if fixed {
		_arg1 = C.TRUE
	}

	C.gtk_combo_box_set_popup_fixed_width(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(fixed)
}

// SetRowSeparatorFunc sets the row separator function, which is used to
// determine whether a row should be drawn as a separator. If the row separator
// function is NULL, no separators are drawn. This is the default value.
//
// The function takes the following parameters:
//
//   - fn: TreeViewRowSeparatorFunc.
func (comboBox *ComboBox) SetRowSeparatorFunc(fn TreeViewRowSeparatorFunc) {
	var _arg0 *C.GtkComboBox                // out
	var _arg1 C.GtkTreeViewRowSeparatorFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewRowSeparatorFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_combo_box_set_row_separator_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(fn)
}

// SetRowSpanColumn sets the column with row span information for combo_box to
// be row_span. The row span column contains integers which indicate how many
// rows an item should span.
//
// The function takes the following parameters:
//
//   - rowSpan: column in the model passed during construction.
func (comboBox *ComboBox) SetRowSpanColumn(rowSpan int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(rowSpan)

	C.gtk_combo_box_set_row_span_column(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(rowSpan)
}

// SetTitle sets the menu’s title in tearoff mode.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - title for the menu in tearoff mode.
func (comboBox *ComboBox) SetTitle(title string) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_combo_box_set_title(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(title)
}

// SetWrapWidth sets the wrap width of combo_box to be width. The wrap width is
// basically the preferred number of columns when you want the popup to be layed
// out in a table.
//
// The function takes the following parameters:
//
//   - width: preferred number of columns.
func (comboBox *ComboBox) SetWrapWidth(width int) {
	var _arg0 *C.GtkComboBox // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(width)

	C.gtk_combo_box_set_wrap_width(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(width)
}

// Changed: signal is emitted when the active item is changed.
func (comboBox *ComboBox) changed() {
	gclass := (*C.GtkComboBoxClass)(coreglib.PeekParentClass(comboBox))
	fnarg := gclass.changed

	var _arg0 *C.GtkComboBox // out

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	C._gotk4_gtk3_ComboBox_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(comboBox)
}

// formatEntryText: signal which allows you to change how the text displayed in
// a combo box’s entry is displayed.
func (comboBox *ComboBox) formatEntryText(path string) string {
	gclass := (*C.GtkComboBoxClass)(coreglib.PeekParentClass(comboBox))
	fnarg := gclass.format_entry_text

	var _arg0 *C.GtkComboBox // out
	var _arg1 *C.gchar       // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkComboBox)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_ComboBox_virtual_format_entry_text(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(path)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// ComboBoxAccessibleOverrides contains methods that are overridable.
type ComboBoxAccessibleOverrides struct {
}

func defaultComboBoxAccessibleOverrides(v *ComboBoxAccessible) ComboBoxAccessibleOverrides {
	return ComboBoxAccessibleOverrides{}
}

type ComboBoxAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	*coreglib.Object
	atk.Action
	atk.Selection
}

var (
	_ coreglib.Objector = (*ComboBoxAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ComboBoxAccessible, *ComboBoxAccessibleClass, ComboBoxAccessibleOverrides](
		GTypeComboBoxAccessible,
		initComboBoxAccessibleClass,
		wrapComboBoxAccessible,
		defaultComboBoxAccessibleOverrides,
	)
}

func initComboBoxAccessibleClass(gclass unsafe.Pointer, overrides ComboBoxAccessibleOverrides, classInitFunc func(*ComboBoxAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ComboBoxAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapComboBoxAccessible(obj *coreglib.Object) *ComboBoxAccessible {
	return &ComboBoxAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalComboBoxAccessible(p uintptr) (interface{}, error) {
	return wrapComboBoxAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ComboBoxTextOverrides contains methods that are overridable.
type ComboBoxTextOverrides struct {
}

func defaultComboBoxTextOverrides(v *ComboBoxText) ComboBoxTextOverrides {
	return ComboBoxTextOverrides{}
}

// ComboBoxText is a simple variant of ComboBox that hides the model-view
// complexity for simple text-only use cases.
//
// To create a GtkComboBoxText, use gtk_combo_box_text_new() or
// gtk_combo_box_text_new_with_entry().
//
// You can add items to a GtkComboBoxText with gtk_combo_box_text_append_text(),
// gtk_combo_box_text_insert_text() or gtk_combo_box_text_prepend_text() and
// remove options with gtk_combo_box_text_remove().
//
// If the GtkComboBoxText contains an entry (via the “has-entry” property),
// its contents can be retrieved using gtk_combo_box_text_get_active_text(). The
// entry itself can be accessed by calling gtk_bin_get_child() on the combo box.
//
// You should not call gtk_combo_box_set_model() or attempt to pack more cells
// into this combo box via its GtkCellLayout interface.
//
// # GtkComboBoxText as GtkBuildable
//
// The GtkComboBoxText implementation of the GtkBuildable interface
// supports adding items directly using the <items> element and specifying
// <item> elements for each item. Each <item> element can specify the “id”
// corresponding to the appended text and also supports the regular translation
// attributes “translatable”, “context” and “comments”.
//
// Here is a UI definition fragment specifying GtkComboBoxText items:
//
//	combobox
//	╰── box.linked
//	    ├── entry.combo
//	    ├── button.combo
//	    ╰── window.popup
//
// GtkComboBoxText has a single CSS node with name combobox. It adds the style
// class .combo to the main CSS nodes of its entry and button children, and the
// .linked class to the node of its internal box.
type ComboBoxText struct {
	_ [0]func() // equal guard
	ComboBox
}

var (
	_ Binner            = (*ComboBoxText)(nil)
	_ coreglib.Objector = (*ComboBoxText)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ComboBoxText, *ComboBoxTextClass, ComboBoxTextOverrides](
		GTypeComboBoxText,
		initComboBoxTextClass,
		wrapComboBoxText,
		defaultComboBoxTextOverrides,
	)
}

func initComboBoxTextClass(gclass unsafe.Pointer, overrides ComboBoxTextOverrides, classInitFunc func(*ComboBoxTextClass)) {
	if classInitFunc != nil {
		class := (*ComboBoxTextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapComboBoxText(obj *coreglib.Object) *ComboBoxText {
	return &ComboBoxText{
		ComboBox: ComboBox{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			CellEditable: CellEditable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			CellLayout: CellLayout{
				Object: obj,
			},
		},
	}
}

func marshalComboBoxText(p uintptr) (interface{}, error) {
	return wrapComboBoxText(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewComboBoxText creates a new ComboBoxText, which is a ComboBox just
// displaying strings.
//
// The function returns the following values:
//
//   - comboBoxText: new ComboBoxText.
func NewComboBoxText() *ComboBoxText {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_combo_box_text_new()

	var _comboBoxText *ComboBoxText // out

	_comboBoxText = wrapComboBoxText(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBoxText
}

// NewComboBoxTextWithEntry creates a new ComboBoxText, which is a ComboBox just
// displaying strings. The combo box created by this function has an entry.
//
// The function returns the following values:
//
//   - comboBoxText: new ComboBoxText.
func NewComboBoxTextWithEntry() *ComboBoxText {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_combo_box_text_new_with_entry()

	var _comboBoxText *ComboBoxText // out

	_comboBoxText = wrapComboBoxText(coreglib.Take(unsafe.Pointer(_cret)))

	return _comboBoxText
}

// Append appends text to the list of strings stored in combo_box. If id is
// non-NULL then it is used as the ID of the row.
//
// This is the same as calling gtk_combo_box_text_insert() with a position of
// -1.
//
// The function takes the following parameters:
//
//   - id (optional): string ID for this value, or NULL.
//   - text: string.
func (comboBox *ComboBoxText) Append(id, text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 *C.gchar           // out
	var _arg2 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if id != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(id)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_combo_box_text_append(_arg0, _arg1, _arg2)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(id)
	runtime.KeepAlive(text)
}

// AppendText appends text to the list of strings stored in combo_box.
//
// This is the same as calling gtk_combo_box_text_insert_text() with a position
// of -1.
//
// The function takes the following parameters:
//
//   - text: string.
func (comboBox *ComboBoxText) AppendText(text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_combo_box_text_append_text(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(text)
}

// ActiveText returns the currently active string in combo_box, or NULL if none
// is selected. If combo_box contains an entry, this function will return its
// contents (which will not necessarily be an item from the list).
//
// The function returns the following values:
//
//   - utf8: newly allocated string containing the currently active text.
//     Must be freed with g_free().
func (comboBox *ComboBoxText) ActiveText() string {
	var _arg0 *C.GtkComboBoxText // out
	var _cret *C.gchar           // in

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	_cret = C.gtk_combo_box_text_get_active_text(_arg0)
	runtime.KeepAlive(comboBox)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Insert inserts text at position in the list of strings stored in
// combo_box. If id is non-NULL then it is used as the ID of the row. See
// ComboBox:id-column.
//
// If position is negative then text is appended.
//
// The function takes the following parameters:
//
//   - position: index to insert text.
//   - id (optional): string ID for this value, or NULL.
//   - text: string to display.
func (comboBox *ComboBoxText) Insert(position int, id, text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 C.gint             // out
	var _arg2 *C.gchar           // out
	var _arg3 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(position)
	if id != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(id)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg3))

	C.gtk_combo_box_text_insert(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(position)
	runtime.KeepAlive(id)
	runtime.KeepAlive(text)
}

// InsertText inserts text at position in the list of strings stored in
// combo_box.
//
// If position is negative then text is appended.
//
// This is the same as calling gtk_combo_box_text_insert() with a NULL ID
// string.
//
// The function takes the following parameters:
//
//   - position: index to insert text.
//   - text: string.
func (comboBox *ComboBoxText) InsertText(position int, text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 C.gint             // out
	var _arg2 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_combo_box_text_insert_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(position)
	runtime.KeepAlive(text)
}

// Prepend prepends text to the list of strings stored in combo_box. If id is
// non-NULL then it is used as the ID of the row.
//
// This is the same as calling gtk_combo_box_text_insert() with a position of 0.
//
// The function takes the following parameters:
//
//   - id (optional): string ID for this value, or NULL.
//   - text: string.
func (comboBox *ComboBoxText) Prepend(id, text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 *C.gchar           // out
	var _arg2 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	if id != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(id)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_combo_box_text_prepend(_arg0, _arg1, _arg2)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(id)
	runtime.KeepAlive(text)
}

// PrependText prepends text to the list of strings stored in combo_box.
//
// This is the same as calling gtk_combo_box_text_insert_text() with a position
// of 0.
//
// The function takes the following parameters:
//
//   - text: string.
func (comboBox *ComboBoxText) PrependText(text string) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_combo_box_text_prepend_text(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(text)
}

// Remove removes the string at position from combo_box.
//
// The function takes the following parameters:
//
//   - position: index of the item to remove.
func (comboBox *ComboBoxText) Remove(position int) {
	var _arg0 *C.GtkComboBoxText // out
	var _arg1 C.gint             // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))
	_arg1 = C.gint(position)

	C.gtk_combo_box_text_remove(_arg0, _arg1)
	runtime.KeepAlive(comboBox)
	runtime.KeepAlive(position)
}

// RemoveAll removes all the text entries from the combo box.
func (comboBox *ComboBoxText) RemoveAll() {
	var _arg0 *C.GtkComboBoxText // out

	_arg0 = (*C.GtkComboBoxText)(unsafe.Pointer(coreglib.InternObject(comboBox).Native()))

	C.gtk_combo_box_text_remove_all(_arg0)
	runtime.KeepAlive(comboBox)
}

// ContainerOverrides contains methods that are overridable.
type ContainerOverrides struct {
	// Add adds widget to container. Typically used for simple containers such
	// as Window, Frame, or Button; for more complicated layout containers such
	// as Box or Grid, this function will pick default packing parameters that
	// may not be correct. So consider functions such as gtk_box_pack_start()
	// and gtk_grid_attach() as an alternative to gtk_container_add() in those
	// cases. A widget may be added to only one container at a time; you can’t
	// place the same widget inside two different containers.
	//
	// Note that some containers, such as ScrolledWindow or ListBox, may add
	// intermediate children between the added widget and the container.
	//
	// The function takes the following parameters:
	//
	//   - widget to be placed inside container.
	Add func(widget Widgetter)
	// CheckResize: signal emitted when a size recalculation is needed.
	CheckResize func()
	// ChildType returns the type of the children supported by the container.
	//
	// Note that this may return G_TYPE_NONE to indicate that no more children
	// can be added, e.g. for a Paned which already has two children.
	//
	// The function returns the following values:
	//
	//   - gType: #GType.
	ChildType func() coreglib.Type
	// CompositeName gets a widget’s composite name. Deprecated: 3.10.
	CompositeName func(child Widgetter) string
	// PathForChild returns a newly created widget path representing all the
	// widget hierarchy from the toplevel down to and including child.
	//
	// The function takes the following parameters:
	//
	//   - child of container.
	//
	// The function returns the following values:
	//
	//   - widgetPath: newly created WidgetPath.
	PathForChild func(child Widgetter) *WidgetPath
	// Remove removes widget from container. widget must be inside container.
	// Note that container will own a reference to widget, and that this
	// may be the last reference held; so removing a widget from its
	// container can destroy that widget. If you want to use widget again,
	// you need to add a reference to it before removing it from a container,
	// using g_object_ref(). If you don’t want to use widget again it’s usually
	// more efficient to simply destroy it directly using gtk_widget_destroy()
	// since this will remove it from the container and help break any circular
	// reference count cycles.
	//
	// The function takes the following parameters:
	//
	//   - widget: current child of container.
	Remove func(widget Widgetter)
	// SetFocusChild: sets, or unsets if child is NULL, the focused child of
	// container.
	//
	// This function emits the GtkContainer::set_focus_child signal of
	// container. Implementations of Container can override the default
	// behaviour by overriding the class closure of this signal.
	//
	// This is function is mostly meant to be used by widgets. Applications
	// can use gtk_widget_grab_focus() to manually set the focus to a specific
	// widget.
	//
	// The function takes the following parameters:
	//
	//   - child (optional) or NULL.
	SetFocusChild func(child Widgetter)
}

func defaultContainerOverrides(v *Container) ContainerOverrides {
	return ContainerOverrides{
		Add:           v.add,
		CheckResize:   v.checkResize,
		ChildType:     v.childType,
		CompositeName: v.compositeName,
		PathForChild:  v.pathForChild,
		Remove:        v.remove,
		SetFocusChild: v.setFocusChild,
	}
}

// Container: GTK+ user interface is constructed by nesting widgets inside
// widgets. Container widgets are the inner nodes in the resulting tree of
// widgets: they contain other widgets. So, for example, you might have a Window
// containing a Frame containing a Label. If you wanted an image instead of a
// textual label inside the frame, you might replace the Label widget with a
// Image widget.
//
// There are two major kinds of container widgets in GTK+. Both are subclasses
// of the abstract GtkContainer base class.
//
// The first type of container widget has a single child widget and derives from
// Bin. These containers are decorators, which add some kind of functionality
// to the child. For example, a Button makes its child into a clickable button;
// a Frame draws a frame around its child and a Window places its child widget
// inside a top-level window.
//
// The second type of container can have more than one child; its purpose is to
// manage layout. This means that these containers assign sizes and positions
// to their children. For example, a HBox arranges its children in a horizontal
// row, and a Grid arranges the widgets it contains in a two-dimensional grid.
//
// For implementations of Container the virtual method ContainerClass.forall()
// is always required, since it's used for drawing and other internal
// operations on the children. If the Container implementation expect to have
// non internal children it's needed to implement both ContainerClass.add()
// and ContainerClass.remove(). If the GtkContainer implementation has
// internal children, they should be added with gtk_widget_set_parent() on
// init() and removed with gtk_widget_unparent() in the WidgetClass.destroy()
// implementation. See more about implementing custom widgets at
// https://wiki.gnome.org/HowDoI/CustomWidgets
//
// # Height for width geometry management
//
// GTK+ uses a height-for-width (and width-for-height) geometry management
// system. Height-for-width means that a widget can change how much vertical
// space it needs, depending on the amount of horizontal space that it is given
// (and similar for width-for-height).
//
// There are some things to keep in mind when implementing container widgets
// that make use of GTK+’s height for width geometry management system.
// First, it’s important to note that a container must prioritize one of
// its dimensions, that is to say that a widget or container can only
// have a SizeRequestMode that is GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH or
// GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT. However, every widget and container must
// be able to respond to the APIs for both dimensions, i.e. even if a widget has
// a request mode that is height-for-width, it is possible that its parent will
// request its sizes using the width-for-height APIs.
//
// To ensure that everything works properly, here are some guidelines to follow
// when implementing height-for-width (or width-for-height) containers.
//
// Each request mode involves 2 virtual methods. Height-for-width
// apis run through gtk_widget_get_preferred_width() and then through
// gtk_widget_get_preferred_height_for_width(). When handling requests in the
// opposite SizeRequestMode it is important that every widget request at least
// enough space to display all of its content at all times.
//
// When gtk_widget_get_preferred_height() is called on a container that is
// height-for-width, the container must return the height for its minimum width.
// This is easily achieved by simply calling the reverse apis implemented for
// itself as follows:
//
//	<object class="GtkBox">
//	  <child>
//	    <object class="GtkEntry" id="entry1"/>
//	    <packing>
//	      <property name="pack-type">start</property>
//	    </packing>
//	  </child>
//	  <child>
//	    <object class="GtkEntry" id="entry2"/>
//	  </child>
//	  <focus-chain>
//	    <widget name="entry1"/>
//	    <widget name="entry2"/>
//	  </focus-chain>
//	</object>.
type Container struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Container)(nil)
)

// Containerer describes types inherited from class Container.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Containerer interface {
	coreglib.Objector
	baseContainer() *Container
}

var _ Containerer = (*Container)(nil)

func init() {
	coreglib.RegisterClassInfo[*Container, *ContainerClass, ContainerOverrides](
		GTypeContainer,
		initContainerClass,
		wrapContainer,
		defaultContainerOverrides,
	)
}

func initContainerClass(gclass unsafe.Pointer, overrides ContainerOverrides, classInitFunc func(*ContainerClass)) {
	pclass := (*C.GtkContainerClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeContainer))))

	if overrides.Add != nil {
		pclass.add = (*[0]byte)(C._gotk4_gtk3_ContainerClass_add)
	}

	if overrides.CheckResize != nil {
		pclass.check_resize = (*[0]byte)(C._gotk4_gtk3_ContainerClass_check_resize)
	}

	if overrides.ChildType != nil {
		pclass.child_type = (*[0]byte)(C._gotk4_gtk3_ContainerClass_child_type)
	}

	if overrides.CompositeName != nil {
		pclass.composite_name = (*[0]byte)(C._gotk4_gtk3_ContainerClass_composite_name)
	}

	if overrides.PathForChild != nil {
		pclass.get_path_for_child = (*[0]byte)(C._gotk4_gtk3_ContainerClass_get_path_for_child)
	}

	if overrides.Remove != nil {
		pclass.remove = (*[0]byte)(C._gotk4_gtk3_ContainerClass_remove)
	}

	if overrides.SetFocusChild != nil {
		pclass.set_focus_child = (*[0]byte)(C._gotk4_gtk3_ContainerClass_set_focus_child)
	}

	if classInitFunc != nil {
		class := (*ContainerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapContainer(obj *coreglib.Object) *Container {
	return &Container{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalContainer(p uintptr) (interface{}, error) {
	return wrapContainer(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (container *Container) baseContainer() *Container {
	return container
}

// BaseContainer returns the underlying base object.
func BaseContainer(obj Containerer) *Container {
	return obj.baseContainer()
}

func (container *Container) ConnectAdd(f func(object Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(container, "add", false, unsafe.Pointer(C._gotk4_gtk3_Container_ConnectAdd), f)
}

func (container *Container) ConnectCheckResize(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(container, "check-resize", false, unsafe.Pointer(C._gotk4_gtk3_Container_ConnectCheckResize), f)
}

func (container *Container) ConnectRemove(f func(object Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(container, "remove", false, unsafe.Pointer(C._gotk4_gtk3_Container_ConnectRemove), f)
}

func (container *Container) ConnectSetFocusChild(f func(object Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(container, "set-focus-child", false, unsafe.Pointer(C._gotk4_gtk3_Container_ConnectSetFocusChild), f)
}

// Add adds widget to container. Typically used for simple containers such
// as Window, Frame, or Button; for more complicated layout containers such
// as Box or Grid, this function will pick default packing parameters that
// may not be correct. So consider functions such as gtk_box_pack_start() and
// gtk_grid_attach() as an alternative to gtk_container_add() in those cases.
// A widget may be added to only one container at a time; you can’t place the
// same widget inside two different containers.
//
// Note that some containers, such as ScrolledWindow or ListBox, may add
// intermediate children between the added widget and the container.
//
// The function takes the following parameters:
//
//   - widget to be placed inside container.
func (container *Container) Add(widget Widgetter) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_container_add(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(widget)
}

func (container *Container) CheckResize() {
	var _arg0 *C.GtkContainer // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	C.gtk_container_check_resize(_arg0)
	runtime.KeepAlive(container)
}

// ChildGetProperty gets the value of a child property for child and container.
//
// The function takes the following parameters:
//
//   - child: widget which is a child of container.
//   - propertyName: name of the property to get.
//   - value: location to return the value.
func (container *Container) ChildGetProperty(child Widgetter, propertyName string, value *coreglib.Value) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.gchar        // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_container_child_get_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
	runtime.KeepAlive(propertyName)
	runtime.KeepAlive(value)
}

// ChildNotify emits a Widget::child-notify signal for the [child
// property][child-properties] child_property on the child.
//
// This is an analogue of g_object_notify() for child properties.
//
// Also see gtk_widget_child_notify().
//
// The function takes the following parameters:
//
//   - child widget.
//   - childProperty: name of a child property installed on the class of
//     container.
func (container *Container) ChildNotify(child Widgetter, childProperty string) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(childProperty)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_container_child_notify(_arg0, _arg1, _arg2)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
	runtime.KeepAlive(childProperty)
}

// ChildSetProperty sets a child property for child and container.
//
// The function takes the following parameters:
//
//   - child: widget which is a child of container.
//   - propertyName: name of the property to set.
//   - value to set the property to.
func (container *Container) ChildSetProperty(child Widgetter, propertyName string, value *coreglib.Value) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.gchar        // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_container_child_set_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
	runtime.KeepAlive(propertyName)
	runtime.KeepAlive(value)
}

// ChildType returns the type of the children supported by the container.
//
// Note that this may return G_TYPE_NONE to indicate that no more children can
// be added, e.g. for a Paned which already has two children.
//
// The function returns the following values:
//
//   - gType: #GType.
func (container *Container) ChildType() coreglib.Type {
	var _arg0 *C.GtkContainer // out
	var _cret C.GType         // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_child_type(_arg0)
	runtime.KeepAlive(container)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// Forall invokes callback on each direct child of container, including children
// that are considered “internal” (implementation details of the container).
// “Internal” children generally weren’t added by the user of the container,
// but were added by the container implementation itself.
//
// Most applications should use gtk_container_foreach(), rather than
// gtk_container_forall().
//
// The function takes the following parameters:
//
//   - callback: callback.
func (container *Container) Forall(callback Callback) {
	var _arg0 *C.GtkContainer // out
	var _arg1 C.GtkCallback   // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_Callback)
	_arg2 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_container_forall(_arg0, _arg1, _arg2)
	runtime.KeepAlive(container)
	runtime.KeepAlive(callback)
}

// ForEach invokes callback on each non-internal child of container. See
// gtk_container_forall() for details on what constitutes an “internal” child.
// For all practical purposes, this function should iterate over precisely
// those child widgets that were added to the container by the application with
// explicit add() calls.
//
// It is permissible to remove the child from the callback handler.
//
// Most applications should use gtk_container_foreach(), rather than
// gtk_container_forall().
//
// The function takes the following parameters:
//
//   - callback: callback.
func (container *Container) ForEach(callback Callback) {
	var _arg0 *C.GtkContainer // out
	var _arg1 C.GtkCallback   // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_Callback)
	_arg2 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_container_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(container)
	runtime.KeepAlive(callback)
}

// BorderWidth retrieves the border width of the container. See
// gtk_container_set_border_width().
//
// The function returns the following values:
//
//   - guint: current border width.
func (container *Container) BorderWidth() uint {
	var _arg0 *C.GtkContainer // out
	var _cret C.guint         // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_border_width(_arg0)
	runtime.KeepAlive(container)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Children returns the container’s non-internal children. See
// gtk_container_forall() for details on what constitutes an "internal" child.
//
// The function returns the following values:
//
//   - list: newly-allocated list of the container’s non-internal children.
func (container *Container) Children() []Widgetter {
	var _arg0 *C.GtkContainer // out
	var _cret *C.GList        // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_children(_arg0)
	runtime.KeepAlive(container)

	var _list []Widgetter // out

	_list = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// FocusChain retrieves the focus chain of the container, if one has been set
// explicitly. If no focus chain has been explicitly set, GTK+ computes the
// focus chain based on the positions of the children. In that case, GTK+ stores
// NULL in focusable_widgets and returns FALSE.
//
// Deprecated: For overriding focus behavior, use the GtkWidgetClass::focus
// signal.
//
// The function returns the following values:
//
//   - focusableWidgets: location to store the focus chain of the container,
//     or NULL. You should free this list using g_list_free() when you are done
//     with it, however no additional reference count is added to the individual
//     widgets in the focus chain.
//   - ok: TRUE if the focus chain of the container has been set explicitly.
func (container *Container) FocusChain() ([]Widgetter, bool) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GList        // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_focus_chain(_arg0, &_arg1)
	runtime.KeepAlive(container)

	var _focusableWidgets []Widgetter // out
	var _ok bool                      // out

	_focusableWidgets = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_arg1)))
	gextras.MoveList(unsafe.Pointer(_arg1), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_focusableWidgets = append(_focusableWidgets, dst)
	})
	if _cret != 0 {
		_ok = true
	}

	return _focusableWidgets, _ok
}

// FocusChild returns the current focus child widget inside container.
// This is not the currently focused widget. That can be obtained by calling
// gtk_window_get_focus().
//
// The function returns the following values:
//
//   - widget (optional): child widget which will receive the focus inside
//     container when the container is focused, or NULL if none is set.
func (container *Container) FocusChild() Widgetter {
	var _arg0 *C.GtkContainer // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_focus_child(_arg0)
	runtime.KeepAlive(container)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// FocusHAdjustment retrieves the horizontal focus adjustment for the container.
// See gtk_container_set_focus_hadjustment ().
//
// The function returns the following values:
//
//   - adjustment (optional): horizontal focus adjustment, or NULL if none has
//     been set.
func (container *Container) FocusHAdjustment() *Adjustment {
	var _arg0 *C.GtkContainer  // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_focus_hadjustment(_arg0)
	runtime.KeepAlive(container)

	var _adjustment *Adjustment // out

	if _cret != nil {
		_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _adjustment
}

// FocusVAdjustment retrieves the vertical focus adjustment for the container.
// See gtk_container_set_focus_vadjustment().
//
// The function returns the following values:
//
//   - adjustment (optional): vertical focus adjustment, or NULL if none has
//     been set.
func (container *Container) FocusVAdjustment() *Adjustment {
	var _arg0 *C.GtkContainer  // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_focus_vadjustment(_arg0)
	runtime.KeepAlive(container)

	var _adjustment *Adjustment // out

	if _cret != nil {
		_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _adjustment
}

// PathForChild returns a newly created widget path representing all the widget
// hierarchy from the toplevel down to and including child.
//
// The function takes the following parameters:
//
//   - child of container.
//
// The function returns the following values:
//
//   - widgetPath: newly created WidgetPath.
func (container *Container) PathForChild(child Widgetter) *WidgetPath {
	var _arg0 *C.GtkContainer  // out
	var _arg1 *C.GtkWidget     // out
	var _cret *C.GtkWidgetPath // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_container_get_path_for_child(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// ResizeMode returns the resize mode for the container. See
// gtk_container_set_resize_mode ().
//
// Deprecated: Resize modes are deprecated. They aren’t necessary anymore since
// frame clocks and might introduce obscure bugs if used.
//
// The function returns the following values:
//
//   - resizeMode: current resize mode.
func (container *Container) ResizeMode() ResizeMode {
	var _arg0 *C.GtkContainer // out
	var _cret C.GtkResizeMode // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_get_resize_mode(_arg0)
	runtime.KeepAlive(container)

	var _resizeMode ResizeMode // out

	_resizeMode = ResizeMode(_cret)

	return _resizeMode
}

// PropagateDraw: when a container receives a call to the draw function,
// it must send synthetic Widget::draw calls to all children that don’t have
// their own Windows. This function provides a convenient way of doing this.
// A container, when it receives a call to its Widget::draw function, calls
// gtk_container_propagate_draw() once for each child, passing in the cr the
// container received.
//
// gtk_container_propagate_draw() takes care of translating the origin
// of cr, and deciding whether the draw needs to be sent to the child.
// It is a convenient and optimized way of getting the same effect as calling
// gtk_widget_draw() on the child directly.
//
// In most cases, a container can simply either inherit the Widget::draw
// implementation from Container, or do some drawing and then chain to the
// ::draw implementation from Container.
//
// The function takes the following parameters:
//
//   - child of container.
//   - cr: cairo context as passed to the container. If you want to use
//     cr in container’s draw function, consider using cairo_save() and
//     cairo_restore() before calling this function.
func (container *Container) PropagateDraw(child Widgetter, cr *cairo.Context) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 *C.cairo_t      // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	C.gtk_container_propagate_draw(_arg0, _arg1, _arg2)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
	runtime.KeepAlive(cr)
}

// Remove removes widget from container. widget must be inside container.
// Note that container will own a reference to widget, and that this may be the
// last reference held; so removing a widget from its container can destroy that
// widget. If you want to use widget again, you need to add a reference to it
// before removing it from a container, using g_object_ref(). If you don’t want
// to use widget again it’s usually more efficient to simply destroy it directly
// using gtk_widget_destroy() since this will remove it from the container and
// help break any circular reference count cycles.
//
// The function takes the following parameters:
//
//   - widget: current child of container.
func (container *Container) Remove(widget Widgetter) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_container_remove(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(widget)
}

// ResizeChildren: deprecated: since version 3.10.
func (container *Container) ResizeChildren() {
	var _arg0 *C.GtkContainer // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	C.gtk_container_resize_children(_arg0)
	runtime.KeepAlive(container)
}

// SetBorderWidth sets the border width of the container.
//
// The border width of a container is the amount of space to leave around the
// outside of the container. The only exception to this is Window; because
// toplevel windows can’t leave space outside, they leave the space inside.
// The border is added on all sides of the container. To add space to only one
// side, use a specific Widget:margin property on the child widget, for example
// Widget:margin-top.
//
// The function takes the following parameters:
//
//   - borderWidth: amount of blank space to leave outside the container.
//     Valid values are in the range 0-65535 pixels.
func (container *Container) SetBorderWidth(borderWidth uint) {
	var _arg0 *C.GtkContainer // out
	var _arg1 C.guint         // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = C.guint(borderWidth)

	C.gtk_container_set_border_width(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(borderWidth)
}

// SetFocusChain sets a focus chain, overriding the one computed automatically
// by GTK+.
//
// In principle each widget in the chain should be a descendant of the
// container, but this is not enforced by this method, since it’s allowed to set
// the focus chain before you pack the widgets, or have a widget in the chain
// that isn’t always packed. The necessary checks are done when the focus chain
// is actually traversed.
//
// Deprecated: For overriding focus behavior, use the GtkWidgetClass::focus
// signal.
//
// The function takes the following parameters:
//
//   - focusableWidgets: the new focus chain.
func (container *Container) SetFocusChain(focusableWidgets []Widgetter) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GList        // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	for i := len(focusableWidgets) - 1; i >= 0; i-- {
		src := focusableWidgets[i]
		var dst *C.GtkWidget // out
		dst = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(src).Native()))
		_arg1 = C.g_list_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
	}
	defer C.g_list_free(_arg1)

	C.gtk_container_set_focus_chain(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(focusableWidgets)
}

// SetFocusChild: sets, or unsets if child is NULL, the focused child of
// container.
//
// This function emits the GtkContainer::set_focus_child signal of container.
// Implementations of Container can override the default behaviour by overriding
// the class closure of this signal.
//
// This is function is mostly meant to be used by widgets. Applications can use
// gtk_widget_grab_focus() to manually set the focus to a specific widget.
//
// The function takes the following parameters:
//
//   - child (optional) or NULL.
func (container *Container) SetFocusChild(child Widgetter) {
	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	if child != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	}

	C.gtk_container_set_focus_child(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
}

// SetFocusHAdjustment hooks up an adjustment to focus handling in a container,
// so when a child of the container is focused, the adjustment is scrolled
// to show that widget. This function sets the horizontal alignment.
// See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining the
// adjustment and gtk_container_set_focus_vadjustment() for setting the vertical
// adjustment.
//
// The adjustments have to be in pixel units and in the same coordinate system
// as the allocation for immediate children of the container.
//
// The function takes the following parameters:
//
//   - adjustment which should be adjusted when the focus is moved among the
//     descendents of container.
func (container *Container) SetFocusHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkContainer  // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_container_set_focus_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(adjustment)
}

// SetFocusVAdjustment hooks up an adjustment to focus handling in a container,
// so when a child of the container is focused, the adjustment is scrolled
// to show that widget. This function sets the vertical alignment.
// See gtk_scrolled_window_get_vadjustment() for a typical way of obtaining
// the adjustment and gtk_container_set_focus_hadjustment() for setting the
// horizontal adjustment.
//
// The adjustments have to be in pixel units and in the same coordinate system
// as the allocation for immediate children of the container.
//
// The function takes the following parameters:
//
//   - adjustment which should be adjusted when the focus is moved among the
//     descendents of container.
func (container *Container) SetFocusVAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkContainer  // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_container_set_focus_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(adjustment)
}

// SetReallocateRedraws sets the reallocate_redraws flag of the container to the
// given value.
//
// Containers requesting reallocation redraws get automatically redrawn if any
// of their children changed allocation.
//
// Deprecated: Call gtk_widget_queue_draw() in your size_allocate handler.
//
// The function takes the following parameters:
//
//   - needsRedraws: new value for the container’s reallocate_redraws flag.
func (container *Container) SetReallocateRedraws(needsRedraws bool) {
	var _arg0 *C.GtkContainer // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	if needsRedraws {
		_arg1 = C.TRUE
	}

	C.gtk_container_set_reallocate_redraws(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(needsRedraws)
}

// SetResizeMode sets the resize mode for the container.
//
// The resize mode of a container determines whether a resize request will be
// passed to the container’s parent, queued for later execution or executed
// immediately.
//
// Deprecated: Resize modes are deprecated. They aren’t necessary anymore since
// frame clocks and might introduce obscure bugs if used.
//
// The function takes the following parameters:
//
//   - resizeMode: new resize mode.
func (container *Container) SetResizeMode(resizeMode ResizeMode) {
	var _arg0 *C.GtkContainer // out
	var _arg1 C.GtkResizeMode // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = C.GtkResizeMode(resizeMode)

	C.gtk_container_set_resize_mode(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(resizeMode)
}

// UnsetFocusChain removes a focus chain explicitly set with
// gtk_container_set_focus_chain().
//
// Deprecated: For overriding focus behavior, use the GtkWidgetClass::focus
// signal.
func (container *Container) UnsetFocusChain() {
	var _arg0 *C.GtkContainer // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	C.gtk_container_unset_focus_chain(_arg0)
	runtime.KeepAlive(container)
}

// Add adds widget to container. Typically used for simple containers such
// as Window, Frame, or Button; for more complicated layout containers such
// as Box or Grid, this function will pick default packing parameters that
// may not be correct. So consider functions such as gtk_box_pack_start() and
// gtk_grid_attach() as an alternative to gtk_container_add() in those cases.
// A widget may be added to only one container at a time; you can’t place the
// same widget inside two different containers.
//
// Note that some containers, such as ScrolledWindow or ListBox, may add
// intermediate children between the added widget and the container.
//
// The function takes the following parameters:
//
//   - widget to be placed inside container.
func (container *Container) add(widget Widgetter) {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.add

	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Container_virtual_add(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(widget)
}

// checkResize: signal emitted when a size recalculation is needed.
func (container *Container) checkResize() {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.check_resize

	var _arg0 *C.GtkContainer // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	C._gotk4_gtk3_Container_virtual_check_resize(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(container)
}

// childType returns the type of the children supported by the container.
//
// Note that this may return G_TYPE_NONE to indicate that no more children can
// be added, e.g. for a Paned which already has two children.
//
// The function returns the following values:
//
//   - gType: #GType.
func (container *Container) childType() coreglib.Type {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.child_type

	var _arg0 *C.GtkContainer // out
	var _cret C.GType         // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C._gotk4_gtk3_Container_virtual_child_type(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(container)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// compositeName gets a widget’s composite name. Deprecated: 3.10.
func (container *Container) compositeName(child Widgetter) string {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.composite_name

	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C._gotk4_gtk3_Container_virtual_composite_name(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Forall invokes callback on each direct child of container, including children
// that are considered “internal” (implementation details of the container).
// “Internal” children generally weren’t added by the user of the container,
// but were added by the container implementation itself.
//
// Most applications should use gtk_container_foreach(), rather than
// gtk_container_forall().
//
// The function takes the following parameters:
//
//   - includeInternals
//   - callback: callback.
func (container *Container) forall(includeInternals bool, callback Callback) {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.forall

	var _arg0 *C.GtkContainer // out
	var _arg1 C.gboolean      // out
	var _arg2 C.GtkCallback   // out
	var _arg3 C.gpointer

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	if includeInternals {
		_arg1 = C.TRUE
	}
	_arg2 = (*[0]byte)(C._gotk4_gtk3_Callback)
	_arg3 = C.gpointer(gbox.Assign(callback))
	defer gbox.Delete(uintptr(_arg3))

	C._gotk4_gtk3_Container_virtual_forall(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(container)
	runtime.KeepAlive(includeInternals)
	runtime.KeepAlive(callback)
}

// pathForChild returns a newly created widget path representing all the widget
// hierarchy from the toplevel down to and including child.
//
// The function takes the following parameters:
//
//   - child of container.
//
// The function returns the following values:
//
//   - widgetPath: newly created WidgetPath.
func (container *Container) pathForChild(child Widgetter) *WidgetPath {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.get_path_for_child

	var _arg0 *C.GtkContainer  // out
	var _arg1 *C.GtkWidget     // out
	var _cret *C.GtkWidgetPath // in

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C._gotk4_gtk3_Container_virtual_get_path_for_child(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// Remove removes widget from container. widget must be inside container.
// Note that container will own a reference to widget, and that this may be the
// last reference held; so removing a widget from its container can destroy that
// widget. If you want to use widget again, you need to add a reference to it
// before removing it from a container, using g_object_ref(). If you don’t want
// to use widget again it’s usually more efficient to simply destroy it directly
// using gtk_widget_destroy() since this will remove it from the container and
// help break any circular reference count cycles.
//
// The function takes the following parameters:
//
//   - widget: current child of container.
func (container *Container) remove(widget Widgetter) {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.remove

	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Container_virtual_remove(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(widget)
}

// setFocusChild: sets, or unsets if child is NULL, the focused child of
// container.
//
// This function emits the GtkContainer::set_focus_child signal of container.
// Implementations of Container can override the default behaviour by overriding
// the class closure of this signal.
//
// This is function is mostly meant to be used by widgets. Applications can use
// gtk_widget_grab_focus() to manually set the focus to a specific widget.
//
// The function takes the following parameters:
//
//   - child (optional) or NULL.
func (container *Container) setFocusChild(child Widgetter) {
	gclass := (*C.GtkContainerClass)(coreglib.PeekParentClass(container))
	fnarg := gclass.set_focus_child

	var _arg0 *C.GtkContainer // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkContainer)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	if child != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	}

	C._gotk4_gtk3_Container_virtual_set_focus_child(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
}

// ContainerAccessibleOverrides contains methods that are overridable.
type ContainerAccessibleOverrides struct {
}

func defaultContainerAccessibleOverrides(v *ContainerAccessible) ContainerAccessibleOverrides {
	return ContainerAccessibleOverrides{}
}

type ContainerAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible
}

var (
	_ coreglib.Objector = (*ContainerAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ContainerAccessible, *ContainerAccessibleClass, ContainerAccessibleOverrides](
		GTypeContainerAccessible,
		initContainerAccessibleClass,
		wrapContainerAccessible,
		defaultContainerAccessibleOverrides,
	)
}

func initContainerAccessibleClass(gclass unsafe.Pointer, overrides ContainerAccessibleOverrides, classInitFunc func(*ContainerAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ContainerAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapContainerAccessible(obj *coreglib.Object) *ContainerAccessible {
	return &ContainerAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
	}
}

func marshalContainerAccessible(p uintptr) (interface{}, error) {
	return wrapContainerAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ContainerCellAccessibleOverrides contains methods that are overridable.
type ContainerCellAccessibleOverrides struct {
}

func defaultContainerCellAccessibleOverrides(v *ContainerCellAccessible) ContainerCellAccessibleOverrides {
	return ContainerCellAccessibleOverrides{}
}

type ContainerCellAccessible struct {
	_ [0]func() // equal guard
	CellAccessible
}

var (
	_ coreglib.Objector = (*ContainerCellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ContainerCellAccessible, *ContainerCellAccessibleClass, ContainerCellAccessibleOverrides](
		GTypeContainerCellAccessible,
		initContainerCellAccessibleClass,
		wrapContainerCellAccessible,
		defaultContainerCellAccessibleOverrides,
	)
}

func initContainerCellAccessibleClass(gclass unsafe.Pointer, overrides ContainerCellAccessibleOverrides, classInitFunc func(*ContainerCellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ContainerCellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapContainerCellAccessible(obj *coreglib.Object) *ContainerCellAccessible {
	return &ContainerCellAccessible{
		CellAccessible: CellAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			AtkObject: atk.AtkObject{
				Object: obj,
			},
			Component: atk.Component{
				Object: obj,
			},
			TableCell: atk.TableCell{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
		},
	}
}

func marshalContainerCellAccessible(p uintptr) (interface{}, error) {
	return wrapContainerCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func NewContainerCellAccessible() *ContainerCellAccessible {
	var _cret *C.GtkContainerCellAccessible // in

	_cret = C.gtk_container_cell_accessible_new()

	var _containerCellAccessible *ContainerCellAccessible // out

	_containerCellAccessible = wrapContainerCellAccessible(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _containerCellAccessible
}

func (container *ContainerCellAccessible) AddChild(child *CellAccessible) {
	var _arg0 *C.GtkContainerCellAccessible // out
	var _arg1 *C.GtkCellAccessible          // out

	_arg0 = (*C.GtkContainerCellAccessible)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_container_cell_accessible_add_child(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
}

// Children: get a list of children.
func (container *ContainerCellAccessible) Children() []*CellAccessible {
	var _arg0 *C.GtkContainerCellAccessible // out
	var _cret *C.GList                      // in

	_arg0 = (*C.GtkContainerCellAccessible)(unsafe.Pointer(coreglib.InternObject(container).Native()))

	_cret = C.gtk_container_cell_accessible_get_children(_arg0)
	runtime.KeepAlive(container)

	var _list []*CellAccessible // out

	_list = make([]*CellAccessible, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkCellAccessible)(v)
		var dst *CellAccessible // out
		dst = wrapCellAccessible(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

func (container *ContainerCellAccessible) RemoveChild(child *CellAccessible) {
	var _arg0 *C.GtkContainerCellAccessible // out
	var _arg1 *C.GtkCellAccessible          // out

	_arg0 = (*C.GtkContainerCellAccessible)(unsafe.Pointer(coreglib.InternObject(container).Native()))
	_arg1 = (*C.GtkCellAccessible)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_container_cell_accessible_remove_child(_arg0, _arg1)
	runtime.KeepAlive(container)
	runtime.KeepAlive(child)
}

// CSSProviderOverrides contains methods that are overridable.
type CSSProviderOverrides struct {
	// The function takes the following parameters:
	//
	//   - section
	//   - err
	ParsingError func(section *CSSSection, err error)
}

func defaultCSSProviderOverrides(v *CSSProvider) CSSProviderOverrides {
	return CSSProviderOverrides{
		ParsingError: v.parsingError,
	}
}

// CSSProvider is an object implementing the StyleProvider interface. It is able
// to parse [CSS-like][css-overview] input in order to style widgets.
//
// An application can make GTK+ parse a specific CSS style sheet by calling
// gtk_css_provider_load_from_file() or gtk_css_provider_load_from_resource()
// and adding the provider with gtk_style_context_add_provider() or
// gtk_style_context_add_provider_for_screen().
//
// In addition, certain files will be read when GTK+ is initialized.
// First, the file $XDG_CONFIG_HOME/gtk-3.0/gtk.css is loaded
// if it exists. Then, GTK+ loads the first existing file
// among XDG_DATA_HOME/themes/THEME/gtk-VERSION/gtk.css,
// $HOME/.themes/THEME/gtk-VERSION/gtk.css,
// $XDG_DATA_DIRS/themes/THEME/gtk-VERSION/gtk.css and
// DATADIR/share/themes/THEME/gtk-VERSION/gtk.css, where THEME is the name
// of the current theme (see the Settings:gtk-theme-name setting), DATADIR
// is the prefix configured when GTK+ was compiled (unless overridden by the
// GTK_DATA_PREFIX environment variable), and VERSION is the GTK+ version
// number. If no file is found for the current version, GTK+ tries older
// versions all the way back to 3.0.
//
// In the same way, GTK+ tries to load a gtk-keys.css file for the current key
// theme, as defined by Settings:gtk-key-theme-name.
type CSSProvider struct {
	_ [0]func() // equal guard
	*coreglib.Object

	StyleProvider
}

var (
	_ coreglib.Objector = (*CSSProvider)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*CSSProvider, *CSSProviderClass, CSSProviderOverrides](
		GTypeCSSProvider,
		initCSSProviderClass,
		wrapCSSProvider,
		defaultCSSProviderOverrides,
	)
}

func initCSSProviderClass(gclass unsafe.Pointer, overrides CSSProviderOverrides, classInitFunc func(*CSSProviderClass)) {
	pclass := (*C.GtkCssProviderClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeCSSProvider))))

	if overrides.ParsingError != nil {
		pclass.parsing_error = (*[0]byte)(C._gotk4_gtk3_CssProviderClass_parsing_error)
	}

	if classInitFunc != nil {
		class := (*CSSProviderClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapCSSProvider(obj *coreglib.Object) *CSSProvider {
	return &CSSProvider{
		Object: obj,
		StyleProvider: StyleProvider{
			Object: obj,
		},
	}
}

func marshalCSSProvider(p uintptr) (interface{}, error) {
	return wrapCSSProvider(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectParsingError signals that a parsing error occurred. the path, line and
// position describe the actual location of the error as accurately as possible.
//
// Parsing errors are never fatal, so the parsing will resume after the error.
// Errors may however cause parts of the given data or even all of it to not be
// parsed at all. So it is a useful idea to check that the parsing succeeds by
// connecting to this signal.
//
// Note that this signal may be emitted at any time as the css provider may
// opt to defer parsing parts or all of the input to a later time than when a
// loading function was called.
func (cssProvider *CSSProvider) ConnectParsingError(f func(section *CSSSection, err error)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(cssProvider, "parsing-error", false, unsafe.Pointer(C._gotk4_gtk3_CssProvider_ConnectParsingError), f)
}

// NewCSSProvider returns a newly created CssProvider.
//
// The function returns the following values:
//
//   - cssProvider: new CssProvider.
func NewCSSProvider() *CSSProvider {
	var _cret *C.GtkCssProvider // in

	_cret = C.gtk_css_provider_new()

	var _cssProvider *CSSProvider // out

	_cssProvider = wrapCSSProvider(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _cssProvider
}

// LoadFromData loads data into css_provider, and by doing so clears any
// previously loaded information.
//
// The function takes the following parameters:
//
//   - data: CSS data loaded in memory.
func (cssProvider *CSSProvider) LoadFromData(data string) error {
	var _arg0 *C.GtkCssProvider // out
	var _arg1 *C.gchar          // out
	var _arg2 C.gssize
	var _cerr *C.GError // in

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(cssProvider).Native()))
	_arg2 = (C.gssize)(len(data))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(data) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(data)), data)
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_css_provider_load_from_data(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(cssProvider)
	runtime.KeepAlive(data)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// LoadFromFile loads the data contained in file into css_provider, making it
// clear any previously loaded information.
//
// The function takes the following parameters:
//
//   - file pointing to a file to load.
func (cssProvider *CSSProvider) LoadFromFile(file gio.Filer) error {
	var _arg0 *C.GtkCssProvider // out
	var _arg1 *C.GFile          // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(cssProvider).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(file).Native()))

	C.gtk_css_provider_load_from_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(cssProvider)
	runtime.KeepAlive(file)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// LoadFromPath loads the data contained in path into css_provider, making it
// clear any previously loaded information.
//
// The function takes the following parameters:
//
//   - path of a filename to load, in the GLib filename encoding.
func (cssProvider *CSSProvider) LoadFromPath(path string) error {
	var _arg0 *C.GtkCssProvider // out
	var _arg1 *C.gchar          // out
	var _cerr *C.GError         // in

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(cssProvider).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_css_provider_load_from_path(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(cssProvider)
	runtime.KeepAlive(path)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// LoadFromResource loads the data contained in the resource at resource_path
// into the CssProvider, clearing any previously loaded information.
//
// To track errors while loading CSS, connect to the CssProvider::parsing-error
// signal.
//
// The function takes the following parameters:
//
//   - resourcePath resource path.
func (cssProvider *CSSProvider) LoadFromResource(resourcePath string) {
	var _arg0 *C.GtkCssProvider // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(cssProvider).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_css_provider_load_from_resource(_arg0, _arg1)
	runtime.KeepAlive(cssProvider)
	runtime.KeepAlive(resourcePath)
}

// String converts the provider into a string representation in CSS format.
//
// Using gtk_css_provider_load_from_data() with the return value from this
// function on a new provider created with gtk_css_provider_new() will basically
// create a duplicate of this provider.
//
// The function returns the following values:
//
//   - utf8: new string representing the provider.
func (provider *CSSProvider) String() string {
	var _arg0 *C.GtkCssProvider // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))

	_cret = C.gtk_css_provider_to_string(_arg0)
	runtime.KeepAlive(provider)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// The function takes the following parameters:
//
//   - section
//   - err
func (provider *CSSProvider) parsingError(section *CSSSection, err error) {
	gclass := (*C.GtkCssProviderClass)(coreglib.PeekParentClass(provider))
	fnarg := gclass.parsing_error

	var _arg0 *C.GtkCssProvider // out
	var _arg1 *C.GtkCssSection  // out
	var _arg2 *C.GError         // out

	_arg0 = (*C.GtkCssProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg1 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))
	if err != nil {
		_arg2 = (*C.GError)(gerror.New(err))
	}

	C._gotk4_gtk3_CSSProvider_virtual_parsing_error(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(section)
	runtime.KeepAlive(err)
}

// CSSProviderGetDefault returns the provider containing the style settings used
// as a fallback for all widgets.
//
// Deprecated: Use gtk_css_provider_new() instead.
//
// The function returns the following values:
//
//   - cssProvider: provider used for fallback styling. This memory is owned by
//     GTK+, and you must not free it.
func CSSProviderGetDefault() *CSSProvider {
	var _cret *C.GtkCssProvider // in

	_cret = C.gtk_css_provider_get_default()

	var _cssProvider *CSSProvider // out

	_cssProvider = wrapCSSProvider(coreglib.Take(unsafe.Pointer(_cret)))

	return _cssProvider
}

// CSSProviderGetNamed loads a theme from the usual theme paths.
//
// The function takes the following parameters:
//
//   - name: theme name.
//   - variant (optional) to load, for example, "dark", or NULL for the default.
//
// The function returns the following values:
//
//   - cssProvider with the theme loaded. This memory is owned by GTK+, and you
//     must not free it.
func CSSProviderGetNamed(name, variant string) *CSSProvider {
	var _arg1 *C.gchar          // out
	var _arg2 *C.gchar          // out
	var _cret *C.GtkCssProvider // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if variant != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(variant)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_css_provider_get_named(_arg1, _arg2)
	runtime.KeepAlive(name)
	runtime.KeepAlive(variant)

	var _cssProvider *CSSProvider // out

	_cssProvider = wrapCSSProvider(coreglib.Take(unsafe.Pointer(_cret)))

	return _cssProvider
}

// DialogOverrides contains methods that are overridable.
type DialogOverrides struct {
	// Close: signal emitted when the user uses a keybinding to close the
	// dialog.
	Close func()
	// Response emits the Dialog::response signal with the given response ID.
	// Used to indicate that the user has responded to the dialog in some way;
	// typically either you or gtk_dialog_run() will be monitoring the
	// ::response signal and take appropriate action.
	//
	// The function takes the following parameters:
	//
	//   - responseId: response ID.
	Response func(responseId int)
}

func defaultDialogOverrides(v *Dialog) DialogOverrides {
	return DialogOverrides{
		Close:    v.close,
		Response: v.response,
	}
}

// Dialog boxes are a convenient way to prompt the user for a small amount of
// input, e.g. to display a message, ask a question, or anything else that does
// not require extensive effort on the user’s part.
//
// GTK+ treats a dialog as a window split vertically. The top section is a VBox,
// and is where widgets such as a Label or a Entry should be packed. The bottom
// area is known as the “action area”. This is generally used for packing
// buttons into the dialog which may perform functions such as cancel, ok,
// or apply.
//
// Dialog boxes are created with a call to gtk_dialog_new() or
// gtk_dialog_new_with_buttons(). gtk_dialog_new_with_buttons() is recommended;
// it allows you to set the dialog title, some convenient flags, and add simple
// buttons.
//
// If “dialog” is a newly created dialog, the two primary areas of the
// window can be accessed through gtk_dialog_get_content_area() and
// gtk_dialog_get_action_area(), as can be seen from the example below.
//
// A “modal” dialog (that is, one which freezes the rest of the application from
// user input), can be created by calling gtk_window_set_modal() on the dialog.
// Use the GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new()
// into a Window. When using gtk_dialog_new_with_buttons() you can also pass the
// K_DIALOG_MODAL flag to make a dialog modal.
//
// If you add buttons to Dialog using gtk_dialog_new_with_buttons(),
// gtk_dialog_add_button(), gtk_dialog_add_buttons(), or
// gtk_dialog_add_action_widget(), clicking the button will emit a signal called
// Dialog::response with a response ID that you specified. GTK+ will never
// assign a meaning to positive response IDs; these are entirely user-defined.
// But for convenience, you can use the response IDs in the ResponseType
// enumeration (these all have values less than zero). If a dialog receives a
// delete event, the Dialog::response signal will be emitted with a response ID
// of K_RESPONSE_DELETE_EVENT.
//
// If you want to block waiting for a dialog to return before returning control
// flow to your code, you can call gtk_dialog_run(). This function enters
// a recursive main loop and waits for the user to respond to the dialog,
// returning the response ID corresponding to the button the user clicked.
//
// For the simple dialog in the following example, in reality you’d probably
// use MessageDialog to save yourself some effort. But you’d need to create the
// dialog contents manually if you had more than a simple message in the dialog.
//
// An example for simple GtkDialog usage:
//
//	<object class="GtkDialog" id="dialog1">
//	  <child type="action">
//	    <object class="GtkButton" id="button_cancel"/>
//	  </child>
//	  <child type="action">
//	    <object class="GtkButton" id="button_ok">
//	      <property name="can-default">True</property>
//	    </object>
//	  </child>
//	  <action-widgets>
//	    <action-widget response="cancel">button_cancel</action-widget>
//	    <action-widget response="ok" default="true">button_ok</action-widget>
//	  </action-widgets>
//	</object>.
type Dialog struct {
	_ [0]func() // equal guard
	Window
}

var (
	_ Binner = (*Dialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Dialog, *DialogClass, DialogOverrides](
		GTypeDialog,
		initDialogClass,
		wrapDialog,
		defaultDialogOverrides,
	)
}

func initDialogClass(gclass unsafe.Pointer, overrides DialogOverrides, classInitFunc func(*DialogClass)) {
	pclass := (*C.GtkDialogClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeDialog))))

	if overrides.Close != nil {
		pclass.close = (*[0]byte)(C._gotk4_gtk3_DialogClass_close)
	}

	if overrides.Response != nil {
		pclass.response = (*[0]byte)(C._gotk4_gtk3_DialogClass_response)
	}

	if classInitFunc != nil {
		class := (*DialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapDialog(obj *coreglib.Object) *Dialog {
	return &Dialog{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalDialog(p uintptr) (interface{}, error) {
	return wrapDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectClose signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user uses a keybinding to close the dialog.
//
// The default binding for this signal is the Escape key.
func (dialog *Dialog) ConnectClose(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(dialog, "close", false, unsafe.Pointer(C._gotk4_gtk3_Dialog_ConnectClose), f)
}

// ConnectResponse is emitted when an action widget is clicked,
// the dialog receives a delete event, or the application programmer
// calls gtk_dialog_response(). On a delete event, the response ID is
// K_RESPONSE_DELETE_EVENT. Otherwise, it depends on which action widget was
// clicked.
func (dialog *Dialog) ConnectResponse(f func(responseId int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(dialog, "response", false, unsafe.Pointer(C._gotk4_gtk3_Dialog_ConnectResponse), f)
}

// NewDialog creates a new dialog box.
//
// Widgets should not be packed into this Window directly, but into the vbox and
// action_area, as described above.
//
// The function returns the following values:
//
//   - dialog: new dialog as a Widget.
func NewDialog() *Dialog {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_dialog_new()

	var _dialog *Dialog // out

	_dialog = wrapDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _dialog
}

// AddActionWidget adds an activatable widget to the action area of a Dialog,
// connecting a signal handler that will emit the Dialog::response signal on
// the dialog when the widget is activated. The widget is appended to the end
// of the dialog’s action area. If you want to add a non-activatable widget,
// simply pack it into the action_area field of the Dialog struct.
//
// The function takes the following parameters:
//
//   - child: activatable widget.
//   - responseId: response ID for child.
func (dialog *Dialog) AddActionWidget(child Widgetter, responseId int) {
	var _arg0 *C.GtkDialog // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(responseId)

	C.gtk_dialog_add_action_widget(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(child)
	runtime.KeepAlive(responseId)
}

// AddButton adds a button with the given text and sets things up so that
// clicking the button will emit the Dialog::response signal with the given
// response_id. The button is appended to the end of the dialog’s action area.
// The button widget is returned, but usually you don’t need it.
//
// The function takes the following parameters:
//
//   - buttonText: text of button.
//   - responseId: response ID for the button.
//
// The function returns the following values:
//
//   - widget widget that was added.
func (dialog *Dialog) AddButton(buttonText string, responseId int) Widgetter {
	var _arg0 *C.GtkDialog // out
	var _arg1 *C.gchar     // out
	var _arg2 C.gint       // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(buttonText)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(responseId)

	_cret = C.gtk_dialog_add_button(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(buttonText)
	runtime.KeepAlive(responseId)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// ActionArea returns the action area of dialog.
//
// Deprecated: Direct access to the action area is discouraged; use
// gtk_dialog_add_button(), etc.
//
// The function returns the following values:
//
//   - box: action area.
func (dialog *Dialog) ActionArea() *Box {
	var _arg0 *C.GtkDialog // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_dialog_get_action_area(_arg0)
	runtime.KeepAlive(dialog)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// ContentArea returns the content area of dialog.
//
// The function returns the following values:
//
//   - box: content area Box.
func (dialog *Dialog) ContentArea() *Box {
	var _arg0 *C.GtkDialog // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_dialog_get_content_area(_arg0)
	runtime.KeepAlive(dialog)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// HeaderBar returns the header bar of dialog. Note that the headerbar is only
// used by the dialog if the Dialog:use-header-bar property is TRUE.
//
// The function returns the following values:
//
//   - headerBar: header bar.
func (dialog *Dialog) HeaderBar() *HeaderBar {
	var _arg0 *C.GtkDialog // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_dialog_get_header_bar(_arg0)
	runtime.KeepAlive(dialog)

	var _headerBar *HeaderBar // out

	_headerBar = wrapHeaderBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _headerBar
}

// ResponseForWidget gets the response id of a widget in the action area of a
// dialog.
//
// The function takes the following parameters:
//
//   - widget in the action area of dialog.
//
// The function returns the following values:
//
//   - gint: response id of widget, or GTK_RESPONSE_NONE if widget doesn’t have
//     a response id set.
func (dialog *Dialog) ResponseForWidget(widget Widgetter) int {
	var _arg0 *C.GtkDialog // out
	var _arg1 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_dialog_get_response_for_widget(_arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// WidgetForResponse gets the widget button that uses the given response ID in
// the action area of a dialog.
//
// The function takes the following parameters:
//
//   - responseId: response ID used by the dialog widget.
//
// The function returns the following values:
//
//   - widget (optional) button that uses the given response_id, or NULL.
func (dialog *Dialog) WidgetForResponse(responseId int) Widgetter {
	var _arg0 *C.GtkDialog // out
	var _arg1 C.gint       // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = C.gint(responseId)

	_cret = C.gtk_dialog_get_widget_for_response(_arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(responseId)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Response emits the Dialog::response signal with the given response ID.
// Used to indicate that the user has responded to the dialog in some way;
// typically either you or gtk_dialog_run() will be monitoring the ::response
// signal and take appropriate action.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (dialog *Dialog) Response(responseId int) {
	var _arg0 *C.GtkDialog // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = C.gint(responseId)

	C.gtk_dialog_response(_arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(responseId)
}

// Run blocks in a recursive main loop until the dialog either emits the
// Dialog::response signal, or is destroyed. If the dialog is destroyed during
// the call to gtk_dialog_run(), gtk_dialog_run() returns K_RESPONSE_NONE.
// Otherwise, it returns the response ID from the ::response signal emission.
//
// Before entering the recursive main loop, gtk_dialog_run() calls
// gtk_widget_show() on the dialog for you. Note that you still need to show any
// children of the dialog yourself.
//
// During gtk_dialog_run(), the default behavior of Widget::delete-event
// is disabled; if the dialog receives ::delete_event, it will not be
// destroyed as windows usually are, and gtk_dialog_run() will return
// K_RESPONSE_DELETE_EVENT. Also, during gtk_dialog_run() the dialog will be
// modal. You can force gtk_dialog_run() to return at any time by calling
// gtk_dialog_response() to emit the ::response signal. Destroying the dialog
// during gtk_dialog_run() is a very bad idea, because your post-run code won’t
// know whether the dialog was destroyed or not.
//
// After gtk_dialog_run() returns, you are responsible for hiding or destroying
// the dialog if you wish to do so.
//
// Typical usage of this function might be:
//
//	GtkWidget *dialog = gtk_dialog_new ();
//	// Set up dialog...
//
//	int result = gtk_dialog_run (GTK_DIALOG (dialog));
//	switch (result)
//	  {
//	    case GTK_RESPONSE_ACCEPT:
//	       // do_application_specific_something ();
//	       break;
//	    default:
//	       // do_nothing_since_dialog_was_cancelled ();
//	       break;
//	  }
//	gtk_widget_destroy (dialog);
//
// Note that even though the recursive main loop gives the effect of a modal
// dialog (it prevents the user from interacting with other windows in the same
// window group while the dialog is run), callbacks such as timeouts, IO channel
// watches, DND drops, etc, will be triggered during a gtk_dialog_run() call.
//
// The function returns the following values:
//
//   - gint: response ID.
func (dialog *Dialog) Run() int {
	var _arg0 *C.GtkDialog // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_dialog_run(_arg0)
	runtime.KeepAlive(dialog)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SetAlternativeButtonOrderFromArray sets an alternative button order.
// If the Settings:gtk-alternative-button-order setting is set to TRUE,
// the dialog buttons are reordered according to the order of the response ids
// in new_order.
//
// See gtk_dialog_set_alternative_button_order() for more information.
//
// This function is for use by language bindings.
//
// Deprecated: Deprecated.
//
// The function takes the following parameters:
//
//   - newOrder: array of response ids of dialog’s buttons.
func (dialog *Dialog) SetAlternativeButtonOrderFromArray(newOrder []int) {
	var _arg0 *C.GtkDialog // out
	var _arg2 *C.gint      // out
	var _arg1 C.gint

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (C.gint)(len(newOrder))
	_arg2 = (*C.gint)(C.calloc(C.size_t(len(newOrder)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.gint)(_arg2), len(newOrder))
		for i := range newOrder {
			out[i] = C.gint(newOrder[i])
		}
	}

	C.gtk_dialog_set_alternative_button_order_from_array(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(newOrder)
}

// SetDefaultResponse sets the last widget in the dialog’s action area with
// the given response_id as the default widget for the dialog. Pressing “Enter”
// normally activates the default widget.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (dialog *Dialog) SetDefaultResponse(responseId int) {
	var _arg0 *C.GtkDialog // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = C.gint(responseId)

	C.gtk_dialog_set_default_response(_arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(responseId)
}

// SetResponseSensitive calls gtk_widget_set_sensitive (widget, setting)
// for each widget in the dialog’s action area with the given response_id.
// A convenient way to sensitize/desensitize dialog buttons.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
//   - setting: TRUE for sensitive.
func (dialog *Dialog) SetResponseSensitive(responseId int, setting bool) {
	var _arg0 *C.GtkDialog // out
	var _arg1 C.gint       // out
	var _arg2 C.gboolean   // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = C.gint(responseId)
	if setting {
		_arg2 = C.TRUE
	}

	C.gtk_dialog_set_response_sensitive(_arg0, _arg1, _arg2)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(responseId)
	runtime.KeepAlive(setting)
}

// Close: signal emitted when the user uses a keybinding to close the dialog.
func (dialog *Dialog) close() {
	gclass := (*C.GtkDialogClass)(coreglib.PeekParentClass(dialog))
	fnarg := gclass.close

	var _arg0 *C.GtkDialog // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	C._gotk4_gtk3_Dialog_virtual_close(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(dialog)
}

// Response emits the Dialog::response signal with the given response ID.
// Used to indicate that the user has responded to the dialog in some way;
// typically either you or gtk_dialog_run() will be monitoring the ::response
// signal and take appropriate action.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (dialog *Dialog) response(responseId int) {
	gclass := (*C.GtkDialogClass)(coreglib.PeekParentClass(dialog))
	fnarg := gclass.response

	var _arg0 *C.GtkDialog // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = C.gint(responseId)

	C._gotk4_gtk3_Dialog_virtual_response(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(responseId)
}

// DrawingAreaOverrides contains methods that are overridable.
type DrawingAreaOverrides struct {
}

func defaultDrawingAreaOverrides(v *DrawingArea) DrawingAreaOverrides {
	return DrawingAreaOverrides{}
}

// DrawingArea widget is used for creating custom user interface elements.
// It’s essentially a blank widget; you can draw on it. After creating a drawing
// area, the application may want to connect to:
//
// - Mouse and button press signals to respond to input from the user. (Use
// gtk_widget_add_events() to enable events you wish to receive.)
//
// - The Widget::realize signal to take any necessary actions when the widget
// is instantiated on a particular display. (Create GDK resources in response to
// this signal.)
//
// - The Widget::size-allocate signal to take any necessary actions when the
// widget changes size.
//
// - The Widget::draw signal to handle redrawing the contents of the widget.
//
// The following code portion demonstrates using a drawing area to display a
// circle in the normal widget foreground color.
//
// Note that GDK automatically clears the exposed area before sending the
// expose event, and that drawing is implicitly clipped to the exposed area.
// If you want to have a theme-provided background, you need to call
// gtk_render_background() in your ::draw method.
//
// Simple GtkDrawingArea usage
//
//	gboolean
//	draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
//	{
//	  guint width, height;
//	  GdkRGBA color;
//	  GtkStyleContext *context;
//
//	  context = gtk_widget_get_style_context (widget);
//
//	  width = gtk_widget_get_allocated_width (widget);
//	  height = gtk_widget_get_allocated_height (widget);
//
//	  gtk_render_background (context, cr, 0, 0, width, height);
//
//	  cairo_arc (cr,
//	             width / 2.0, height / 2.0,
//	             MIN (width, height) / 2.0,
//	             0, 2 * G_PI);
//
//	  gtk_style_context_get_color (context,
//	                               gtk_style_context_get_state (context),
//	                               &color);
//	  gdk_cairo_set_source_rgba (cr, &color);
//
//	  cairo_fill (cr);
//
//	 return FALSE;
//	}
//	[...]
//	  GtkWidget *drawing_area = gtk_drawing_area_new ();
//	  gtk_widget_set_size_request (drawing_area, 100, 100);
//	  g_signal_connect (G_OBJECT (drawing_area), "draw",
//	                    G_CALLBACK (draw_callback), NULL);
//
// Draw signals are normally delivered when a drawing area first comes onscreen,
// or when it’s covered by another window and then uncovered. You can also
// force an expose event by adding to the “damage region” of the drawing area’s
// window; gtk_widget_queue_draw_area() and gdk_window_invalidate_rect() are
// equally good ways to do this. You’ll then get a draw signal for the invalid
// region.
//
// The available routines for drawing are documented on the [GDK Drawing
// Primitives][gdk3-Cairo-Interaction] page and the cairo documentation.
//
// To receive mouse events on a drawing area, you will need to enable them
// with gtk_widget_add_events(). To receive keyboard events, you will need to
// set the “can-focus” property on the drawing area, and you should probably
// draw some user-visible indication that the drawing area is focused. Use
// gtk_widget_has_focus() in your expose event handler to decide whether to draw
// the focus indicator. See gtk_render_focus() for one way to draw focus.
type DrawingArea struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*DrawingArea)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*DrawingArea, *DrawingAreaClass, DrawingAreaOverrides](
		GTypeDrawingArea,
		initDrawingAreaClass,
		wrapDrawingArea,
		defaultDrawingAreaOverrides,
	)
}

func initDrawingAreaClass(gclass unsafe.Pointer, overrides DrawingAreaOverrides, classInitFunc func(*DrawingAreaClass)) {
	if classInitFunc != nil {
		class := (*DrawingAreaClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapDrawingArea(obj *coreglib.Object) *DrawingArea {
	return &DrawingArea{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalDrawingArea(p uintptr) (interface{}, error) {
	return wrapDrawingArea(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewDrawingArea creates a new drawing area.
//
// The function returns the following values:
//
//   - drawingArea: new DrawingArea.
func NewDrawingArea() *DrawingArea {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_drawing_area_new()

	var _drawingArea *DrawingArea // out

	_drawingArea = wrapDrawingArea(coreglib.Take(unsafe.Pointer(_cret)))

	return _drawingArea
}

// EntryOverrides contains methods that are overridable.
type EntryOverrides struct {
	// Activate class handler for the Entry::activate signal. The default
	// implementation calls gtk_window_activate_default() on the entry’s
	// top-level window.
	Activate func()
	// Backspace class handler for the Entry::backspace signal. The default
	// implementation deletes the selection or a single character or word.
	Backspace func()
	// CopyClipboard class handler for the Entry::copy-clipboard signal.
	// The default implementation copies the selection, if one exists.
	CopyClipboard func()
	// CutClipboard class handler for the Entry::cut-clipboard signal.
	// The default implementation cuts the selection, if one exists.
	CutClipboard func()
	// DeleteFromCursor class handler for the Entry::delete-from-cursor signal.
	// The default implementation deletes the selection or the specified number
	// of characters or words.
	//
	// The function takes the following parameters:
	//
	//   - typ
	//   - count
	DeleteFromCursor func(typ DeleteType, count int)
	// FrameSize: calculate the size of the text area frame, which is its
	// allocated width and requested height, minus space for margins and
	// borders, and taking baseline and text height into account. This virtual
	// function must be non-NULL.
	//
	// The function takes the following parameters:
	//
	//   - x
	//   - y
	//   - width
	//   - height
	FrameSize func(x, y, width, height *int)
	// TextAreaSize: calculate the size of the text area, which is its allocated
	// width and requested height, minus space for margins and borders. This
	// virtual function must be non-NULL.
	//
	// The function takes the following parameters:
	//
	//   - x
	//   - y
	//   - width
	//   - height
	TextAreaSize func(x, y, width, height *int)
	// InsertAtCursor class handler for the Entry::insert-at-cursor signal.
	// The default implementation inserts text at the cursor.
	InsertAtCursor func(str string)
	InsertEmoji    func()
	// MoveCursor class handler for the Entry::move-cursor signal. The default
	// implementation specifies the standard Entry cursor movement behavior.
	//
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	//   - extendSelection
	MoveCursor func(step MovementStep, count int, extendSelection bool)
	// PasteClipboard class handler for the Entry::paste-clipboard signal.
	// The default implementation pastes at the current cursor position or over
	// the current selection if one exists.
	PasteClipboard func()
	// PopulatePopup class handler for the Entry::populate-popup signal.
	// If non-NULL, this will be called to add additional entries to the context
	// menu when it is displayed.
	PopulatePopup func(popup Widgetter)
	// ToggleOverwrite class handler for the Entry::toggle-overwrite signal.
	// The default implementation toggles overwrite mode and blinks the cursor.
	ToggleOverwrite func()
}

func defaultEntryOverrides(v *Entry) EntryOverrides {
	return EntryOverrides{
		Activate:         v.activate,
		Backspace:        v.backspace,
		CopyClipboard:    v.copyClipboard,
		CutClipboard:     v.cutClipboard,
		DeleteFromCursor: v.deleteFromCursor,
		FrameSize:        v.frameSize,
		TextAreaSize:     v.textAreaSize,
		InsertAtCursor:   v.insertAtCursor,
		InsertEmoji:      v.insertEmoji,
		MoveCursor:       v.moveCursor,
		PasteClipboard:   v.pasteClipboard,
		PopulatePopup:    v.populatePopup,
		ToggleOverwrite:  v.toggleOverwrite,
	}
}

// Entry widget is a single line text entry widget. A fairly large set of key
// bindings are supported by default. If the entered text is longer than the
// allocation of the widget, the widget will scroll so that the cursor position
// is visible.
//
// When using an entry for passwords and other sensitive information, it can
// be put into “password mode” using gtk_entry_set_visibility(). In this mode,
// entered text is displayed using a “invisible” character. By default, GTK+
// picks the best invisible character that is available in the current font,
// but it can be changed with gtk_entry_set_invisible_char(). Since 2.16,
// GTK+ displays a warning when Caps Lock or input methods might interfere with
// entering text in a password entry. The warning can be turned off with the
// Entry:caps-lock-warning property.
//
// Since 2.16, GtkEntry has the ability to display progress or activity
// information behind the text. To make an entry display such information,
// use gtk_entry_set_progress_fraction() or gtk_entry_set_progress_pulse_step().
//
// Additionally, GtkEntry can show icons at either side of the entry.
// These icons can be activatable by clicking, can be set up as drag source
// and can have tooltips. To add an icon, use gtk_entry_set_icon_from_gicon()
// or one of the various other functions that set an icon from a stock id,
// an icon name or a pixbuf. To trigger an action when the user clicks an icon,
// connect to the Entry::icon-press signal. To allow DND operations from an
// icon, use gtk_entry_set_icon_drag_source(). To set a tooltip on an icon, use
// gtk_entry_set_icon_tooltip_text() or the corresponding function for markup.
//
// Note that functionality or information that is only available by clicking
// on an icon in an entry may not be accessible at all to users which are not
// able to use a mouse or other pointing device. It is therefore recommended
// that any such functionality should also be available by other means, e.g.
// via the context menu of the entry.
//
// CSS nodes
//
//	entry[.read-only][.flat][.warning][.error]
//	├── image.left
//	├── image.right
//	├── undershoot.left
//	├── undershoot.right
//	├── [selection]
//	├── [progress[.pulse]]
//	╰── [window.popup]
//
// GtkEntry has a main node with the name entry. Depending on the properties
// of the entry, the style classes .read-only and .flat may appear. The style
// classes .warning and .error may also be used with entries.
//
// When the entry shows icons, it adds subnodes with the name image and the
// style class .left or .right, depending on where the icon appears.
//
// When the entry has a selection, it adds a subnode with the name selection.
//
// When the entry shows progress, it adds a subnode with the name progress.
// The node has the style class .pulse when the shown progress is pulsing.
//
// The CSS node for a context menu is added as a subnode below entry as well.
//
// The undershoot nodes are used to draw the underflow indication when content
// is scrolled out of view. These nodes get the .left and .right style classes
// added depending on where the indication is drawn.
//
// When touch is used and touch selection handles are shown, they are using
// CSS nodes with name cursor-handle. They get the .top or .bottom style
// class depending on where they are shown in relation to the selection.
// If there is just a single handle for the text cursor, it gets the style class
// .insertion-cursor.
type Entry struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	CellEditable
	Editable
}

var (
	_ Widgetter         = (*Entry)(nil)
	_ coreglib.Objector = (*Entry)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Entry, *EntryClass, EntryOverrides](
		GTypeEntry,
		initEntryClass,
		wrapEntry,
		defaultEntryOverrides,
	)
}

func initEntryClass(gclass unsafe.Pointer, overrides EntryOverrides, classInitFunc func(*EntryClass)) {
	pclass := (*C.GtkEntryClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeEntry))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_EntryClass_activate)
	}

	if overrides.Backspace != nil {
		pclass.backspace = (*[0]byte)(C._gotk4_gtk3_EntryClass_backspace)
	}

	if overrides.CopyClipboard != nil {
		pclass.copy_clipboard = (*[0]byte)(C._gotk4_gtk3_EntryClass_copy_clipboard)
	}

	if overrides.CutClipboard != nil {
		pclass.cut_clipboard = (*[0]byte)(C._gotk4_gtk3_EntryClass_cut_clipboard)
	}

	if overrides.DeleteFromCursor != nil {
		pclass.delete_from_cursor = (*[0]byte)(C._gotk4_gtk3_EntryClass_delete_from_cursor)
	}

	if overrides.FrameSize != nil {
		pclass.get_frame_size = (*[0]byte)(C._gotk4_gtk3_EntryClass_get_frame_size)
	}

	if overrides.TextAreaSize != nil {
		pclass.get_text_area_size = (*[0]byte)(C._gotk4_gtk3_EntryClass_get_text_area_size)
	}

	if overrides.InsertAtCursor != nil {
		pclass.insert_at_cursor = (*[0]byte)(C._gotk4_gtk3_EntryClass_insert_at_cursor)
	}

	if overrides.InsertEmoji != nil {
		pclass.insert_emoji = (*[0]byte)(C._gotk4_gtk3_EntryClass_insert_emoji)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_EntryClass_move_cursor)
	}

	if overrides.PasteClipboard != nil {
		pclass.paste_clipboard = (*[0]byte)(C._gotk4_gtk3_EntryClass_paste_clipboard)
	}

	if overrides.PopulatePopup != nil {
		pclass.populate_popup = (*[0]byte)(C._gotk4_gtk3_EntryClass_populate_popup)
	}

	if overrides.ToggleOverwrite != nil {
		pclass.toggle_overwrite = (*[0]byte)(C._gotk4_gtk3_EntryClass_toggle_overwrite)
	}

	if classInitFunc != nil {
		class := (*EntryClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapEntry(obj *coreglib.Object) *Entry {
	return &Entry{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		CellEditable: CellEditable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Editable: Editable{
			Object: obj,
		},
	}
}

func marshalEntry(p uintptr) (interface{}, error) {
	return wrapEntry(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate signal is emitted when the user hits the Enter key.
//
// While this signal is used as a [keybinding signal][GtkBindingSignal],
// it is also commonly used by applications to intercept activation of entries.
//
// The default bindings for this signal are all forms of the Enter key.
func (entry *Entry) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "activate", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectActivate), f)
}

// ConnectBackspace signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user asks for it.
//
// The default bindings for this signal are Backspace and Shift-Backspace.
func (entry *Entry) ConnectBackspace(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "backspace", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectBackspace), f)
}

// ConnectCopyClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to copy the selection to the clipboard.
//
// The default bindings for this signal are Ctrl-c and Ctrl-Insert.
func (entry *Entry) ConnectCopyClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "copy-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectCopyClipboard), f)
}

// ConnectCutClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to cut the selection to the clipboard.
//
// The default bindings for this signal are Ctrl-x and Shift-Delete.
func (entry *Entry) ConnectCutClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "cut-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectCutClipboard), f)
}

// ConnectDeleteFromCursor signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user initiates a text deletion.
//
// If the type is GTK_DELETE_CHARS, GTK+ deletes the selection if there is one,
// otherwise it deletes the requested number of characters.
//
// The default bindings for this signal are Delete for deleting a character and
// Ctrl-Delete for deleting a word.
func (entry *Entry) ConnectDeleteFromCursor(f func(typ DeleteType, count int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "delete-from-cursor", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectDeleteFromCursor), f)
}

// ConnectIconPress signal is emitted when an activatable icon is clicked.
func (entry *Entry) ConnectIconPress(f func(iconPos EntryIconPosition, event *gdk.Event)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "icon-press", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectIconPress), f)
}

// ConnectIconRelease signal is emitted on the button release from a mouse click
// over an activatable icon.
func (entry *Entry) ConnectIconRelease(f func(iconPos EntryIconPosition, event *gdk.Event)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "icon-release", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectIconRelease), f)
}

// ConnectInsertAtCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates the insertion of a fixed string at the
// cursor.
//
// This signal has no default bindings.
func (entry *Entry) ConnectInsertAtCursor(f func(str string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "insert-at-cursor", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectInsertAtCursor), f)
}

// ConnectInsertEmoji signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to present the Emoji chooser for the entry.
//
// The default bindings for this signal are Ctrl-. and Ctrl-;.
func (entry *Entry) ConnectInsertEmoji(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "insert-emoji", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectInsertEmoji), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a cursor movement. If the cursor is not
// visible in entry, this signal causes the viewport to be moved instead.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// The default bindings for this signal come in two variants, the variant with
// the Shift modifier extends the selection, the variant without the Shift
// modifer does not. There are too many key combinations to list them all here.
//
// - Arrow keys move by individual characters/lines
//
// - Ctrl-arrow key combinations move by words/paragraphs
//
// - Home/End keys move to the ends of the buffer.
func (entry *Entry) ConnectMoveCursor(f func(step MovementStep, count int, extendSelection bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectMoveCursor), f)
}

// ConnectPasteClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to paste the contents of the clipboard into the text view.
//
// The default bindings for this signal are Ctrl-v and Shift-Insert.
func (entry *Entry) ConnectPasteClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "paste-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectPasteClipboard), f)
}

// ConnectPopulatePopup signal gets emitted before showing the context menu of
// the entry.
//
// If you need to add items to the context menu, connect to this signal and
// append your items to the widget, which will be a Menu in this case.
//
// If Entry:populate-all is TRUE, this signal will also be emitted to populate
// touch popups. In this case, widget will be a different container, e.g.
// a Toolbar. The signal handler should not make assumptions about the type of
// widget.
func (entry *Entry) ConnectPopulatePopup(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "populate-popup", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectPopulatePopup), f)
}

// ConnectPreeditChanged: if an input method is used, the typed text will not
// immediately be committed to the buffer. So if you are interested in the text,
// connect to this signal.
func (entry *Entry) ConnectPreeditChanged(f func(preedit string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "preedit-changed", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectPreeditChanged), f)
}

// ConnectToggleOverwrite signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted to toggle the overwrite mode of the entry.
//
// The default bindings for this signal is Insert.
func (entry *Entry) ConnectToggleOverwrite(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "toggle-overwrite", false, unsafe.Pointer(C._gotk4_gtk3_Entry_ConnectToggleOverwrite), f)
}

// NewEntry creates a new entry.
//
// The function returns the following values:
//
//   - entry: new Entry.
func NewEntry() *Entry {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_entry_new()

	var _entry *Entry // out

	_entry = wrapEntry(coreglib.Take(unsafe.Pointer(_cret)))

	return _entry
}

// NewEntryWithBuffer creates a new entry with the specified text buffer.
//
// The function takes the following parameters:
//
//   - buffer to use for the new Entry.
//
// The function returns the following values:
//
//   - entry: new Entry.
func NewEntryWithBuffer(buffer *EntryBuffer) *Entry {
	var _arg1 *C.GtkEntryBuffer // out
	var _cret *C.GtkWidget      // in

	_arg1 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_entry_new_with_buffer(_arg1)
	runtime.KeepAlive(buffer)

	var _entry *Entry // out

	_entry = wrapEntry(coreglib.Take(unsafe.Pointer(_cret)))

	return _entry
}

// ActivatesDefault retrieves the value set by
// gtk_entry_set_activates_default().
//
// The function returns the following values:
//
//   - ok: TRUE if the entry will activate the default widget.
func (entry *Entry) ActivatesDefault() bool {
	var _arg0 *C.GtkEntry // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_activates_default(_arg0)
	runtime.KeepAlive(entry)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Alignment gets the value set by gtk_entry_set_alignment().
//
// The function returns the following values:
//
//   - gfloat: alignment.
func (entry *Entry) Alignment() float32 {
	var _arg0 *C.GtkEntry // out
	var _cret C.gfloat    // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_alignment(_arg0)
	runtime.KeepAlive(entry)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// Attributes gets the attribute list that was set on the entry using
// gtk_entry_set_attributes(), if any.
//
// The function returns the following values:
//
//   - attrList (optional): attribute list, or NULL if none was set.
func (entry *Entry) Attributes() *pango.AttrList {
	var _arg0 *C.GtkEntry      // out
	var _cret *C.PangoAttrList // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_attributes(_arg0)
	runtime.KeepAlive(entry)

	var _attrList *pango.AttrList // out

	if _cret != nil {
		_attrList = (*pango.AttrList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.pango_attr_list_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_attrList)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.pango_attr_list_unref((*C.PangoAttrList)(intern.C))
			},
		)
	}

	return _attrList
}

// Buffer: get the EntryBuffer object which holds the text for this widget.
//
// The function returns the following values:
//
//   - entryBuffer: EntryBuffer object.
func (entry *Entry) Buffer() *EntryBuffer {
	var _arg0 *C.GtkEntry       // out
	var _cret *C.GtkEntryBuffer // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_buffer(_arg0)
	runtime.KeepAlive(entry)

	var _entryBuffer *EntryBuffer // out

	_entryBuffer = wrapEntryBuffer(coreglib.Take(unsafe.Pointer(_cret)))

	return _entryBuffer
}

// Completion returns the auxiliary completion object currently in use by entry.
//
// The function returns the following values:
//
//   - entryCompletion: auxiliary completion object currently in use by entry.
func (entry *Entry) Completion() *EntryCompletion {
	var _arg0 *C.GtkEntry           // out
	var _cret *C.GtkEntryCompletion // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_completion(_arg0)
	runtime.KeepAlive(entry)

	var _entryCompletion *EntryCompletion // out

	_entryCompletion = wrapEntryCompletion(coreglib.Take(unsafe.Pointer(_cret)))

	return _entryCompletion
}

// CurrentIconDragSource returns the index of the icon which is the source of
// the current DND operation, or -1.
//
// This function is meant to be used in a Widget::drag-data-get callback.
//
// The function returns the following values:
//
//   - gint: index of the icon which is the source of the current DND operation,
//     or -1.
func (entry *Entry) CurrentIconDragSource() int {
	var _arg0 *C.GtkEntry // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_current_icon_drag_source(_arg0)
	runtime.KeepAlive(entry)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// CursorHAdjustment retrieves the horizontal cursor adjustment for the entry.
// See gtk_entry_set_cursor_hadjustment().
//
// The function returns the following values:
//
//   - adjustment (optional): horizontal cursor adjustment, or NULL if none has
//     been set.
func (entry *Entry) CursorHAdjustment() *Adjustment {
	var _arg0 *C.GtkEntry      // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_cursor_hadjustment(_arg0)
	runtime.KeepAlive(entry)

	var _adjustment *Adjustment // out

	if _cret != nil {
		_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _adjustment
}

// HasFrame gets the value set by gtk_entry_set_has_frame().
//
// The function returns the following values:
//
//   - ok: whether the entry has a beveled frame.
func (entry *Entry) HasFrame() bool {
	var _arg0 *C.GtkEntry // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_has_frame(_arg0)
	runtime.KeepAlive(entry)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IconActivatable returns whether the icon is activatable.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - ok: TRUE if the icon is activatable.
func (entry *Entry) IconActivatable(iconPos EntryIconPosition) bool {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_activatable(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IconArea gets the area where entry’s icon at icon_pos is drawn. This function
// is useful when drawing something to the entry in a draw callback.
//
// If the entry is not realized or has no icon at the given position, icon_area
// is filled with zeros. Otherwise, icon_area will be filled with the icon’s
// allocation, relative to entry’s allocation.
//
// See also gtk_entry_get_text_area().
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - iconArea: return location for the icon’s area.
func (entry *Entry) IconArea(iconPos EntryIconPosition) *gdk.Rectangle {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 C.GdkRectangle         // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	C.gtk_entry_get_icon_area(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _iconArea *gdk.Rectangle // out

	_iconArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _iconArea
}

// IconAtPos finds the icon at the given position and return its index.
// The position’s coordinates are relative to the entry’s top left corner. If x,
// y doesn’t lie inside an icon, -1 is returned. This function is intended for
// use in a Widget::query-tooltip signal handler.
//
// The function takes the following parameters:
//
//   - x coordinate of the position to find.
//   - y coordinate of the position to find.
//
// The function returns the following values:
//
//   - gint: index of the icon at the given position, or -1.
func (entry *Entry) IconAtPos(x, y int) int {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out
	var _arg2 C.gint      // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_entry_get_icon_at_pos(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IconGIcon retrieves the #GIcon used for the icon, or NULL if there is no
// icon or if the icon was set by some other method (e.g., by stock, pixbuf,
// or icon name).
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - icon (optional) or NULL if no icon is set or if the icon is not a #GIcon.
func (entry *Entry) IconGIcon(iconPos EntryIconPosition) *gio.Icon {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.GIcon               // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_gicon(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _icon *gio.Icon // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_icon = &gio.Icon{
				Object: obj,
			}
		}
	}

	return _icon
}

// IconName retrieves the icon name used for the icon, or NULL if there is no
// icon or if the icon was set by some other method (e.g., by pixbuf, stock or
// gicon).
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - utf8 (optional): icon name, or NULL if no icon is set or if the icon
//     wasn’t set from an icon name.
func (entry *Entry) IconName(iconPos EntryIconPosition) string {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_name(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// IconPixbuf retrieves the image used for the icon.
//
// Unlike the other methods of setting and getting icon data, this method
// will work regardless of whether the icon was set using a Pixbuf, a #GIcon,
// a stock item, or an icon name.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - pixbuf (optional) or NULL if no icon is set for this position.
func (entry *Entry) IconPixbuf(iconPos EntryIconPosition) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.GdkPixbuf           // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// IconSensitive returns whether the icon appears sensitive or insensitive.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - ok: TRUE if the icon is sensitive.
func (entry *Entry) IconSensitive(iconPos EntryIconPosition) bool {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_sensitive(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IconStock retrieves the stock id used for the icon, or NULL if there is no
// icon or if the icon was set by some other method (e.g., by pixbuf, icon name
// or gicon).
//
// Deprecated: Use gtk_entry_get_icon_name() instead.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - utf8: stock id, or NULL if no icon is set or if the icon wasn’t set from
//     a stock id.
func (entry *Entry) IconStock(iconPos EntryIconPosition) string {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_stock(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// IconStorageType gets the type of representation being used by the icon to
// store image data. If the icon has no image data, the return value will be
// GTK_IMAGE_EMPTY.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - imageType: image representation being used.
func (entry *Entry) IconStorageType(iconPos EntryIconPosition) ImageType {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret C.GtkImageType         // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_storage_type(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _imageType ImageType // out

	_imageType = ImageType(_cret)

	return _imageType
}

// IconTooltipMarkup gets the contents of the tooltip on the icon at the
// specified position in entry.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. Free the returned string with
//     g_free() when done.
func (entry *Entry) IconTooltipMarkup(iconPos EntryIconPosition) string {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_tooltip_markup(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// IconTooltipText gets the contents of the tooltip on the icon at the specified
// position in entry.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. Free the returned string with
//     g_free() when done.
func (entry *Entry) IconTooltipText(iconPos EntryIconPosition) string {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _cret *C.gchar               // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)

	_cret = C.gtk_entry_get_icon_tooltip_text(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// InnerBorder: this function returns the entry’s Entry:inner-border property.
// See gtk_entry_set_inner_border() for more information.
//
// Deprecated: Use the standard border and padding CSS properties (through
// objects like StyleContext and CssProvider); the value returned by this
// function is ignored by Entry.
//
// The function returns the following values:
//
//   - border (optional) entry’s Border, or NULL if none was set.
func (entry *Entry) InnerBorder() *Border {
	var _arg0 *C.GtkEntry  // out
	var _cret *C.GtkBorder // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_inner_border(_arg0)
	runtime.KeepAlive(entry)

	var _border *Border // out

	if _cret != nil {
		_border = (*Border)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	}

	return _border
}

// InputHints gets the value of the Entry:input-hints property.
func (entry *Entry) InputHints() InputHints {
	var _arg0 *C.GtkEntry     // out
	var _cret C.GtkInputHints // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_input_hints(_arg0)
	runtime.KeepAlive(entry)

	var _inputHints InputHints // out

	_inputHints = InputHints(_cret)

	return _inputHints
}

// InputPurpose gets the value of the Entry:input-purpose property.
func (entry *Entry) InputPurpose() InputPurpose {
	var _arg0 *C.GtkEntry       // out
	var _cret C.GtkInputPurpose // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_input_purpose(_arg0)
	runtime.KeepAlive(entry)

	var _inputPurpose InputPurpose // out

	_inputPurpose = InputPurpose(_cret)

	return _inputPurpose
}

// InvisibleChar retrieves the character displayed in place of the
// real characters for entries with visibility set to false. See
// gtk_entry_set_invisible_char().
//
// The function returns the following values:
//
//   - gunichar: current invisible char, or 0, if the entry does not show
//     invisible text at all.
func (entry *Entry) InvisibleChar() uint32 {
	var _arg0 *C.GtkEntry // out
	var _cret C.gunichar  // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_invisible_char(_arg0)
	runtime.KeepAlive(entry)

	var _gunichar uint32 // out

	_gunichar = uint32(_cret)

	return _gunichar
}

// Layout gets the Layout used to display the entry. The layout is useful
// to e.g. convert text positions to pixel positions, in combination with
// gtk_entry_get_layout_offsets(). The returned layout is owned by the entry and
// must not be modified or freed by the caller.
//
// Keep in mind that the layout text may contain a preedit
// string, so gtk_entry_layout_index_to_text_index() and
// gtk_entry_text_index_to_layout_index() are needed to convert byte indices in
// the layout to byte indices in the entry contents.
//
// The function returns the following values:
//
//   - layout for this entry.
func (entry *Entry) Layout() *pango.Layout {
	var _arg0 *C.GtkEntry    // out
	var _cret *C.PangoLayout // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_layout(_arg0)
	runtime.KeepAlive(entry)

	var _layout *pango.Layout // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_layout = &pango.Layout{
			Object: obj,
		}
	}

	return _layout
}

// LayoutOffsets obtains the position of the Layout used to render text in the
// entry, in widget coordinates. Useful if you want to line up the text in an
// entry with some other text, e.g. when using the entry to implement editable
// cells in a sheet widget.
//
// Also useful to convert mouse events into coordinates inside the Layout, e.g.
// to take some action if some part of the entry text is clicked.
//
// Note that as the user scrolls around in the entry the offsets will change;
// you’ll need to connect to the “notify::scroll-offset” signal to track this.
// Remember when using the Layout functions you need to convert to and from
// pixels using PANGO_PIXELS() or NGO_SCALE.
//
// Keep in mind that the layout text may contain a preedit
// string, so gtk_entry_layout_index_to_text_index() and
// gtk_entry_text_index_to_layout_index() are needed to convert byte indices in
// the layout to byte indices in the entry contents.
//
// The function returns the following values:
//
//   - x (optional): location to store X offset of layout, or NULL.
//   - y (optional): location to store Y offset of layout, or NULL.
func (entry *Entry) LayoutOffsets() (x, y int) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_get_layout_offsets(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(entry)

	var _x int // out
	var _y int // out

	_x = int(_arg1)
	_y = int(_arg2)

	return _x, _y
}

// MaxLength retrieves the maximum allowed length of the text in entry.
// See gtk_entry_set_max_length().
//
// This is equivalent to getting entry's EntryBuffer and calling
// gtk_entry_buffer_get_max_length() on it.
//
// The function returns the following values:
//
//   - gint: maximum allowed number of characters in Entry, or 0 if there is no
//     maximum.
func (entry *Entry) MaxLength() int {
	var _arg0 *C.GtkEntry // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_max_length(_arg0)
	runtime.KeepAlive(entry)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MaxWidthChars retrieves the desired maximum width of entry, in characters.
// See gtk_entry_set_max_width_chars().
//
// The function returns the following values:
//
//   - gint: maximum width of the entry, in characters.
func (entry *Entry) MaxWidthChars() int {
	var _arg0 *C.GtkEntry // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_max_width_chars(_arg0)
	runtime.KeepAlive(entry)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// OverwriteMode gets the value set by gtk_entry_set_overwrite_mode().
//
// The function returns the following values:
//
//   - ok: whether the text is overwritten when typing.
func (entry *Entry) OverwriteMode() bool {
	var _arg0 *C.GtkEntry // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_overwrite_mode(_arg0)
	runtime.KeepAlive(entry)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PlaceholderText retrieves the text that will be displayed when entry is empty
// and unfocused.
//
// The function returns the following values:
//
//   - utf8: pointer to the placeholder text as a string. This string points
//     to internally allocated storage in the widget and must not be freed,
//     modified or stored.
func (entry *Entry) PlaceholderText() string {
	var _arg0 *C.GtkEntry // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_placeholder_text(_arg0)
	runtime.KeepAlive(entry)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ProgressFraction returns the current fraction of the task that’s been
// completed. See gtk_entry_set_progress_fraction().
//
// The function returns the following values:
//
//   - gdouble: fraction from 0.0 to 1.0.
func (entry *Entry) ProgressFraction() float64 {
	var _arg0 *C.GtkEntry // out
	var _cret C.gdouble   // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_progress_fraction(_arg0)
	runtime.KeepAlive(entry)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// ProgressPulseStep retrieves the pulse step set with
// gtk_entry_set_progress_pulse_step().
//
// The function returns the following values:
//
//   - gdouble: fraction from 0.0 to 1.0.
func (entry *Entry) ProgressPulseStep() float64 {
	var _arg0 *C.GtkEntry // out
	var _cret C.gdouble   // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_progress_pulse_step(_arg0)
	runtime.KeepAlive(entry)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Tabs gets the tabstops that were set on the entry using gtk_entry_set_tabs(),
// if any.
//
// The function returns the following values:
//
//   - tabArray (optional): tabstops, or NULL if none was set.
func (entry *Entry) Tabs() *pango.TabArray {
	var _arg0 *C.GtkEntry      // out
	var _cret *C.PangoTabArray // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_tabs(_arg0)
	runtime.KeepAlive(entry)

	var _tabArray *pango.TabArray // out

	if _cret != nil {
		_tabArray = (*pango.TabArray)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	}

	return _tabArray
}

// Text retrieves the contents of the entry widget. See also
// gtk_editable_get_chars().
//
// This is equivalent to getting entry's EntryBuffer and calling
// gtk_entry_buffer_get_text() on it.
//
// The function returns the following values:
//
//   - utf8: pointer to the contents of the widget as a string. This string
//     points to internally allocated storage in the widget and must not be
//     freed, modified or stored.
func (entry *Entry) Text() string {
	var _arg0 *C.GtkEntry // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_text(_arg0)
	runtime.KeepAlive(entry)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TextArea gets the area where the entry’s text is drawn. This function is
// useful when drawing something to the entry in a draw callback.
//
// If the entry is not realized, text_area is filled with zeros.
//
// See also gtk_entry_get_icon_area().
//
// The function returns the following values:
//
//   - textArea: return location for the text area.
func (entry *Entry) TextArea() *gdk.Rectangle {
	var _arg0 *C.GtkEntry    // out
	var _arg1 C.GdkRectangle // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_get_text_area(_arg0, &_arg1)
	runtime.KeepAlive(entry)

	var _textArea *gdk.Rectangle // out

	_textArea = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _textArea
}

// TextLength retrieves the current length of the text in entry.
//
// This is equivalent to getting entry's EntryBuffer and calling
// gtk_entry_buffer_get_length() on it.
//
// The function returns the following values:
//
//   - guint16: current number of characters in Entry, or 0 if there are none.
func (entry *Entry) TextLength() uint16 {
	var _arg0 *C.GtkEntry // out
	var _cret C.guint16   // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_text_length(_arg0)
	runtime.KeepAlive(entry)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// Visibility retrieves whether the text in entry is visible. See
// gtk_entry_set_visibility().
//
// The function returns the following values:
//
//   - ok: TRUE if the text is currently visible.
func (entry *Entry) Visibility() bool {
	var _arg0 *C.GtkEntry // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_visibility(_arg0)
	runtime.KeepAlive(entry)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WidthChars gets the value set by gtk_entry_set_width_chars().
//
// The function returns the following values:
//
//   - gint: number of chars to request space for, or negative if unset.
func (entry *Entry) WidthChars() int {
	var _arg0 *C.GtkEntry // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	_cret = C.gtk_entry_get_width_chars(_arg0)
	runtime.KeepAlive(entry)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// GrabFocusWithoutSelecting causes entry to have keyboard focus.
//
// It behaves like gtk_widget_grab_focus(), except that it doesn't select
// the contents of the entry. You only want to call this on some special
// entries which the user usually doesn't want to replace all text in, such as
// search-as-you-type entries.
func (entry *Entry) GrabFocusWithoutSelecting() {
	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_grab_focus_without_selecting(_arg0)
	runtime.KeepAlive(entry)
}

// IMContextFilterKeypress: allow the Entry input method to internally
// handle key press and release events. If this function returns TRUE,
// then no further processing should be done for this key event. See
// gtk_im_context_filter_keypress().
//
// Note that you are expected to call this function from your handler when
// overriding key event handling. This is needed in the case when you need to
// insert your own key handling between the input method and the default key
// event handling of the Entry. See gtk_text_view_reset_im_context() for an
// example of use.
//
// The function takes the following parameters:
//
//   - event: key event.
//
// The function returns the following values:
//
//   - ok: TRUE if the input method handled the key event.
func (entry *Entry) IMContextFilterKeypress(event *gdk.EventKey) bool {
	var _arg0 *C.GtkEntry    // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_entry_im_context_filter_keypress(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LayoutIndexToTextIndex converts from a position in the entry’s Layout
// (returned by gtk_entry_get_layout()) to a position in the entry contents
// (returned by gtk_entry_get_text()).
//
// The function takes the following parameters:
//
//   - layoutIndex: byte index into the entry layout text.
//
// The function returns the following values:
//
//   - gint: byte index into the entry contents.
func (entry *Entry) LayoutIndexToTextIndex(layoutIndex int) int {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(layoutIndex)

	_cret = C.gtk_entry_layout_index_to_text_index(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(layoutIndex)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ProgressPulse indicates that some progress is made, but you don’t know how
// much. Causes the entry’s progress indicator to enter “activity mode,” where
// a block bounces back and forth. Each call to gtk_entry_progress_pulse()
// causes the block to move by a little bit (the amount of movement per pulse is
// determined by gtk_entry_set_progress_pulse_step()).
func (entry *Entry) ProgressPulse() {
	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_progress_pulse(_arg0)
	runtime.KeepAlive(entry)
}

// ResetIMContext: reset the input method context of the entry if needed.
//
// This can be necessary in the case where modifying the buffer would confuse
// on-going input method behavior.
func (entry *Entry) ResetIMContext() {
	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_reset_im_context(_arg0)
	runtime.KeepAlive(entry)
}

// SetActivatesDefault: if setting is TRUE, pressing Enter in the entry
// will activate the default widget for the window containing the entry.
// This usually means that the dialog box containing the entry will be closed,
// since the default widget is usually one of the dialog buttons.
//
// (For experts: if setting is TRUE, the entry calls
// gtk_window_activate_default() on the window containing the entry, in the
// default handler for the Entry::activate signal.).
//
// The function takes the following parameters:
//
//   - setting: TRUE to activate window’s default widget on Enter keypress.
func (entry *Entry) SetActivatesDefault(setting bool) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_entry_set_activates_default(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(setting)
}

// SetAlignment sets the alignment for the contents of the entry. This controls
// the horizontal positioning of the contents when the displayed text is shorter
// than the width of the entry.
//
// The function takes the following parameters:
//
//   - xalign: horizontal alignment, from 0 (left) to 1 (right). Reversed for
//     RTL layouts.
func (entry *Entry) SetAlignment(xalign float32) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gfloat    // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gfloat(xalign)

	C.gtk_entry_set_alignment(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(xalign)
}

// SetAttributes sets a AttrList; the attributes in the list are applied to the
// entry text.
//
// The function takes the following parameters:
//
//   - attrs: AttrList.
func (entry *Entry) SetAttributes(attrs *pango.AttrList) {
	var _arg0 *C.GtkEntry      // out
	var _arg1 *C.PangoAttrList // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.PangoAttrList)(gextras.StructNative(unsafe.Pointer(attrs)))

	C.gtk_entry_set_attributes(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(attrs)
}

// SetBuffer: set the EntryBuffer object which holds the text for this widget.
//
// The function takes the following parameters:
//
//   - buffer: EntryBuffer.
func (entry *Entry) SetBuffer(buffer *EntryBuffer) {
	var _arg0 *C.GtkEntry       // out
	var _arg1 *C.GtkEntryBuffer // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_entry_set_buffer(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(buffer)
}

// SetCompletion sets completion to be the auxiliary completion object to use
// with entry. All further configuration of the completion mechanism is done
// on completion using the EntryCompletion API. Completion is disabled if
// completion is set to NULL.
//
// The function takes the following parameters:
//
//   - completion (optional) or NULL.
func (entry *Entry) SetCompletion(completion *EntryCompletion) {
	var _arg0 *C.GtkEntry           // out
	var _arg1 *C.GtkEntryCompletion // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if completion != nil {
		_arg1 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	}

	C.gtk_entry_set_completion(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(completion)
}

// SetCursorHAdjustment hooks up an adjustment to the cursor position in an
// entry, so that when the cursor is moved, the adjustment is scrolled to show
// that position. See gtk_scrolled_window_get_hadjustment() for a typical way of
// obtaining the adjustment.
//
// The adjustment has to be in pixel units and in the same coordinate system as
// the entry.
//
// The function takes the following parameters:
//
//   - adjustment (optional) which should be adjusted when the cursor is moved,
//     or NULL.
func (entry *Entry) SetCursorHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkEntry      // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_entry_set_cursor_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(adjustment)
}

// SetHasFrame sets whether the entry has a beveled frame around it.
//
// The function takes the following parameters:
//
//   - setting: new value.
func (entry *Entry) SetHasFrame(setting bool) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_entry_set_has_frame(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(setting)
}

// SetIconActivatable sets whether the icon is activatable.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - activatable: TRUE if the icon should be activatable.
func (entry *Entry) SetIconActivatable(iconPos EntryIconPosition, activatable bool) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 C.gboolean             // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if activatable {
		_arg2 = C.TRUE
	}

	C.gtk_entry_set_icon_activatable(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(activatable)
}

// SetIconDragSource sets up the icon at the given position so that GTK+ will
// start a drag operation when the user clicks and drags the icon.
//
// To handle the drag operation, you need to connect to the usual
// Widget::drag-data-get (or possibly Widget::drag-data-delete) signal, and use
// gtk_entry_get_current_icon_drag_source() in your signal handler to find out
// if the drag was started from an icon.
//
// By default, GTK+ uses the icon as the drag icon. You can use the
// Widget::drag-begin signal to set a different icon. Note that you have to use
// g_signal_connect_after() to ensure that your signal handler gets executed
// after the default handler.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - targetList targets (data formats) in which the data can be provided.
//   - actions: bitmask of the allowed drag actions.
func (entry *Entry) SetIconDragSource(iconPos EntryIconPosition, targetList *TargetList, actions gdk.DragAction) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.GtkTargetList       // out
	var _arg3 C.GdkDragAction        // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	_arg2 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(targetList)))
	_arg3 = C.GdkDragAction(actions)

	C.gtk_entry_set_icon_drag_source(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(targetList)
	runtime.KeepAlive(actions)
}

// SetIconFromGIcon sets the icon shown in the entry at the specified position
// from the current icon theme. If the icon isn’t known, a “broken image” icon
// will be displayed instead.
//
// If icon is NULL, no icon will be shown in the specified position.
//
// The function takes the following parameters:
//
//   - iconPos: position at which to set the icon.
//   - icon (optional) to set, or NULL.
func (entry *Entry) SetIconFromGIcon(iconPos EntryIconPosition, icon gio.Iconner) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.GIcon               // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if icon != nil {
		_arg2 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	}

	C.gtk_entry_set_icon_from_gicon(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(icon)
}

// SetIconFromIconName sets the icon shown in the entry at the specified
// position from the current icon theme.
//
// If the icon name isn’t known, a “broken image” icon will be displayed
// instead.
//
// If icon_name is NULL, no icon will be shown in the specified position.
//
// The function takes the following parameters:
//
//   - iconPos: position at which to set the icon.
//   - iconName (optional): icon name, or NULL.
func (entry *Entry) SetIconFromIconName(iconPos EntryIconPosition, iconName string) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.gchar               // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if iconName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_entry_set_icon_from_icon_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(iconName)
}

// SetIconFromPixbuf sets the icon shown in the specified position using a
// pixbuf.
//
// If pixbuf is NULL, no icon will be shown in the specified position.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - pixbuf (optional) or NULL.
func (entry *Entry) SetIconFromPixbuf(iconPos EntryIconPosition, pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.GdkPixbuf           // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if pixbuf != nil {
		_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_entry_set_icon_from_pixbuf(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(pixbuf)
}

// SetIconFromStock sets the icon shown in the entry at the specified position
// from a stock image.
//
// If stock_id is NULL, no icon will be shown in the specified position.
//
// Deprecated: Use gtk_entry_set_icon_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - stockId (optional): name of the stock item, or NULL.
func (entry *Entry) SetIconFromStock(iconPos EntryIconPosition, stockId string) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.gchar               // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if stockId != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_entry_set_icon_from_stock(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(stockId)
}

// SetIconSensitive sets the sensitivity for the specified icon.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - sensitive specifies whether the icon should appear sensitive or
//     insensitive.
func (entry *Entry) SetIconSensitive(iconPos EntryIconPosition, sensitive bool) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 C.gboolean             // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if sensitive {
		_arg2 = C.TRUE
	}

	C.gtk_entry_set_icon_sensitive(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(sensitive)
}

// SetIconTooltipMarkup sets tooltip as the contents of the tooltip for the icon
// at the specified position. tooltip is assumed to be marked up with the [Pango
// text markup language][PangoMarkupFormat].
//
// Use NULL for tooltip to remove an existing tooltip.
//
// See also gtk_widget_set_tooltip_markup() and
// gtk_entry_set_icon_tooltip_text().
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - tooltip (optional) contents of the tooltip for the icon, or NULL.
func (entry *Entry) SetIconTooltipMarkup(iconPos EntryIconPosition, tooltip string) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.gchar               // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if tooltip != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_entry_set_icon_tooltip_markup(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(tooltip)
}

// SetIconTooltipText sets tooltip as the contents of the tooltip for the icon
// at the specified position.
//
// Use NULL for tooltip to remove an existing tooltip.
//
// See also gtk_widget_set_tooltip_text() and
// gtk_entry_set_icon_tooltip_markup().
//
// If you unset the widget tooltip via gtk_widget_set_tooltip_text() or
// gtk_widget_set_tooltip_markup(), this sets GtkWidget:has-tooltip to FALSE,
// which suppresses icon tooltips too. You can resolve this by then calling
// gtk_widget_set_has_tooltip() to set GtkWidget:has-tooltip back to TRUE, or
// setting at least one non-empty tooltip on any icon achieves the same result.
//
// The function takes the following parameters:
//
//   - iconPos: icon position.
//   - tooltip (optional) contents of the tooltip for the icon, or NULL.
func (entry *Entry) SetIconTooltipText(iconPos EntryIconPosition, tooltip string) {
	var _arg0 *C.GtkEntry            // out
	var _arg1 C.GtkEntryIconPosition // out
	var _arg2 *C.gchar               // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkEntryIconPosition(iconPos)
	if tooltip != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_entry_set_icon_tooltip_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(iconPos)
	runtime.KeepAlive(tooltip)
}

// SetInnerBorder sets entry’s inner-border property to border, or clears it
// if NULL is passed. The inner-border is the area around the entry’s text,
// but inside its frame.
//
// If set, this property overrides the inner-border style property. Overriding
// the style-provided border is useful when you want to do in-place editing of
// some text in a canvas or list widget, where pixel-exact positioning of the
// entry is important.
//
// Deprecated: Use the standard border and padding CSS properties (through
// objects like StyleContext and CssProvider); the value set with this function
// is ignored by Entry.
//
// The function takes the following parameters:
//
//   - border (optional) or NULL.
func (entry *Entry) SetInnerBorder(border *Border) {
	var _arg0 *C.GtkEntry  // out
	var _arg1 *C.GtkBorder // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if border != nil {
		_arg1 = (*C.GtkBorder)(gextras.StructNative(unsafe.Pointer(border)))
	}

	C.gtk_entry_set_inner_border(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(border)
}

// SetInputHints sets the Entry:input-hints property, which allows input methods
// to fine-tune their behaviour.
//
// The function takes the following parameters:
//
//   - hints: hints.
func (entry *Entry) SetInputHints(hints InputHints) {
	var _arg0 *C.GtkEntry     // out
	var _arg1 C.GtkInputHints // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkInputHints(hints)

	C.gtk_entry_set_input_hints(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(hints)
}

// SetInputPurpose sets the Entry:input-purpose property which can be used by
// on-screen keyboards and other input methods to adjust their behaviour.
//
// The function takes the following parameters:
//
//   - purpose: purpose.
func (entry *Entry) SetInputPurpose(purpose InputPurpose) {
	var _arg0 *C.GtkEntry       // out
	var _arg1 C.GtkInputPurpose // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkInputPurpose(purpose)

	C.gtk_entry_set_input_purpose(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(purpose)
}

// SetInvisibleChar sets the character to use in place of the actual text when
// gtk_entry_set_visibility() has been called to set text visibility to FALSE.
// i.e. this is the character used in “password mode” to show the user how many
// characters have been typed. By default, GTK+ picks the best invisible char
// available in the current font. If you set the invisible char to 0, then the
// user will get no feedback at all; there will be no text on the screen as they
// type.
//
// The function takes the following parameters:
//
//   - ch: unicode character.
func (entry *Entry) SetInvisibleChar(ch uint32) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gunichar  // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gunichar(ch)

	C.gtk_entry_set_invisible_char(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(ch)
}

// SetMaxLength sets the maximum allowed length of the contents of the widget.
// If the current contents are longer than the given length, then they will be
// truncated to fit.
//
// This is equivalent to getting entry's EntryBuffer and calling
// gtk_entry_buffer_set_max_length() on it. ]|.
//
// The function takes the following parameters:
//
//   - max: maximum length of the entry, or 0 for no maximum. (other than the
//     maximum length of entries.) The value passed in will be clamped to the
//     range 0-65536.
func (entry *Entry) SetMaxLength(max int) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(max)

	C.gtk_entry_set_max_length(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(max)
}

// SetMaxWidthChars sets the desired maximum width in characters of entry.
//
// The function takes the following parameters:
//
//   - nChars: new desired maximum width, in characters.
func (entry *Entry) SetMaxWidthChars(nChars int) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(nChars)

	C.gtk_entry_set_max_width_chars(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(nChars)
}

// SetOverwriteMode sets whether the text is overwritten when typing in the
// Entry.
//
// The function takes the following parameters:
//
//   - overwrite: new value.
func (entry *Entry) SetOverwriteMode(overwrite bool) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if overwrite {
		_arg1 = C.TRUE
	}

	C.gtk_entry_set_overwrite_mode(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(overwrite)
}

// SetPlaceholderText sets text to be displayed in entry when it is empty and
// unfocused. This can be used to give a visual hint of the expected contents of
// the Entry.
//
// Note that since the placeholder text gets removed when the entry received
// focus, using this feature is a bit problematic if the entry is given the
// initial focus in a window. Sometimes this can be worked around by delaying
// the initial focus setting until the first key event arrives.
//
// The function takes the following parameters:
//
//   - text (optional): string to be displayed when entry is empty and
//     unfocused, or NULL.
func (entry *Entry) SetPlaceholderText(text string) {
	var _arg0 *C.GtkEntry // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if text != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_entry_set_placeholder_text(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(text)
}

// SetProgressFraction causes the entry’s progress indicator to “fill in”
// the given fraction of the bar. The fraction should be between 0.0 and 1.0,
// inclusive.
//
// The function takes the following parameters:
//
//   - fraction of the task that’s been completed.
func (entry *Entry) SetProgressFraction(fraction float64) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gdouble(fraction)

	C.gtk_entry_set_progress_fraction(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(fraction)
}

// SetProgressPulseStep sets the fraction of total entry width to move the
// progress bouncing block for each call to gtk_entry_progress_pulse().
//
// The function takes the following parameters:
//
//   - fraction between 0.0 and 1.0.
func (entry *Entry) SetProgressPulseStep(fraction float64) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gdouble(fraction)

	C.gtk_entry_set_progress_pulse_step(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(fraction)
}

// SetTabs sets a TabArray; the tabstops in the array are applied to the entry
// text.
//
// The function takes the following parameters:
//
//   - tabs: TabArray.
func (entry *Entry) SetTabs(tabs *pango.TabArray) {
	var _arg0 *C.GtkEntry      // out
	var _arg1 *C.PangoTabArray // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.PangoTabArray)(gextras.StructNative(unsafe.Pointer(tabs)))

	C.gtk_entry_set_tabs(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(tabs)
}

// SetText sets the text in the widget to the given value, replacing the current
// contents.
//
// See gtk_entry_buffer_set_text().
//
// The function takes the following parameters:
//
//   - text: new text.
func (entry *Entry) SetText(text string) {
	var _arg0 *C.GtkEntry // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_entry_set_text(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(text)
}

// SetVisibility sets whether the contents of the entry are visible or not. When
// visibility is set to FALSE, characters are displayed as the invisible char,
// and will also appear that way when the text in the entry widget is copied
// elsewhere.
//
// By default, GTK+ picks the best invisible character available in the current
// font, but it can be changed with gtk_entry_set_invisible_char().
//
// Note that you probably want to set Entry:input-purpose to
// GTK_INPUT_PURPOSE_PASSWORD or GTK_INPUT_PURPOSE_PIN to inform input methods
// about the purpose of this entry, in addition to setting visibility to FALSE.
//
// The function takes the following parameters:
//
//   - visible: TRUE if the contents of the entry are displayed as plaintext.
func (entry *Entry) SetVisibility(visible bool) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_entry_set_visibility(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(visible)
}

// SetWidthChars changes the size request of the entry to be about the right
// size for n_chars characters. Note that it changes the size request,
// the size can still be affected by how you pack the widget into containers.
// If n_chars is -1, the size reverts to the default entry size.
//
// The function takes the following parameters:
//
//   - nChars: width in chars.
func (entry *Entry) SetWidthChars(nChars int) {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(nChars)

	C.gtk_entry_set_width_chars(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(nChars)
}

// TextIndexToLayoutIndex converts from a position in the entry contents
// (returned by gtk_entry_get_text()) to a position in the entry’s
// Layout (returned by gtk_entry_get_layout(), with text retrieved via
// pango_layout_get_text()).
//
// The function takes the following parameters:
//
//   - textIndex: byte index into the entry contents.
//
// The function returns the following values:
//
//   - gint: byte index into the entry layout text.
func (entry *Entry) TextIndexToLayoutIndex(textIndex int) int {
	var _arg0 *C.GtkEntry // out
	var _arg1 C.gint      // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.gint(textIndex)

	_cret = C.gtk_entry_text_index_to_layout_index(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(textIndex)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// UnsetInvisibleChar unsets the invisible char previously set with
// gtk_entry_set_invisible_char(). So that the default invisible char is used
// again.
func (entry *Entry) UnsetInvisibleChar() {
	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_entry_unset_invisible_char(_arg0)
	runtime.KeepAlive(entry)
}

// Activate class handler for the Entry::activate signal. The default
// implementation calls gtk_window_activate_default() on the entry’s top-level
// window.
func (entry *Entry) activate() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.activate

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// Backspace class handler for the Entry::backspace signal. The default
// implementation deletes the selection or a single character or word.
func (entry *Entry) backspace() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.backspace

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_backspace(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// copyClipboard class handler for the Entry::copy-clipboard signal. The default
// implementation copies the selection, if one exists.
func (entry *Entry) copyClipboard() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.copy_clipboard

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_copy_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// cutClipboard class handler for the Entry::cut-clipboard signal. The default
// implementation cuts the selection, if one exists.
func (entry *Entry) cutClipboard() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.cut_clipboard

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_cut_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// deleteFromCursor class handler for the Entry::delete-from-cursor signal.
// The default implementation deletes the selection or the specified number of
// characters or words.
//
// The function takes the following parameters:
//
//   - typ
//   - count
func (entry *Entry) deleteFromCursor(typ DeleteType, count int) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.delete_from_cursor

	var _arg0 *C.GtkEntry     // out
	var _arg1 C.GtkDeleteType // out
	var _arg2 C.gint          // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkDeleteType(typ)
	_arg2 = C.gint(count)

	C._gotk4_gtk3_Entry_virtual_delete_from_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(count)
}

// frameSize: calculate the size of the text area frame, which is its
// allocated width and requested height, minus space for margins and borders,
// and taking baseline and text height into account. This virtual function must
// be non-NULL.
//
// The function takes the following parameters:
//
//   - x
//   - y
//   - width
//   - height
func (entry *Entry) frameSize(x, y, width, height *int) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.get_frame_size

	var _arg0 *C.GtkEntry // out
	var _arg1 *C.gint     // out
	var _arg2 *C.gint     // out
	var _arg3 *C.gint     // out
	var _arg4 *C.gint     // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.gint)(unsafe.Pointer(x))
	_arg2 = (*C.gint)(unsafe.Pointer(y))
	_arg3 = (*C.gint)(unsafe.Pointer(width))
	_arg4 = (*C.gint)(unsafe.Pointer(height))

	C._gotk4_gtk3_Entry_virtual_get_frame_size(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// textAreaSize: calculate the size of the text area, which is its allocated
// width and requested height, minus space for margins and borders. This virtual
// function must be non-NULL.
//
// The function takes the following parameters:
//
//   - x
//   - y
//   - width
//   - height
func (entry *Entry) textAreaSize(x, y, width, height *int) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.get_text_area_size

	var _arg0 *C.GtkEntry // out
	var _arg1 *C.gint     // out
	var _arg2 *C.gint     // out
	var _arg3 *C.gint     // out
	var _arg4 *C.gint     // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.gint)(unsafe.Pointer(x))
	_arg2 = (*C.gint)(unsafe.Pointer(y))
	_arg3 = (*C.gint)(unsafe.Pointer(width))
	_arg4 = (*C.gint)(unsafe.Pointer(height))

	C._gotk4_gtk3_Entry_virtual_get_text_area_size(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// insertAtCursor class handler for the Entry::insert-at-cursor signal.
// The default implementation inserts text at the cursor.
func (entry *Entry) insertAtCursor(str string) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.insert_at_cursor

	var _arg0 *C.GtkEntry // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_Entry_virtual_insert_at_cursor(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(str)
}

func (entry *Entry) insertEmoji() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.insert_emoji

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_insert_emoji(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// moveCursor class handler for the Entry::move-cursor signal. The default
// implementation specifies the standard Entry cursor movement behavior.
//
// The function takes the following parameters:
//
//   - step
//   - count
//   - extendSelection
func (entry *Entry) moveCursor(step MovementStep, count int, extendSelection bool) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkEntry       // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _arg3 C.gboolean        // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)
	if extendSelection {
		_arg3 = C.TRUE
	}

	C._gotk4_gtk3_Entry_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)
	runtime.KeepAlive(extendSelection)
}

// pasteClipboard class handler for the Entry::paste-clipboard signal.
// The default implementation pastes at the current cursor position or over the
// current selection if one exists.
func (entry *Entry) pasteClipboard() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.paste_clipboard

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_paste_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// populatePopup class handler for the Entry::populate-popup signal. If
// non-NULL, this will be called to add additional entries to the context menu
// when it is displayed.
func (entry *Entry) populatePopup(popup Widgetter) {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.populate_popup

	var _arg0 *C.GtkEntry  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(popup).Native()))

	C._gotk4_gtk3_Entry_virtual_populate_popup(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(popup)
}

// toggleOverwrite class handler for the Entry::toggle-overwrite signal.
// The default implementation toggles overwrite mode and blinks the cursor.
func (entry *Entry) toggleOverwrite() {
	gclass := (*C.GtkEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.toggle_overwrite

	var _arg0 *C.GtkEntry // out

	_arg0 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_Entry_virtual_toggle_overwrite(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// EntryAccessibleOverrides contains methods that are overridable.
type EntryAccessibleOverrides struct {
}

func defaultEntryAccessibleOverrides(v *EntryAccessible) EntryAccessibleOverrides {
	return EntryAccessibleOverrides{}
}

type EntryAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	*coreglib.Object
	atk.Action
	atk.EditableText
	atk.Text
}

var (
	_ coreglib.Objector = (*EntryAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*EntryAccessible, *EntryAccessibleClass, EntryAccessibleOverrides](
		GTypeEntryAccessible,
		initEntryAccessibleClass,
		wrapEntryAccessible,
		defaultEntryAccessibleOverrides,
	)
}

func initEntryAccessibleClass(gclass unsafe.Pointer, overrides EntryAccessibleOverrides, classInitFunc func(*EntryAccessibleClass)) {
	if classInitFunc != nil {
		class := (*EntryAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapEntryAccessible(obj *coreglib.Object) *EntryAccessible {
	return &EntryAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		EditableText: atk.EditableText{
			Object: obj,
		},
		Text: atk.Text{
			Object: obj,
		},
	}
}

func marshalEntryAccessible(p uintptr) (interface{}, error) {
	return wrapEntryAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// EntryBufferOverrides contains methods that are overridable.
type EntryBufferOverrides struct {
	// DeleteText deletes a sequence of characters from the buffer. n_chars
	// characters are deleted starting at position. If n_chars is negative,
	// then all characters until the end of the text are deleted.
	//
	// If position or n_chars are out of bounds, then they are coerced to sane
	// values.
	//
	// Note that the positions are specified in characters, not bytes.
	//
	// The function takes the following parameters:
	//
	//   - position at which to delete text.
	//   - nChars: number of characters to delete.
	//
	// The function returns the following values:
	//
	//   - guint: number of characters deleted.
	DeleteText func(position, nChars uint) uint
	// The function takes the following parameters:
	//
	//   - position
	//   - nChars
	DeletedText func(position, nChars uint)
	// Length retrieves the length in characters of the buffer.
	//
	// The function returns the following values:
	//
	//   - guint: number of characters in the buffer.
	Length func() uint
	Text   func(nBytes *uint) string
	// InsertText inserts n_chars characters of chars into the contents of the
	// buffer, at position position.
	//
	// If n_chars is negative, then characters from chars will be inserted until
	// a null-terminator is found. If position or n_chars are out of bounds,
	// or the maximum buffer text length is exceeded, then they are coerced to
	// sane values.
	//
	// Note that the position and length are in characters, not in bytes.
	//
	// The function takes the following parameters:
	//
	//   - position at which to insert text.
	//   - chars: text to insert into the buffer.
	//   - nChars: length of the text in characters, or -1.
	//
	// The function returns the following values:
	//
	//   - guint: number of characters actually inserted.
	InsertText func(position uint, chars string, nChars uint) uint
	// The function takes the following parameters:
	//
	//   - position
	//   - chars
	//   - nChars
	InsertedText func(position uint, chars string, nChars uint)
}

func defaultEntryBufferOverrides(v *EntryBuffer) EntryBufferOverrides {
	return EntryBufferOverrides{
		DeleteText:   v.deleteText,
		DeletedText:  v.deletedText,
		Length:       v.length,
		Text:         v.text,
		InsertText:   v.insertText,
		InsertedText: v.insertedText,
	}
}

// EntryBuffer class contains the actual text displayed in a Entry widget.
//
// A single EntryBuffer object can be shared by multiple Entry widgets
// which will then share the same text content, but not the cursor position,
// visibility attributes, icon etc.
//
// EntryBuffer may be derived from. Such a derived class might allow text to
// be stored in an alternate location, such as non-pageable memory, useful in
// the case of important passwords. Or a derived class could integrate with an
// application’s concept of undo/redo.
type EntryBuffer struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*EntryBuffer)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*EntryBuffer, *EntryBufferClass, EntryBufferOverrides](
		GTypeEntryBuffer,
		initEntryBufferClass,
		wrapEntryBuffer,
		defaultEntryBufferOverrides,
	)
}

func initEntryBufferClass(gclass unsafe.Pointer, overrides EntryBufferOverrides, classInitFunc func(*EntryBufferClass)) {
	pclass := (*C.GtkEntryBufferClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeEntryBuffer))))

	if overrides.DeleteText != nil {
		pclass.delete_text = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_delete_text)
	}

	if overrides.DeletedText != nil {
		pclass.deleted_text = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_deleted_text)
	}

	if overrides.Length != nil {
		pclass.get_length = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_get_length)
	}

	if overrides.Text != nil {
		pclass.get_text = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_get_text)
	}

	if overrides.InsertText != nil {
		pclass.insert_text = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_insert_text)
	}

	if overrides.InsertedText != nil {
		pclass.inserted_text = (*[0]byte)(C._gotk4_gtk3_EntryBufferClass_inserted_text)
	}

	if classInitFunc != nil {
		class := (*EntryBufferClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapEntryBuffer(obj *coreglib.Object) *EntryBuffer {
	return &EntryBuffer{
		Object: obj,
	}
}

func marshalEntryBuffer(p uintptr) (interface{}, error) {
	return wrapEntryBuffer(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDeletedText: this signal is emitted after text is deleted from the
// buffer.
func (buffer *EntryBuffer) ConnectDeletedText(f func(position, nChars uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "deleted-text", false, unsafe.Pointer(C._gotk4_gtk3_EntryBuffer_ConnectDeletedText), f)
}

// ConnectInsertedText: this signal is emitted after text is inserted into the
// buffer.
func (buffer *EntryBuffer) ConnectInsertedText(f func(position uint, chars string, nChars uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "inserted-text", false, unsafe.Pointer(C._gotk4_gtk3_EntryBuffer_ConnectInsertedText), f)
}

// NewEntryBuffer: create a new GtkEntryBuffer object.
//
// Optionally, specify initial text to set in the buffer.
//
// The function takes the following parameters:
//
//   - initialChars (optional): initial buffer text, or NULL.
//   - nInitialChars: number of characters in initial_chars, or -1.
//
// The function returns the following values:
//
//   - entryBuffer: new GtkEntryBuffer object.
func NewEntryBuffer(initialChars string, nInitialChars int) *EntryBuffer {
	var _arg1 *C.gchar          // out
	var _arg2 C.gint            // out
	var _cret *C.GtkEntryBuffer // in

	if initialChars != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(initialChars)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.gint(nInitialChars)

	_cret = C.gtk_entry_buffer_new(_arg1, _arg2)
	runtime.KeepAlive(initialChars)
	runtime.KeepAlive(nInitialChars)

	var _entryBuffer *EntryBuffer // out

	_entryBuffer = wrapEntryBuffer(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _entryBuffer
}

// DeleteText deletes a sequence of characters from the buffer. n_chars
// characters are deleted starting at position. If n_chars is negative, then all
// characters until the end of the text are deleted.
//
// If position or n_chars are out of bounds, then they are coerced to sane
// values.
//
// Note that the positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - position at which to delete text.
//   - nChars: number of characters to delete.
//
// The function returns the following values:
//
//   - guint: number of characters deleted.
func (buffer *EntryBuffer) DeleteText(position uint, nChars int) uint {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 C.gint            // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = C.gint(nChars)

	_cret = C.gtk_entry_buffer_delete_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(nChars)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// EmitDeletedText: used when subclassing EntryBuffer.
//
// The function takes the following parameters:
//
//   - position at which text was deleted.
//   - nChars: number of characters deleted.
func (buffer *EntryBuffer) EmitDeletedText(position, nChars uint) {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 C.guint           // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = C.guint(nChars)

	C.gtk_entry_buffer_emit_deleted_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(nChars)
}

// EmitInsertedText: used when subclassing EntryBuffer.
//
// The function takes the following parameters:
//
//   - position at which text was inserted.
//   - chars: text that was inserted.
//   - nChars: number of characters inserted.
func (buffer *EntryBuffer) EmitInsertedText(position uint, chars string, nChars uint) {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 *C.gchar          // out
	var _arg3 C.guint           // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(chars)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.guint(nChars)

	C.gtk_entry_buffer_emit_inserted_text(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(chars)
	runtime.KeepAlive(nChars)
}

// Bytes retrieves the length in bytes of the buffer. See
// gtk_entry_buffer_get_length().
//
// The function returns the following values:
//
//   - gsize: byte length of the buffer.
func (buffer *EntryBuffer) Bytes() uint {
	var _arg0 *C.GtkEntryBuffer // out
	var _cret C.gsize           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_entry_buffer_get_bytes(_arg0)
	runtime.KeepAlive(buffer)

	var _gsize uint // out

	_gsize = uint(_cret)

	return _gsize
}

// Length retrieves the length in characters of the buffer.
//
// The function returns the following values:
//
//   - guint: number of characters in the buffer.
func (buffer *EntryBuffer) Length() uint {
	var _arg0 *C.GtkEntryBuffer // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_entry_buffer_get_length(_arg0)
	runtime.KeepAlive(buffer)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// MaxLength retrieves the maximum allowed length of the text in buffer.
// See gtk_entry_buffer_set_max_length().
//
// The function returns the following values:
//
//   - gint: maximum allowed number of characters in EntryBuffer, or 0 if there
//     is no maximum.
func (buffer *EntryBuffer) MaxLength() int {
	var _arg0 *C.GtkEntryBuffer // out
	var _cret C.gint            // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_entry_buffer_get_max_length(_arg0)
	runtime.KeepAlive(buffer)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Text retrieves the contents of the buffer.
//
// The memory pointer returned by this call will not change unless this object
// emits a signal, or is finalized.
//
// The function returns the following values:
//
//   - utf8: pointer to the contents of the widget as a string. This string
//     points to internally allocated storage in the buffer and must not be
//     freed, modified or stored.
func (buffer *EntryBuffer) Text() string {
	var _arg0 *C.GtkEntryBuffer // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_entry_buffer_get_text(_arg0)
	runtime.KeepAlive(buffer)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// InsertText inserts n_chars characters of chars into the contents of the
// buffer, at position position.
//
// If n_chars is negative, then characters from chars will be inserted until a
// null-terminator is found. If position or n_chars are out of bounds, or the
// maximum buffer text length is exceeded, then they are coerced to sane values.
//
// Note that the position and length are in characters, not in bytes.
//
// The function takes the following parameters:
//
//   - position at which to insert text.
//   - chars: text to insert into the buffer.
//   - nChars: length of the text in characters, or -1.
//
// The function returns the following values:
//
//   - guint: number of characters actually inserted.
func (buffer *EntryBuffer) InsertText(position uint, chars string, nChars int) uint {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 *C.gchar          // out
	var _arg3 C.gint            // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(chars)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(nChars)

	_cret = C.gtk_entry_buffer_insert_text(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(chars)
	runtime.KeepAlive(nChars)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// SetMaxLength sets the maximum allowed length of the contents of the buffer.
// If the current contents are longer than the given length, then they will be
// truncated to fit.
//
// The function takes the following parameters:
//
//   - maxLength: maximum length of the entry buffer, or 0 for no maximum.
//     (other than the maximum length of entries.) The value passed in will be
//     clamped to the range 0-65536.
func (buffer *EntryBuffer) SetMaxLength(maxLength int) {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.gint            // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.gint(maxLength)

	C.gtk_entry_buffer_set_max_length(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(maxLength)
}

// SetText sets the text in the buffer.
//
// This is roughly equivalent to calling gtk_entry_buffer_delete_text() and
// gtk_entry_buffer_insert_text().
//
// Note that n_chars is in characters, not in bytes.
//
// The function takes the following parameters:
//
//   - chars: new text.
//   - nChars: number of characters in text, or -1.
func (buffer *EntryBuffer) SetText(chars string, nChars int) {
	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 *C.gchar          // out
	var _arg2 C.gint            // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(chars)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(nChars)

	C.gtk_entry_buffer_set_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(chars)
	runtime.KeepAlive(nChars)
}

// deleteText deletes a sequence of characters from the buffer. n_chars
// characters are deleted starting at position. If n_chars is negative, then all
// characters until the end of the text are deleted.
//
// If position or n_chars are out of bounds, then they are coerced to sane
// values.
//
// Note that the positions are specified in characters, not bytes.
//
// The function takes the following parameters:
//
//   - position at which to delete text.
//   - nChars: number of characters to delete.
//
// The function returns the following values:
//
//   - guint: number of characters deleted.
func (buffer *EntryBuffer) deleteText(position, nChars uint) uint {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.delete_text

	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 C.guint           // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = C.guint(nChars)

	_cret = C._gotk4_gtk3_EntryBuffer_virtual_delete_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(nChars)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// The function takes the following parameters:
//
//   - position
//   - nChars
func (buffer *EntryBuffer) deletedText(position, nChars uint) {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.deleted_text

	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 C.guint           // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = C.guint(nChars)

	C._gotk4_gtk3_EntryBuffer_virtual_deleted_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(nChars)
}

// Length retrieves the length in characters of the buffer.
//
// The function returns the following values:
//
//   - guint: number of characters in the buffer.
func (buffer *EntryBuffer) length() uint {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.get_length

	var _arg0 *C.GtkEntryBuffer // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C._gotk4_gtk3_EntryBuffer_virtual_get_length(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buffer)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

func (buffer *EntryBuffer) text(nBytes *uint) string {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.get_text

	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 *C.gsize          // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gsize)(unsafe.Pointer(nBytes))

	_cret = C._gotk4_gtk3_EntryBuffer_virtual_get_text(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(nBytes)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// insertText inserts n_chars characters of chars into the contents of the
// buffer, at position position.
//
// If n_chars is negative, then characters from chars will be inserted until a
// null-terminator is found. If position or n_chars are out of bounds, or the
// maximum buffer text length is exceeded, then they are coerced to sane values.
//
// Note that the position and length are in characters, not in bytes.
//
// The function takes the following parameters:
//
//   - position at which to insert text.
//   - chars: text to insert into the buffer.
//   - nChars: length of the text in characters, or -1.
//
// The function returns the following values:
//
//   - guint: number of characters actually inserted.
func (buffer *EntryBuffer) insertText(position uint, chars string, nChars uint) uint {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.insert_text

	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 *C.gchar          // out
	var _arg3 C.guint           // out
	var _cret C.guint           // in

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(chars)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.guint(nChars)

	_cret = C._gotk4_gtk3_EntryBuffer_virtual_insert_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(chars)
	runtime.KeepAlive(nChars)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// The function takes the following parameters:
//
//   - position
//   - chars
//   - nChars
func (buffer *EntryBuffer) insertedText(position uint, chars string, nChars uint) {
	gclass := (*C.GtkEntryBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.inserted_text

	var _arg0 *C.GtkEntryBuffer // out
	var _arg1 C.guint           // out
	var _arg2 *C.gchar          // out
	var _arg3 C.guint           // out

	_arg0 = (*C.GtkEntryBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = C.guint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(chars)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.guint(nChars)

	C._gotk4_gtk3_EntryBuffer_virtual_inserted_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(position)
	runtime.KeepAlive(chars)
	runtime.KeepAlive(nChars)
}

// EntryCompletionOverrides contains methods that are overridable.
type EntryCompletionOverrides struct {
	ActionActivated func(index_ int)
	// The function takes the following parameters:
	//
	//   - model
	//   - iter
	CursorOnMatch func(model TreeModeller, iter *TreeIter) bool
	InsertPrefix  func(prefix string) bool
	// The function takes the following parameters:
	//
	//   - model
	//   - iter
	MatchSelected func(model TreeModeller, iter *TreeIter) bool
	NoMatches     func()
}

func defaultEntryCompletionOverrides(v *EntryCompletion) EntryCompletionOverrides {
	return EntryCompletionOverrides{
		ActionActivated: v.actionActivated,
		CursorOnMatch:   v.cursorOnMatch,
		InsertPrefix:    v.insertPrefix,
		MatchSelected:   v.matchSelected,
		NoMatches:       v.noMatches,
	}
}

// EntryCompletion is an auxiliary object to be used in conjunction with Entry
// to provide the completion functionality. It implements the CellLayout
// interface, to allow the user to add extra cells to the TreeView with
// completion matches.
//
// “Completion functionality” means that when the user modifies the text
// in the entry, EntryCompletion checks which rows in the model match the
// current content of the entry, and displays a list of matches. By default,
// the matching is done by comparing the entry text case-insensitively against
// the text column of the model (see gtk_entry_completion_set_text_column()),
// but this can be overridden with a custom match function (see
// gtk_entry_completion_set_match_func()).
//
// When the user selects a completion, the content of the entry is updated.
// By default, the content of the entry is replaced by the text column
// of the model, but this can be overridden by connecting to the
// EntryCompletion::match-selected signal and updating the entry in the signal
// handler. Note that you should return TRUE from the signal handler to suppress
// the default behaviour.
//
// To add completion functionality to an entry, use gtk_entry_set_completion().
//
// In addition to regular completion matches, which will be inserted into
// the entry when they are selected, EntryCompletion also allows to display
// “actions” in the popup window. Their appearance is similar to menuitems,
// to differentiate them clearly from completion strings. When an action is
// selected, the EntryCompletion::action-activated signal is emitted.
//
// GtkEntryCompletion uses a TreeModelFilter model to represent the subset of
// the entire model that is currently matching. While the GtkEntryCompletion
// signals EntryCompletion::match-selected and EntryCompletion::cursor-on-match
// take the original model and an iter pointing to that model as arguments,
// other callbacks and signals (such as CellLayoutDataFuncs or
// CellArea::apply-attributes) will generally take the filter model
// as argument. As long as you are only calling gtk_tree_model_get(),
// this will make no difference to you. If for some reason, you need the
// original model, use gtk_tree_model_filter_get_model(). Don’t forget to use
// gtk_tree_model_filter_convert_iter_to_child_iter() to obtain a matching iter.
type EntryCompletion struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
	CellLayout
}

var (
	_ coreglib.Objector = (*EntryCompletion)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*EntryCompletion, *EntryCompletionClass, EntryCompletionOverrides](
		GTypeEntryCompletion,
		initEntryCompletionClass,
		wrapEntryCompletion,
		defaultEntryCompletionOverrides,
	)
}

func initEntryCompletionClass(gclass unsafe.Pointer, overrides EntryCompletionOverrides, classInitFunc func(*EntryCompletionClass)) {
	pclass := (*C.GtkEntryCompletionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeEntryCompletion))))

	if overrides.ActionActivated != nil {
		pclass.action_activated = (*[0]byte)(C._gotk4_gtk3_EntryCompletionClass_action_activated)
	}

	if overrides.CursorOnMatch != nil {
		pclass.cursor_on_match = (*[0]byte)(C._gotk4_gtk3_EntryCompletionClass_cursor_on_match)
	}

	if overrides.InsertPrefix != nil {
		pclass.insert_prefix = (*[0]byte)(C._gotk4_gtk3_EntryCompletionClass_insert_prefix)
	}

	if overrides.MatchSelected != nil {
		pclass.match_selected = (*[0]byte)(C._gotk4_gtk3_EntryCompletionClass_match_selected)
	}

	if overrides.NoMatches != nil {
		pclass.no_matches = (*[0]byte)(C._gotk4_gtk3_EntryCompletionClass_no_matches)
	}

	if classInitFunc != nil {
		class := (*EntryCompletionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapEntryCompletion(obj *coreglib.Object) *EntryCompletion {
	return &EntryCompletion{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
		CellLayout: CellLayout{
			Object: obj,
		},
	}
}

func marshalEntryCompletion(p uintptr) (interface{}, error) {
	return wrapEntryCompletion(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActionActivated gets emitted when an action is activated.
func (completion *EntryCompletion) ConnectActionActivated(f func(index int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(completion, "action-activated", false, unsafe.Pointer(C._gotk4_gtk3_EntryCompletion_ConnectActionActivated), f)
}

// ConnectCursorOnMatch gets emitted when a match from the cursor is on a match
// of the list. The default behaviour is to replace the contents of the entry
// with the contents of the text column in the row pointed to by iter.
//
// Note that model is the model that was passed to
// gtk_entry_completion_set_model().
func (completion *EntryCompletion) ConnectCursorOnMatch(f func(model TreeModeller, iter *TreeIter) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(completion, "cursor-on-match", false, unsafe.Pointer(C._gotk4_gtk3_EntryCompletion_ConnectCursorOnMatch), f)
}

// ConnectInsertPrefix gets emitted when the inline autocompletion is triggered.
// The default behaviour is to make the entry display the whole prefix and
// select the newly inserted part.
//
// Applications may connect to this signal in order to insert only a smaller
// part of the prefix into the entry - e.g. the entry used in the FileChooser
// inserts only the part of the prefix up to the next '/'.
func (completion *EntryCompletion) ConnectInsertPrefix(f func(prefix string) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(completion, "insert-prefix", false, unsafe.Pointer(C._gotk4_gtk3_EntryCompletion_ConnectInsertPrefix), f)
}

// ConnectMatchSelected gets emitted when a match from the list is selected.
// The default behaviour is to replace the contents of the entry with the
// contents of the text column in the row pointed to by iter.
//
// Note that model is the model that was passed to
// gtk_entry_completion_set_model().
func (completion *EntryCompletion) ConnectMatchSelected(f func(model TreeModeller, iter *TreeIter) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(completion, "match-selected", false, unsafe.Pointer(C._gotk4_gtk3_EntryCompletion_ConnectMatchSelected), f)
}

// ConnectNoMatches gets emitted when the filter model has zero number of rows
// in completion_complete method. (In other words when GtkEntryCompletion is out
// of suggestions).
func (completion *EntryCompletion) ConnectNoMatches(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(completion, "no-matches", false, unsafe.Pointer(C._gotk4_gtk3_EntryCompletion_ConnectNoMatches), f)
}

// NewEntryCompletion creates a new EntryCompletion object.
//
// The function returns the following values:
//
//   - entryCompletion: newly created EntryCompletion object.
func NewEntryCompletion() *EntryCompletion {
	var _cret *C.GtkEntryCompletion // in

	_cret = C.gtk_entry_completion_new()

	var _entryCompletion *EntryCompletion // out

	_entryCompletion = wrapEntryCompletion(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _entryCompletion
}

// NewEntryCompletionWithArea creates a new EntryCompletion object using the
// specified area to layout cells in the underlying TreeViewColumn for the
// drop-down menu.
//
// The function takes the following parameters:
//
//   - area used to layout cells.
//
// The function returns the following values:
//
//   - entryCompletion: newly created EntryCompletion object.
func NewEntryCompletionWithArea(area CellAreaer) *EntryCompletion {
	var _arg1 *C.GtkCellArea        // out
	var _cret *C.GtkEntryCompletion // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_entry_completion_new_with_area(_arg1)
	runtime.KeepAlive(area)

	var _entryCompletion *EntryCompletion // out

	_entryCompletion = wrapEntryCompletion(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _entryCompletion
}

// Complete requests a completion operation, or in other words a refiltering of
// the current list with completions, using the current key. The completion list
// view will be updated accordingly.
func (completion *EntryCompletion) Complete() {
	var _arg0 *C.GtkEntryCompletion // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	C.gtk_entry_completion_complete(_arg0)
	runtime.KeepAlive(completion)
}

// ComputePrefix computes the common prefix that is shared by all rows in
// completion that start with key. If no row matches key, NULL will be returned.
// Note that a text column must have been set for this function to work,
// see gtk_entry_completion_set_text_column() for details.
//
// The function takes the following parameters:
//
//   - key: text to complete for.
//
// The function returns the following values:
//
//   - utf8 (optional): common prefix all rows starting with key or NULL if no
//     row matches key.
func (completion *EntryCompletion) ComputePrefix(key string) string {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 *C.char               // out
	var _cret *C.gchar              // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_entry_completion_compute_prefix(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(key)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// DeleteAction deletes the action at index_ from completion’s action list.
//
// Note that index_ is a relative position and the position of an action may
// have changed since it was inserted.
//
// The function takes the following parameters:
//
//   - index_: index of the item to delete.
func (completion *EntryCompletion) DeleteAction(index_ int) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(index_)

	C.gtk_entry_completion_delete_action(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(index_)
}

// CompletionPrefix: get the original text entered by the user that triggered
// the completion or NULL if there’s no completion ongoing.
//
// The function returns the following values:
//
//   - utf8: prefix for the current completion.
func (completion *EntryCompletion) CompletionPrefix() string {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret *C.gchar              // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_completion_prefix(_arg0)
	runtime.KeepAlive(completion)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Entry gets the entry completion has been attached to.
//
// The function returns the following values:
//
//   - widget: entry completion has been attached to.
func (completion *EntryCompletion) Entry() Widgetter {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret *C.GtkWidget          // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_entry(_arg0)
	runtime.KeepAlive(completion)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// InlineCompletion returns whether the common prefix of the possible
// completions should be automatically inserted in the entry.
//
// The function returns the following values:
//
//   - ok: TRUE if inline completion is turned on.
func (completion *EntryCompletion) InlineCompletion() bool {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_inline_completion(_arg0)
	runtime.KeepAlive(completion)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InlineSelection returns TRUE if inline-selection mode is turned on.
//
// The function returns the following values:
//
//   - ok: TRUE if inline-selection mode is on.
func (completion *EntryCompletion) InlineSelection() bool {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_inline_selection(_arg0)
	runtime.KeepAlive(completion)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MinimumKeyLength returns the minimum key length as set for completion.
//
// The function returns the following values:
//
//   - gint: currently used minimum key length.
func (completion *EntryCompletion) MinimumKeyLength() int {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gint                // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_minimum_key_length(_arg0)
	runtime.KeepAlive(completion)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Model returns the model the EntryCompletion is using as data source. Returns
// NULL if the model is unset.
//
// The function returns the following values:
//
//   - treeModel (optional) or NULL if none is currently being used.
func (completion *EntryCompletion) Model() *TreeModel {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret *C.GtkTreeModel       // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_model(_arg0)
	runtime.KeepAlive(completion)

	var _treeModel *TreeModel // out

	if _cret != nil {
		_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _treeModel
}

// PopupCompletion returns whether the completions should be presented in a
// popup window.
//
// The function returns the following values:
//
//   - ok: TRUE if popup completion is turned on.
func (completion *EntryCompletion) PopupCompletion() bool {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_popup_completion(_arg0)
	runtime.KeepAlive(completion)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PopupSetWidth returns whether the completion popup window will be resized to
// the width of the entry.
//
// The function returns the following values:
//
//   - ok: TRUE if the popup window will be resized to the width of the entry.
func (completion *EntryCompletion) PopupSetWidth() bool {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_popup_set_width(_arg0)
	runtime.KeepAlive(completion)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PopupSingleMatch returns whether the completion popup window will appear even
// if there is only a single match.
//
// The function returns the following values:
//
//   - ok: TRUE if the popup window will appear regardless of the number of
//     matches.
func (completion *EntryCompletion) PopupSingleMatch() bool {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_popup_single_match(_arg0)
	runtime.KeepAlive(completion)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TextColumn returns the column in the model of completion to get strings from.
//
// The function returns the following values:
//
//   - gint: column containing the strings.
func (completion *EntryCompletion) TextColumn() int {
	var _arg0 *C.GtkEntryCompletion // out
	var _cret C.gint                // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	_cret = C.gtk_entry_completion_get_text_column(_arg0)
	runtime.KeepAlive(completion)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// InsertActionMarkup inserts an action in completion’s action item list at
// position index_ with markup markup.
//
// The function takes the following parameters:
//
//   - index_: index of the item to insert.
//   - markup of the item to insert.
func (completion *EntryCompletion) InsertActionMarkup(index_ int, markup string) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out
	var _arg2 *C.gchar              // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(index_)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_entry_completion_insert_action_markup(_arg0, _arg1, _arg2)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(index_)
	runtime.KeepAlive(markup)
}

// InsertActionText inserts an action in completion’s action item list at
// position index_ with text text. If you want the action item to have markup,
// use gtk_entry_completion_insert_action_markup().
//
// Note that index_ is a relative position in the list of actions and the
// position of an action can change when deleting a different action.
//
// The function takes the following parameters:
//
//   - index_: index of the item to insert.
//   - text of the item to insert.
func (completion *EntryCompletion) InsertActionText(index_ int, text string) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out
	var _arg2 *C.gchar              // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(index_)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_entry_completion_insert_action_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(index_)
	runtime.KeepAlive(text)
}

// InsertPrefix requests a prefix insertion.
func (completion *EntryCompletion) InsertPrefix() {
	var _arg0 *C.GtkEntryCompletion // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	C.gtk_entry_completion_insert_prefix(_arg0)
	runtime.KeepAlive(completion)
}

// SetInlineCompletion sets whether the common prefix of the possible
// completions should be automatically inserted in the entry.
//
// The function takes the following parameters:
//
//   - inlineCompletion: TRUE to do inline completion.
func (completion *EntryCompletion) SetInlineCompletion(inlineCompletion bool) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gboolean            // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if inlineCompletion {
		_arg1 = C.TRUE
	}

	C.gtk_entry_completion_set_inline_completion(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(inlineCompletion)
}

// SetInlineSelection sets whether it is possible to cycle through the possible
// completions inside the entry.
//
// The function takes the following parameters:
//
//   - inlineSelection: TRUE to do inline selection.
func (completion *EntryCompletion) SetInlineSelection(inlineSelection bool) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gboolean            // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if inlineSelection {
		_arg1 = C.TRUE
	}

	C.gtk_entry_completion_set_inline_selection(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(inlineSelection)
}

// SetMatchFunc sets the match function for completion to be func. The match
// function is used to determine if a row should or should not be in the
// completion list.
//
// The function takes the following parameters:
//
//   - fn to use.
func (completion *EntryCompletion) SetMatchFunc(fn EntryCompletionMatchFunc) {
	var _arg0 *C.GtkEntryCompletion         // out
	var _arg1 C.GtkEntryCompletionMatchFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_EntryCompletionMatchFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_entry_completion_set_match_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(fn)
}

// SetMinimumKeyLength requires the length of the search key for completion to
// be at least length. This is useful for long lists, where completing using
// a small key takes a lot of time and will come up with meaningless results
// anyway (ie, a too large dataset).
//
// The function takes the following parameters:
//
//   - length: minimum length of the key in order to start completing.
func (completion *EntryCompletion) SetMinimumKeyLength(length int) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(length)

	C.gtk_entry_completion_set_minimum_key_length(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(length)
}

// SetModel sets the model for a EntryCompletion. If completion already has a
// model set, it will remove it before setting the new model. If model is NULL,
// then it will unset the model.
//
// The function takes the following parameters:
//
//   - model (optional): TreeModel.
func (completion *EntryCompletion) SetModel(model TreeModeller) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 *C.GtkTreeModel       // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if model != nil {
		_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}

	C.gtk_entry_completion_set_model(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(model)
}

// SetPopupCompletion sets whether the completions should be presented in a
// popup window.
//
// The function takes the following parameters:
//
//   - popupCompletion: TRUE to do popup completion.
func (completion *EntryCompletion) SetPopupCompletion(popupCompletion bool) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gboolean            // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if popupCompletion {
		_arg1 = C.TRUE
	}

	C.gtk_entry_completion_set_popup_completion(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(popupCompletion)
}

// SetPopupSetWidth sets whether the completion popup window will be resized to
// be the same width as the entry.
//
// The function takes the following parameters:
//
//   - popupSetWidth: TRUE to make the width of the popup the same as the entry.
func (completion *EntryCompletion) SetPopupSetWidth(popupSetWidth bool) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gboolean            // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if popupSetWidth {
		_arg1 = C.TRUE
	}

	C.gtk_entry_completion_set_popup_set_width(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(popupSetWidth)
}

// SetPopupSingleMatch sets whether the completion popup window will appear even
// if there is only a single match. You may want to set this to FALSE if you are
// using [inline completion][GtkEntryCompletion--inline-completion].
//
// The function takes the following parameters:
//
//   - popupSingleMatch: TRUE if the popup should appear even for a single
//     match.
func (completion *EntryCompletion) SetPopupSingleMatch(popupSingleMatch bool) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gboolean            // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	if popupSingleMatch {
		_arg1 = C.TRUE
	}

	C.gtk_entry_completion_set_popup_single_match(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(popupSingleMatch)
}

// SetTextColumn: convenience function for setting up the most used case of
// this code: a completion list with just strings. This function will set up
// completion to have a list displaying all (and just) strings in the completion
// list, and to get those strings from column in the model of completion.
//
// This functions creates and adds a CellRendererText for the selected column.
// If you need to set the text column, but don't want the cell renderer,
// use g_object_set() to set the EntryCompletion:text-column property directly.
//
// The function takes the following parameters:
//
//   - column in the model of completion to get strings from.
func (completion *EntryCompletion) SetTextColumn(column int) {
	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(column)

	C.gtk_entry_completion_set_text_column(_arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(column)
}

func (completion *EntryCompletion) actionActivated(index_ int) {
	gclass := (*C.GtkEntryCompletionClass)(coreglib.PeekParentClass(completion))
	fnarg := gclass.action_activated

	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 C.gint                // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = C.gint(index_)

	C._gotk4_gtk3_EntryCompletion_virtual_action_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(index_)
}

// The function takes the following parameters:
//
//   - model
//   - iter
func (completion *EntryCompletion) cursorOnMatch(model TreeModeller, iter *TreeIter) bool {
	gclass := (*C.GtkEntryCompletionClass)(coreglib.PeekParentClass(completion))
	fnarg := gclass.cursor_on_match

	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 *C.GtkTreeModel       // out
	var _arg2 *C.GtkTreeIter        // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_EntryCompletion_virtual_cursor_on_match(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(model)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (completion *EntryCompletion) insertPrefix(prefix string) bool {
	gclass := (*C.GtkEntryCompletionClass)(coreglib.PeekParentClass(completion))
	fnarg := gclass.insert_prefix

	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 *C.gchar              // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(prefix)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_EntryCompletion_virtual_insert_prefix(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(prefix)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - model
//   - iter
func (completion *EntryCompletion) matchSelected(model TreeModeller, iter *TreeIter) bool {
	gclass := (*C.GtkEntryCompletionClass)(coreglib.PeekParentClass(completion))
	fnarg := gclass.match_selected

	var _arg0 *C.GtkEntryCompletion // out
	var _arg1 *C.GtkTreeModel       // out
	var _arg2 *C.GtkTreeIter        // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_EntryCompletion_virtual_match_selected(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(completion)
	runtime.KeepAlive(model)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (completion *EntryCompletion) noMatches() {
	gclass := (*C.GtkEntryCompletionClass)(coreglib.PeekParentClass(completion))
	fnarg := gclass.no_matches

	var _arg0 *C.GtkEntryCompletion // out

	_arg0 = (*C.GtkEntryCompletion)(unsafe.Pointer(coreglib.InternObject(completion).Native()))

	C._gotk4_gtk3_EntryCompletion_virtual_no_matches(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(completion)
}

type EntryIconAccessible struct {
	_ [0]func() // equal guard
	atk.AtkObject

	*coreglib.Object
	atk.Action
	atk.Component
}

var (
	_ coreglib.Objector = (*EntryIconAccessible)(nil)
)

func wrapEntryIconAccessible(obj *coreglib.Object) *EntryIconAccessible {
	return &EntryIconAccessible{
		AtkObject: atk.AtkObject{
			Object: obj,
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		Component: atk.Component{
			Object: obj,
		},
	}
}

func marshalEntryIconAccessible(p uintptr) (interface{}, error) {
	return wrapEntryIconAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// EventBoxOverrides contains methods that are overridable.
type EventBoxOverrides struct {
}

func defaultEventBoxOverrides(v *EventBox) EventBoxOverrides {
	return EventBoxOverrides{}
}

// EventBox widget is a subclass of Bin which also has its own window. It is
// useful since it allows you to catch events for widgets which do not have
// their own window.
type EventBox struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*EventBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*EventBox, *EventBoxClass, EventBoxOverrides](
		GTypeEventBox,
		initEventBoxClass,
		wrapEventBox,
		defaultEventBoxOverrides,
	)
}

func initEventBoxClass(gclass unsafe.Pointer, overrides EventBoxOverrides, classInitFunc func(*EventBoxClass)) {
	if classInitFunc != nil {
		class := (*EventBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapEventBox(obj *coreglib.Object) *EventBox {
	return &EventBox{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalEventBox(p uintptr) (interface{}, error) {
	return wrapEventBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewEventBox creates a new EventBox.
//
// The function returns the following values:
//
//   - eventBox: new EventBox.
func NewEventBox() *EventBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_event_box_new()

	var _eventBox *EventBox // out

	_eventBox = wrapEventBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _eventBox
}

// AboveChild returns whether the event box window is above or below the windows
// of its child. See gtk_event_box_set_above_child() for details.
//
// The function returns the following values:
//
//   - ok: TRUE if the event box window is above the window of its child.
func (eventBox *EventBox) AboveChild() bool {
	var _arg0 *C.GtkEventBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEventBox)(unsafe.Pointer(coreglib.InternObject(eventBox).Native()))

	_cret = C.gtk_event_box_get_above_child(_arg0)
	runtime.KeepAlive(eventBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleWindow returns whether the event box has a visible window. See
// gtk_event_box_set_visible_window() for details.
//
// The function returns the following values:
//
//   - ok: TRUE if the event box window is visible.
func (eventBox *EventBox) VisibleWindow() bool {
	var _arg0 *C.GtkEventBox // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkEventBox)(unsafe.Pointer(coreglib.InternObject(eventBox).Native()))

	_cret = C.gtk_event_box_get_visible_window(_arg0)
	runtime.KeepAlive(eventBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAboveChild: set whether the event box window is positioned above the
// windows of its child, as opposed to below it. If the window is above, all
// events inside the event box will go to the event box. If the window is below,
// events in windows of child widgets will first got to that widget, and then to
// its parents.
//
// The default is to keep the window below the child.
//
// The function takes the following parameters:
//
//   - aboveChild: TRUE if the event box window is above its child.
func (eventBox *EventBox) SetAboveChild(aboveChild bool) {
	var _arg0 *C.GtkEventBox // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkEventBox)(unsafe.Pointer(coreglib.InternObject(eventBox).Native()))
	if aboveChild {
		_arg1 = C.TRUE
	}

	C.gtk_event_box_set_above_child(_arg0, _arg1)
	runtime.KeepAlive(eventBox)
	runtime.KeepAlive(aboveChild)
}

// SetVisibleWindow: set whether the event box uses a visible or invisible child
// window. The default is to use visible windows.
//
// In an invisible window event box, the window that the event box creates is
// a GDK_INPUT_ONLY window, which means that it is invisible and only serves to
// receive events.
//
// A visible window event box creates a visible (GDK_INPUT_OUTPUT) window that
// acts as the parent window for all the widgets contained in the event box.
//
// You should generally make your event box invisible if you just want to trap
// events. Creating a visible window may cause artifacts that are visible to the
// user, especially if the user is using a theme with gradients or pixmaps.
//
// The main reason to create a non input-only event box is if you want to set
// the background to a different color or draw on it.
//
// There is one unexpected issue for an invisible event box that has its
// window below the child. (See gtk_event_box_set_above_child().) Since the
// input-only window is not an ancestor window of any windows that descendent
// widgets of the event box create, events on these windows aren’t propagated
// up by the windowing system, but only by GTK+. The practical effect of
// this is if an event isn’t in the event mask for the descendant window (see
// gtk_widget_add_events()), it won’t be received by the event box.
//
// This problem doesn’t occur for visible event boxes, because in that case,
// the event box window is actually the ancestor of the descendant windows,
// not just at the same place on the screen.
//
// The function takes the following parameters:
//
//   - visibleWindow: TRUE to make the event box have a visible window.
func (eventBox *EventBox) SetVisibleWindow(visibleWindow bool) {
	var _arg0 *C.GtkEventBox // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkEventBox)(unsafe.Pointer(coreglib.InternObject(eventBox).Native()))
	if visibleWindow {
		_arg1 = C.TRUE
	}

	C.gtk_event_box_set_visible_window(_arg0, _arg1)
	runtime.KeepAlive(eventBox)
	runtime.KeepAlive(visibleWindow)
}

// EventController is a base, low-level implementation for event controllers.
// Those react to a series of Events, and possibly trigger actions as a
// consequence of those.
type EventController struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*EventController)(nil)
)

// EventControllerer describes types inherited from class EventController.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type EventControllerer interface {
	coreglib.Objector
	baseEventController() *EventController
}

var _ EventControllerer = (*EventController)(nil)

func wrapEventController(obj *coreglib.Object) *EventController {
	return &EventController{
		Object: obj,
	}
}

func marshalEventController(p uintptr) (interface{}, error) {
	return wrapEventController(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (controller *EventController) baseEventController() *EventController {
	return controller
}

// BaseEventController returns the underlying base object.
func BaseEventController(obj EventControllerer) *EventController {
	return obj.baseEventController()
}

// PropagationPhase gets the propagation phase at which controller handles
// events.
//
// The function returns the following values:
//
//   - propagationPhase: propagation phase.
func (controller *EventController) PropagationPhase() PropagationPhase {
	var _arg0 *C.GtkEventController // out
	var _cret C.GtkPropagationPhase // in

	_arg0 = (*C.GtkEventController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))

	_cret = C.gtk_event_controller_get_propagation_phase(_arg0)
	runtime.KeepAlive(controller)

	var _propagationPhase PropagationPhase // out

	_propagationPhase = PropagationPhase(_cret)

	return _propagationPhase
}

// Widget returns the Widget this controller relates to.
//
// The function returns the following values:
//
//   - widget: Widget.
func (controller *EventController) Widget() Widgetter {
	var _arg0 *C.GtkEventController // out
	var _cret *C.GtkWidget          // in

	_arg0 = (*C.GtkEventController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))

	_cret = C.gtk_event_controller_get_widget(_arg0)
	runtime.KeepAlive(controller)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// HandleEvent feeds an events into controller, so it can be interpreted and the
// controller actions triggered.
//
// The function takes the following parameters:
//
//   - event: Event.
//
// The function returns the following values:
//
//   - ok: TRUE if the event was potentially useful to trigger the controller
//     action.
func (controller *EventController) HandleEvent(event *gdk.Event) bool {
	var _arg0 *C.GtkEventController // out
	var _arg1 *C.GdkEvent           // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkEventController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_event_controller_handle_event(_arg0, _arg1)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Reset resets the controller to a clean state. Every interaction the
// controller did through EventController::handle-event will be dropped at this
// point.
func (controller *EventController) Reset() {
	var _arg0 *C.GtkEventController // out

	_arg0 = (*C.GtkEventController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))

	C.gtk_event_controller_reset(_arg0)
	runtime.KeepAlive(controller)
}

// SetPropagationPhase sets the propagation phase at which a controller handles
// events.
//
// If phase is GTK_PHASE_NONE, no automatic event handling will be performed,
// but other additional gesture maintenance will. In that phase, the events can
// be managed by calling gtk_event_controller_handle_event().
//
// The function takes the following parameters:
//
//   - phase: propagation phase.
func (controller *EventController) SetPropagationPhase(phase PropagationPhase) {
	var _arg0 *C.GtkEventController // out
	var _arg1 C.GtkPropagationPhase // out

	_arg0 = (*C.GtkEventController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg1 = C.GtkPropagationPhase(phase)

	C.gtk_event_controller_set_propagation_phase(_arg0, _arg1)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(phase)
}

// EventControllerKey is an event controller meant for situations where you need
// access to key events.
//
// This object was added in 3.24.
type EventControllerKey struct {
	_ [0]func() // equal guard
	EventController
}

var (
	_ EventControllerer = (*EventControllerKey)(nil)
)

func wrapEventControllerKey(obj *coreglib.Object) *EventControllerKey {
	return &EventControllerKey{
		EventController: EventController{
			Object: obj,
		},
	}
}

func marshalEventControllerKey(p uintptr) (interface{}, error) {
	return wrapEventControllerKey(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (controller *EventControllerKey) ConnectFocusIn(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "focus-in", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectFocusIn), f)
}

func (controller *EventControllerKey) ConnectFocusOut(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "focus-out", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectFocusOut), f)
}

func (controller *EventControllerKey) ConnectIMUpdate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "im-update", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectIMUpdate), f)
}

// ConnectKeyPressed: this signal is emitted whenever a key is pressed.
func (controller *EventControllerKey) ConnectKeyPressed(f func(keyval, keycode uint, state gdk.ModifierType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "key-pressed", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectKeyPressed), f)
}

// ConnectKeyReleased: this signal is emitted whenever a key is released.
func (controller *EventControllerKey) ConnectKeyReleased(f func(keyval, keycode uint, state gdk.ModifierType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "key-released", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectKeyReleased), f)
}

func (controller *EventControllerKey) ConnectModifiers(f func(object gdk.ModifierType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(controller, "modifiers", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerKey_ConnectModifiers), f)
}

func NewEventControllerKey(widget Widgetter) *EventControllerKey {
	var _arg1 *C.GtkWidget          // out
	var _cret *C.GtkEventController // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_event_controller_key_new(_arg1)
	runtime.KeepAlive(widget)

	var _eventControllerKey *EventControllerKey // out

	_eventControllerKey = wrapEventControllerKey(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _eventControllerKey
}

func (controller *EventControllerKey) Forward(widget Widgetter) bool {
	var _arg0 *C.GtkEventControllerKey // out
	var _arg1 *C.GtkWidget             // out
	var _cret C.gboolean               // in

	_arg0 = (*C.GtkEventControllerKey)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_event_controller_key_forward(_arg0, _arg1)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (controller *EventControllerKey) Group() uint {
	var _arg0 *C.GtkEventControllerKey // out
	var _cret C.guint                  // in

	_arg0 = (*C.GtkEventControllerKey)(unsafe.Pointer(coreglib.InternObject(controller).Native()))

	_cret = C.gtk_event_controller_key_get_group(_arg0)
	runtime.KeepAlive(controller)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// IMContext gets the IM context of a key controller.
//
// The function returns the following values:
//
//   - imContext: IM context.
func (controller *EventControllerKey) IMContext() IMContexter {
	var _arg0 *C.GtkEventControllerKey // out
	var _cret *C.GtkIMContext          // in

	_arg0 = (*C.GtkEventControllerKey)(unsafe.Pointer(coreglib.InternObject(controller).Native()))

	_cret = C.gtk_event_controller_key_get_im_context(_arg0)
	runtime.KeepAlive(controller)

	var _imContext IMContexter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.IMContexter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(IMContexter)
			return ok
		})
		rv, ok := casted.(IMContexter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.IMContexter")
		}
		_imContext = rv
	}

	return _imContext
}

func (controller *EventControllerKey) SetIMContext(imContext IMContexter) {
	var _arg0 *C.GtkEventControllerKey // out
	var _arg1 *C.GtkIMContext          // out

	_arg0 = (*C.GtkEventControllerKey)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg1 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(imContext).Native()))

	C.gtk_event_controller_key_set_im_context(_arg0, _arg1)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(imContext)
}

// EventControllerMotion is an event controller meant for situations where you
// need to track the position of the pointer.
//
// This object was added in 3.24.
type EventControllerMotion struct {
	_ [0]func() // equal guard
	EventController
}

var (
	_ EventControllerer = (*EventControllerMotion)(nil)
)

func wrapEventControllerMotion(obj *coreglib.Object) *EventControllerMotion {
	return &EventControllerMotion{
		EventController: EventController{
			Object: obj,
		},
	}
}

func marshalEventControllerMotion(p uintptr) (interface{}, error) {
	return wrapEventControllerMotion(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEnter signals that the pointer has entered the widget.
func (v *EventControllerMotion) ConnectEnter(f func(x, y float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "enter", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerMotion_ConnectEnter), f)
}

// ConnectLeave signals that pointer has left the widget.
func (v *EventControllerMotion) ConnectLeave(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "leave", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerMotion_ConnectLeave), f)
}

// ConnectMotion is emitted when the pointer moves inside the widget.
func (v *EventControllerMotion) ConnectMotion(f func(x, y float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "motion", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerMotion_ConnectMotion), f)
}

// NewEventControllerMotion creates a new event controller that will handle
// motion events for the given widget.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - eventControllerMotion: new EventControllerMotion.
func NewEventControllerMotion(widget Widgetter) *EventControllerMotion {
	var _arg1 *C.GtkWidget          // out
	var _cret *C.GtkEventController // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_event_controller_motion_new(_arg1)
	runtime.KeepAlive(widget)

	var _eventControllerMotion *EventControllerMotion // out

	_eventControllerMotion = wrapEventControllerMotion(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _eventControllerMotion
}

// EventControllerScroll is an event controller meant to handle scroll
// events from mice and touchpads. It is capable of handling both
// discrete and continuous scroll events, abstracting them both on the
// EventControllerScroll::scroll signal (deltas in the discrete case are
// multiples of 1).
//
// In the case of continuous scroll events, EventControllerScroll
// encloses all EventControllerScroll::scroll events between two
// EventControllerScroll::scroll-begin and EventControllerScroll::scroll-end
// signals.
//
// The behavior of the event controller can be modified by the flags
// given at creation time, or modified at a later point through
// gtk_event_controller_scroll_set_flags() (e.g. because the scrolling
// conditions of the widget changed).
//
// The controller can be set up to emit motion for either/both vertical and
// horizontal scroll events through K_EVENT_CONTROLLER_SCROLL_VERTICAL,
// K_EVENT_CONTROLLER_SCROLL_HORIZONTAL and K_EVENT_CONTROLLER_SCROLL_BOTH.
// If any axis is disabled, the respective EventControllerScroll::scroll delta
// will be 0. Vertical scroll events will be translated to horizontal motion for
// the devices incapable of horizontal scrolling.
//
// The event controller can also be forced to emit discrete events on all
// devices through K_EVENT_CONTROLLER_SCROLL_DISCRETE. This can be used to
// implement discrete actions triggered through scroll events (e.g. switching
// across combobox options).
//
// The K_EVENT_CONTROLLER_SCROLL_KINETIC flag toggles the emission of the
// EventControllerScroll::decelerate signal, emitted at the end of scrolling
// with two X/Y velocity arguments that are consistent with the motion that was
// received.
//
// This object was added in 3.24.
type EventControllerScroll struct {
	_ [0]func() // equal guard
	EventController
}

var (
	_ EventControllerer = (*EventControllerScroll)(nil)
)

func wrapEventControllerScroll(obj *coreglib.Object) *EventControllerScroll {
	return &EventControllerScroll{
		EventController: EventController{
			Object: obj,
		},
	}
}

func marshalEventControllerScroll(p uintptr) (interface{}, error) {
	return wrapEventControllerScroll(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDecelerate is emitted after scroll is finished if the
// K_EVENT_CONTROLLER_SCROLL_KINETIC flag is set. vel_x and vel_y express the
// initial velocity that was imprinted by the scroll events. vel_x and vel_y are
// expressed in pixels/ms.
func (scroll *EventControllerScroll) ConnectDecelerate(f func(velX, velY float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scroll, "decelerate", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerScroll_ConnectDecelerate), f)
}

// ConnectScroll signals that the widget should scroll by the amount specified
// by dx and dy.
func (scroll *EventControllerScroll) ConnectScroll(f func(dx, dy float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scroll, "scroll", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerScroll_ConnectScroll), f)
}

// ConnectScrollBegin signals that a new scrolling operation has begun. It will
// only be emitted on devices capable of it.
func (scroll *EventControllerScroll) ConnectScrollBegin(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scroll, "scroll-begin", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerScroll_ConnectScrollBegin), f)
}

// ConnectScrollEnd signals that a new scrolling operation has finished. It will
// only be emitted on devices capable of it.
func (scroll *EventControllerScroll) ConnectScrollEnd(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scroll, "scroll-end", false, unsafe.Pointer(C._gotk4_gtk3_EventControllerScroll_ConnectScrollEnd), f)
}

// NewEventControllerScroll creates a new event controller that will handle
// scroll events for the given widget.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - flags: behavior flags.
//
// The function returns the following values:
//
//   - eventControllerScroll: new EventControllerScroll.
func NewEventControllerScroll(widget Widgetter, flags EventControllerScrollFlags) *EventControllerScroll {
	var _arg1 *C.GtkWidget                    // out
	var _arg2 C.GtkEventControllerScrollFlags // out
	var _cret *C.GtkEventController           // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkEventControllerScrollFlags(flags)

	_cret = C.gtk_event_controller_scroll_new(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)

	var _eventControllerScroll *EventControllerScroll // out

	_eventControllerScroll = wrapEventControllerScroll(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _eventControllerScroll
}

// Flags gets the flags conditioning the scroll controller behavior.
//
// The function returns the following values:
//
//   - eventControllerScrollFlags: controller flags.
func (scroll *EventControllerScroll) Flags() EventControllerScrollFlags {
	var _arg0 *C.GtkEventControllerScroll     // out
	var _cret C.GtkEventControllerScrollFlags // in

	_arg0 = (*C.GtkEventControllerScroll)(unsafe.Pointer(coreglib.InternObject(scroll).Native()))

	_cret = C.gtk_event_controller_scroll_get_flags(_arg0)
	runtime.KeepAlive(scroll)

	var _eventControllerScrollFlags EventControllerScrollFlags // out

	_eventControllerScrollFlags = EventControllerScrollFlags(_cret)

	return _eventControllerScrollFlags
}

// SetFlags sets the flags conditioning scroll controller behavior.
//
// The function takes the following parameters:
//
//   - flags: behavior flags.
func (scroll *EventControllerScroll) SetFlags(flags EventControllerScrollFlags) {
	var _arg0 *C.GtkEventControllerScroll     // out
	var _arg1 C.GtkEventControllerScrollFlags // out

	_arg0 = (*C.GtkEventControllerScroll)(unsafe.Pointer(coreglib.InternObject(scroll).Native()))
	_arg1 = C.GtkEventControllerScrollFlags(flags)

	C.gtk_event_controller_scroll_set_flags(_arg0, _arg1)
	runtime.KeepAlive(scroll)
	runtime.KeepAlive(flags)
}

// ExpanderOverrides contains methods that are overridable.
type ExpanderOverrides struct {
	// Activate: keybinding signal is emitted when the user hits the Enter key.
	Activate func()
}

func defaultExpanderOverrides(v *Expander) ExpanderOverrides {
	return ExpanderOverrides{
		Activate: v.activate,
	}
}

// Expander allows the user to hide or show its child by clicking on an expander
// triangle similar to the triangles used in a TreeView.
//
// Normally you use an expander as you would use any other descendant of Bin;
// you create the child widget and use gtk_container_add() to add it to the
// expander. When the expander is toggled, it will take care of showing and
// hiding the child automatically.
//
// # Special Usage
//
// There are situations in which you may prefer to show and hide the expanded
// widget yourself, such as when you want to actually create the widget at
// expansion time. In this case, create a Expander but do not add a child to it.
// The expander widget has an Expander:expanded property which can be used to
// monitor its expansion state. You should watch this property with a signal
// connection as follows:
//
//	expander
//	├── title
//	│   ├── arrow
//	│   ╰── <label widget>
//	╰── <child>
//
// GtkExpander has three CSS nodes, the main node with the name expander,
// a subnode with name title and node below it with name arrow. The arrow of an
// expander that is showing its child gets the :checked pseudoclass added to it.
type Expander struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Expander)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Expander, *ExpanderClass, ExpanderOverrides](
		GTypeExpander,
		initExpanderClass,
		wrapExpander,
		defaultExpanderOverrides,
	)
}

func initExpanderClass(gclass unsafe.Pointer, overrides ExpanderOverrides, classInitFunc func(*ExpanderClass)) {
	pclass := (*C.GtkExpanderClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeExpander))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_ExpanderClass_activate)
	}

	if classInitFunc != nil {
		class := (*ExpanderClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapExpander(obj *coreglib.Object) *Expander {
	return &Expander{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalExpander(p uintptr) (interface{}, error) {
	return wrapExpander(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (expander *Expander) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(expander, "activate", false, unsafe.Pointer(C._gotk4_gtk3_Expander_ConnectActivate), f)
}

// NewExpander creates a new expander using label as the text of the label.
//
// The function takes the following parameters:
//
//   - label (optional): text of the label.
//
// The function returns the following values:
//
//   - expander: new Expander widget.
func NewExpander(label string) *Expander {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_expander_new(_arg1)
	runtime.KeepAlive(label)

	var _expander *Expander // out

	_expander = wrapExpander(coreglib.Take(unsafe.Pointer(_cret)))

	return _expander
}

// NewExpanderWithMnemonic creates a new expander using label as the text
// of the label. If characters in label are preceded by an underscore,
// they are underlined. If you need a literal underscore character in a label,
// use “__” (two underscores). The first underlined character represents a
// keyboard accelerator called a mnemonic. Pressing Alt and that key activates
// the button.
//
// The function takes the following parameters:
//
//   - label (optional): text of the label with an underscore in front of the
//     mnemonic character.
//
// The function returns the following values:
//
//   - expander: new Expander widget.
func NewExpanderWithMnemonic(label string) *Expander {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_expander_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _expander *Expander // out

	_expander = wrapExpander(coreglib.Take(unsafe.Pointer(_cret)))

	return _expander
}

// Expanded queries a Expander and returns its current state. Returns TRUE if
// the child widget is revealed.
//
// See gtk_expander_set_expanded().
//
// The function returns the following values:
//
//   - ok: current state of the expander.
func (expander *Expander) Expanded() bool {
	var _arg0 *C.GtkExpander // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_expanded(_arg0)
	runtime.KeepAlive(expander)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Label fetches the text from a label widget including any embedded underlines
// indicating mnemonics and Pango markup, as set by gtk_expander_set_label().
// If the label text has not been set the return value will be NULL. This will
// be the case if you create an empty button with gtk_button_new() to use as a
// container.
//
// Note that this function behaved differently in versions prior to 2.14 and
// used to return the label text stripped of embedded underlines indicating
// mnemonics and Pango markup. This problem can be avoided by fetching the label
// text directly from the label widget.
//
// The function returns the following values:
//
//   - utf8 (optional): text of the label widget. This string is owned by the
//     widget and must not be modified or freed.
func (expander *Expander) Label() string {
	var _arg0 *C.GtkExpander // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_label(_arg0)
	runtime.KeepAlive(expander)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// LabelFill returns whether the label widget will fill all available horizontal
// space allocated to expander.
//
// The function returns the following values:
//
//   - ok: TRUE if the label widget will fill all available horizontal space.
func (expander *Expander) LabelFill() bool {
	var _arg0 *C.GtkExpander // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_label_fill(_arg0)
	runtime.KeepAlive(expander)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LabelWidget retrieves the label widget for the frame. See
// gtk_expander_set_label_widget().
//
// The function returns the following values:
//
//   - widget (optional): label widget, or NULL if there is none.
func (expander *Expander) LabelWidget() Widgetter {
	var _arg0 *C.GtkExpander // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_label_widget(_arg0)
	runtime.KeepAlive(expander)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// ResizeToplevel returns whether the expander will resize the toplevel widget
// containing the expander upon resizing and collpasing.
//
// The function returns the following values:
//
//   - ok: “resize toplevel” setting.
func (expander *Expander) ResizeToplevel() bool {
	var _arg0 *C.GtkExpander // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_resize_toplevel(_arg0)
	runtime.KeepAlive(expander)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Spacing gets the value set by gtk_expander_set_spacing().
//
// Deprecated: Use margins on the child instead.
//
// The function returns the following values:
//
//   - gint: spacing between the expander and child.
func (expander *Expander) Spacing() int {
	var _arg0 *C.GtkExpander // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_spacing(_arg0)
	runtime.KeepAlive(expander)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// UseMarkup returns whether the label’s text is interpreted as marked
// up with the [Pango text markup language][PangoMarkupFormat]. See
// gtk_expander_set_use_markup().
//
// The function returns the following values:
//
//   - ok: TRUE if the label’s text will be parsed for markup.
func (expander *Expander) UseMarkup() bool {
	var _arg0 *C.GtkExpander // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_use_markup(_arg0)
	runtime.KeepAlive(expander)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UseUnderline returns whether an embedded underline in the expander label
// indicates a mnemonic. See gtk_expander_set_use_underline().
//
// The function returns the following values:
//
//   - ok: TRUE if an embedded underline in the expander label indicates the
//     mnemonic accelerator keys.
func (expander *Expander) UseUnderline() bool {
	var _arg0 *C.GtkExpander // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	_cret = C.gtk_expander_get_use_underline(_arg0)
	runtime.KeepAlive(expander)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetExpanded sets the state of the expander. Set to TRUE, if you want the
// child widget to be revealed, and FALSE if you want the child widget to be
// hidden.
//
// The function takes the following parameters:
//
//   - expanded: whether the child widget is revealed.
func (expander *Expander) SetExpanded(expanded bool) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if expanded {
		_arg1 = C.TRUE
	}

	C.gtk_expander_set_expanded(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(expanded)
}

// SetLabel sets the text of the label of the expander to label.
//
// This will also clear any previously set labels.
//
// The function takes the following parameters:
//
//   - label (optional): string.
func (expander *Expander) SetLabel(label string) {
	var _arg0 *C.GtkExpander // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_expander_set_label(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(label)
}

// SetLabelFill sets whether the label widget should fill all available
// horizontal space allocated to expander.
//
// Note that this function has no effect since 3.20.
//
// The function takes the following parameters:
//
//   - labelFill: TRUE if the label should should fill all available horizontal
//     space.
func (expander *Expander) SetLabelFill(labelFill bool) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if labelFill {
		_arg1 = C.TRUE
	}

	C.gtk_expander_set_label_fill(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(labelFill)
}

// SetLabelWidget: set the label widget for the expander. This is the widget
// that will appear embedded alongside the expander arrow.
//
// The function takes the following parameters:
//
//   - labelWidget (optional): new label widget.
func (expander *Expander) SetLabelWidget(labelWidget Widgetter) {
	var _arg0 *C.GtkExpander // out
	var _arg1 *C.GtkWidget   // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if labelWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(labelWidget).Native()))
	}

	C.gtk_expander_set_label_widget(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(labelWidget)
}

// SetResizeToplevel sets whether the expander will resize the toplevel widget
// containing the expander upon resizing and collpasing.
//
// The function takes the following parameters:
//
//   - resizeToplevel: whether to resize the toplevel.
func (expander *Expander) SetResizeToplevel(resizeToplevel bool) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if resizeToplevel {
		_arg1 = C.TRUE
	}

	C.gtk_expander_set_resize_toplevel(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(resizeToplevel)
}

// SetSpacing sets the spacing field of expander, which is the number of pixels
// to place between expander and the child.
//
// Deprecated: Use margins on the child instead.
//
// The function takes the following parameters:
//
//   - spacing: distance between the expander and child in pixels.
func (expander *Expander) SetSpacing(spacing int) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	_arg1 = C.gint(spacing)

	C.gtk_expander_set_spacing(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(spacing)
}

// SetUseMarkup sets whether the text of the label contains markup in [Pango’s
// text markup language][PangoMarkupFormat]. See gtk_label_set_markup().
//
// The function takes the following parameters:
//
//   - useMarkup: TRUE if the label’s text should be parsed for markup.
func (expander *Expander) SetUseMarkup(useMarkup bool) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if useMarkup {
		_arg1 = C.TRUE
	}

	C.gtk_expander_set_use_markup(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(useMarkup)
}

// SetUseUnderline: if true, an underline in the text of the expander label
// indicates the next character should be used for the mnemonic accelerator key.
//
// The function takes the following parameters:
//
//   - useUnderline: TRUE if underlines in the text indicate mnemonics.
func (expander *Expander) SetUseUnderline(useUnderline bool) {
	var _arg0 *C.GtkExpander // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))
	if useUnderline {
		_arg1 = C.TRUE
	}

	C.gtk_expander_set_use_underline(_arg0, _arg1)
	runtime.KeepAlive(expander)
	runtime.KeepAlive(useUnderline)
}

// Activate: keybinding signal is emitted when the user hits the Enter key.
func (expander *Expander) activate() {
	gclass := (*C.GtkExpanderClass)(coreglib.PeekParentClass(expander))
	fnarg := gclass.activate

	var _arg0 *C.GtkExpander // out

	_arg0 = (*C.GtkExpander)(unsafe.Pointer(coreglib.InternObject(expander).Native()))

	C._gotk4_gtk3_Expander_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(expander)
}

// ExpanderAccessibleOverrides contains methods that are overridable.
type ExpanderAccessibleOverrides struct {
}

func defaultExpanderAccessibleOverrides(v *ExpanderAccessible) ExpanderAccessibleOverrides {
	return ExpanderAccessibleOverrides{}
}

type ExpanderAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Action
}

var (
	_ coreglib.Objector = (*ExpanderAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ExpanderAccessible, *ExpanderAccessibleClass, ExpanderAccessibleOverrides](
		GTypeExpanderAccessible,
		initExpanderAccessibleClass,
		wrapExpanderAccessible,
		defaultExpanderAccessibleOverrides,
	)
}

func initExpanderAccessibleClass(gclass unsafe.Pointer, overrides ExpanderAccessibleOverrides, classInitFunc func(*ExpanderAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ExpanderAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapExpanderAccessible(obj *coreglib.Object) *ExpanderAccessible {
	return &ExpanderAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Action: atk.Action{
			Object: obj,
		},
	}
}

func marshalExpanderAccessible(p uintptr) (interface{}, error) {
	return wrapExpanderAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// FileChooserButtonOverrides contains methods that are overridable.
type FileChooserButtonOverrides struct {
	// FileSet: signal emitted when the user selects a file.
	FileSet func()
}

func defaultFileChooserButtonOverrides(v *FileChooserButton) FileChooserButtonOverrides {
	return FileChooserButtonOverrides{
		FileSet: v.fileSet,
	}
}

// FileChooserButton is a widget that lets the user select a file. It implements
// the FileChooser interface. Visually, it is a file name with a button to bring
// up a FileChooserDialog. The user can then use that dialog to change the
// file associated with that button. This widget does not support setting the
// FileChooser:select-multiple property to TRUE.
//
// Create a button to let the user select a file in /etc
//
//	{
//	  GtkWidget *button;
//
//	  button = gtk_file_chooser_button_new (_("Select a file"),
//	                                        GTK_FILE_CHOOSER_ACTION_OPEN);
//	  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
//	                                       "/etc");
//	}
//
// The FileChooserButton supports the FileChooserActions
// GTK_FILE_CHOOSER_ACTION_OPEN and GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
//
// > The FileChooserButton will ellipsize the label, and will thus > request
// little horizontal space. To give the button more space, > you should call
// gtk_widget_get_preferred_size(), > gtk_file_chooser_button_set_width_chars(),
// or pack the button in > such a way that other interface elements give space
// to the > widget.
//
// # CSS nodes
//
// GtkFileChooserButton has a CSS node with name “filechooserbutton”, containing
// a subnode for the internal button with name “button” and style class “.file”.
type FileChooserButton struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	FileChooser
}

var (
	_ coreglib.Objector = (*FileChooserButton)(nil)
	_ Containerer       = (*FileChooserButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FileChooserButton, *FileChooserButtonClass, FileChooserButtonOverrides](
		GTypeFileChooserButton,
		initFileChooserButtonClass,
		wrapFileChooserButton,
		defaultFileChooserButtonOverrides,
	)
}

func initFileChooserButtonClass(gclass unsafe.Pointer, overrides FileChooserButtonOverrides, classInitFunc func(*FileChooserButtonClass)) {
	pclass := (*C.GtkFileChooserButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeFileChooserButton))))

	if overrides.FileSet != nil {
		pclass.file_set = (*[0]byte)(C._gotk4_gtk3_FileChooserButtonClass_file_set)
	}

	if classInitFunc != nil {
		class := (*FileChooserButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFileChooserButton(obj *coreglib.Object) *FileChooserButton {
	return &FileChooserButton{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		FileChooser: FileChooser{
			Object: obj,
		},
	}
}

func marshalFileChooserButton(p uintptr) (interface{}, error) {
	return wrapFileChooserButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectFileSet signal is emitted when the user selects a file.
//
// Note that this signal is only emitted when the user changes the file.
func (button *FileChooserButton) ConnectFileSet(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "file-set", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserButton_ConnectFileSet), f)
}

// NewFileChooserButton creates a new file-selecting button widget.
//
// The function takes the following parameters:
//
//   - title of the browse dialog.
//   - action: open mode for the widget.
//
// The function returns the following values:
//
//   - fileChooserButton: new button widget.
func NewFileChooserButton(title string, action FileChooserAction) *FileChooserButton {
	var _arg1 *C.gchar               // out
	var _arg2 C.GtkFileChooserAction // out
	var _cret *C.GtkWidget           // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkFileChooserAction(action)

	_cret = C.gtk_file_chooser_button_new(_arg1, _arg2)
	runtime.KeepAlive(title)
	runtime.KeepAlive(action)

	var _fileChooserButton *FileChooserButton // out

	_fileChooserButton = wrapFileChooserButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _fileChooserButton
}

// NewFileChooserButtonWithDialog creates a FileChooserButton widget which uses
// dialog as its file-picking window.
//
// Note that dialog must be a Dialog (or subclass) which implements the
// FileChooser interface and must not have GTK_DIALOG_DESTROY_WITH_PARENT set.
//
// Also note that the dialog needs to have its confirmative button added with
// response GTK_RESPONSE_ACCEPT or GTK_RESPONSE_OK in order for the button to
// take over the file selected in the dialog.
//
// The function takes the following parameters:
//
//   - dialog: widget to use as dialog.
//
// The function returns the following values:
//
//   - fileChooserButton: new button widget.
func NewFileChooserButtonWithDialog(dialog *Dialog) *FileChooserButton {
	var _arg1 *C.GtkWidget // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_file_chooser_button_new_with_dialog(_arg1)
	runtime.KeepAlive(dialog)

	var _fileChooserButton *FileChooserButton // out

	_fileChooserButton = wrapFileChooserButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _fileChooserButton
}

// FocusOnClick returns whether the button grabs focus when it is clicked with
// the mouse. See gtk_file_chooser_button_set_focus_on_click().
//
// Deprecated: Use gtk_widget_get_focus_on_click() instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the button grabs focus when it is clicked with the mouse.
func (button *FileChooserButton) FocusOnClick() bool {
	var _arg0 *C.GtkFileChooserButton // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_file_chooser_button_get_focus_on_click(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Title retrieves the title of the browse dialog used by button. The returned
// value should not be modified or freed.
//
// The function returns the following values:
//
//   - utf8: pointer to the browse dialog’s title.
func (button *FileChooserButton) Title() string {
	var _arg0 *C.GtkFileChooserButton // out
	var _cret *C.gchar                // in

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_file_chooser_button_get_title(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// WidthChars retrieves the width in characters of the button widget’s entry
// and/or label.
//
// The function returns the following values:
//
//   - gint: integer width (in characters) that the button will use to size
//     itself.
func (button *FileChooserButton) WidthChars() int {
	var _arg0 *C.GtkFileChooserButton // out
	var _cret C.gint                  // in

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_file_chooser_button_get_width_chars(_arg0)
	runtime.KeepAlive(button)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SetFocusOnClick sets whether the button will grab focus when it is clicked
// with the mouse. Making mouse clicks not grab focus is useful in places like
// toolbars where you don’t want the keyboard focus removed from the main area
// of the application.
//
// Deprecated: Use gtk_widget_set_focus_on_click() instead.
//
// The function takes the following parameters:
//
//   - focusOnClick: whether the button grabs focus when clicked with the mouse.
func (button *FileChooserButton) SetFocusOnClick(focusOnClick bool) {
	var _arg0 *C.GtkFileChooserButton // out
	var _arg1 C.gboolean              // out

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if focusOnClick {
		_arg1 = C.TRUE
	}

	C.gtk_file_chooser_button_set_focus_on_click(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(focusOnClick)
}

// SetTitle modifies the title of the browse dialog used by button.
//
// The function takes the following parameters:
//
//   - title: new browse dialog title.
func (button *FileChooserButton) SetTitle(title string) {
	var _arg0 *C.GtkFileChooserButton // out
	var _arg1 *C.gchar                // out

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_chooser_button_set_title(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(title)
}

// SetWidthChars sets the width (in characters) that button will use to n_chars.
//
// The function takes the following parameters:
//
//   - nChars: new width, in characters.
func (button *FileChooserButton) SetWidthChars(nChars int) {
	var _arg0 *C.GtkFileChooserButton // out
	var _arg1 C.gint                  // out

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.gint(nChars)

	C.gtk_file_chooser_button_set_width_chars(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(nChars)
}

// fileSet: signal emitted when the user selects a file.
func (fc *FileChooserButton) fileSet() {
	gclass := (*C.GtkFileChooserButtonClass)(coreglib.PeekParentClass(fc))
	fnarg := gclass.file_set

	var _arg0 *C.GtkFileChooserButton // out

	_arg0 = (*C.GtkFileChooserButton)(unsafe.Pointer(coreglib.InternObject(fc).Native()))

	C._gotk4_gtk3_FileChooserButton_virtual_file_set(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(fc)
}

// FileChooserDialogOverrides contains methods that are overridable.
type FileChooserDialogOverrides struct {
}

func defaultFileChooserDialogOverrides(v *FileChooserDialog) FileChooserDialogOverrides {
	return FileChooserDialogOverrides{}
}

// FileChooserDialog is a dialog box suitable for use with “File/Open” or
// “File/Save as” commands. This widget works by putting a FileChooserWidget
// inside a Dialog. It exposes the FileChooser interface, so you can use all
// of the FileChooser functions on the file chooser dialog as well as those for
// Dialog.
//
// Note that FileChooserDialog does not have any methods of its own. Instead,
// you should use the functions that work on a FileChooser.
//
// If you want to integrate well with the platform you should use the
// FileChooserNative API, which will use a platform-specific dialog if available
// and fall back to GtkFileChooserDialog otherwise.
//
// # Typical usage
//
// In the simplest of cases, you can the following code to use FileChooserDialog
// to select a file for opening:
//
//	GtkWidget *dialog;
//	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
//	gint res;
//
//	dialog = gtk_file_chooser_dialog_new ("Open File",
//	                                      parent_window,
//	                                      action,
//	                                      _("_Cancel"),
//	                                      GTK_RESPONSE_CANCEL,
//	                                      _("_Open"),
//	                                      GTK_RESPONSE_ACCEPT,
//	                                      NULL);
//
//	res = gtk_dialog_run (GTK_DIALOG (dialog));
//	if (res == GTK_RESPONSE_ACCEPT)
//	  {
//	    char *filename;
//	    GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
//	    filename = gtk_file_chooser_get_filename (chooser);
//	    open_file (filename);
//	    g_free (filename);
//	  }
//
//	gtk_widget_destroy (dialog);
//
// To use a dialog for saving, you can use this:
//
//	GtkWidget *dialog;
//	GtkFileChooser *chooser;
//	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
//	gint res;
//
//	dialog = gtk_file_chooser_dialog_new ("Save File",
//	                                      parent_window,
//	                                      action,
//	                                      _("_Cancel"),
//	                                      GTK_RESPONSE_CANCEL,
//	                                      _("_Save"),
//	                                      GTK_RESPONSE_ACCEPT,
//	                                      NULL);
//	chooser = GTK_FILE_CHOOSER (dialog);
//
//	gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
//
//	if (user_edited_a_new_document)
//	  gtk_file_chooser_set_current_name (chooser,
//	                                     _("Untitled document"));
//	else
//	  gtk_file_chooser_set_filename (chooser,
//	                                 existing_filename);
//
//	res = gtk_dialog_run (GTK_DIALOG (dialog));
//	if (res == GTK_RESPONSE_ACCEPT)
//	  {
//	    char *filename;
//
//	    filename = gtk_file_chooser_get_filename (chooser);
//	    save_to_file (filename);
//	    g_free (filename);
//	  }
//
//	gtk_widget_destroy (dialog);
//
// # Setting up a file chooser dialog
//
// There are various cases in which you may need to use a FileChooserDialog:
//
// - To select a file for opening. Use K_FILE_CHOOSER_ACTION_OPEN.
//
// - To save a file for the first time. Use K_FILE_CHOOSER_ACTION_SAVE, and
// suggest a name such as “Untitled” with gtk_file_chooser_set_current_name().
//
// - To save a file under a different name. Use K_FILE_CHOOSER_ACTION_SAVE,
// and set the existing filename with gtk_file_chooser_set_filename().
//
// - To choose a folder instead of a file. Use
// K_FILE_CHOOSER_ACTION_SELECT_FOLDER.
//
// Note that old versions of the file chooser’s documentation suggested using
// gtk_file_chooser_set_current_folder() in various situations, with the
// intention of letting the application suggest a reasonable default folder.
// This is no longer considered to be a good policy, as now the file chooser is
// able to make good suggestions on its own. In general, you should only cause
// the file chooser to show a specific folder when it is appropriate to use
// gtk_file_chooser_set_filename(), i.e. when you are doing a Save As command
// and you already have a file saved somewhere.
//
// # Response Codes
//
// FileChooserDialog inherits from Dialog, so buttons that go in its action
// area have response codes such as K_RESPONSE_ACCEPT and K_RESPONSE_CANCEL.
// For example, you could call gtk_file_chooser_dialog_new() as follows:
//
//	GtkWidget *dialog;
//	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
//
//	dialog = gtk_file_chooser_dialog_new ("Open File",
//	                                      parent_window,
//	                                      action,
//	                                      _("_Cancel"),
//	                                      GTK_RESPONSE_CANCEL,
//	                                      _("_Open"),
//	                                      GTK_RESPONSE_ACCEPT,
//	                                      NULL);
//
// This will create buttons for “Cancel” and “Open” that use stock response
// identifiers from ResponseType. For most dialog boxes you can use your
// own custom response codes rather than the ones in ResponseType, but
// FileChooserDialog assumes that its “accept”-type action, e.g. an “Open” or
// “Save” button, will have one of the following response codes:
//
// - K_RESPONSE_ACCEPT
//
// - K_RESPONSE_OK
//
// - K_RESPONSE_YES
//
// - K_RESPONSE_APPLY
//
// This is because FileChooserDialog must intercept responses and switch to
// folders if appropriate, rather than letting the dialog terminate — the
// implementation uses these known response codes to know which responses can be
// blocked if appropriate.
//
// To summarize, make sure you use a [stock response
// code][gtkfilechooserdialog-responses] when you use FileChooserDialog to
// ensure proper operation.
type FileChooserDialog struct {
	_ [0]func() // equal guard
	Dialog

	*coreglib.Object
	FileChooser
}

var (
	_ coreglib.Objector = (*FileChooserDialog)(nil)
	_ Binner            = (*FileChooserDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FileChooserDialog, *FileChooserDialogClass, FileChooserDialogOverrides](
		GTypeFileChooserDialog,
		initFileChooserDialogClass,
		wrapFileChooserDialog,
		defaultFileChooserDialogOverrides,
	)
}

func initFileChooserDialogClass(gclass unsafe.Pointer, overrides FileChooserDialogOverrides, classInitFunc func(*FileChooserDialogClass)) {
	if classInitFunc != nil {
		class := (*FileChooserDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFileChooserDialog(obj *coreglib.Object) *FileChooserDialog {
	return &FileChooserDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
		Object: obj,
		FileChooser: FileChooser{
			Object: obj,
		},
	}
}

func marshalFileChooserDialog(p uintptr) (interface{}, error) {
	return wrapFileChooserDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// FileChooserNativeOverrides contains methods that are overridable.
type FileChooserNativeOverrides struct {
}

func defaultFileChooserNativeOverrides(v *FileChooserNative) FileChooserNativeOverrides {
	return FileChooserNativeOverrides{}
}

// FileChooserNative is an abstraction of a dialog box suitable for use
// with “File/Open” or “File/Save as” commands. By default, this just uses
// a FileChooserDialog to implement the actual dialog. However, on certain
// platforms, such as Windows and macOS, the native platform file chooser is
// used instead. When the application is running in a sandboxed environment
// without direct filesystem access (such as Flatpak), FileChooserNative may
// call the proper APIs (portals) to let the user choose a file and make it
// available to the application.
//
// While the API of FileChooserNative closely mirrors FileChooserDialog,
// the main difference is that there is no access to any Window or Widget
// for the dialog. This is required, as there may not be one in the case of a
// platform native dialog. Showing, hiding and running the dialog is handled by
// the NativeDialog functions.
//
// # Typical usage
//
// In the simplest of cases, you can the following code to use FileChooserDialog
// to select a file for opening:
//
//	GtkFileChooserNative *native;
//	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
//	gint res;
//
//	native = gtk_file_chooser_native_new ("Open File",
//	                                      parent_window,
//	                                      action,
//	                                      "_Open",
//	                                      "_Cancel");
//
//	res = gtk_native_dialog_run (GTK_NATIVE_DIALOG (native));
//	if (res == GTK_RESPONSE_ACCEPT)
//	  {
//	    char *filename;
//	    GtkFileChooser *chooser = GTK_FILE_CHOOSER (native);
//	    filename = gtk_file_chooser_get_filename (chooser);
//	    open_file (filename);
//	    g_free (filename);
//	  }
//
//	g_object_unref (native);
//
// To use a dialog for saving, you can use this:
//
//	GtkFileChooserNative *native;
//	GtkFileChooser *chooser;
//	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
//	gint res;
//
//	native = gtk_file_chooser_native_new ("Save File",
//	                                      parent_window,
//	                                      action,
//	                                      "_Save",
//	                                      "_Cancel");
//	chooser = GTK_FILE_CHOOSER (native);
//
//	gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
//
//	if (user_edited_a_new_document)
//	  gtk_file_chooser_set_current_name (chooser,
//	                                     _("Untitled document"));
//	else
//	  gtk_file_chooser_set_filename (chooser,
//	                                 existing_filename);
//
//	res = gtk_native_dialog_run (GTK_NATIVE_DIALOG (native));
//	if (res == GTK_RESPONSE_ACCEPT)
//	  {
//	    char *filename;
//
//	    filename = gtk_file_chooser_get_filename (chooser);
//	    save_to_file (filename);
//	    g_free (filename);
//	  }
//
//	g_object_unref (native);
//
// For more information on how to best set up a file dialog, see
// FileChooserDialog.
//
// # Response Codes
//
// FileChooserNative inherits from NativeDialog, which means it will return
// K_RESPONSE_ACCEPT if the user accepted, and K_RESPONSE_CANCEL if he pressed
// cancel. It can also return K_RESPONSE_DELETE_EVENT if the window was
// unexpectedly closed.
//
// Differences from FileChooserDialog ##
// {#gtkfilechooserdialognative-differences}
//
// There are a few things in the GtkFileChooser API that are not possible to
// use with FileChooserNative, as such use would prohibit the use of a native
// dialog.
//
// There is no support for the signals that are emitted when the user
// navigates in the dialog, including: * FileChooser::current-folder-changed
// * FileChooser::selection-changed * FileChooser::file-activated *
// FileChooser::confirm-overwrite
//
// You can also not use the methods that directly control user navigation:
// * gtk_file_chooser_unselect_filename() * gtk_file_chooser_select_all() *
// gtk_file_chooser_unselect_all()
//
// If you need any of the above you will have to use FileChooserDialog directly.
//
// No operations that change the the dialog work while the dialog is visible.
// Set all the properties that are required before showing the dialog.
//
// # Win32 details
//
// On windows the IFileDialog implementation (added in Windows Vista) is used.
// It supports many of the features that FileChooserDialog does, but there are
// some things it does not handle:
//
// * Extra widgets added with gtk_file_chooser_set_extra_widget().
//
// * Use of custom previews by connecting to FileChooser::update-preview.
//
// * Any FileFilter added using a mimetype or custom filter.
//
// If any of these features are used the regular FileChooserDialog will be used
// in place of the native one.
//
// # Portal details
//
// When the org.freedesktop.portal.FileChooser portal is available on the
// session bus, it is used to bring up an out-of-process file chooser.
// Depending on the kind of session the application is running in, this may or
// may not be a GTK+ file chooser. In this situation, the following things are
// not supported and will be silently ignored:
//
// * Extra widgets added with gtk_file_chooser_set_extra_widget().
//
// * Use of custom previews by connecting to FileChooser::update-preview.
//
// * Any FileFilter added with a custom filter.
//
// macOS details
//
// On macOS the NSSavePanel and NSOpenPanel classes are used to provide native
// file chooser dialogs. Some features provided by FileChooserDialog are not
// supported:
//
// * Extra widgets added with gtk_file_chooser_set_extra_widget(), unless the
// widget is an instance of GtkLabel, in which case the label text will be used
// to set the NSSavePanel message instance property.
//
// * Use of custom previews by connecting to FileChooser::update-preview.
//
// * Any FileFilter added with a custom filter.
//
// * Shortcut folders.
type FileChooserNative struct {
	_ [0]func() // equal guard
	NativeDialog

	*coreglib.Object
	FileChooser
}

var (
	_ NativeDialogger   = (*FileChooserNative)(nil)
	_ coreglib.Objector = (*FileChooserNative)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FileChooserNative, *FileChooserNativeClass, FileChooserNativeOverrides](
		GTypeFileChooserNative,
		initFileChooserNativeClass,
		wrapFileChooserNative,
		defaultFileChooserNativeOverrides,
	)
}

func initFileChooserNativeClass(gclass unsafe.Pointer, overrides FileChooserNativeOverrides, classInitFunc func(*FileChooserNativeClass)) {
	if classInitFunc != nil {
		class := (*FileChooserNativeClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFileChooserNative(obj *coreglib.Object) *FileChooserNative {
	return &FileChooserNative{
		NativeDialog: NativeDialog{
			Object: obj,
		},
		Object: obj,
		FileChooser: FileChooser{
			Object: obj,
		},
	}
}

func marshalFileChooserNative(p uintptr) (interface{}, error) {
	return wrapFileChooserNative(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFileChooserNative creates a new FileChooserNative.
//
// The function takes the following parameters:
//
//   - title (optional): title of the native, or NULL.
//   - parent (optional): transient parent of the native, or NULL.
//   - action: open or save mode for the dialog.
//   - acceptLabel (optional): text to go in the accept button, or NULL for the
//     default.
//   - cancelLabel (optional): text to go in the cancel button, or NULL for the
//     default.
//
// The function returns the following values:
//
//   - fileChooserNative: new FileChooserNative.
func NewFileChooserNative(title string, parent *Window, action FileChooserAction, acceptLabel, cancelLabel string) *FileChooserNative {
	var _arg1 *C.gchar                // out
	var _arg2 *C.GtkWindow            // out
	var _arg3 C.GtkFileChooserAction  // out
	var _arg4 *C.gchar                // out
	var _arg5 *C.gchar                // out
	var _cret *C.GtkFileChooserNative // in

	if title != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	if parent != nil {
		_arg2 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}
	_arg3 = C.GtkFileChooserAction(action)
	if acceptLabel != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(acceptLabel)))
		defer C.free(unsafe.Pointer(_arg4))
	}
	if cancelLabel != "" {
		_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(cancelLabel)))
		defer C.free(unsafe.Pointer(_arg5))
	}

	_cret = C.gtk_file_chooser_native_new(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(title)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(action)
	runtime.KeepAlive(acceptLabel)
	runtime.KeepAlive(cancelLabel)

	var _fileChooserNative *FileChooserNative // out

	_fileChooserNative = wrapFileChooserNative(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _fileChooserNative
}

// AcceptLabel retrieves the custom label text for the accept button.
//
// The function returns the following values:
//
//   - utf8 (optional): custom label, or NULL for the default. This string is
//     owned by GTK+ and should not be modified or freed.
func (self *FileChooserNative) AcceptLabel() string {
	var _arg0 *C.GtkFileChooserNative // out
	var _cret *C.char                 // in

	_arg0 = (*C.GtkFileChooserNative)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_file_chooser_native_get_accept_label(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// CancelLabel retrieves the custom label text for the cancel button.
//
// The function returns the following values:
//
//   - utf8 (optional): custom label, or NULL for the default. This string is
//     owned by GTK+ and should not be modified or freed.
func (self *FileChooserNative) CancelLabel() string {
	var _arg0 *C.GtkFileChooserNative // out
	var _cret *C.char                 // in

	_arg0 = (*C.GtkFileChooserNative)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_file_chooser_native_get_cancel_label(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// SetAcceptLabel sets the custom label text for the accept button.
//
// If characters in label are preceded by an underscore, they are underlined.
// If you need a literal underscore character in a label, use “__” (two
// underscores). The first underlined character represents a keyboard
// accelerator called a mnemonic. Pressing Alt and that key activates the
// button.
//
// The function takes the following parameters:
//
//   - acceptLabel (optional): custom label or NULL for the default.
func (self *FileChooserNative) SetAcceptLabel(acceptLabel string) {
	var _arg0 *C.GtkFileChooserNative // out
	var _arg1 *C.char                 // out

	_arg0 = (*C.GtkFileChooserNative)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if acceptLabel != "" {
		_arg1 = (*C.char)(unsafe.Pointer(C.CString(acceptLabel)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_file_chooser_native_set_accept_label(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(acceptLabel)
}

// SetCancelLabel sets the custom label text for the cancel button.
//
// If characters in label are preceded by an underscore, they are underlined.
// If you need a literal underscore character in a label, use “__” (two
// underscores). The first underlined character represents a keyboard
// accelerator called a mnemonic. Pressing Alt and that key activates the
// button.
//
// The function takes the following parameters:
//
//   - cancelLabel (optional): custom label or NULL for the default.
func (self *FileChooserNative) SetCancelLabel(cancelLabel string) {
	var _arg0 *C.GtkFileChooserNative // out
	var _arg1 *C.char                 // out

	_arg0 = (*C.GtkFileChooserNative)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if cancelLabel != "" {
		_arg1 = (*C.char)(unsafe.Pointer(C.CString(cancelLabel)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_file_chooser_native_set_cancel_label(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(cancelLabel)
}

// FileChooserWidgetOverrides contains methods that are overridable.
type FileChooserWidgetOverrides struct {
}

func defaultFileChooserWidgetOverrides(v *FileChooserWidget) FileChooserWidgetOverrides {
	return FileChooserWidgetOverrides{}
}

// FileChooserWidget is a widget for choosing files. It exposes the FileChooser
// interface, and you should use the methods of this interface to interact with
// the widget.
//
// # CSS nodes
//
// GtkFileChooserWidget has a single CSS node with name filechooser.
type FileChooserWidget struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	FileChooser
}

var (
	_ coreglib.Objector = (*FileChooserWidget)(nil)
	_ Containerer       = (*FileChooserWidget)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FileChooserWidget, *FileChooserWidgetClass, FileChooserWidgetOverrides](
		GTypeFileChooserWidget,
		initFileChooserWidgetClass,
		wrapFileChooserWidget,
		defaultFileChooserWidgetOverrides,
	)
}

func initFileChooserWidgetClass(gclass unsafe.Pointer, overrides FileChooserWidgetOverrides, classInitFunc func(*FileChooserWidgetClass)) {
	if classInitFunc != nil {
		class := (*FileChooserWidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFileChooserWidget(obj *coreglib.Object) *FileChooserWidget {
	return &FileChooserWidget{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		FileChooser: FileChooser{
			Object: obj,
		},
	}
}

func marshalFileChooserWidget(p uintptr) (interface{}, error) {
	return wrapFileChooserWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDesktopFolder signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser show the user's Desktop folder in the
// file list.
//
// The default binding for this signal is Alt + D.
func (v *FileChooserWidget) ConnectDesktopFolder(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "desktop-folder", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectDesktopFolder), f)
}

// ConnectDownFolder signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser go to a child of the current folder
// in the file hierarchy. The subfolder that will be used is displayed in the
// path bar widget of the file chooser. For example, if the path bar is showing
// "/foo/bar/baz", with bar currently displayed, then this will cause the file
// chooser to switch to the "baz" subfolder.
//
// The default binding for this signal is Alt + Down.
func (v *FileChooserWidget) ConnectDownFolder(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "down-folder", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectDownFolder), f)
}

// ConnectHomeFolder signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser show the user's home folder in the file
// list.
//
// The default binding for this signal is Alt + Home.
func (v *FileChooserWidget) ConnectHomeFolder(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "home-folder", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectHomeFolder), f)
}

// ConnectLocationPopup signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser show a "Location" prompt which the user
// can use to manually type the name of the file he wishes to select.
//
// The default bindings for this signal are Control + L with a path string
// of "" (the empty string). It is also bound to / with a path string of "/"
// (a slash): this lets you type / and immediately type a path name. On Unix
// systems, this is bound to ~ (tilde) with a path string of "~" itself for
// access to home directories.
func (v *FileChooserWidget) ConnectLocationPopup(f func(path string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "location-popup", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectLocationPopup), f)
}

// ConnectLocationPopupOnPaste signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user asks for it.
//
// This is used to make the file chooser show a "Location" prompt when the user
// pastes into a FileChooserWidget.
//
// The default binding for this signal is Control + V.
func (v *FileChooserWidget) ConnectLocationPopupOnPaste(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "location-popup-on-paste", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectLocationPopupOnPaste), f)
}

// ConnectLocationTogglePopup signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user asks for it.
//
// This is used to toggle the visibility of a "Location" prompt which the user
// can use to manually type the name of the file he wishes to select.
//
// The default binding for this signal is Control + L.
func (v *FileChooserWidget) ConnectLocationTogglePopup(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "location-toggle-popup", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectLocationTogglePopup), f)
}

// ConnectPlacesShortcut signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to move the focus to the places sidebar.
//
// The default binding for this signal is Alt + P.
func (v *FileChooserWidget) ConnectPlacesShortcut(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "places-shortcut", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectPlacesShortcut), f)
}

// ConnectQuickBookmark signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser switch to the bookmark specified in
// the bookmark_index parameter. For example, if you have three bookmarks,
// you can pass 0, 1, 2 to this signal to switch to each of them, respectively.
//
// The default binding for this signal is Alt + 1, Alt + 2, etc. until Alt + 0.
// Note that in the default binding, that Alt + 1 is actually defined to switch
// to the bookmark at index 0, and so on successively; Alt + 0 is defined to
// switch to the bookmark at index 10.
func (v *FileChooserWidget) ConnectQuickBookmark(f func(bookmarkIndex int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "quick-bookmark", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectQuickBookmark), f)
}

// ConnectRecentShortcut signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser show the Recent location.
//
// The default binding for this signal is Alt + R.
func (v *FileChooserWidget) ConnectRecentShortcut(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "recent-shortcut", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectRecentShortcut), f)
}

// ConnectSearchShortcut signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser show the search entry.
//
// The default binding for this signal is Alt + S.
func (v *FileChooserWidget) ConnectSearchShortcut(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "search-shortcut", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectSearchShortcut), f)
}

// ConnectShowHidden signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user asks for it.
//
// This is used to make the file chooser display hidden files.
//
// The default binding for this signal is Control + H.
func (v *FileChooserWidget) ConnectShowHidden(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "show-hidden", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectShowHidden), f)
}

// ConnectUpFolder signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user asks for it.
//
// This is used to make the file chooser go to the parent of the current folder
// in the file hierarchy.
//
// The default binding for this signal is Alt + Up.
func (v *FileChooserWidget) ConnectUpFolder(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "up-folder", false, unsafe.Pointer(C._gotk4_gtk3_FileChooserWidget_ConnectUpFolder), f)
}

// NewFileChooserWidget creates a new FileChooserWidget. This is a file chooser
// widget that can be embedded in custom windows, and it is the same widget that
// is used by FileChooserDialog.
//
// The function takes the following parameters:
//
//   - action: open or save mode for the widget.
//
// The function returns the following values:
//
//   - fileChooserWidget: new FileChooserWidget.
func NewFileChooserWidget(action FileChooserAction) *FileChooserWidget {
	var _arg1 C.GtkFileChooserAction // out
	var _cret *C.GtkWidget           // in

	_arg1 = C.GtkFileChooserAction(action)

	_cret = C.gtk_file_chooser_widget_new(_arg1)
	runtime.KeepAlive(action)

	var _fileChooserWidget *FileChooserWidget // out

	_fileChooserWidget = wrapFileChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _fileChooserWidget
}

type FileChooserWidgetAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Action
}

var (
	_ coreglib.Objector = (*FileChooserWidgetAccessible)(nil)
)

func wrapFileChooserWidgetAccessible(obj *coreglib.Object) *FileChooserWidgetAccessible {
	return &FileChooserWidgetAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Action: atk.Action{
			Object: obj,
		},
	}
}

// FileFilter can be used to restrict the files being shown in a
// FileChooser. Files can be filtered based on their name (with
// gtk_file_filter_add_pattern()), on their mime type (with
// gtk_file_filter_add_mime_type()), or by a custom filter function (with
// gtk_file_filter_add_custom()).
//
// Filtering by mime types handles aliasing and subclassing of mime types; e.g.
// a filter for text/plain also matches a file with mime type application/rtf,
// since application/rtf is a subclass of text/plain. Note that FileFilter
// allows wildcards for the subtype of a mime type, so you can e.g. filter for
// image/\*.
//
// Normally, filters are used by adding them to a FileChooser, see
// gtk_file_chooser_add_filter(), but it is also possible to manually use a
// filter on a file with gtk_file_filter_filter().
//
// # GtkFileFilter as GtkBuildable
//
// The GtkFileFilter implementation of the GtkBuildable interface supports
// adding rules using the <mime-types>, <patterns> and <applications> elements
// and listing the rules within. Specifying a <mime-type> or <pattern>
// has the same effect as as calling gtk_file_filter_add_mime_type() or
// gtk_file_filter_add_pattern().
//
// An example of a UI definition fragment specifying GtkFileFilter rules:
//
//	<object class="GtkFileFilter">
//	  <mime-types>
//	    <mime-type>text/plain</mime-type>
//	    <mime-type>image/ *</mime-type>
//	  </mime-types>
//	  <patterns>
//	    <pattern>*.txt</pattern>
//	    <pattern>*.png</pattern>
//	  </patterns>
//	</object>.
type FileFilter struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned

	*coreglib.Object
	Buildable
}

var (
	_ coreglib.Objector = (*FileFilter)(nil)
)

func wrapFileFilter(obj *coreglib.Object) *FileFilter {
	return &FileFilter{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalFileFilter(p uintptr) (interface{}, error) {
	return wrapFileFilter(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFileFilter creates a new FileFilter with no rules added to it. Such a
// filter doesn’t accept any files, so is not particularly useful until you add
// rules with gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(),
// or gtk_file_filter_add_custom(). To create a filter that accepts any file,
// use:
//
//	GtkFileFilter *filter = gtk_file_filter_new ();
//	gtk_file_filter_add_pattern (filter, "*");.
//
// The function returns the following values:
//
//   - fileFilter: new FileFilter.
func NewFileFilter() *FileFilter {
	var _cret *C.GtkFileFilter // in

	_cret = C.gtk_file_filter_new()

	var _fileFilter *FileFilter // out

	_fileFilter = wrapFileFilter(coreglib.Take(unsafe.Pointer(_cret)))

	return _fileFilter
}

// NewFileFilterFromGVariant: deserialize a file filter from an a{sv} variant in
// the format produced by gtk_file_filter_to_gvariant().
//
// The function takes the following parameters:
//
//   - variant: a{sv} #GVariant.
//
// The function returns the following values:
//
//   - fileFilter: new FileFilter object.
func NewFileFilterFromGVariant(variant *glib.Variant) *FileFilter {
	var _arg1 *C.GVariant      // out
	var _cret *C.GtkFileFilter // in

	_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(variant)))

	_cret = C.gtk_file_filter_new_from_gvariant(_arg1)
	runtime.KeepAlive(variant)

	var _fileFilter *FileFilter // out

	_fileFilter = wrapFileFilter(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _fileFilter
}

// AddCustom adds rule to a filter that allows files based on a custom callback
// function. The bitfield needed which is passed in provides information about
// what sorts of information that the filter function needs; this allows GTK+ to
// avoid retrieving expensive information when it isn’t needed by the filter.
//
// The function takes the following parameters:
//
//   - needed: bitfield of flags indicating the information that the custom
//     filter function needs.
//   - fn: callback function; if the function returns TRUE, then the file will
//     be displayed.
func (filter *FileFilter) AddCustom(needed FileFilterFlags, fn FileFilterFunc) {
	var _arg0 *C.GtkFileFilter     // out
	var _arg1 C.GtkFileFilterFlags // out
	var _arg2 C.GtkFileFilterFunc  // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = C.GtkFileFilterFlags(needed)
	_arg2 = (*[0]byte)(C._gotk4_gtk3_FileFilterFunc)
	_arg3 = C.gpointer(gbox.Assign(fn))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_file_filter_add_custom(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(needed)
	runtime.KeepAlive(fn)
}

// AddMIMEType adds a rule allowing a given mime type to filter.
//
// The function takes the following parameters:
//
//   - mimeType: name of a MIME type.
func (filter *FileFilter) AddMIMEType(mimeType string) {
	var _arg0 *C.GtkFileFilter // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(mimeType)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_filter_add_mime_type(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(mimeType)
}

// AddPattern adds a rule allowing a shell style glob to a filter.
//
// The function takes the following parameters:
//
//   - pattern: shell style glob.
func (filter *FileFilter) AddPattern(pattern string) {
	var _arg0 *C.GtkFileFilter // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(pattern)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_file_filter_add_pattern(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(pattern)
}

// AddPixbufFormats adds a rule allowing image files in the formats supported by
// GdkPixbuf.
func (filter *FileFilter) AddPixbufFormats() {
	var _arg0 *C.GtkFileFilter // out

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_file_filter_add_pixbuf_formats(_arg0)
	runtime.KeepAlive(filter)
}

// Filter tests whether a file should be displayed according to filter.
// The FileFilterInfo filter_info should include the fields returned from
// gtk_file_filter_get_needed().
//
// This function will not typically be used by applications; it is intended
// principally for use in the implementation of FileChooser.
//
// The function takes the following parameters:
//
//   - filterInfo containing information about a file.
//
// The function returns the following values:
//
//   - ok: TRUE if the file should be displayed.
func (filter *FileFilter) Filter(filterInfo *FileFilterInfo) bool {
	var _arg0 *C.GtkFileFilter     // out
	var _arg1 *C.GtkFileFilterInfo // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.GtkFileFilterInfo)(gextras.StructNative(unsafe.Pointer(filterInfo)))

	_cret = C.gtk_file_filter_filter(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(filterInfo)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Name gets the human-readable name for the filter. See
// gtk_file_filter_set_name().
//
// The function returns the following values:
//
//   - utf8 (optional): human-readable name of the filter, or NULL. This value
//     is owned by GTK+ and must not be modified or freed.
func (filter *FileFilter) Name() string {
	var _arg0 *C.GtkFileFilter // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_file_filter_get_name(_arg0)
	runtime.KeepAlive(filter)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Needed gets the fields that need to be filled in for the FileFilterInfo
// passed to gtk_file_filter_filter()
//
// This function will not typically be used by applications; it is intended
// principally for use in the implementation of FileChooser.
//
// The function returns the following values:
//
//   - fileFilterFlags: bitfield of flags indicating needed fields when calling
//     gtk_file_filter_filter().
func (filter *FileFilter) Needed() FileFilterFlags {
	var _arg0 *C.GtkFileFilter     // out
	var _cret C.GtkFileFilterFlags // in

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_file_filter_get_needed(_arg0)
	runtime.KeepAlive(filter)

	var _fileFilterFlags FileFilterFlags // out

	_fileFilterFlags = FileFilterFlags(_cret)

	return _fileFilterFlags
}

// SetName sets the human-readable name of the filter; this is the string
// that will be displayed in the file selector user interface if there is a
// selectable list of filters.
//
// The function takes the following parameters:
//
//   - name (optional) for the filter, or NULL to remove any existing name.
func (filter *FileFilter) SetName(name string) {
	var _arg0 *C.GtkFileFilter // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_file_filter_set_name(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(name)
}

// ToGVariant: serialize a file filter to an a{sv} variant.
//
// The function returns the following values:
//
//   - variant: new, floating, #GVariant.
func (filter *FileFilter) ToGVariant() *glib.Variant {
	var _arg0 *C.GtkFileFilter // out
	var _cret *C.GVariant      // in

	_arg0 = (*C.GtkFileFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_file_filter_to_gvariant(_arg0)
	runtime.KeepAlive(filter)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// FixedOverrides contains methods that are overridable.
type FixedOverrides struct {
}

func defaultFixedOverrides(v *Fixed) FixedOverrides {
	return FixedOverrides{}
}

// Fixed widget is a container which can place child widgets at fixed positions
// and with fixed sizes, given in pixels. Fixed performs no automatic layout
// management.
//
// For most applications, you should not use this container! It keeps you from
// having to learn about the other GTK+ containers, but it results in broken
// applications. With Fixed, the following things will result in truncated text,
// overlapping widgets, and other display bugs:
//
// - Themes, which may change widget sizes.
//
// - Fonts other than the one you used to write the app will of course change
// the size of widgets containing text; keep in mind that users may use a
// larger font because of difficulty reading the default, or they may be using a
// different OS that provides different fonts.
//
// - Translation of text into other languages changes its size. Also, display of
// non-English text will use a different font in many cases.
//
// In addition, Fixed does not pay attention to text direction and thus may
// produce unwanted results if your app is run under right-to-left languages
// such as Hebrew or Arabic. That is: normally GTK+ will order containers
// appropriately for the text direction, e.g. to put labels to the right of the
// thing they label when using an RTL language, but it can’t do that with Fixed.
// So if you need to reorder widgets depending on the text direction, you would
// need to manually detect it and adjust child positions accordingly.
//
// Finally, fixed positioning makes it kind of annoying to add/remove GUI
// elements, since you have to reposition all the other elements. This is a
// long-term maintenance problem for your application.
//
// If you know none of these things are an issue for your application, and
// prefer the simplicity of Fixed, by all means use the widget. But you should
// be aware of the tradeoffs.
//
// See also Layout, which shares the ability to perform fixed positioning of
// child widgets and additionally adds custom drawing and scrollability.
type Fixed struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Fixed)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Fixed, *FixedClass, FixedOverrides](
		GTypeFixed,
		initFixedClass,
		wrapFixed,
		defaultFixedOverrides,
	)
}

func initFixedClass(gclass unsafe.Pointer, overrides FixedOverrides, classInitFunc func(*FixedClass)) {
	if classInitFunc != nil {
		class := (*FixedClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFixed(obj *coreglib.Object) *Fixed {
	return &Fixed{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalFixed(p uintptr) (interface{}, error) {
	return wrapFixed(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFixed creates a new Fixed.
//
// The function returns the following values:
//
//   - fixed: new Fixed.
func NewFixed() *Fixed {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_fixed_new()

	var _fixed *Fixed // out

	_fixed = wrapFixed(coreglib.Take(unsafe.Pointer(_cret)))

	return _fixed
}

// Move moves a child of a Fixed container to the given position.
//
// The function takes the following parameters:
//
//   - widget: child widget.
//   - x: horizontal position to move the widget to.
//   - y: vertical position to move the widget to.
func (fixed *Fixed) Move(widget Widgetter, x, y int) {
	var _arg0 *C.GtkFixed  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out

	_arg0 = (*C.GtkFixed)(unsafe.Pointer(coreglib.InternObject(fixed).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)

	C.gtk_fixed_move(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(fixed)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// Put adds a widget to a Fixed container at the given position.
//
// The function takes the following parameters:
//
//   - widget to add.
//   - x: horizontal position to place the widget at.
//   - y: vertical position to place the widget at.
func (fixed *Fixed) Put(widget Widgetter, x, y int) {
	var _arg0 *C.GtkFixed  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out

	_arg0 = (*C.GtkFixed)(unsafe.Pointer(coreglib.InternObject(fixed).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)

	C.gtk_fixed_put(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(fixed)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// FlowBoxOverrides contains methods that are overridable.
type FlowBoxOverrides struct {
	ActivateCursorChild func()
	ChildActivated      func(child *FlowBoxChild)
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	MoveCursor func(step MovementStep, count int) bool
	// SelectAll: select all children of box, if the selection mode allows it.
	SelectAll               func()
	SelectedChildrenChanged func()
	ToggleCursorChild       func()
	// UnselectAll: unselect all children of box, if the selection mode allows
	// it.
	UnselectAll func()
}

func defaultFlowBoxOverrides(v *FlowBox) FlowBoxOverrides {
	return FlowBoxOverrides{
		ActivateCursorChild:     v.activateCursorChild,
		ChildActivated:          v.childActivated,
		MoveCursor:              v.moveCursor,
		SelectAll:               v.selectAll,
		SelectedChildrenChanged: v.selectedChildrenChanged,
		ToggleCursorChild:       v.toggleCursorChild,
		UnselectAll:             v.unselectAll,
	}
}

// FlowBox positions child widgets in sequence according to its orientation.
//
// For instance, with the horizontal orientation, the widgets will be arranged
// from left to right, starting a new row under the previous row when necessary.
// Reducing the width in this case will require more rows, so a larger height
// will be requested.
//
// Likewise, with the vertical orientation, the widgets will be arranged from
// top to bottom, starting a new column to the right when necessary. Reducing
// the height will require more columns, so a larger width will be requested.
//
// The size request of a GtkFlowBox alone may not be what you expect; if you
// need to be able to shrink it along both axes and dynamically reflow its
// children, you may have to wrap it in a ScrolledWindow to enable that.
//
// The children of a GtkFlowBox can be dynamically sorted and filtered.
//
// Although a GtkFlowBox must have only FlowBoxChild children, you can add any
// kind of widget to it via gtk_container_add(), and a GtkFlowBoxChild widget
// will automatically be inserted between the box and the widget.
//
// Also see ListBox.
//
// GtkFlowBox was added in GTK+ 3.12.
//
// CSS nodes
//
//	flowbox
//	├── flowboxchild
//	│   ╰── <child>
//	├── flowboxchild
//	│   ╰── <child>
//	┊
//	╰── [rubberband]
//
// GtkFlowBox uses a single CSS node with name flowbox. GtkFlowBoxChild uses a
// single CSS node with name flowboxchild. For rubberband selection, a subnode
// with name rubberband is used.
type FlowBox struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Orientable
}

var (
	_ Containerer       = (*FlowBox)(nil)
	_ coreglib.Objector = (*FlowBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FlowBox, *FlowBoxClass, FlowBoxOverrides](
		GTypeFlowBox,
		initFlowBoxClass,
		wrapFlowBox,
		defaultFlowBoxOverrides,
	)
}

func initFlowBoxClass(gclass unsafe.Pointer, overrides FlowBoxOverrides, classInitFunc func(*FlowBoxClass)) {
	pclass := (*C.GtkFlowBoxClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeFlowBox))))

	if overrides.ActivateCursorChild != nil {
		pclass.activate_cursor_child = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_activate_cursor_child)
	}

	if overrides.ChildActivated != nil {
		pclass.child_activated = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_child_activated)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_move_cursor)
	}

	if overrides.SelectAll != nil {
		pclass.select_all = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_select_all)
	}

	if overrides.SelectedChildrenChanged != nil {
		pclass.selected_children_changed = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_selected_children_changed)
	}

	if overrides.ToggleCursorChild != nil {
		pclass.toggle_cursor_child = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_toggle_cursor_child)
	}

	if overrides.UnselectAll != nil {
		pclass.unselect_all = (*[0]byte)(C._gotk4_gtk3_FlowBoxClass_unselect_all)
	}

	if classInitFunc != nil {
		class := (*FlowBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFlowBox(obj *coreglib.Object) *FlowBox {
	return &FlowBox{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalFlowBox(p uintptr) (interface{}, error) {
	return wrapFlowBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateCursorChild signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user activates the box.
func (box *FlowBox) ConnectActivateCursorChild(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "activate-cursor-child", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectActivateCursorChild), f)
}

// ConnectChildActivated signal is emitted when a child has been activated by
// the user.
func (box *FlowBox) ConnectChildActivated(f func(child *FlowBoxChild)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "child-activated", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectChildActivated), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a cursor movement.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// The default bindings for this signal come in two variants, the variant with
// the Shift modifier extends the selection, the variant without the Shift
// modifer does not. There are too many key combinations to list them all here.
//
// - Arrow keys move by individual children
//
// - Home/End keys move to the ends of the box
//
// - PageUp/PageDown keys move vertically by pages.
func (box *FlowBox) ConnectMoveCursor(f func(step MovementStep, count int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectMoveCursor), f)
}

// ConnectSelectAll signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to select all children of the box, if the selection mode permits it.
//
// The default bindings for this signal is Ctrl-a.
func (box *FlowBox) ConnectSelectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "select-all", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectSelectAll), f)
}

// ConnectSelectedChildrenChanged signal is emitted when the set of selected
// children changes.
//
// Use gtk_flow_box_selected_foreach() or gtk_flow_box_get_selected_children()
// to obtain the selected children.
func (box *FlowBox) ConnectSelectedChildrenChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "selected-children-changed", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectSelectedChildrenChanged), f)
}

// ConnectToggleCursorChild signal is a [keybinding signal][GtkBindingSignal]
// which toggles the selection of the child that has the focus.
//
// The default binding for this signal is Ctrl-Space.
func (box *FlowBox) ConnectToggleCursorChild(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "toggle-cursor-child", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectToggleCursorChild), f)
}

// ConnectUnselectAll signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to unselect all children of the box, if the selection mode
// permits it.
//
// The default bindings for this signal is Ctrl-Shift-a.
func (box *FlowBox) ConnectUnselectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "unselect-all", false, unsafe.Pointer(C._gotk4_gtk3_FlowBox_ConnectUnselectAll), f)
}

// NewFlowBox creates a GtkFlowBox.
//
// The function returns the following values:
//
//   - flowBox: new FlowBox container.
func NewFlowBox() *FlowBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_flow_box_new()

	var _flowBox *FlowBox // out

	_flowBox = wrapFlowBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _flowBox
}

// BindModel binds model to box.
//
// If box was already bound to a model, that previous binding is destroyed.
//
// The contents of box are cleared and then filled with widgets that represent
// items from model. box is updated whenever model changes. If model is NULL,
// box is left empty.
//
// It is undefined to add or remove widgets directly (for example, with
// gtk_flow_box_insert() or gtk_container_add()) while box is bound to a model.
//
// Note that using a model is incompatible with the filtering and sorting
// functionality in GtkFlowBox. When using a model, filtering and sorting should
// be implemented by the model.
//
// The function takes the following parameters:
//
//   - model (optional) to be bound to box.
//   - createWidgetFunc: function that creates widgets for items.
func (box *FlowBox) BindModel(model gio.ListModeller, createWidgetFunc FlowBoxCreateWidgetFunc) {
	var _arg0 *C.GtkFlowBox                // out
	var _arg1 *C.GListModel                // out
	var _arg2 C.GtkFlowBoxCreateWidgetFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if model != nil {
		_arg1 = (*C.GListModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}
	_arg2 = (*[0]byte)(C._gotk4_gtk3_FlowBoxCreateWidgetFunc)
	_arg3 = C.gpointer(gbox.Assign(createWidgetFunc))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_flow_box_bind_model(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(model)
	runtime.KeepAlive(createWidgetFunc)
}

// ActivateOnSingleClick returns whether children activate on single clicks.
//
// The function returns the following values:
//
//   - ok: TRUE if children are activated on single click, FALSE otherwise.
func (box *FlowBox) ActivateOnSingleClick() bool {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_activate_on_single_click(_arg0)
	runtime.KeepAlive(box)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ChildAtIndex gets the nth child in the box.
//
// The function takes the following parameters:
//
//   - idx: position of the child.
//
// The function returns the following values:
//
//   - flowBoxChild (optional): child widget, which will always be a
//     FlowBoxChild or NULL in case no child widget with the given index exists.
func (box *FlowBox) ChildAtIndex(idx int) *FlowBoxChild {
	var _arg0 *C.GtkFlowBox      // out
	var _arg1 C.gint             // out
	var _cret *C.GtkFlowBoxChild // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(idx)

	_cret = C.gtk_flow_box_get_child_at_index(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(idx)

	var _flowBoxChild *FlowBoxChild // out

	if _cret != nil {
		_flowBoxChild = wrapFlowBoxChild(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _flowBoxChild
}

// ChildAtPos gets the child in the (x, y) position.
//
// The function takes the following parameters:
//
//   - x coordinate of the child.
//   - y coordinate of the child.
//
// The function returns the following values:
//
//   - flowBoxChild (optional): child widget, which will always be a
//     FlowBoxChild or NULL in case no child widget exists for the given x and y
//     coordinates.
func (box *FlowBox) ChildAtPos(x, y int) *FlowBoxChild {
	var _arg0 *C.GtkFlowBox      // out
	var _arg1 C.gint             // out
	var _arg2 C.gint             // out
	var _cret *C.GtkFlowBoxChild // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_flow_box_get_child_at_pos(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _flowBoxChild *FlowBoxChild // out

	if _cret != nil {
		_flowBoxChild = wrapFlowBoxChild(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _flowBoxChild
}

// ColumnSpacing gets the horizontal spacing.
//
// The function returns the following values:
//
//   - guint: horizontal spacing.
func (box *FlowBox) ColumnSpacing() uint {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.guint       // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_column_spacing(_arg0)
	runtime.KeepAlive(box)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Homogeneous returns whether the box is homogeneous (all children are the same
// size). See gtk_box_set_homogeneous().
//
// The function returns the following values:
//
//   - ok: TRUE if the box is homogeneous.
func (box *FlowBox) Homogeneous() bool {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_homogeneous(_arg0)
	runtime.KeepAlive(box)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MaxChildrenPerLine gets the maximum number of children per line.
//
// The function returns the following values:
//
//   - guint: maximum number of children per line.
func (box *FlowBox) MaxChildrenPerLine() uint {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.guint       // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_max_children_per_line(_arg0)
	runtime.KeepAlive(box)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// MinChildrenPerLine gets the minimum number of children per line.
//
// The function returns the following values:
//
//   - guint: minimum number of children per line.
func (box *FlowBox) MinChildrenPerLine() uint {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.guint       // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_min_children_per_line(_arg0)
	runtime.KeepAlive(box)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// RowSpacing gets the vertical spacing.
//
// The function returns the following values:
//
//   - guint: vertical spacing.
func (box *FlowBox) RowSpacing() uint {
	var _arg0 *C.GtkFlowBox // out
	var _cret C.guint       // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_row_spacing(_arg0)
	runtime.KeepAlive(box)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// SelectedChildren creates a list of all selected children.
//
// The function returns the following values:
//
//   - list: A #GList containing the Widget for each selected child. Free with
//     g_list_free() when done.
func (box *FlowBox) SelectedChildren() []*FlowBoxChild {
	var _arg0 *C.GtkFlowBox // out
	var _cret *C.GList      // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_selected_children(_arg0)
	runtime.KeepAlive(box)

	var _list []*FlowBoxChild // out

	_list = make([]*FlowBoxChild, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkFlowBoxChild)(v)
		var dst *FlowBoxChild // out
		dst = wrapFlowBoxChild(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// SelectionMode gets the selection mode of box.
//
// The function returns the following values:
//
//   - selectionMode: SelectionMode.
func (box *FlowBox) SelectionMode() SelectionMode {
	var _arg0 *C.GtkFlowBox      // out
	var _cret C.GtkSelectionMode // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_flow_box_get_selection_mode(_arg0)
	runtime.KeepAlive(box)

	var _selectionMode SelectionMode // out

	_selectionMode = SelectionMode(_cret)

	return _selectionMode
}

// Insert inserts the widget into box at position.
//
// If a sort function is set, the widget will actually be inserted at
// the calculated position and this function has the same effect as
// gtk_container_add().
//
// If position is -1, or larger than the total number of children in the box,
// then the widget will be appended to the end.
//
// The function takes the following parameters:
//
//   - widget to add.
//   - position to insert child in.
func (box *FlowBox) Insert(widget Widgetter, position int) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gint        // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.gint(position)

	C.gtk_flow_box_insert(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(position)
}

// InvalidateFilter updates the filtering for all children.
//
// Call this function when the result of the filter function on the box is
// changed due ot an external factor. For instance, this would be used if the
// filter function just looked for a specific search term, and the entry with
// the string has changed.
func (box *FlowBox) InvalidateFilter() {
	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_flow_box_invalidate_filter(_arg0)
	runtime.KeepAlive(box)
}

// InvalidateSort updates the sorting for all children.
//
// Call this when the result of the sort function on box is changed due to an
// external factor.
func (box *FlowBox) InvalidateSort() {
	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_flow_box_invalidate_sort(_arg0)
	runtime.KeepAlive(box)
}

// SelectAll: select all children of box, if the selection mode allows it.
func (box *FlowBox) SelectAll() {
	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_flow_box_select_all(_arg0)
	runtime.KeepAlive(box)
}

// SelectChild selects a single child of box, if the selection mode allows it.
//
// The function takes the following parameters:
//
//   - child of box.
func (box *FlowBox) SelectChild(child *FlowBoxChild) {
	var _arg0 *C.GtkFlowBox      // out
	var _arg1 *C.GtkFlowBoxChild // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_flow_box_select_child(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
}

// SelectedForEach calls a function for each selected child.
//
// Note that the selection cannot be modified from within this function.
//
// The function takes the following parameters:
//
//   - fn: function to call for each selected child.
func (box *FlowBox) SelectedForEach(fn FlowBoxForEachFunc) {
	var _arg0 *C.GtkFlowBox           // out
	var _arg1 C.GtkFlowBoxForeachFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_FlowBoxForEachFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_flow_box_selected_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(fn)
}

// SetActivateOnSingleClick: if single is TRUE, children will be activated when
// you click on them, otherwise you need to double-click.
//
// The function takes the following parameters:
//
//   - single: TRUE to emit child-activated on a single click.
func (box *FlowBox) SetActivateOnSingleClick(single bool) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if single {
		_arg1 = C.TRUE
	}

	C.gtk_flow_box_set_activate_on_single_click(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(single)
}

// SetColumnSpacing sets the horizontal space to add between children. See the
// FlowBox:column-spacing property.
//
// The function takes the following parameters:
//
//   - spacing to use.
func (box *FlowBox) SetColumnSpacing(spacing uint) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.guint       // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_flow_box_set_column_spacing(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(spacing)
}

// SetFilterFunc: by setting a filter function on the box one can decide
// dynamically which of the children to show. For instance, to implement a
// search function that only shows the children matching the search terms.
//
// The filter_func will be called for each child after the call,
// and it will continue to be called each time a child changes (via
// gtk_flow_box_child_changed()) or when gtk_flow_box_invalidate_filter() is
// called.
//
// Note that using a filter function is incompatible with using a model (see
// gtk_flow_box_bind_model()).
//
// The function takes the following parameters:
//
//   - filterFunc (optional): callback that lets you filter which children to
//     show.
func (box *FlowBox) SetFilterFunc(filterFunc FlowBoxFilterFunc) {
	var _arg0 *C.GtkFlowBox          // out
	var _arg1 C.GtkFlowBoxFilterFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if filterFunc != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_FlowBoxFilterFunc)
		_arg2 = C.gpointer(gbox.Assign(filterFunc))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_flow_box_set_filter_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(box)
	runtime.KeepAlive(filterFunc)
}

// SetHAdjustment hooks up an adjustment to focus handling in box.
// The adjustment is also used for autoscrolling during rubberband selection.
// See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
// the adjustment, and gtk_flow_box_set_vadjustment()for setting the vertical
// adjustment.
//
// The adjustments have to be in pixel units and in the same coordinate system
// as the allocation for immediate children of the box.
//
// The function takes the following parameters:
//
//   - adjustment which should be adjusted when the focus is moved among the
//     descendents of container.
func (box *FlowBox) SetHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkFlowBox    // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_flow_box_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(adjustment)
}

// SetHomogeneous sets the FlowBox:homogeneous property of box, controlling
// whether or not all children of box are given equal space in the box.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE to create equal allotments, FALSE for variable
//     allotments.
func (box *FlowBox) SetHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_flow_box_set_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(homogeneous)
}

// SetMaxChildrenPerLine sets the maximum number of children to request and
// allocate space for in box’s orientation.
//
// Setting the maximum number of children per line limits the overall natural
// size request to be no more than n_children children long in the given
// orientation.
//
// The function takes the following parameters:
//
//   - nChildren: maximum number of children per line.
func (box *FlowBox) SetMaxChildrenPerLine(nChildren uint) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.guint       // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.guint(nChildren)

	C.gtk_flow_box_set_max_children_per_line(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(nChildren)
}

// SetMinChildrenPerLine sets the minimum number of children to line up in box’s
// orientation before flowing.
//
// The function takes the following parameters:
//
//   - nChildren: minimum number of children per line.
func (box *FlowBox) SetMinChildrenPerLine(nChildren uint) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.guint       // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.guint(nChildren)

	C.gtk_flow_box_set_min_children_per_line(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(nChildren)
}

// SetRowSpacing sets the vertical space to add between children. See the
// FlowBox:row-spacing property.
//
// The function takes the following parameters:
//
//   - spacing to use.
func (box *FlowBox) SetRowSpacing(spacing uint) {
	var _arg0 *C.GtkFlowBox // out
	var _arg1 C.guint       // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_flow_box_set_row_spacing(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(spacing)
}

// SetSelectionMode sets how selection works in box. See SelectionMode for
// details.
//
// The function takes the following parameters:
//
//   - mode: new selection mode.
func (box *FlowBox) SetSelectionMode(mode SelectionMode) {
	var _arg0 *C.GtkFlowBox      // out
	var _arg1 C.GtkSelectionMode // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.GtkSelectionMode(mode)

	C.gtk_flow_box_set_selection_mode(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(mode)
}

// SetSortFunc: by setting a sort function on the box, one can dynamically
// reorder the children of the box, based on the contents of the children.
//
// The sort_func will be called for each child after the call, and will continue
// to be called each time a child changes (via gtk_flow_box_child_changed()) and
// when gtk_flow_box_invalidate_sort() is called.
//
// Note that using a sort function is incompatible with using a model (see
// gtk_flow_box_bind_model()).
//
// The function takes the following parameters:
//
//   - sortFunc (optional): sort function.
func (box *FlowBox) SetSortFunc(sortFunc FlowBoxSortFunc) {
	var _arg0 *C.GtkFlowBox        // out
	var _arg1 C.GtkFlowBoxSortFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if sortFunc != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_FlowBoxSortFunc)
		_arg2 = C.gpointer(gbox.Assign(sortFunc))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_flow_box_set_sort_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(box)
	runtime.KeepAlive(sortFunc)
}

// SetVAdjustment hooks up an adjustment to focus handling in box.
// The adjustment is also used for autoscrolling during rubberband selection.
// See gtk_scrolled_window_get_vadjustment() for a typical way of obtaining
// the adjustment, and gtk_flow_box_set_hadjustment()for setting the horizontal
// adjustment.
//
// The adjustments have to be in pixel units and in the same coordinate system
// as the allocation for immediate children of the box.
//
// The function takes the following parameters:
//
//   - adjustment which should be adjusted when the focus is moved among the
//     descendents of container.
func (box *FlowBox) SetVAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkFlowBox    // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_flow_box_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(adjustment)
}

// UnselectAll: unselect all children of box, if the selection mode allows it.
func (box *FlowBox) UnselectAll() {
	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_flow_box_unselect_all(_arg0)
	runtime.KeepAlive(box)
}

// UnselectChild unselects a single child of box, if the selection mode allows
// it.
//
// The function takes the following parameters:
//
//   - child of box.
func (box *FlowBox) UnselectChild(child *FlowBoxChild) {
	var _arg0 *C.GtkFlowBox      // out
	var _arg1 *C.GtkFlowBoxChild // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_flow_box_unselect_child(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
}

func (box *FlowBox) activateCursorChild() {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.activate_cursor_child

	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_FlowBox_virtual_activate_cursor_child(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

func (box *FlowBox) childActivated(child *FlowBoxChild) {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.child_activated

	var _arg0 *C.GtkFlowBox      // out
	var _arg1 *C.GtkFlowBoxChild // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C._gotk4_gtk3_FlowBox_virtual_child_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
}

// The function takes the following parameters:
//
//   - step
//   - count
func (box *FlowBox) moveCursor(step MovementStep, count int) bool {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkFlowBox     // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)

	_cret = C._gotk4_gtk3_FlowBox_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// selectAll: select all children of box, if the selection mode allows it.
func (box *FlowBox) selectAll() {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.select_all

	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_FlowBox_virtual_select_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

func (box *FlowBox) selectedChildrenChanged() {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.selected_children_changed

	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_FlowBox_virtual_selected_children_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

func (box *FlowBox) toggleCursorChild() {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.toggle_cursor_child

	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_FlowBox_virtual_toggle_cursor_child(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// unselectAll: unselect all children of box, if the selection mode allows it.
func (box *FlowBox) unselectAll() {
	gclass := (*C.GtkFlowBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.unselect_all

	var _arg0 *C.GtkFlowBox // out

	_arg0 = (*C.GtkFlowBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_FlowBox_virtual_unselect_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// FlowBoxAccessibleOverrides contains methods that are overridable.
type FlowBoxAccessibleOverrides struct {
}

func defaultFlowBoxAccessibleOverrides(v *FlowBoxAccessible) FlowBoxAccessibleOverrides {
	return FlowBoxAccessibleOverrides{}
}

type FlowBoxAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Selection
}

var (
	_ coreglib.Objector = (*FlowBoxAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FlowBoxAccessible, *FlowBoxAccessibleClass, FlowBoxAccessibleOverrides](
		GTypeFlowBoxAccessible,
		initFlowBoxAccessibleClass,
		wrapFlowBoxAccessible,
		defaultFlowBoxAccessibleOverrides,
	)
}

func initFlowBoxAccessibleClass(gclass unsafe.Pointer, overrides FlowBoxAccessibleOverrides, classInitFunc func(*FlowBoxAccessibleClass)) {
	if classInitFunc != nil {
		class := (*FlowBoxAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFlowBoxAccessible(obj *coreglib.Object) *FlowBoxAccessible {
	return &FlowBoxAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalFlowBoxAccessible(p uintptr) (interface{}, error) {
	return wrapFlowBoxAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// FlowBoxChildOverrides contains methods that are overridable.
type FlowBoxChildOverrides struct {
	Activate func()
}

func defaultFlowBoxChildOverrides(v *FlowBoxChild) FlowBoxChildOverrides {
	return FlowBoxChildOverrides{
		Activate: v.activate,
	}
}

type FlowBoxChild struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*FlowBoxChild)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FlowBoxChild, *FlowBoxChildClass, FlowBoxChildOverrides](
		GTypeFlowBoxChild,
		initFlowBoxChildClass,
		wrapFlowBoxChild,
		defaultFlowBoxChildOverrides,
	)
}

func initFlowBoxChildClass(gclass unsafe.Pointer, overrides FlowBoxChildOverrides, classInitFunc func(*FlowBoxChildClass)) {
	pclass := (*C.GtkFlowBoxChildClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeFlowBoxChild))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_FlowBoxChildClass_activate)
	}

	if classInitFunc != nil {
		class := (*FlowBoxChildClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFlowBoxChild(obj *coreglib.Object) *FlowBoxChild {
	return &FlowBoxChild{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalFlowBoxChild(p uintptr) (interface{}, error) {
	return wrapFlowBoxChild(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate signal is emitted when the user activates a child widget in
// a FlowBox, either by clicking or double-clicking, or by using the Space or
// Enter key.
//
// While this signal is used as a [keybinding signal][GtkBindingSignal],
// it can be used by applications for their own purposes.
func (child *FlowBoxChild) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(child, "activate", false, unsafe.Pointer(C._gotk4_gtk3_FlowBoxChild_ConnectActivate), f)
}

// NewFlowBoxChild creates a new FlowBoxChild, to be used as a child of a
// FlowBox.
//
// The function returns the following values:
//
//   - flowBoxChild: new FlowBoxChild.
func NewFlowBoxChild() *FlowBoxChild {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_flow_box_child_new()

	var _flowBoxChild *FlowBoxChild // out

	_flowBoxChild = wrapFlowBoxChild(coreglib.Take(unsafe.Pointer(_cret)))

	return _flowBoxChild
}

// Changed marks child as changed, causing any state that depends on this to be
// updated. This affects sorting and filtering.
//
// Note that calls to this method must be in sync with the data used for the
// sorting and filtering functions. For instance, if the list is mirroring some
// external data set, and *two* children changed in the external data set when
// you call gtk_flow_box_child_changed() on the first child, the sort function
// must only read the new data for the first of the two changed children,
// otherwise the resorting of the children will be wrong.
//
// This generally means that if you don’t fully control the data model,
// you have to duplicate the data that affects the sorting and filtering
// functions into the widgets themselves. Another alternative is to call
// gtk_flow_box_invalidate_sort() on any model change, but that is more
// expensive.
func (child *FlowBoxChild) Changed() {
	var _arg0 *C.GtkFlowBoxChild // out

	_arg0 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_flow_box_child_changed(_arg0)
	runtime.KeepAlive(child)
}

// Index gets the current index of the child in its FlowBox container.
//
// The function returns the following values:
//
//   - gint: index of the child, or -1 if the child is not in a flow box.
func (child *FlowBoxChild) Index() int {
	var _arg0 *C.GtkFlowBoxChild // out
	var _cret C.gint             // in

	_arg0 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_flow_box_child_get_index(_arg0)
	runtime.KeepAlive(child)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IsSelected returns whether the child is currently selected in its FlowBox
// container.
//
// The function returns the following values:
//
//   - ok: TRUE if child is selected.
func (child *FlowBoxChild) IsSelected() bool {
	var _arg0 *C.GtkFlowBoxChild // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_flow_box_child_is_selected(_arg0)
	runtime.KeepAlive(child)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (child *FlowBoxChild) activate() {
	gclass := (*C.GtkFlowBoxChildClass)(coreglib.PeekParentClass(child))
	fnarg := gclass.activate

	var _arg0 *C.GtkFlowBoxChild // out

	_arg0 = (*C.GtkFlowBoxChild)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C._gotk4_gtk3_FlowBoxChild_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(child)
}

// FlowBoxChildAccessibleOverrides contains methods that are overridable.
type FlowBoxChildAccessibleOverrides struct {
}

func defaultFlowBoxChildAccessibleOverrides(v *FlowBoxChildAccessible) FlowBoxChildAccessibleOverrides {
	return FlowBoxChildAccessibleOverrides{}
}

type FlowBoxChildAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*FlowBoxChildAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FlowBoxChildAccessible, *FlowBoxChildAccessibleClass, FlowBoxChildAccessibleOverrides](
		GTypeFlowBoxChildAccessible,
		initFlowBoxChildAccessibleClass,
		wrapFlowBoxChildAccessible,
		defaultFlowBoxChildAccessibleOverrides,
	)
}

func initFlowBoxChildAccessibleClass(gclass unsafe.Pointer, overrides FlowBoxChildAccessibleOverrides, classInitFunc func(*FlowBoxChildAccessibleClass)) {
	if classInitFunc != nil {
		class := (*FlowBoxChildAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFlowBoxChildAccessible(obj *coreglib.Object) *FlowBoxChildAccessible {
	return &FlowBoxChildAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalFlowBoxChildAccessible(p uintptr) (interface{}, error) {
	return wrapFlowBoxChildAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// FontButtonOverrides contains methods that are overridable.
type FontButtonOverrides struct {
	FontSet func()
}

func defaultFontButtonOverrides(v *FontButton) FontButtonOverrides {
	return FontButtonOverrides{
		FontSet: v.fontSet,
	}
}

// FontButton is a button which displays the currently selected font an allows
// to open a font chooser dialog to change the font. It is suitable widget for
// selecting a font in a preference dialog.
//
// # CSS nodes
//
// GtkFontButton has a single CSS node with name button and style class .font.
type FontButton struct {
	_ [0]func() // equal guard
	Button

	*coreglib.Object
	FontChooser
}

var (
	_ coreglib.Objector = (*FontButton)(nil)
	_ Binner            = (*FontButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FontButton, *FontButtonClass, FontButtonOverrides](
		GTypeFontButton,
		initFontButtonClass,
		wrapFontButton,
		defaultFontButtonOverrides,
	)
}

func initFontButtonClass(gclass unsafe.Pointer, overrides FontButtonOverrides, classInitFunc func(*FontButtonClass)) {
	pclass := (*C.GtkFontButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeFontButton))))

	if overrides.FontSet != nil {
		pclass.font_set = (*[0]byte)(C._gotk4_gtk3_FontButtonClass_font_set)
	}

	if classInitFunc != nil {
		class := (*FontButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFontButton(obj *coreglib.Object) *FontButton {
	return &FontButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
		Object: obj,
		FontChooser: FontChooser{
			Object: obj,
		},
	}
}

func marshalFontButton(p uintptr) (interface{}, error) {
	return wrapFontButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectFontSet signal is emitted when the user selects a font. When handling
// this signal, use gtk_font_chooser_get_font() to find out which font was just
// selected.
//
// Note that this signal is only emitted when the user changes the font. If you
// need to react to programmatic font changes as well, use the notify::font
// signal.
func (fontButton *FontButton) ConnectFontSet(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(fontButton, "font-set", false, unsafe.Pointer(C._gotk4_gtk3_FontButton_ConnectFontSet), f)
}

// NewFontButton creates a new font picker widget.
//
// The function returns the following values:
//
//   - fontButton: new font picker widget.
func NewFontButton() *FontButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_font_button_new()

	var _fontButton *FontButton // out

	_fontButton = wrapFontButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontButton
}

// NewFontButtonWithFont creates a new font picker widget.
//
// The function takes the following parameters:
//
//   - fontname: name of font to display in font chooser dialog.
//
// The function returns the following values:
//
//   - fontButton: new font picker widget.
func NewFontButtonWithFont(fontname string) *FontButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_font_button_new_with_font(_arg1)
	runtime.KeepAlive(fontname)

	var _fontButton *FontButton // out

	_fontButton = wrapFontButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontButton
}

// FontName retrieves the name of the currently selected font. This name
// includes style and size information as well. If you want to render something
// with the font, use this string with pango_font_description_from_string() .
// If you’re interested in peeking certain values (family name, style, size,
// weight) just query these properties from the FontDescription object.
//
// Deprecated: Use gtk_font_chooser_get_font() instead.
//
// The function returns the following values:
//
//   - utf8: internal copy of the font name which must not be freed.
func (fontButton *FontButton) FontName() string {
	var _arg0 *C.GtkFontButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_font_name(_arg0)
	runtime.KeepAlive(fontButton)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ShowSize returns whether the font size will be shown in the label.
//
// The function returns the following values:
//
//   - ok: whether the font size will be shown in the label.
func (fontButton *FontButton) ShowSize() bool {
	var _arg0 *C.GtkFontButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_show_size(_arg0)
	runtime.KeepAlive(fontButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowStyle returns whether the name of the font style will be shown in the
// label.
//
// The function returns the following values:
//
//   - ok: whether the font style will be shown in the label.
func (fontButton *FontButton) ShowStyle() bool {
	var _arg0 *C.GtkFontButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_show_style(_arg0)
	runtime.KeepAlive(fontButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Title retrieves the title of the font chooser dialog.
//
// The function returns the following values:
//
//   - utf8: internal copy of the title string which must not be freed.
func (fontButton *FontButton) Title() string {
	var _arg0 *C.GtkFontButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_title(_arg0)
	runtime.KeepAlive(fontButton)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// UseFont returns whether the selected font is used in the label.
//
// The function returns the following values:
//
//   - ok: whether the selected font is used in the label.
func (fontButton *FontButton) UseFont() bool {
	var _arg0 *C.GtkFontButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_use_font(_arg0)
	runtime.KeepAlive(fontButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UseSize returns whether the selected size is used in the label.
//
// The function returns the following values:
//
//   - ok: whether the selected size is used in the label.
func (fontButton *FontButton) UseSize() bool {
	var _arg0 *C.GtkFontButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))

	_cret = C.gtk_font_button_get_use_size(_arg0)
	runtime.KeepAlive(fontButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetFontName sets or updates the currently-displayed font in font picker
// dialog.
//
// Deprecated: Use gtk_font_chooser_set_font() instead.
//
// The function takes the following parameters:
//
//   - fontname: name of font to display in font chooser dialog.
//
// The function returns the following values:
//
//   - ok: TRUE.
func (fontButton *FontButton) SetFontName(fontname string) bool {
	var _arg0 *C.GtkFontButton // out
	var _arg1 *C.gchar         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_font_button_set_font_name(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(fontname)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetShowSize: if show_size is TRUE, the font size will be displayed along with
// the name of the selected font.
//
// The function takes the following parameters:
//
//   - showSize: TRUE if font size should be displayed in dialog.
func (fontButton *FontButton) SetShowSize(showSize bool) {
	var _arg0 *C.GtkFontButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	if showSize {
		_arg1 = C.TRUE
	}

	C.gtk_font_button_set_show_size(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(showSize)
}

// SetShowStyle: if show_style is TRUE, the font style will be displayed along
// with name of the selected font.
//
// The function takes the following parameters:
//
//   - showStyle: TRUE if font style should be displayed in label.
func (fontButton *FontButton) SetShowStyle(showStyle bool) {
	var _arg0 *C.GtkFontButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	if showStyle {
		_arg1 = C.TRUE
	}

	C.gtk_font_button_set_show_style(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(showStyle)
}

// SetTitle sets the title for the font chooser dialog.
//
// The function takes the following parameters:
//
//   - title: string containing the font chooser dialog title.
func (fontButton *FontButton) SetTitle(title string) {
	var _arg0 *C.GtkFontButton // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_button_set_title(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(title)
}

// SetUseFont: if use_font is TRUE, the font name will be written using the
// selected font.
//
// The function takes the following parameters:
//
//   - useFont: if TRUE, font name will be written using font chosen.
func (fontButton *FontButton) SetUseFont(useFont bool) {
	var _arg0 *C.GtkFontButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	if useFont {
		_arg1 = C.TRUE
	}

	C.gtk_font_button_set_use_font(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(useFont)
}

// SetUseSize: if use_size is TRUE, the font name will be written using the
// selected size.
//
// The function takes the following parameters:
//
//   - useSize: if TRUE, font name will be written using the selected size.
func (fontButton *FontButton) SetUseSize(useSize bool) {
	var _arg0 *C.GtkFontButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(fontButton).Native()))
	if useSize {
		_arg1 = C.TRUE
	}

	C.gtk_font_button_set_use_size(_arg0, _arg1)
	runtime.KeepAlive(fontButton)
	runtime.KeepAlive(useSize)
}

func (gfp *FontButton) fontSet() {
	gclass := (*C.GtkFontButtonClass)(coreglib.PeekParentClass(gfp))
	fnarg := gclass.font_set

	var _arg0 *C.GtkFontButton // out

	_arg0 = (*C.GtkFontButton)(unsafe.Pointer(coreglib.InternObject(gfp).Native()))

	C._gotk4_gtk3_FontButton_virtual_font_set(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(gfp)
}

// FontChooserDialogOverrides contains methods that are overridable.
type FontChooserDialogOverrides struct {
}

func defaultFontChooserDialogOverrides(v *FontChooserDialog) FontChooserDialogOverrides {
	return FontChooserDialogOverrides{}
}

// FontChooserDialog widget is a dialog for selecting a font. It implements the
// FontChooser interface.
//
// # GtkFontChooserDialog as GtkBuildable
//
// The GtkFontChooserDialog implementation of the Buildable interface exposes
// the buttons with the names “select_button” and “cancel_button”.
type FontChooserDialog struct {
	_ [0]func() // equal guard
	Dialog

	*coreglib.Object
	FontChooser
}

var (
	_ coreglib.Objector = (*FontChooserDialog)(nil)
	_ Binner            = (*FontChooserDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FontChooserDialog, *FontChooserDialogClass, FontChooserDialogOverrides](
		GTypeFontChooserDialog,
		initFontChooserDialogClass,
		wrapFontChooserDialog,
		defaultFontChooserDialogOverrides,
	)
}

func initFontChooserDialogClass(gclass unsafe.Pointer, overrides FontChooserDialogOverrides, classInitFunc func(*FontChooserDialogClass)) {
	if classInitFunc != nil {
		class := (*FontChooserDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFontChooserDialog(obj *coreglib.Object) *FontChooserDialog {
	return &FontChooserDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
		Object: obj,
		FontChooser: FontChooser{
			Object: obj,
		},
	}
}

func marshalFontChooserDialog(p uintptr) (interface{}, error) {
	return wrapFontChooserDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFontChooserDialog creates a new FontChooserDialog.
//
// The function takes the following parameters:
//
//   - title (optional): title of the dialog, or NULL.
//   - parent (optional): transient parent of the dialog, or NULL.
//
// The function returns the following values:
//
//   - fontChooserDialog: new FontChooserDialog.
func NewFontChooserDialog(title string, parent *Window) *FontChooserDialog {
	var _arg1 *C.gchar     // out
	var _arg2 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	if title != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	if parent != nil {
		_arg2 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	_cret = C.gtk_font_chooser_dialog_new(_arg1, _arg2)
	runtime.KeepAlive(title)
	runtime.KeepAlive(parent)

	var _fontChooserDialog *FontChooserDialog // out

	_fontChooserDialog = wrapFontChooserDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontChooserDialog
}

// FontChooserWidgetOverrides contains methods that are overridable.
type FontChooserWidgetOverrides struct {
}

func defaultFontChooserWidgetOverrides(v *FontChooserWidget) FontChooserWidgetOverrides {
	return FontChooserWidgetOverrides{}
}

// FontChooserWidget widget lists the available fonts, styles and sizes,
// allowing the user to select a font. It is used in the FontChooserDialog
// widget to provide a dialog box for selecting fonts.
//
// To set the font which is initially selected, use gtk_font_chooser_set_font()
// or gtk_font_chooser_set_font_desc().
//
// To get the selected font use gtk_font_chooser_get_font() or
// gtk_font_chooser_get_font_desc().
//
// To change the text which is shown in the preview area, use
// gtk_font_chooser_set_preview_text().
//
// # CSS nodes
//
// GtkFontChooserWidget has a single CSS node with name fontchooser.
type FontChooserWidget struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	FontChooser
}

var (
	_ coreglib.Objector = (*FontChooserWidget)(nil)
	_ Containerer       = (*FontChooserWidget)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FontChooserWidget, *FontChooserWidgetClass, FontChooserWidgetOverrides](
		GTypeFontChooserWidget,
		initFontChooserWidgetClass,
		wrapFontChooserWidget,
		defaultFontChooserWidgetOverrides,
	)
}

func initFontChooserWidgetClass(gclass unsafe.Pointer, overrides FontChooserWidgetOverrides, classInitFunc func(*FontChooserWidgetClass)) {
	if classInitFunc != nil {
		class := (*FontChooserWidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFontChooserWidget(obj *coreglib.Object) *FontChooserWidget {
	return &FontChooserWidget{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		FontChooser: FontChooser{
			Object: obj,
		},
	}
}

func marshalFontChooserWidget(p uintptr) (interface{}, error) {
	return wrapFontChooserWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFontChooserWidget creates a new FontChooserWidget.
//
// The function returns the following values:
//
//   - fontChooserWidget: new FontChooserWidget.
func NewFontChooserWidget() *FontChooserWidget {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_font_chooser_widget_new()

	var _fontChooserWidget *FontChooserWidget // out

	_fontChooserWidget = wrapFontChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontChooserWidget
}

// FontSelectionOverrides contains methods that are overridable.
type FontSelectionOverrides struct {
}

func defaultFontSelectionOverrides(v *FontSelection) FontSelectionOverrides {
	return FontSelectionOverrides{}
}

type FontSelection struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*FontSelection)(nil)
	_ coreglib.Objector = (*FontSelection)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FontSelection, *FontSelectionClass, FontSelectionOverrides](
		GTypeFontSelection,
		initFontSelectionClass,
		wrapFontSelection,
		defaultFontSelectionOverrides,
	)
}

func initFontSelectionClass(gclass unsafe.Pointer, overrides FontSelectionOverrides, classInitFunc func(*FontSelectionClass)) {
	if classInitFunc != nil {
		class := (*FontSelectionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFontSelection(obj *coreglib.Object) *FontSelection {
	return &FontSelection{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalFontSelection(p uintptr) (interface{}, error) {
	return wrapFontSelection(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFontSelection creates a new FontSelection.
//
// Deprecated: Use FontChooserWidget instead.
//
// The function returns the following values:
//
//   - fontSelection: new FontSelection.
func NewFontSelection() *FontSelection {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_font_selection_new()

	var _fontSelection *FontSelection // out

	_fontSelection = wrapFontSelection(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontSelection
}

// Face gets the FontFace representing the selected font group details (i.e.
// family, slant, weight, width, etc).
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - fontFace representing the selected font group details. The returned
//     object is owned by fontsel and must not be modified or freed.
func (fontsel *FontSelection) Face() pango.FontFacer {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.PangoFontFace    // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_face(_arg0)
	runtime.KeepAlive(fontsel)

	var _fontFace pango.FontFacer // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type pango.FontFacer is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(pango.FontFacer)
			return ok
		})
		rv, ok := casted.(pango.FontFacer)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFacer")
		}
		_fontFace = rv
	}

	return _fontFace
}

// FaceList: this returns the TreeView which lists all styles available for the
// selected font. For example, “Regular”, “Bold”, etc.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - widget that is part of fontsel.
func (fontsel *FontSelection) FaceList() Widgetter {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_face_list(_arg0)
	runtime.KeepAlive(fontsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// Family gets the FontFamily representing the selected font family.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - fontFamily representing the selected font family. Font families are a
//     collection of font faces. The returned object is owned by fontsel and
//     must not be modified or freed.
func (fontsel *FontSelection) Family() pango.FontFamilier {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.PangoFontFamily  // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_family(_arg0)
	runtime.KeepAlive(fontsel)

	var _fontFamily pango.FontFamilier // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type pango.FontFamilier is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(pango.FontFamilier)
			return ok
		})
		rv, ok := casted.(pango.FontFamilier)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontFamilier")
		}
		_fontFamily = rv
	}

	return _fontFamily
}

// FamilyList: this returns the TreeView that lists font families, for example,
// “Sans”, “Serif”, etc.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - widget that is part of fontsel.
func (fontsel *FontSelection) FamilyList() Widgetter {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_family_list(_arg0)
	runtime.KeepAlive(fontsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// FontName gets the currently-selected font name.
//
// Note that this can be a different string than what you set with
// gtk_font_selection_set_font_name(), as the font selection widget may
// normalize font names and thus return a string with a different structure.
// For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica
// Bold Italic 12”. Use pango_font_description_equal() if you want to compare
// two font descriptions.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - utf8: string with the name of the current font, or NULL if no font is
//     selected. You must free this string with g_free().
func (fontsel *FontSelection) FontName() string {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_font_name(_arg0)
	runtime.KeepAlive(fontsel)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// PreviewEntry: this returns the Entry used to display the font as a preview.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - widget that is part of fontsel.
func (fontsel *FontSelection) PreviewEntry() Widgetter {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_preview_entry(_arg0)
	runtime.KeepAlive(fontsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// PreviewText gets the text displayed in the preview area.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - utf8: text displayed in the preview area. This string is owned by the
//     widget and should not be modified or freed.
func (fontsel *FontSelection) PreviewText() string {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_preview_text(_arg0)
	runtime.KeepAlive(fontsel)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Size: selected font size.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - gint: n integer representing the selected font size, or -1 if no font
//     size is selected.
func (fontsel *FontSelection) Size() int {
	var _arg0 *C.GtkFontSelection // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_size(_arg0)
	runtime.KeepAlive(fontsel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SizeEntry: this returns the Entry used to allow the user to edit the font
// number manually instead of selecting it from the list of font sizes.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - widget that is part of fontsel.
func (fontsel *FontSelection) SizeEntry() Widgetter {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_size_entry(_arg0)
	runtime.KeepAlive(fontsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SizeList: this returns the TreeView used to list font sizes.
//
// Deprecated: Use FontChooser.
//
// The function returns the following values:
//
//   - widget that is part of fontsel.
func (fontsel *FontSelection) SizeList() Widgetter {
	var _arg0 *C.GtkFontSelection // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))

	_cret = C.gtk_font_selection_get_size_list(_arg0)
	runtime.KeepAlive(fontsel)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetFontName sets the currently-selected font.
//
// Note that the fontsel needs to know the screen in which it will appear for
// this to work; this can be guaranteed by simply making sure that the fontsel
// is inserted in a toplevel window before you call this function.
//
// Deprecated: Use FontChooser.
//
// The function takes the following parameters:
//
//   - fontname: font name like “Helvetica 12” or “Times Bold 18”.
//
// The function returns the following values:
//
//   - ok: TRUE if the font could be set successfully; FALSE if no such font
//     exists or if the fontsel doesn’t belong to a particular screen yet.
func (fontsel *FontSelection) SetFontName(fontname string) bool {
	var _arg0 *C.GtkFontSelection // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_font_selection_set_font_name(_arg0, _arg1)
	runtime.KeepAlive(fontsel)
	runtime.KeepAlive(fontname)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetPreviewText sets the text displayed in the preview area. The text is used
// to show how the selected font looks.
//
// Deprecated: Use FontChooser.
//
// The function takes the following parameters:
//
//   - text to display in the preview area.
func (fontsel *FontSelection) SetPreviewText(text string) {
	var _arg0 *C.GtkFontSelection // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkFontSelection)(unsafe.Pointer(coreglib.InternObject(fontsel).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_selection_set_preview_text(_arg0, _arg1)
	runtime.KeepAlive(fontsel)
	runtime.KeepAlive(text)
}

// FontSelectionDialogOverrides contains methods that are overridable.
type FontSelectionDialogOverrides struct {
}

func defaultFontSelectionDialogOverrides(v *FontSelectionDialog) FontSelectionDialogOverrides {
	return FontSelectionDialogOverrides{}
}

type FontSelectionDialog struct {
	_ [0]func() // equal guard
	Dialog
}

var (
	_ Binner = (*FontSelectionDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FontSelectionDialog, *FontSelectionDialogClass, FontSelectionDialogOverrides](
		GTypeFontSelectionDialog,
		initFontSelectionDialogClass,
		wrapFontSelectionDialog,
		defaultFontSelectionDialogOverrides,
	)
}

func initFontSelectionDialogClass(gclass unsafe.Pointer, overrides FontSelectionDialogOverrides, classInitFunc func(*FontSelectionDialogClass)) {
	if classInitFunc != nil {
		class := (*FontSelectionDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFontSelectionDialog(obj *coreglib.Object) *FontSelectionDialog {
	return &FontSelectionDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
	}
}

func marshalFontSelectionDialog(p uintptr) (interface{}, error) {
	return wrapFontSelectionDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFontSelectionDialog creates a new FontSelectionDialog.
//
// Deprecated: Use FontChooserDialog.
//
// The function takes the following parameters:
//
//   - title of the dialog window.
//
// The function returns the following values:
//
//   - fontSelectionDialog: new FontSelectionDialog.
func NewFontSelectionDialog(title string) *FontSelectionDialog {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_font_selection_dialog_new(_arg1)
	runtime.KeepAlive(title)

	var _fontSelectionDialog *FontSelectionDialog // out

	_fontSelectionDialog = wrapFontSelectionDialog(coreglib.Take(unsafe.Pointer(_cret)))

	return _fontSelectionDialog
}

// CancelButton gets the “Cancel” button.
//
// Deprecated: Use FontChooserDialog.
//
// The function returns the following values:
//
//   - widget used in the dialog for the “Cancel” button.
func (fsd *FontSelectionDialog) CancelButton() Widgetter {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _cret *C.GtkWidget              // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))

	_cret = C.gtk_font_selection_dialog_get_cancel_button(_arg0)
	runtime.KeepAlive(fsd)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// FontName gets the currently-selected font name.
//
// Note that this can be a different string than what you set with
// gtk_font_selection_dialog_set_font_name(), as the font selection widget may
// normalize font names and thus return a string with a different structure.
// For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica
// Bold Italic 12”. Use pango_font_description_equal() if you want to compare
// two font descriptions.
//
// Deprecated: Use FontChooserDialog.
//
// The function returns the following values:
//
//   - utf8: string with the name of the current font, or NULL if no font is
//     selected. You must free this string with g_free().
func (fsd *FontSelectionDialog) FontName() string {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _cret *C.gchar                  // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))

	_cret = C.gtk_font_selection_dialog_get_font_name(_arg0)
	runtime.KeepAlive(fsd)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// FontSelection retrieves the FontSelection widget embedded in the dialog.
//
// Deprecated: Use FontChooserDialog.
//
// The function returns the following values:
//
//   - widget: embedded FontSelection.
func (fsd *FontSelectionDialog) FontSelection() Widgetter {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _cret *C.GtkWidget              // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))

	_cret = C.gtk_font_selection_dialog_get_font_selection(_arg0)
	runtime.KeepAlive(fsd)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// OKButton gets the “OK” button.
//
// Deprecated: Use FontChooserDialog.
//
// The function returns the following values:
//
//   - widget used in the dialog for the “OK” button.
func (fsd *FontSelectionDialog) OKButton() Widgetter {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _cret *C.GtkWidget              // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))

	_cret = C.gtk_font_selection_dialog_get_ok_button(_arg0)
	runtime.KeepAlive(fsd)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// PreviewText gets the text displayed in the preview area.
//
// Deprecated: Use FontChooserDialog.
//
// The function returns the following values:
//
//   - utf8: text displayed in the preview area. This string is owned by the
//     widget and should not be modified or freed.
func (fsd *FontSelectionDialog) PreviewText() string {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _cret *C.gchar                  // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))

	_cret = C.gtk_font_selection_dialog_get_preview_text(_arg0)
	runtime.KeepAlive(fsd)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// SetFontName sets the currently selected font.
//
// Deprecated: Use FontChooserDialog.
//
// The function takes the following parameters:
//
//   - fontname: font name like “Helvetica 12” or “Times Bold 18”.
//
// The function returns the following values:
//
//   - ok: TRUE if the font selected in fsd is now the fontname specified,
//     FALSE otherwise.
func (fsd *FontSelectionDialog) SetFontName(fontname string) bool {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _arg1 *C.gchar                  // out
	var _cret C.gboolean                // in

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fontname)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_font_selection_dialog_set_font_name(_arg0, _arg1)
	runtime.KeepAlive(fsd)
	runtime.KeepAlive(fontname)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetPreviewText sets the text displayed in the preview area.
//
// Deprecated: Use FontChooserDialog.
//
// The function takes the following parameters:
//
//   - text to display in the preview area.
func (fsd *FontSelectionDialog) SetPreviewText(text string) {
	var _arg0 *C.GtkFontSelectionDialog // out
	var _arg1 *C.gchar                  // out

	_arg0 = (*C.GtkFontSelectionDialog)(unsafe.Pointer(coreglib.InternObject(fsd).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_font_selection_dialog_set_preview_text(_arg0, _arg1)
	runtime.KeepAlive(fsd)
	runtime.KeepAlive(text)
}

// FrameOverrides contains methods that are overridable.
type FrameOverrides struct {
	ComputeChildAllocation func(allocation *Allocation)
}

func defaultFrameOverrides(v *Frame) FrameOverrides {
	return FrameOverrides{
		ComputeChildAllocation: v.computeChildAllocation,
	}
}

// Frame: frame widget is a bin that surrounds its child with a decorative
// frame and an optional label. If present, the label is drawn in a gap in
// the top side of the frame. The position of the label can be controlled with
// gtk_frame_set_label_align().
//
// # GtkFrame as GtkBuildable
//
// The GtkFrame implementation of the Buildable interface supports placing a
// child in the label position by specifying “label” as the “type” attribute of
// a <child> element. A normal content child can be specified without specifying
// a <child> type attribute.
//
// An example of a UI definition fragment with GtkFrame:
//
//	frame
//	├── border[.flat]
//	├── <label widget>
//	╰── <child>
//
// GtkFrame has a main CSS node named “frame” and a subnode named “border”. The
// “border” node is used to draw the visible border. You can set the appearance
// of the border using CSS properties like “border-style” on the “border” node.
//
// The border node can be given the style class “.flat”, which is used
// by themes to disable drawing of the border. To do this from code, call
// gtk_frame_set_shadow_type() with GTK_SHADOW_NONE to add the “.flat” class or
// any other shadow type to remove it.
type Frame struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Frame)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Frame, *FrameClass, FrameOverrides](
		GTypeFrame,
		initFrameClass,
		wrapFrame,
		defaultFrameOverrides,
	)
}

func initFrameClass(gclass unsafe.Pointer, overrides FrameOverrides, classInitFunc func(*FrameClass)) {
	pclass := (*C.GtkFrameClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeFrame))))

	if overrides.ComputeChildAllocation != nil {
		pclass.compute_child_allocation = (*[0]byte)(C._gotk4_gtk3_FrameClass_compute_child_allocation)
	}

	if classInitFunc != nil {
		class := (*FrameClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFrame(obj *coreglib.Object) *Frame {
	return &Frame{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalFrame(p uintptr) (interface{}, error) {
	return wrapFrame(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewFrame creates a new Frame, with optional label label. If label is NULL,
// the label is omitted.
//
// The function takes the following parameters:
//
//   - label (optional): text to use as the label of the frame.
//
// The function returns the following values:
//
//   - frame: new Frame widget.
func NewFrame(label string) *Frame {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_frame_new(_arg1)
	runtime.KeepAlive(label)

	var _frame *Frame // out

	_frame = wrapFrame(coreglib.Take(unsafe.Pointer(_cret)))

	return _frame
}

// Label: if the frame’s label widget is a Label, returns the text in the label
// widget. (The frame will have a Label for the label widget if a non-NULL
// argument was passed to gtk_frame_new().).
//
// The function returns the following values:
//
//   - utf8 (optional): text in the label, or NULL if there was no label widget
//     or the lable widget was not a Label. This string is owned by GTK+ and
//     must not be modified or freed.
func (frame *Frame) Label() string {
	var _arg0 *C.GtkFrame // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))

	_cret = C.gtk_frame_get_label(_arg0)
	runtime.KeepAlive(frame)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// LabelAlign retrieves the X and Y alignment of the frame’s label. See
// gtk_frame_set_label_align().
//
// The function returns the following values:
//
//   - xalign (optional): location to store X alignment of frame’s label,
//     or NULL.
//   - yalign (optional): location to store X alignment of frame’s label,
//     or NULL.
func (frame *Frame) LabelAlign() (xalign, yalign float32) {
	var _arg0 *C.GtkFrame // out
	var _arg1 C.gfloat    // in
	var _arg2 C.gfloat    // in

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))

	C.gtk_frame_get_label_align(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(frame)

	var _xalign float32 // out
	var _yalign float32 // out

	_xalign = float32(_arg1)
	_yalign = float32(_arg2)

	return _xalign, _yalign
}

// LabelWidget retrieves the label widget for the frame. See
// gtk_frame_set_label_widget().
//
// The function returns the following values:
//
//   - widget (optional): label widget, or NULL if there is none.
func (frame *Frame) LabelWidget() Widgetter {
	var _arg0 *C.GtkFrame  // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))

	_cret = C.gtk_frame_get_label_widget(_arg0)
	runtime.KeepAlive(frame)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// ShadowType retrieves the shadow type of the frame. See
// gtk_frame_set_shadow_type().
//
// The function returns the following values:
//
//   - shadowType: current shadow type of the frame.
func (frame *Frame) ShadowType() ShadowType {
	var _arg0 *C.GtkFrame     // out
	var _cret C.GtkShadowType // in

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))

	_cret = C.gtk_frame_get_shadow_type(_arg0)
	runtime.KeepAlive(frame)

	var _shadowType ShadowType // out

	_shadowType = ShadowType(_cret)

	return _shadowType
}

// SetLabel removes the current Frame:label-widget. If label is not NULL,
// creates a new Label with that text and adds it as the Frame:label-widget.
//
// The function takes the following parameters:
//
//   - label (optional): text to use as the label of the frame.
func (frame *Frame) SetLabel(label string) {
	var _arg0 *C.GtkFrame // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))
	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_frame_set_label(_arg0, _arg1)
	runtime.KeepAlive(frame)
	runtime.KeepAlive(label)
}

// SetLabelAlign sets the alignment of the frame widget’s label. The default
// values for a newly created frame are 0.0 and 0.5.
//
// The function takes the following parameters:
//
//   - xalign: position of the label along the top edge of the widget. A value
//     of 0.0 represents left alignment; 1.0 represents right alignment.
//   - yalign: y alignment of the label. A value of 0.0 aligns under the frame;
//     1.0 aligns above the frame. If the values are exactly 0.0 or 1.0 the gap
//     in the frame won’t be painted because the label will be completely above
//     or below the frame.
func (frame *Frame) SetLabelAlign(xalign, yalign float32) {
	var _arg0 *C.GtkFrame // out
	var _arg1 C.gfloat    // out
	var _arg2 C.gfloat    // out

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)

	C.gtk_frame_set_label_align(_arg0, _arg1, _arg2)
	runtime.KeepAlive(frame)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
}

// SetLabelWidget sets the Frame:label-widget for the frame. This is the widget
// that will appear embedded in the top edge of the frame as a title.
//
// The function takes the following parameters:
//
//   - labelWidget (optional): new label widget.
func (frame *Frame) SetLabelWidget(labelWidget Widgetter) {
	var _arg0 *C.GtkFrame  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))
	if labelWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(labelWidget).Native()))
	}

	C.gtk_frame_set_label_widget(_arg0, _arg1)
	runtime.KeepAlive(frame)
	runtime.KeepAlive(labelWidget)
}

// SetShadowType sets the Frame:shadow-type for frame, i.e. whether it is
// drawn without (GTK_SHADOW_NONE) or with (other values) a visible border.
// Values other than GTK_SHADOW_NONE are treated identically by GtkFrame.
// The chosen type is applied by removing or adding the .flat class to the CSS
// node named border.
//
// The function takes the following parameters:
//
//   - typ: new ShadowType.
func (frame *Frame) SetShadowType(typ ShadowType) {
	var _arg0 *C.GtkFrame     // out
	var _arg1 C.GtkShadowType // out

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))
	_arg1 = C.GtkShadowType(typ)

	C.gtk_frame_set_shadow_type(_arg0, _arg1)
	runtime.KeepAlive(frame)
	runtime.KeepAlive(typ)
}

func (frame *Frame) computeChildAllocation(allocation *Allocation) {
	gclass := (*C.GtkFrameClass)(coreglib.PeekParentClass(frame))
	fnarg := gclass.compute_child_allocation

	var _arg0 *C.GtkFrame      // out
	var _arg1 *C.GtkAllocation // out

	_arg0 = (*C.GtkFrame)(unsafe.Pointer(coreglib.InternObject(frame).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	C._gotk4_gtk3_Frame_virtual_compute_child_allocation(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(frame)
	runtime.KeepAlive(allocation)
}

// FrameAccessibleOverrides contains methods that are overridable.
type FrameAccessibleOverrides struct {
}

func defaultFrameAccessibleOverrides(v *FrameAccessible) FrameAccessibleOverrides {
	return FrameAccessibleOverrides{}
}

type FrameAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*FrameAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*FrameAccessible, *FrameAccessibleClass, FrameAccessibleOverrides](
		GTypeFrameAccessible,
		initFrameAccessibleClass,
		wrapFrameAccessible,
		defaultFrameAccessibleOverrides,
	)
}

func initFrameAccessibleClass(gclass unsafe.Pointer, overrides FrameAccessibleOverrides, classInitFunc func(*FrameAccessibleClass)) {
	if classInitFunc != nil {
		class := (*FrameAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapFrameAccessible(obj *coreglib.Object) *FrameAccessible {
	return &FrameAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalFrameAccessible(p uintptr) (interface{}, error) {
	return wrapFrameAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// GLAreaOverrides contains methods that are overridable.
type GLAreaOverrides struct {
	// Render class closure for the GLArea::render signal.
	Render func(context gdk.GLContexter) bool
	// Resize class closeure for the GLArea::resize signal.
	//
	// The function takes the following parameters:
	//
	//   - width
	//   - height
	Resize func(width, height int)
}

func defaultGLAreaOverrides(v *GLArea) GLAreaOverrides {
	return GLAreaOverrides{
		Render: v.render,
		Resize: v.resize,
	}
}

// GLArea is a widget that allows drawing with OpenGL.
//
// GLArea sets up its own GLContext for the window it creates, and creates
// a custom GL framebuffer that the widget will do GL rendering onto.
// It also ensures that this framebuffer is the default GL rendering target when
// rendering.
//
// In order to draw, you have to connect to the GLArea::render signal,
// or subclass GLArea and override the GtkGLAreaClass.render() virtual function.
//
// The GLArea widget ensures that the GLContext is associated with the widget's
// drawing area, and it is kept updated when the size and position of the
// drawing area changes.
//
// Drawing with GtkGLArea ##
//
// The simplest way to draw using OpenGL commands in a GLArea is to create a
// widget instance and connect to the GLArea::render signal:
//
//	static void
//	on_realize (GtkGLarea *area)
//	{
//	  // We need to make the context current if we want to
//	  // call GL API
//	  gtk_gl_area_make_current (area);
//
//	  // If there were errors during the initialization or
//	  // when trying to make the context current, this
//	  // function will return a #GError for you to catch
//	  if (gtk_gl_area_get_error (area) != NULL)
//	    return;
//
//	  // You can also use gtk_gl_area_set_error() in order
//	  // to show eventual initialization errors on the
//	  // GtkGLArea widget itself
//	  GError *internal_error = NULL;
//	  init_buffer_objects (&error);
//	  if (error != NULL)
//	    {
//	      gtk_gl_area_set_error (area, error);
//	      g_error_free (error);
//	      return;
//	    }
//
//	  init_shaders (&error);
//	  if (error != NULL)
//	    {
//	      gtk_gl_area_set_error (area, error);
//	      g_error_free (error);
//	      return;
//	    }
//	}
//
// If you need to change the options for creating the GLContext you should use
// the GLArea::create-context signal.
type GLArea struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*GLArea)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*GLArea, *GLAreaClass, GLAreaOverrides](
		GTypeGLArea,
		initGLAreaClass,
		wrapGLArea,
		defaultGLAreaOverrides,
	)
}

func initGLAreaClass(gclass unsafe.Pointer, overrides GLAreaOverrides, classInitFunc func(*GLAreaClass)) {
	pclass := (*C.GtkGLAreaClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeGLArea))))

	if overrides.Render != nil {
		pclass.render = (*[0]byte)(C._gotk4_gtk3_GLAreaClass_render)
	}

	if overrides.Resize != nil {
		pclass.resize = (*[0]byte)(C._gotk4_gtk3_GLAreaClass_resize)
	}

	if classInitFunc != nil {
		class := (*GLAreaClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapGLArea(obj *coreglib.Object) *GLArea {
	return &GLArea{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalGLArea(p uintptr) (interface{}, error) {
	return wrapGLArea(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectCreateContext signal is emitted when the widget is being realized,
// and allows you to override how the GL context is created. This is useful
// when you want to reuse an existing GL context, or if you want to try creating
// different kinds of GL options.
//
// If context creation fails then the signal handler can use
// gtk_gl_area_set_error() to register a more detailed error of how the
// construction failed.
func (area *GLArea) ConnectCreateContext(f func() (glContext gdk.GLContexter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "create-context", false, unsafe.Pointer(C._gotk4_gtk3_GLArea_ConnectCreateContext), f)
}

// ConnectRender signal is emitted every time the contents of the GLArea should
// be redrawn.
//
// The context is bound to the area prior to emitting this function, and the
// buffers are painted to the window once the emission terminates.
func (area *GLArea) ConnectRender(f func(context gdk.GLContexter) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "render", false, unsafe.Pointer(C._gotk4_gtk3_GLArea_ConnectRender), f)
}

// ConnectResize signal is emitted once when the widget is realized, and then
// each time the widget is changed while realized. This is useful in order to
// keep GL state up to date with the widget size, like for instance camera
// properties which may depend on the width/height ratio.
//
// The GL context for the area is guaranteed to be current when this signal is
// emitted.
//
// The default handler sets up the GL viewport.
func (area *GLArea) ConnectResize(f func(width, height int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(area, "resize", false, unsafe.Pointer(C._gotk4_gtk3_GLArea_ConnectResize), f)
}

// NewGLArea creates a new GLArea widget.
//
// The function returns the following values:
//
//   - glArea: new GLArea.
func NewGLArea() *GLArea {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_gl_area_new()

	var _glArea *GLArea // out

	_glArea = wrapGLArea(coreglib.Take(unsafe.Pointer(_cret)))

	return _glArea
}

// AttachBuffers ensures that the area framebuffer object is made the current
// draw and read target, and that all the required buffers for the area are
// created and bound to the frambuffer.
//
// This function is automatically called before emitting the GLArea::render
// signal, and doesn't normally need to be called by application code.
func (area *GLArea) AttachBuffers() {
	var _arg0 *C.GtkGLArea // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	C.gtk_gl_area_attach_buffers(_arg0)
	runtime.KeepAlive(area)
}

// AutoRender returns whether the area is in auto render mode or not.
//
// The function returns the following values:
//
//   - ok: TRUE if the area is auto rendering, FALSE otherwise.
func (area *GLArea) AutoRender() bool {
	var _arg0 *C.GtkGLArea // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_auto_render(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Context retrieves the GLContext used by area.
//
// The function returns the following values:
//
//   - glContext: GLContext.
func (area *GLArea) Context() gdk.GLContexter {
	var _arg0 *C.GtkGLArea    // out
	var _cret *C.GdkGLContext // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_context(_arg0)
	runtime.KeepAlive(area)

	var _glContext gdk.GLContexter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.GLContexter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.GLContexter)
			return ok
		})
		rv, ok := casted.(gdk.GLContexter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.GLContexter")
		}
		_glContext = rv
	}

	return _glContext
}

// Error gets the current error set on the area.
//
// The function returns the following values:
//
//   - err (optional) or NULL.
func (area *GLArea) Error() error {
	var _arg0 *C.GtkGLArea // out
	var _cret *C.GError    // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_error(_arg0)
	runtime.KeepAlive(area)

	var _err error // out

	if _cret != nil {
		_err = gerror.Take(unsafe.Pointer(_cret))
	}

	return _err
}

// HasAlpha returns whether the area has an alpha component.
//
// The function returns the following values:
//
//   - ok: TRUE if the area has an alpha component, FALSE otherwise.
func (area *GLArea) HasAlpha() bool {
	var _arg0 *C.GtkGLArea // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_has_alpha(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasDepthBuffer returns whether the area has a depth buffer.
//
// The function returns the following values:
//
//   - ok: TRUE if the area has a depth buffer, FALSE otherwise.
func (area *GLArea) HasDepthBuffer() bool {
	var _arg0 *C.GtkGLArea // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_has_depth_buffer(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasStencilBuffer returns whether the area has a stencil buffer.
//
// The function returns the following values:
//
//   - ok: TRUE if the area has a stencil buffer, FALSE otherwise.
func (area *GLArea) HasStencilBuffer() bool {
	var _arg0 *C.GtkGLArea // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_has_stencil_buffer(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RequiredVersion retrieves the required version of OpenGL set using
// gtk_gl_area_set_required_version().
//
// The function returns the following values:
//
//   - major: return location for the required major version.
//   - minor: return location for the required minor version.
func (area *GLArea) RequiredVersion() (major, minor int) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	C.gtk_gl_area_get_required_version(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(area)

	var _major int // out
	var _minor int // out

	_major = int(_arg1)
	_minor = int(_arg2)

	return _major, _minor
}

// UseES retrieves the value set by gtk_gl_area_set_use_es().
//
// The function returns the following values:
//
//   - ok: TRUE if the GLArea should create an OpenGL ES context and FALSE
//     otherwise.
func (area *GLArea) UseES() bool {
	var _arg0 *C.GtkGLArea // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_gl_area_get_use_es(_arg0)
	runtime.KeepAlive(area)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MakeCurrent ensures that the GLContext used by area is associated with the
// GLArea.
//
// This function is automatically called before emitting the GLArea::render
// signal, and doesn't normally need to be called by application code.
func (area *GLArea) MakeCurrent() {
	var _arg0 *C.GtkGLArea // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	C.gtk_gl_area_make_current(_arg0)
	runtime.KeepAlive(area)
}

// QueueRender marks the currently rendered data (if any) as invalid, and queues
// a redraw of the widget, ensuring that the GLArea::render signal is emitted
// during the draw.
//
// This is only needed when the gtk_gl_area_set_auto_render() has been called
// with a FALSE value. The default behaviour is to emit GLArea::render on each
// draw.
func (area *GLArea) QueueRender() {
	var _arg0 *C.GtkGLArea // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	C.gtk_gl_area_queue_render(_arg0)
	runtime.KeepAlive(area)
}

// SetAutoRender: if auto_render is TRUE the GLArea::render signal will be
// emitted every time the widget draws. This is the default and is useful if
// drawing the widget is faster.
//
// If auto_render is FALSE the data from previous rendering is kept around
// and will be used for drawing the widget the next time, unless the window is
// resized. In order to force a rendering gtk_gl_area_queue_render() must be
// called. This mode is useful when the scene changes seldomly, but takes a long
// time to redraw.
//
// The function takes the following parameters:
//
//   - autoRender: boolean.
func (area *GLArea) SetAutoRender(autoRender bool) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if autoRender {
		_arg1 = C.TRUE
	}

	C.gtk_gl_area_set_auto_render(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(autoRender)
}

// SetError sets an error on the area which will be shown instead of the GL
// rendering. This is useful in the GLArea::create-context signal if GL context
// creation fails.
//
// The function takes the following parameters:
//
//   - err (optional): new #GError, or NULL to unset the error.
func (area *GLArea) SetError(err error) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 *C.GError    // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if err != nil {
		_arg1 = (*C.GError)(gerror.New(err))
	}

	C.gtk_gl_area_set_error(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(err)
}

// SetHasAlpha: if has_alpha is TRUE the buffer allocated by the widget will
// have an alpha channel component, and when rendering to the window the result
// will be composited over whatever is below the widget.
//
// If has_alpha is FALSE there will be no alpha channel, and the buffer will
// fully replace anything below the widget.
//
// The function takes the following parameters:
//
//   - hasAlpha: TRUE to add an alpha component.
func (area *GLArea) SetHasAlpha(hasAlpha bool) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if hasAlpha {
		_arg1 = C.TRUE
	}

	C.gtk_gl_area_set_has_alpha(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(hasAlpha)
}

// SetHasDepthBuffer: if has_depth_buffer is TRUE the widget will allocate and
// enable a depth buffer for the target framebuffer. Otherwise there will be
// none.
//
// The function takes the following parameters:
//
//   - hasDepthBuffer: TRUE to add a depth buffer.
func (area *GLArea) SetHasDepthBuffer(hasDepthBuffer bool) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if hasDepthBuffer {
		_arg1 = C.TRUE
	}

	C.gtk_gl_area_set_has_depth_buffer(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(hasDepthBuffer)
}

// SetHasStencilBuffer: if has_stencil_buffer is TRUE the widget will allocate
// and enable a stencil buffer for the target framebuffer. Otherwise there will
// be none.
//
// The function takes the following parameters:
//
//   - hasStencilBuffer: TRUE to add a stencil buffer.
func (area *GLArea) SetHasStencilBuffer(hasStencilBuffer bool) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if hasStencilBuffer {
		_arg1 = C.TRUE
	}

	C.gtk_gl_area_set_has_stencil_buffer(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(hasStencilBuffer)
}

// SetRequiredVersion sets the required version of OpenGL to be used when
// creating the context for the widget.
//
// This function must be called before the area has been realized.
//
// The function takes the following parameters:
//
//   - major version.
//   - minor version.
func (area *GLArea) SetRequiredVersion(major, minor int) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = C.gint(major)
	_arg2 = C.gint(minor)

	C.gtk_gl_area_set_required_version(_arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(major)
	runtime.KeepAlive(minor)
}

// SetUseES sets whether the area should create an OpenGL or an OpenGL ES
// context.
//
// You should check the capabilities of the GLContext before drawing with either
// API.
//
// The function takes the following parameters:
//
//   - useEs: whether to use OpenGL or OpenGL ES.
func (area *GLArea) SetUseES(useEs bool) {
	var _arg0 *C.GtkGLArea // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	if useEs {
		_arg1 = C.TRUE
	}

	C.gtk_gl_area_set_use_es(_arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(useEs)
}

// Render class closure for the GLArea::render signal.
func (area *GLArea) render(context gdk.GLContexter) bool {
	gclass := (*C.GtkGLAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.render

	var _arg0 *C.GtkGLArea    // out
	var _arg1 *C.GdkGLContext // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = (*C.GdkGLContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C._gotk4_gtk3_GLArea_virtual_render(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(area)
	runtime.KeepAlive(context)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Resize class closeure for the GLArea::resize signal.
//
// The function takes the following parameters:
//
//   - width
//   - height
func (area *GLArea) resize(width, height int) {
	gclass := (*C.GtkGLAreaClass)(coreglib.PeekParentClass(area))
	fnarg := gclass.resize

	var _arg0 *C.GtkGLArea // out
	var _arg1 C.int        // out
	var _arg2 C.int        // out

	_arg0 = (*C.GtkGLArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))
	_arg1 = C.int(width)
	_arg2 = C.int(height)

	C._gotk4_gtk3_GLArea_virtual_resize(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(area)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// Gesture is the base object for gesture recognition, although this object is
// quite generalized to serve as a base for multi-touch gestures, it is suitable
// to implement single-touch and pointer-based gestures (using the special NULL
// EventSequence value for these).
//
// The number of touches that a Gesture need to be recognized is controlled
// by the Gesture:n-points property, if a gesture is keeping track of less or
// more than that number of sequences, it won't check wether the gesture is
// recognized.
//
// As soon as the gesture has the expected number of touches, the gesture will
// run the Gesture::check signal regularly on input events until the gesture
// is recognized, the criteria to consider a gesture as "recognized" is left to
// Gesture subclasses.
//
// A recognized gesture will then emit the following signals:
//
// - Gesture::begin when the gesture is recognized.
//
// - A number of Gesture::update, whenever an input event is processed.
//
// - Gesture::end when the gesture is no longer recognized.
//
// # Event propagation
//
// In order to receive events, a gesture needs to either set a propagation phase
// through gtk_event_controller_set_propagation_phase(), or feed those manually
// through gtk_event_controller_handle_event().
//
// In the capture phase, events are propagated from the toplevel down to the
// target widget, and gestures that are attached to containers above the widget
// get a chance to interact with the event before it reaches the target.
//
// After the capture phase, GTK+ emits the traditional
// Widget::button-press-event, Widget::button-release-event,
// Widget::touch-event, etc signals. Gestures with the GTK_PHASE_TARGET phase
// are fed events from the default Widget::event handlers.
//
// In the bubble phase, events are propagated up from the target widget to the
// toplevel, and gestures that are attached to containers above the widget get a
// chance to interact with events that have not been handled yet.
//
// # States of a sequence
//
// Whenever input interaction happens, a single event may trigger a cascade of
// Gestures, both across the parents of the widget receiving the event and in
// parallel within an individual widget. It is a responsibility of the widgets
// using those gestures to set the state of touch sequences accordingly in order
// to enable cooperation of gestures around the EventSequences triggering those.
//
// Within a widget, gestures can be grouped through gtk_gesture_group(),
// grouped gestures synchronize the state of sequences, so calling
// gtk_gesture_set_sequence_state() on one will effectively propagate the state
// throughout the group.
//
// By default, all sequences start out in the K_EVENT_SEQUENCE_NONE state,
// sequences in this state trigger the gesture event handler, but event
// propagation will continue unstopped by gestures.
//
// If a sequence enters into the K_EVENT_SEQUENCE_DENIED state, the gesture
// group will effectively ignore the sequence, letting events go unstopped
// through the gesture, but the "slot" will still remain occupied while the
// touch is active.
//
// If a sequence enters in the K_EVENT_SEQUENCE_CLAIMED state, the gesture group
// will grab all interaction on the sequence, by:
//
// - Setting the same sequence to K_EVENT_SEQUENCE_DENIED on every other
// gesture group within the widget, and every gesture on parent widgets in the
// propagation chain.
//
// - calling Gesture::cancel on every gesture in widgets underneath in the
// propagation chain.
//
// - Stopping event propagation after the gesture group handles the event.
//
// Note: if a sequence is set early to K_EVENT_SEQUENCE_CLAIMED on
// K_TOUCH_BEGIN/K_BUTTON_PRESS (so those events are captured before reaching
// the event widget, this implies K_PHASE_CAPTURE), one similar event will
// emulated if the sequence changes to K_EVENT_SEQUENCE_DENIED. This way event
// coherence is preserved before event propagation is unstopped again.
//
// Sequence states can't be changed freely, see gtk_gesture_set_sequence_state()
// to know about the possible lifetimes of a EventSequence.
//
// # Touchpad gestures
//
// On the platforms that support it, Gesture will handle transparently touchpad
// gesture events. The only precautions users of Gesture should do to enable
// this support are:
//
// - Enabling GDK_TOUCHPAD_GESTURE_MASK on their Windows
//
// - If the gesture has GTK_PHASE_NONE, ensuring events of type
// GDK_TOUCHPAD_SWIPE and GDK_TOUCHPAD_PINCH are handled by the Gesture.
type Gesture struct {
	_ [0]func() // equal guard
	EventController
}

var (
	_ EventControllerer = (*Gesture)(nil)
)

// Gesturer describes types inherited from class Gesture.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Gesturer interface {
	coreglib.Objector
	baseGesture() *Gesture
}

var _ Gesturer = (*Gesture)(nil)

func wrapGesture(obj *coreglib.Object) *Gesture {
	return &Gesture{
		EventController: EventController{
			Object: obj,
		},
	}
}

func marshalGesture(p uintptr) (interface{}, error) {
	return wrapGesture(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (gesture *Gesture) baseGesture() *Gesture {
	return gesture
}

// BaseGesture returns the underlying base object.
func BaseGesture(obj Gesturer) *Gesture {
	return obj.baseGesture()
}

// ConnectBegin: this signal is emitted when the gesture is recognized.
// This means the number of touch sequences matches Gesture:n-points, and the
// Gesture::check handler(s) returned UE.
//
// Note: These conditions may also happen when an extra touch (eg. a third touch
// on a 2-touches gesture) is lifted, in that situation sequence won't pertain
// to the current set of active touches, so don't rely on this being true.
func (gesture *Gesture) ConnectBegin(f func(sequence *gdk.EventSequence)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "begin", false, unsafe.Pointer(C._gotk4_gtk3_Gesture_ConnectBegin), f)
}

// ConnectCancel: this signal is emitted whenever a sequence is cancelled.
// This usually happens on active touches when gtk_event_controller_reset()
// is called on gesture (manually, due to grabs...), or the
// individual sequence was claimed by parent widgets' controllers (see
// gtk_gesture_set_sequence_state()).
//
// gesture must forget everything about sequence as a reaction to this signal.
func (gesture *Gesture) ConnectCancel(f func(sequence *gdk.EventSequence)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "cancel", false, unsafe.Pointer(C._gotk4_gtk3_Gesture_ConnectCancel), f)
}

// ConnectEnd: this signal is emitted when gesture either stopped recognizing
// the event sequences as something to be handled (the Gesture::check handler
// returned FALSE), or the number of touch sequences became higher or lower than
// Gesture:n-points.
//
// Note: sequence might not pertain to the group of sequences that were
// previously triggering recognition on gesture (ie. a just pressed touch
// sequence that exceeds Gesture:n-points). This situation may be detected by
// checking through gtk_gesture_handles_sequence().
func (gesture *Gesture) ConnectEnd(f func(sequence *gdk.EventSequence)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "end", false, unsafe.Pointer(C._gotk4_gtk3_Gesture_ConnectEnd), f)
}

// ConnectSequenceStateChanged: this signal is emitted whenever a sequence
// state changes. See gtk_gesture_set_sequence_state() to know more about the
// expectable sequence lifetimes.
func (gesture *Gesture) ConnectSequenceStateChanged(f func(sequence *gdk.EventSequence, state EventSequenceState)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "sequence-state-changed", false, unsafe.Pointer(C._gotk4_gtk3_Gesture_ConnectSequenceStateChanged), f)
}

// ConnectUpdate: this signal is emitted whenever an event is handled while the
// gesture is recognized. sequence is guaranteed to pertain to the set of active
// touches.
func (gesture *Gesture) ConnectUpdate(f func(sequence *gdk.EventSequence)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "update", false, unsafe.Pointer(C._gotk4_gtk3_Gesture_ConnectUpdate), f)
}

// BoundingBox: if there are touch sequences being currently handled by gesture,
// this function returns TRUE and fills in rect with the bounding box containing
// all active touches. Otherwise, FALSE will be returned.
//
// Note: This function will yield unexpected results on touchpad gestures.
// Since there is no correlation between physical and pixel distances,
// these will look as if constrained in an infinitely small area, rect width and
// height will thus be 0 regardless of the number of touchpoints.
//
// The function returns the following values:
//
//   - rect: bounding box containing all active touches.
//   - ok: TRUE if there are active touches, FALSE otherwise.
func (gesture *Gesture) BoundingBox() (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkGesture  // out
	var _arg1 C.GdkRectangle // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_bounding_box(_arg0, &_arg1)
	runtime.KeepAlive(gesture)

	var _rect *gdk.Rectangle // out
	var _ok bool             // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _rect, _ok
}

// BoundingBoxCenter: if there are touch sequences being currently handled by
// gesture, this function returns TRUE and fills in x and y with the center
// of the bounding box containing all active touches. Otherwise, FALSE will be
// returned.
//
// The function returns the following values:
//
//   - x: x coordinate for the bounding box center.
//   - y: y coordinate for the bounding box center.
//   - ok: FALSE if no active touches are present, TRUE otherwise.
func (gesture *Gesture) BoundingBoxCenter() (x, y float64, ok bool) {
	var _arg0 *C.GtkGesture // out
	var _arg1 C.gdouble     // in
	var _arg2 C.gdouble     // in
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_bounding_box_center(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(gesture)

	var _x float64 // out
	var _y float64 // out
	var _ok bool   // out

	_x = float64(_arg1)
	_y = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _x, _y, _ok
}

// Device returns the master Device that is currently operating on gesture,
// or NULL if the gesture is not being interacted.
//
// The function returns the following values:
//
//   - device (optional) or NULL.
func (gesture *Gesture) Device() gdk.Devicer {
	var _arg0 *C.GtkGesture // out
	var _cret *C.GdkDevice  // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_device(_arg0)
	runtime.KeepAlive(gesture)

	var _device gdk.Devicer // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Devicer)
				return ok
			})
			rv, ok := casted.(gdk.Devicer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Devicer")
			}
			_device = rv
		}
	}

	return _device
}

// GetGroup returns all gestures in the group of gesture.
//
// The function returns the following values:
//
//   - list: list of Gestures, free with g_list_free().
func (gesture *Gesture) GetGroup() []Gesturer {
	var _arg0 *C.GtkGesture // out
	var _cret *C.GList      // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_group(_arg0)
	runtime.KeepAlive(gesture)

	var _list []Gesturer // out

	_list = make([]Gesturer, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkGesture)(v)
		var dst Gesturer // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Gesturer is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Gesturer)
				return ok
			})
			rv, ok := casted.(Gesturer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Gesturer")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// LastEvent returns the last event that was processed for sequence.
//
// Note that the returned pointer is only valid as long as the sequence is still
// interpreted by the gesture. If in doubt, you should make a copy of the event.
//
// The function takes the following parameters:
//
//   - sequence (optional): EventSequence.
//
// The function returns the following values:
//
//   - event (optional): last event from sequence.
func (gesture *Gesture) LastEvent(sequence *gdk.EventSequence) *gdk.Event {
	var _arg0 *C.GtkGesture       // out
	var _arg1 *C.GdkEventSequence // out
	var _cret *C.GdkEvent         // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if sequence != nil {
		_arg1 = (*C.GdkEventSequence)(gextras.StructNative(unsafe.Pointer(sequence)))
	}

	_cret = C.gtk_gesture_get_last_event(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(sequence)

	var _event *gdk.Event // out

	if _cret != nil {
		{
			v := (*gdk.Event)(gextras.NewStructNative(unsafe.Pointer(_cret)))
			v = gdk.CopyEventer(v)
			_event = v
		}
	}

	return _event
}

// LastUpdatedSequence returns the EventSequence that was last updated on
// gesture.
//
// The function returns the following values:
//
//   - eventSequence (optional): last updated sequence.
func (gesture *Gesture) LastUpdatedSequence() *gdk.EventSequence {
	var _arg0 *C.GtkGesture       // out
	var _cret *C.GdkEventSequence // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_last_updated_sequence(_arg0)
	runtime.KeepAlive(gesture)

	var _eventSequence *gdk.EventSequence // out

	if _cret != nil {
		_eventSequence = (*gdk.EventSequence)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	}

	return _eventSequence
}

// Point: if sequence is currently being interpreted by gesture, this function
// returns TRUE and fills in x and y with the last coordinates stored for that
// event sequence. The coordinates are always relative to the widget allocation.
//
// The function takes the following parameters:
//
//   - sequence (optional) or NULL for pointer events.
//
// The function returns the following values:
//
//   - x (optional): return location for X axis of the sequence coordinates.
//   - y (optional): return location for Y axis of the sequence coordinates.
//   - ok: TRUE if sequence is currently interpreted.
func (gesture *Gesture) Point(sequence *gdk.EventSequence) (x, y float64, ok bool) {
	var _arg0 *C.GtkGesture       // out
	var _arg1 *C.GdkEventSequence // out
	var _arg2 C.gdouble           // in
	var _arg3 C.gdouble           // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if sequence != nil {
		_arg1 = (*C.GdkEventSequence)(gextras.StructNative(unsafe.Pointer(sequence)))
	}

	_cret = C.gtk_gesture_get_point(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(sequence)

	var _x float64 // out
	var _y float64 // out
	var _ok bool   // out

	_x = float64(_arg2)
	_y = float64(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _x, _y, _ok
}

// SequenceState returns the sequence state, as seen by gesture.
//
// The function takes the following parameters:
//
//   - sequence: EventSequence.
//
// The function returns the following values:
//
//   - eventSequenceState: sequence state in gesture.
func (gesture *Gesture) SequenceState(sequence *gdk.EventSequence) EventSequenceState {
	var _arg0 *C.GtkGesture           // out
	var _arg1 *C.GdkEventSequence     // out
	var _cret C.GtkEventSequenceState // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = (*C.GdkEventSequence)(gextras.StructNative(unsafe.Pointer(sequence)))

	_cret = C.gtk_gesture_get_sequence_state(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(sequence)

	var _eventSequenceState EventSequenceState // out

	_eventSequenceState = EventSequenceState(_cret)

	return _eventSequenceState
}

// Sequences returns the list of EventSequences currently being interpreted by
// gesture.
//
// The function returns the following values:
//
//   - list: list of EventSequences, the list elements are owned by GTK+ and
//     must not be freed or modified, the list itself must be deleted through
//     g_list_free().
func (gesture *Gesture) Sequences() []*gdk.EventSequence {
	var _arg0 *C.GtkGesture // out
	var _cret *C.GList      // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_sequences(_arg0)
	runtime.KeepAlive(gesture)

	var _list []*gdk.EventSequence // out

	_list = make([]*gdk.EventSequence, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GdkEventSequence)(v)
		var dst *gdk.EventSequence // out
		dst = (*gdk.EventSequence)(gextras.NewStructNative(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// Window returns the user-defined window that receives the events handled by
// gesture. See gtk_gesture_set_window() for more information.
//
// The function returns the following values:
//
//   - window (optional): user defined window, or NULL if none.
func (gesture *Gesture) Window() gdk.Windower {
	var _arg0 *C.GtkGesture // out
	var _cret *C.GdkWindow  // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_get_window(_arg0)
	runtime.KeepAlive(gesture)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

// Group adds gesture to the same group than group_gesture. Gestures are by
// default isolated in their own groups.
//
// When gestures are grouped, the state of EventSequences is kept in sync
// for all of those, so calling gtk_gesture_set_sequence_state(), on one will
// transfer the same value to the others.
//
// Groups also perform an "implicit grabbing" of sequences, if a EventSequence
// state is set to K_EVENT_SEQUENCE_CLAIMED on one group, every other gesture
// group attached to the same Widget will switch the state for that sequence to
// K_EVENT_SEQUENCE_DENIED.
//
// The function takes the following parameters:
//
//   - gesture: Gesture.
func (groupGesture *Gesture) Group(gesture Gesturer) {
	var _arg0 *C.GtkGesture // out
	var _arg1 *C.GtkGesture // out

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(groupGesture).Native()))
	_arg1 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	C.gtk_gesture_group(_arg0, _arg1)
	runtime.KeepAlive(groupGesture)
	runtime.KeepAlive(gesture)
}

// HandlesSequence returns TRUE if gesture is currently handling events
// corresponding to sequence.
//
// The function takes the following parameters:
//
//   - sequence (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: TRUE if gesture is handling sequence, FALSE otherwise.
func (gesture *Gesture) HandlesSequence(sequence *gdk.EventSequence) bool {
	var _arg0 *C.GtkGesture       // out
	var _arg1 *C.GdkEventSequence // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if sequence != nil {
		_arg1 = (*C.GdkEventSequence)(gextras.StructNative(unsafe.Pointer(sequence)))
	}

	_cret = C.gtk_gesture_handles_sequence(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(sequence)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsActive returns TRUE if the gesture is currently active. A gesture is active
// meanwhile there are touch sequences interacting with it.
//
// The function returns the following values:
//
//   - ok: TRUE if gesture is active.
func (gesture *Gesture) IsActive() bool {
	var _arg0 *C.GtkGesture // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_is_active(_arg0)
	runtime.KeepAlive(gesture)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsGroupedWith returns TRUE if both gestures pertain to the same group.
//
// The function takes the following parameters:
//
//   - other Gesture.
//
// The function returns the following values:
//
//   - ok: whether the gestures are grouped.
func (gesture *Gesture) IsGroupedWith(other Gesturer) bool {
	var _arg0 *C.GtkGesture // out
	var _arg1 *C.GtkGesture // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(other).Native()))

	_cret = C.gtk_gesture_is_grouped_with(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(other)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsRecognized returns TRUE if the gesture is currently recognized. A gesture
// is recognized if there are as many interacting touch sequences as required by
// gesture, and Gesture::check returned TRUE for the sequences being currently
// interpreted.
//
// The function returns the following values:
//
//   - ok: TRUE if gesture is recognized.
func (gesture *Gesture) IsRecognized() bool {
	var _arg0 *C.GtkGesture // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_is_recognized(_arg0)
	runtime.KeepAlive(gesture)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetSequenceState sets the state of sequence in gesture. Sequences start in
// state K_EVENT_SEQUENCE_NONE, and whenever they change state, they can never
// go back to that state. Likewise, sequences in state K_EVENT_SEQUENCE_DENIED
// cannot turn back to a not denied state. With these rules, the lifetime of an
// event sequence is constrained to the next four:
//
// * None * None → Denied * None → Claimed * None → Claimed → Denied
//
// Note: Due to event handling ordering, it may be unsafe to set the state on
// another gesture within a Gesture::begin signal handler, as the callback might
// be executed before the other gesture knows about the sequence. A safe way to
// perform this could be:
//
//	static void
//	first_gesture_begin_cb (GtkGesture       *first_gesture,
//	                        GdkEventSequence *sequence,
//	                        gpointer          user_data)
//	{
//	  gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
//	  gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
//	}
//
//	static void
//	second_gesture_begin_cb (GtkGesture       *second_gesture,
//	                         GdkEventSequence *sequence,
//	                         gpointer          user_data)
//	{
//	  if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
//	    gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
//	}
//
// If both gestures are in the same group, just set the state on the gesture
// emitting the event, the sequence will be already be initialized to the
// group's global state when the second gesture processes the event.
//
// The function takes the following parameters:
//
//   - sequence: EventSequence.
//   - state: sequence state.
//
// The function returns the following values:
//
//   - ok: TRUE if sequence is handled by gesture, and the state is changed
//     successfully.
func (gesture *Gesture) SetSequenceState(sequence *gdk.EventSequence, state EventSequenceState) bool {
	var _arg0 *C.GtkGesture           // out
	var _arg1 *C.GdkEventSequence     // out
	var _arg2 C.GtkEventSequenceState // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = (*C.GdkEventSequence)(gextras.StructNative(unsafe.Pointer(sequence)))
	_arg2 = C.GtkEventSequenceState(state)

	_cret = C.gtk_gesture_set_sequence_state(_arg0, _arg1, _arg2)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(sequence)
	runtime.KeepAlive(state)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetState sets the state of all sequences that gesture is currently
// interacting with. See gtk_gesture_set_sequence_state() for more details on
// sequence states.
//
// The function takes the following parameters:
//
//   - state: sequence state.
//
// The function returns the following values:
//
//   - ok: TRUE if the state of at least one sequence was changed successfully.
func (gesture *Gesture) SetState(state EventSequenceState) bool {
	var _arg0 *C.GtkGesture           // out
	var _arg1 C.GtkEventSequenceState // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = C.GtkEventSequenceState(state)

	_cret = C.gtk_gesture_set_state(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(state)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetWindow sets a specific window to receive events about, so gesture will
// effectively handle only events targeting window, or a child of it. window
// must pertain to gtk_event_controller_get_widget().
//
// The function takes the following parameters:
//
//   - window (optional) or NULL.
func (gesture *Gesture) SetWindow(window gdk.Windower) {
	var _arg0 *C.GtkGesture // out
	var _arg1 *C.GdkWindow  // out

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if window != nil {
		_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	}

	C.gtk_gesture_set_window(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(window)
}

// Ungroup separates gesture into an isolated group.
func (gesture *Gesture) Ungroup() {
	var _arg0 *C.GtkGesture // out

	_arg0 = (*C.GtkGesture)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	C.gtk_gesture_ungroup(_arg0)
	runtime.KeepAlive(gesture)
}

// GestureDrag is a Gesture implementation that recognizes drag operations. The
// drag operation itself can be tracked throught the GestureDrag::drag-begin,
// GestureDrag::drag-update and GestureDrag::drag-end signals, or the
// relevant coordinates be extracted through gtk_gesture_drag_get_offset() and
// gtk_gesture_drag_get_start_point().
type GestureDrag struct {
	_ [0]func() // equal guard
	GestureSingle
}

var (
	_ Gesturer = (*GestureDrag)(nil)
)

func wrapGestureDrag(obj *coreglib.Object) *GestureDrag {
	return &GestureDrag{
		GestureSingle: GestureSingle{
			Gesture: Gesture{
				EventController: EventController{
					Object: obj,
				},
			},
		},
	}
}

func marshalGestureDrag(p uintptr) (interface{}, error) {
	return wrapGestureDrag(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDragBegin: this signal is emitted whenever dragging starts.
func (gesture *GestureDrag) ConnectDragBegin(f func(startX, startY float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "drag-begin", false, unsafe.Pointer(C._gotk4_gtk3_GestureDrag_ConnectDragBegin), f)
}

// ConnectDragEnd: this signal is emitted whenever the dragging is finished.
func (gesture *GestureDrag) ConnectDragEnd(f func(offsetX, offsetY float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "drag-end", false, unsafe.Pointer(C._gotk4_gtk3_GestureDrag_ConnectDragEnd), f)
}

// ConnectDragUpdate: this signal is emitted whenever the dragging point moves.
func (gesture *GestureDrag) ConnectDragUpdate(f func(offsetX, offsetY float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "drag-update", false, unsafe.Pointer(C._gotk4_gtk3_GestureDrag_ConnectDragUpdate), f)
}

// NewGestureDrag returns a newly created Gesture that recognizes drags.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureDrag: newly created GestureDrag.
func NewGestureDrag(widget Widgetter) *GestureDrag {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_drag_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureDrag *GestureDrag // out

	_gestureDrag = wrapGestureDrag(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureDrag
}

// Offset: if the gesture is active, this function returns TRUE and fills in x
// and y with the coordinates of the current point, as an offset to the starting
// drag point.
//
// The function returns the following values:
//
//   - x (optional): x offset for the current point.
//   - y (optional): y offset for the current point.
//   - ok: TRUE if the gesture is active.
func (gesture *GestureDrag) Offset() (x, y float64, ok bool) {
	var _arg0 *C.GtkGestureDrag // out
	var _arg1 C.gdouble         // in
	var _arg2 C.gdouble         // in
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkGestureDrag)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_drag_get_offset(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(gesture)

	var _x float64 // out
	var _y float64 // out
	var _ok bool   // out

	_x = float64(_arg1)
	_y = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _x, _y, _ok
}

// StartPoint: if the gesture is active, this function returns TRUE and fills in
// x and y with the drag start coordinates, in window-relative coordinates.
//
// The function returns the following values:
//
//   - x (optional): x coordinate for the drag start point.
//   - y (optional): y coordinate for the drag start point.
//   - ok: TRUE if the gesture is active.
func (gesture *GestureDrag) StartPoint() (x, y float64, ok bool) {
	var _arg0 *C.GtkGestureDrag // out
	var _arg1 C.gdouble         // in
	var _arg2 C.gdouble         // in
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkGestureDrag)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_drag_get_start_point(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(gesture)

	var _x float64 // out
	var _y float64 // out
	var _ok bool   // out

	_x = float64(_arg1)
	_y = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _x, _y, _ok
}

// GestureLongPress is a Gesture implementation able to recognize long presses,
// triggering the GestureLongPress::pressed after the timeout is exceeded.
//
// If the touchpoint is lifted before the timeout passes, or if it drifts too
// far of the initial press point, the GestureLongPress::cancelled signal will
// be emitted.
type GestureLongPress struct {
	_ [0]func() // equal guard
	GestureSingle
}

var (
	_ Gesturer = (*GestureLongPress)(nil)
)

func wrapGestureLongPress(obj *coreglib.Object) *GestureLongPress {
	return &GestureLongPress{
		GestureSingle: GestureSingle{
			Gesture: Gesture{
				EventController: EventController{
					Object: obj,
				},
			},
		},
	}
}

func marshalGestureLongPress(p uintptr) (interface{}, error) {
	return wrapGestureLongPress(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectCancelled: this signal is emitted whenever a press moved too far,
// or was released before GestureLongPress::pressed happened.
func (v *GestureLongPress) ConnectCancelled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "cancelled", false, unsafe.Pointer(C._gotk4_gtk3_GestureLongPress_ConnectCancelled), f)
}

// ConnectPressed: this signal is emitted whenever a press goes
// unmoved/unreleased longer than what the GTK+ defaults tell.
func (v *GestureLongPress) ConnectPressed(f func(x, y float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "pressed", false, unsafe.Pointer(C._gotk4_gtk3_GestureLongPress_ConnectPressed), f)
}

// NewGestureLongPress returns a newly created Gesture that recognizes long
// presses.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureLongPress: newly created GestureLongPress.
func NewGestureLongPress(widget Widgetter) *GestureLongPress {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_long_press_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureLongPress *GestureLongPress // out

	_gestureLongPress = wrapGestureLongPress(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureLongPress
}

// GestureMultiPress is a Gesture implementation able to recognize
// multiple clicks on a nearby zone, which can be listened for through the
// GestureMultiPress::pressed signal. Whenever time or distance between clicks
// exceed the GTK+ defaults, GestureMultiPress::stopped is emitted, and the
// click counter is reset.
//
// Callers may also restrict the area that is considered valid for a >1
// touch/button press through gtk_gesture_multi_press_set_area(), so any click
// happening outside that area is considered to be a first click of its own.
type GestureMultiPress struct {
	_ [0]func() // equal guard
	GestureSingle
}

var (
	_ Gesturer = (*GestureMultiPress)(nil)
)

func wrapGestureMultiPress(obj *coreglib.Object) *GestureMultiPress {
	return &GestureMultiPress{
		GestureSingle: GestureSingle{
			Gesture: Gesture{
				EventController: EventController{
					Object: obj,
				},
			},
		},
	}
}

func marshalGestureMultiPress(p uintptr) (interface{}, error) {
	return wrapGestureMultiPress(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectPressed: this signal is emitted whenever a button or touch press
// happens.
func (gesture *GestureMultiPress) ConnectPressed(f func(nPress int, x, y float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "pressed", false, unsafe.Pointer(C._gotk4_gtk3_GestureMultiPress_ConnectPressed), f)
}

// ConnectReleased: this signal is emitted when a button or touch is released.
// n_press will report the number of press that is paired to this event,
// note that GestureMultiPress::stopped may have been emitted between the press
// and its release, n_press will only start over at the next press.
func (gesture *GestureMultiPress) ConnectReleased(f func(nPress int, x, y float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "released", false, unsafe.Pointer(C._gotk4_gtk3_GestureMultiPress_ConnectReleased), f)
}

// ConnectStopped: this signal is emitted whenever any time/distance threshold
// has been exceeded.
func (gesture *GestureMultiPress) ConnectStopped(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "stopped", false, unsafe.Pointer(C._gotk4_gtk3_GestureMultiPress_ConnectStopped), f)
}

// NewGestureMultiPress returns a newly created Gesture that recognizes single
// and multiple presses.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureMultiPress: newly created GestureMultiPress.
func NewGestureMultiPress(widget Widgetter) *GestureMultiPress {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_multi_press_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureMultiPress *GestureMultiPress // out

	_gestureMultiPress = wrapGestureMultiPress(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureMultiPress
}

// Area: if an area was set through gtk_gesture_multi_press_set_area(),
// this function will return TRUE and fill in rect with the press area.
// See gtk_gesture_multi_press_set_area() for more details on what the press
// area represents.
//
// The function returns the following values:
//
//   - rect: return location for the press area.
//   - ok: TRUE if rect was filled with the press area.
func (gesture *GestureMultiPress) Area() (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkGestureMultiPress // out
	var _arg1 C.GdkRectangle          // in
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkGestureMultiPress)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_multi_press_get_area(_arg0, &_arg1)
	runtime.KeepAlive(gesture)

	var _rect *gdk.Rectangle // out
	var _ok bool             // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _rect, _ok
}

// SetArea: if rect is non-NULL, the press area will be checked to be confined
// within the rectangle, otherwise the button count will be reset so the press
// is seen as being the first one. If rect is NULL, the area will be reset to an
// unrestricted state.
//
// Note: The rectangle is only used to determine whether any non-first click
// falls within the expected area. This is not akin to an input shape.
//
// The function takes the following parameters:
//
//   - rect (optional): rectangle to receive coordinates on.
func (gesture *GestureMultiPress) SetArea(rect *gdk.Rectangle) {
	var _arg0 *C.GtkGestureMultiPress // out
	var _arg1 *C.GdkRectangle         // out

	_arg0 = (*C.GtkGestureMultiPress)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if rect != nil {
		_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(rect)))
	}

	C.gtk_gesture_multi_press_set_area(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(rect)
}

// GesturePan is a Gesture implementation able to recognize pan gestures,
// those are drags that are locked to happen along one axis. The axis that a
// GesturePan handles is defined at construct time, and can be changed through
// gtk_gesture_pan_set_orientation().
//
// When the gesture starts to be recognized, GesturePan will attempt to
// determine as early as possible whether the sequence is moving in the expected
// direction, and denying the sequence if this does not happen.
//
// Once a panning gesture along the expected axis is recognized,
// the GesturePan::pan signal will be emitted as input events are received,
// containing the offset in the given axis.
type GesturePan struct {
	_ [0]func() // equal guard
	GestureDrag
}

var (
	_ Gesturer = (*GesturePan)(nil)
)

func wrapGesturePan(obj *coreglib.Object) *GesturePan {
	return &GesturePan{
		GestureDrag: GestureDrag{
			GestureSingle: GestureSingle{
				Gesture: Gesture{
					EventController: EventController{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalGesturePan(p uintptr) (interface{}, error) {
	return wrapGesturePan(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectPan: this signal is emitted once a panning gesture along the expected
// axis is detected.
func (gesture *GesturePan) ConnectPan(f func(direction PanDirection, offset float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "pan", false, unsafe.Pointer(C._gotk4_gtk3_GesturePan_ConnectPan), f)
}

// NewGesturePan returns a newly created Gesture that recognizes pan gestures.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - orientation: expected orientation.
//
// The function returns the following values:
//
//   - gesturePan: newly created GesturePan.
func NewGesturePan(widget Widgetter, orientation Orientation) *GesturePan {
	var _arg1 *C.GtkWidget     // out
	var _arg2 C.GtkOrientation // out
	var _cret *C.GtkGesture    // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkOrientation(orientation)

	_cret = C.gtk_gesture_pan_new(_arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(orientation)

	var _gesturePan *GesturePan // out

	_gesturePan = wrapGesturePan(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gesturePan
}

// Orientation returns the orientation of the pan gestures that this gesture
// expects.
//
// The function returns the following values:
//
//   - orientation: expected orientation for pan gestures.
func (gesture *GesturePan) Orientation() Orientation {
	var _arg0 *C.GtkGesturePan // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkGesturePan)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_pan_get_orientation(_arg0)
	runtime.KeepAlive(gesture)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// SetOrientation sets the orientation to be expected on pan gestures.
//
// The function takes the following parameters:
//
//   - orientation: expected orientation.
func (gesture *GesturePan) SetOrientation(orientation Orientation) {
	var _arg0 *C.GtkGesturePan // out
	var _arg1 C.GtkOrientation // out

	_arg0 = (*C.GtkGesturePan)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = C.GtkOrientation(orientation)

	C.gtk_gesture_pan_set_orientation(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(orientation)
}

// GestureRotate is a Gesture implementation able to recognize 2-finger
// rotations, whenever the angle between both handled sequences changes,
// the GestureRotate::angle-changed signal is emitted.
type GestureRotate struct {
	_ [0]func() // equal guard
	Gesture
}

var (
	_ Gesturer = (*GestureRotate)(nil)
)

func wrapGestureRotate(obj *coreglib.Object) *GestureRotate {
	return &GestureRotate{
		Gesture: Gesture{
			EventController: EventController{
				Object: obj,
			},
		},
	}
}

func marshalGestureRotate(p uintptr) (interface{}, error) {
	return wrapGestureRotate(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectAngleChanged: this signal is emitted when the angle between both
// tracked points changes.
func (gesture *GestureRotate) ConnectAngleChanged(f func(angle, angleDelta float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "angle-changed", false, unsafe.Pointer(C._gotk4_gtk3_GestureRotate_ConnectAngleChanged), f)
}

// NewGestureRotate returns a newly created Gesture that recognizes 2-touch
// rotation gestures.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureRotate: newly created GestureRotate.
func NewGestureRotate(widget Widgetter) *GestureRotate {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_rotate_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureRotate *GestureRotate // out

	_gestureRotate = wrapGestureRotate(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureRotate
}

// AngleDelta: if gesture is active, this function returns the angle difference
// in radians since the gesture was first recognized. If gesture is not active,
// 0 is returned.
//
// The function returns the following values:
//
//   - gdouble: angle delta in radians.
func (gesture *GestureRotate) AngleDelta() float64 {
	var _arg0 *C.GtkGestureRotate // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkGestureRotate)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_rotate_get_angle_delta(_arg0)
	runtime.KeepAlive(gesture)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// GestureSingle is a subclass of Gesture, optimized (although not restricted)
// for dealing with mouse and single-touch gestures. Under interaction,
// these gestures stick to the first interacting sequence, which is accessible
// through gtk_gesture_single_get_current_sequence() while the gesture is being
// interacted with.
//
// By default gestures react to both GDK_BUTTON_PRIMARY and touch events,
// gtk_gesture_single_set_touch_only() can be used to change the touch behavior.
// Callers may also specify a different mouse button number to interact with
// through gtk_gesture_single_set_button(), or react to any mouse button by
// setting 0. While the gesture is active, the button being currently pressed
// can be known through gtk_gesture_single_get_current_button().
type GestureSingle struct {
	_ [0]func() // equal guard
	Gesture
}

var (
	_ Gesturer = (*GestureSingle)(nil)
)

func wrapGestureSingle(obj *coreglib.Object) *GestureSingle {
	return &GestureSingle{
		Gesture: Gesture{
			EventController: EventController{
				Object: obj,
			},
		},
	}
}

func marshalGestureSingle(p uintptr) (interface{}, error) {
	return wrapGestureSingle(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Button returns the button number gesture listens for, or 0 if gesture reacts
// to any button press.
//
// The function returns the following values:
//
//   - guint: button number, or 0 for any button.
func (gesture *GestureSingle) Button() uint {
	var _arg0 *C.GtkGestureSingle // out
	var _cret C.guint             // in

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_single_get_button(_arg0)
	runtime.KeepAlive(gesture)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// CurrentButton returns the button number currently interacting with gesture,
// or 0 if there is none.
//
// The function returns the following values:
//
//   - guint: current button number.
func (gesture *GestureSingle) CurrentButton() uint {
	var _arg0 *C.GtkGestureSingle // out
	var _cret C.guint             // in

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_single_get_current_button(_arg0)
	runtime.KeepAlive(gesture)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// CurrentSequence returns the event sequence currently interacting with
// gesture. This is only meaningful if gtk_gesture_is_active() returns TRUE.
//
// The function returns the following values:
//
//   - eventSequence (optional): current sequence.
func (gesture *GestureSingle) CurrentSequence() *gdk.EventSequence {
	var _arg0 *C.GtkGestureSingle // out
	var _cret *C.GdkEventSequence // in

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_single_get_current_sequence(_arg0)
	runtime.KeepAlive(gesture)

	var _eventSequence *gdk.EventSequence // out

	if _cret != nil {
		_eventSequence = (*gdk.EventSequence)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_eventSequence)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.free(intern.C)
			},
		)
	}

	return _eventSequence
}

// Exclusive gets whether a gesture is exclusive. For more information,
// see gtk_gesture_single_set_exclusive().
//
// The function returns the following values:
//
//   - ok: whether the gesture is exclusive.
func (gesture *GestureSingle) Exclusive() bool {
	var _arg0 *C.GtkGestureSingle // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_single_get_exclusive(_arg0)
	runtime.KeepAlive(gesture)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TouchOnly returns TRUE if the gesture is only triggered by touch events.
//
// The function returns the following values:
//
//   - ok: TRUE if the gesture only handles touch events.
func (gesture *GestureSingle) TouchOnly() bool {
	var _arg0 *C.GtkGestureSingle // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_single_get_touch_only(_arg0)
	runtime.KeepAlive(gesture)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetButton sets the button number gesture listens to. If non-0, every button
// press from a different button number will be ignored. Touch events implicitly
// match with button 1.
//
// The function takes the following parameters:
//
//   - button number to listen to, or 0 for any button.
func (gesture *GestureSingle) SetButton(button uint) {
	var _arg0 *C.GtkGestureSingle // out
	var _arg1 C.guint             // out

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = C.guint(button)

	C.gtk_gesture_single_set_button(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(button)
}

// SetExclusive sets whether gesture is exclusive. An exclusive gesture will
// only handle pointer and "pointer emulated" touch events, so at any given
// time, there is only one sequence able to interact with those.
//
// The function takes the following parameters:
//
//   - exclusive: TRUE to make gesture exclusive.
func (gesture *GestureSingle) SetExclusive(exclusive bool) {
	var _arg0 *C.GtkGestureSingle // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if exclusive {
		_arg1 = C.TRUE
	}

	C.gtk_gesture_single_set_exclusive(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(exclusive)
}

// SetTouchOnly: if touch_only is TRUE, gesture will only handle events of type
// K_TOUCH_BEGIN, K_TOUCH_UPDATE or K_TOUCH_END. If FALSE, mouse events will be
// handled too.
//
// The function takes the following parameters:
//
//   - touchOnly: whether gesture handles only touch events.
func (gesture *GestureSingle) SetTouchOnly(touchOnly bool) {
	var _arg0 *C.GtkGestureSingle // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkGestureSingle)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	if touchOnly {
		_arg1 = C.TRUE
	}

	C.gtk_gesture_single_set_touch_only(_arg0, _arg1)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(touchOnly)
}

// GestureStylus is a Gesture implementation specific to stylus input. The
// provided signals just provide the basic information.
type GestureStylus struct {
	_ [0]func() // equal guard
	GestureSingle
}

var (
	_ Gesturer = (*GestureStylus)(nil)
)

func wrapGestureStylus(obj *coreglib.Object) *GestureStylus {
	return &GestureStylus{
		GestureSingle: GestureSingle{
			Gesture: Gesture{
				EventController: EventController{
					Object: obj,
				},
			},
		},
	}
}

func marshalGestureStylus(p uintptr) (interface{}, error) {
	return wrapGestureStylus(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (gesture *GestureStylus) ConnectDown(f func(object, p0 float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "down", false, unsafe.Pointer(C._gotk4_gtk3_GestureStylus_ConnectDown), f)
}

func (gesture *GestureStylus) ConnectMotion(f func(object, p0 float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "motion", false, unsafe.Pointer(C._gotk4_gtk3_GestureStylus_ConnectMotion), f)
}

func (gesture *GestureStylus) ConnectProximity(f func(object, p0 float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "proximity", false, unsafe.Pointer(C._gotk4_gtk3_GestureStylus_ConnectProximity), f)
}

func (gesture *GestureStylus) ConnectUp(f func(object, p0 float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "up", false, unsafe.Pointer(C._gotk4_gtk3_GestureStylus_ConnectUp), f)
}

// NewGestureStylus creates a new GestureStylus.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureStylus: newly created stylus gesture.
func NewGestureStylus(widget Widgetter) *GestureStylus {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_stylus_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureStylus *GestureStylus // out

	_gestureStylus = wrapGestureStylus(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureStylus
}

// Axis returns the current value for the requested axis. This function
// must be called from either the GestureStylus:down, GestureStylus:motion,
// GestureStylus:up or GestureStylus:proximity signals.
//
// The function takes the following parameters:
//
//   - axis: requested device axis.
//
// The function returns the following values:
//
//   - value: return location for the axis value.
//   - ok if there is a current value for the axis.
func (gesture *GestureStylus) Axis(axis gdk.AxisUse) (float64, bool) {
	var _arg0 *C.GtkGestureStylus // out
	var _arg1 C.GdkAxisUse        // out
	var _arg2 C.gdouble           // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkGestureStylus)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))
	_arg1 = C.GdkAxisUse(axis)

	_cret = C.gtk_gesture_stylus_get_axis(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(gesture)
	runtime.KeepAlive(axis)

	var _value float64 // out
	var _ok bool       // out

	_value = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _value, _ok
}

// DeviceTool returns the DeviceTool currently driving input through this
// gesture. This function must be called from either the GestureStylus::down,
// GestureStylus::motion, GestureStylus::up or GestureStylus::proximity signal
// handlers.
//
// The function returns the following values:
//
//   - deviceTool (optional): current stylus tool.
func (gesture *GestureStylus) DeviceTool() *gdk.DeviceTool {
	var _arg0 *C.GtkGestureStylus // out
	var _cret *C.GdkDeviceTool    // in

	_arg0 = (*C.GtkGestureStylus)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_stylus_get_device_tool(_arg0)
	runtime.KeepAlive(gesture)

	var _deviceTool *gdk.DeviceTool // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_deviceTool = &gdk.DeviceTool{
				Object: obj,
			}
		}
	}

	return _deviceTool
}

// GestureSwipe is a Gesture implementation able to recognize swipes, after a
// press/move/.../move/release sequence happens, the GestureSwipe::swipe signal
// will be emitted, providing the velocity and directionality of the sequence at
// the time it was lifted.
//
// If the velocity is desired in intermediate points,
// gtk_gesture_swipe_get_velocity() can be called on eg. a Gesture::update
// handler.
//
// All velocities are reported in pixels/sec units.
type GestureSwipe struct {
	_ [0]func() // equal guard
	GestureSingle
}

var (
	_ Gesturer = (*GestureSwipe)(nil)
)

func wrapGestureSwipe(obj *coreglib.Object) *GestureSwipe {
	return &GestureSwipe{
		GestureSingle: GestureSingle{
			Gesture: Gesture{
				EventController: EventController{
					Object: obj,
				},
			},
		},
	}
}

func marshalGestureSwipe(p uintptr) (interface{}, error) {
	return wrapGestureSwipe(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectSwipe: this signal is emitted when the recognized gesture is finished,
// velocity and direction are a product of previously recorded events.
func (gesture *GestureSwipe) ConnectSwipe(f func(velocityX, velocityY float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "swipe", false, unsafe.Pointer(C._gotk4_gtk3_GestureSwipe_ConnectSwipe), f)
}

// NewGestureSwipe returns a newly created Gesture that recognizes swipes.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureSwipe: newly created GestureSwipe.
func NewGestureSwipe(widget Widgetter) *GestureSwipe {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_swipe_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureSwipe *GestureSwipe // out

	_gestureSwipe = wrapGestureSwipe(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureSwipe
}

// Velocity: if the gesture is recognized, this function returns TRUE and fill
// in velocity_x and velocity_y with the recorded velocity, as per the last
// event(s) processed.
//
// The function returns the following values:
//
//   - velocityX: return value for the velocity in the X axis, in pixels/sec.
//   - velocityY: return value for the velocity in the Y axis, in pixels/sec.
//   - ok: whether velocity could be calculated.
func (gesture *GestureSwipe) Velocity() (velocityX, velocityY float64, ok bool) {
	var _arg0 *C.GtkGestureSwipe // out
	var _arg1 C.gdouble          // in
	var _arg2 C.gdouble          // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkGestureSwipe)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_swipe_get_velocity(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(gesture)

	var _velocityX float64 // out
	var _velocityY float64 // out
	var _ok bool           // out

	_velocityX = float64(_arg1)
	_velocityY = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _velocityX, _velocityY, _ok
}

// GestureZoom is a Gesture implementation able to recognize pinch/zoom
// gestures, whenever the distance between both tracked sequences changes,
// the GestureZoom::scale-changed signal is emitted to report the scale factor.
type GestureZoom struct {
	_ [0]func() // equal guard
	Gesture
}

var (
	_ Gesturer = (*GestureZoom)(nil)
)

func wrapGestureZoom(obj *coreglib.Object) *GestureZoom {
	return &GestureZoom{
		Gesture: Gesture{
			EventController: EventController{
				Object: obj,
			},
		},
	}
}

func marshalGestureZoom(p uintptr) (interface{}, error) {
	return wrapGestureZoom(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectScaleChanged: this signal is emitted whenever the distance between
// both tracked sequences changes.
func (gesture *GestureZoom) ConnectScaleChanged(f func(scale float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(gesture, "scale-changed", false, unsafe.Pointer(C._gotk4_gtk3_GestureZoom_ConnectScaleChanged), f)
}

// NewGestureZoom returns a newly created Gesture that recognizes zoom in/out
// gestures (usually known as pinch/zoom).
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - gestureZoom: newly created GestureZoom.
func NewGestureZoom(widget Widgetter) *GestureZoom {
	var _arg1 *C.GtkWidget  // out
	var _cret *C.GtkGesture // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_gesture_zoom_new(_arg1)
	runtime.KeepAlive(widget)

	var _gestureZoom *GestureZoom // out

	_gestureZoom = wrapGestureZoom(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _gestureZoom
}

// ScaleDelta: if gesture is active, this function returns the zooming
// difference since the gesture was recognized (hence the starting point is
// considered 1:1). If gesture is not active, 1 is returned.
//
// The function returns the following values:
//
//   - gdouble: scale delta.
func (gesture *GestureZoom) ScaleDelta() float64 {
	var _arg0 *C.GtkGestureZoom // out
	var _cret C.gdouble         // in

	_arg0 = (*C.GtkGestureZoom)(unsafe.Pointer(coreglib.InternObject(gesture).Native()))

	_cret = C.gtk_gesture_zoom_get_scale_delta(_arg0)
	runtime.KeepAlive(gesture)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// GridOverrides contains methods that are overridable.
type GridOverrides struct {
}

func defaultGridOverrides(v *Grid) GridOverrides {
	return GridOverrides{}
}

// Grid is a container which arranges its child widgets in rows and columns,
// with arbitrary positions and horizontal/vertical spans.
//
// Children are added using gtk_grid_attach(). They can span multiple rows or
// columns. It is also possible to add a child next to an existing child, using
// gtk_grid_attach_next_to(). The behaviour of GtkGrid when several children
// occupy the same grid cell is undefined.
//
// GtkGrid can be used like a Box by just using gtk_container_add(), which
// will place children next to each other in the direction determined by the
// Orientable:orientation property. However, if all you want is a single row or
// column, then Box is the preferred widget.
//
// # CSS nodes
//
// GtkGrid uses a single CSS node with name grid.
type Grid struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Orientable
}

var (
	_ Containerer       = (*Grid)(nil)
	_ coreglib.Objector = (*Grid)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Grid, *GridClass, GridOverrides](
		GTypeGrid,
		initGridClass,
		wrapGrid,
		defaultGridOverrides,
	)
}

func initGridClass(gclass unsafe.Pointer, overrides GridOverrides, classInitFunc func(*GridClass)) {
	if classInitFunc != nil {
		class := (*GridClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapGrid(obj *coreglib.Object) *Grid {
	return &Grid{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalGrid(p uintptr) (interface{}, error) {
	return wrapGrid(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewGrid creates a new grid widget.
//
// The function returns the following values:
//
//   - grid: new Grid.
func NewGrid() *Grid {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_grid_new()

	var _grid *Grid // out

	_grid = wrapGrid(coreglib.Take(unsafe.Pointer(_cret)))

	return _grid
}

// Attach adds a widget to the grid.
//
// The position of child is determined by left and top. The number of “cells”
// that child will occupy is determined by width and height.
//
// The function takes the following parameters:
//
//   - child: widget to add.
//   - left: column number to attach the left side of child to.
//   - top: row number to attach the top side of child to.
//   - width: number of columns that child will span.
//   - height: number of rows that child will span.
func (grid *Grid) Attach(child Widgetter, left, top, width, height int) {
	var _arg0 *C.GtkGrid   // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out
	var _arg4 C.gint       // out
	var _arg5 C.gint       // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(left)
	_arg3 = C.gint(top)
	_arg4 = C.gint(width)
	_arg5 = C.gint(height)

	C.gtk_grid_attach(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(child)
	runtime.KeepAlive(left)
	runtime.KeepAlive(top)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// AttachNextTo adds a widget to the grid.
//
// The widget is placed next to sibling, on the side determined by side. When
// sibling is NULL, the widget is placed in row (for left or right placement) or
// column 0 (for top or bottom placement), at the end indicated by side.
//
// Attaching widgets labeled [1], [2], [3] with sibling == NULL and side ==
// GTK_POS_LEFT yields a layout of [3][2][1].
//
// The function takes the following parameters:
//
//   - child: widget to add.
//   - sibling (optional): child of grid that child will be placed next to,
//     or NULL to place child at the beginning or end.
//   - side of sibling that child is positioned next to.
//   - width: number of columns that child will span.
//   - height: number of rows that child will span.
func (grid *Grid) AttachNextTo(child, sibling Widgetter, side PositionType, width, height int) {
	var _arg0 *C.GtkGrid        // out
	var _arg1 *C.GtkWidget      // out
	var _arg2 *C.GtkWidget      // out
	var _arg3 C.GtkPositionType // out
	var _arg4 C.gint            // out
	var _arg5 C.gint            // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if sibling != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(sibling).Native()))
	}
	_arg3 = C.GtkPositionType(side)
	_arg4 = C.gint(width)
	_arg5 = C.gint(height)

	C.gtk_grid_attach_next_to(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(child)
	runtime.KeepAlive(sibling)
	runtime.KeepAlive(side)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// BaselineRow returns which row defines the global baseline of grid.
//
// The function returns the following values:
//
//   - gint: row index defining the global baseline.
func (grid *Grid) BaselineRow() int {
	var _arg0 *C.GtkGrid // out
	var _cret C.gint     // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))

	_cret = C.gtk_grid_get_baseline_row(_arg0)
	runtime.KeepAlive(grid)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ChildAt gets the child of grid whose area covers the grid cell whose upper
// left corner is at left, top.
//
// The function takes the following parameters:
//
//   - left edge of the cell.
//   - top edge of the cell.
//
// The function returns the following values:
//
//   - widget (optional): child at the given position, or NULL.
func (grid *Grid) ChildAt(left, top int) Widgetter {
	var _arg0 *C.GtkGrid   // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(left)
	_arg2 = C.gint(top)

	_cret = C.gtk_grid_get_child_at(_arg0, _arg1, _arg2)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(left)
	runtime.KeepAlive(top)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// ColumnHomogeneous returns whether all columns of grid have the same width.
//
// The function returns the following values:
//
//   - ok: whether all columns of grid have the same width.
func (grid *Grid) ColumnHomogeneous() bool {
	var _arg0 *C.GtkGrid // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))

	_cret = C.gtk_grid_get_column_homogeneous(_arg0)
	runtime.KeepAlive(grid)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ColumnSpacing returns the amount of space between the columns of grid.
//
// The function returns the following values:
//
//   - guint: column spacing of grid.
func (grid *Grid) ColumnSpacing() uint {
	var _arg0 *C.GtkGrid // out
	var _cret C.guint    // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))

	_cret = C.gtk_grid_get_column_spacing(_arg0)
	runtime.KeepAlive(grid)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// RowBaselinePosition returns the baseline position of row as set
// by gtk_grid_set_row_baseline_position() or the default value
// GTK_BASELINE_POSITION_CENTER.
//
// The function takes the following parameters:
//
//   - row index.
//
// The function returns the following values:
//
//   - baselinePosition: baseline position of row.
func (grid *Grid) RowBaselinePosition(row int) BaselinePosition {
	var _arg0 *C.GtkGrid            // out
	var _arg1 C.gint                // out
	var _cret C.GtkBaselinePosition // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(row)

	_cret = C.gtk_grid_get_row_baseline_position(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(row)

	var _baselinePosition BaselinePosition // out

	_baselinePosition = BaselinePosition(_cret)

	return _baselinePosition
}

// RowHomogeneous returns whether all rows of grid have the same height.
//
// The function returns the following values:
//
//   - ok: whether all rows of grid have the same height.
func (grid *Grid) RowHomogeneous() bool {
	var _arg0 *C.GtkGrid // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))

	_cret = C.gtk_grid_get_row_homogeneous(_arg0)
	runtime.KeepAlive(grid)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowSpacing returns the amount of space between the rows of grid.
//
// The function returns the following values:
//
//   - guint: row spacing of grid.
func (grid *Grid) RowSpacing() uint {
	var _arg0 *C.GtkGrid // out
	var _cret C.guint    // in

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))

	_cret = C.gtk_grid_get_row_spacing(_arg0)
	runtime.KeepAlive(grid)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// InsertColumn inserts a column at the specified position.
//
// Children which are attached at or to the right of this position are moved one
// column to the right. Children which span across this position are grown to
// span the new column.
//
// The function takes the following parameters:
//
//   - position to insert the column at.
func (grid *Grid) InsertColumn(position int) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(position)

	C.gtk_grid_insert_column(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(position)
}

// InsertNextTo inserts a row or column at the specified position.
//
// The new row or column is placed next to sibling, on the side determined by
// side. If side is GTK_POS_TOP or GTK_POS_BOTTOM, a row is inserted. If side is
// GTK_POS_LEFT of GTK_POS_RIGHT, a column is inserted.
//
// The function takes the following parameters:
//
//   - sibling: child of grid that the new row or column will be placed next to.
//   - side of sibling that child is positioned next to.
func (grid *Grid) InsertNextTo(sibling Widgetter, side PositionType) {
	var _arg0 *C.GtkGrid        // out
	var _arg1 *C.GtkWidget      // out
	var _arg2 C.GtkPositionType // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(sibling).Native()))
	_arg2 = C.GtkPositionType(side)

	C.gtk_grid_insert_next_to(_arg0, _arg1, _arg2)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(sibling)
	runtime.KeepAlive(side)
}

// InsertRow inserts a row at the specified position.
//
// Children which are attached at or below this position are moved one row down.
// Children which span across this position are grown to span the new row.
//
// The function takes the following parameters:
//
//   - position to insert the row at.
func (grid *Grid) InsertRow(position int) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(position)

	C.gtk_grid_insert_row(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(position)
}

// RemoveColumn removes a column from the grid.
//
// Children that are placed in this column are removed, spanning children that
// overlap this column have their width reduced by one, and children after the
// column are moved to the left.
//
// The function takes the following parameters:
//
//   - position of the column to remove.
func (grid *Grid) RemoveColumn(position int) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(position)

	C.gtk_grid_remove_column(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(position)
}

// RemoveRow removes a row from the grid.
//
// Children that are placed in this row are removed, spanning children that
// overlap this row have their height reduced by one, and children below the row
// are moved up.
//
// The function takes the following parameters:
//
//   - position of the row to remove.
func (grid *Grid) RemoveRow(position int) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(position)

	C.gtk_grid_remove_row(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(position)
}

// SetBaselineRow sets which row defines the global baseline for the entire
// grid. Each row in the grid can have its own local baseline, but only one of
// those is global, meaning it will be the baseline in the parent of the grid.
//
// The function takes the following parameters:
//
//   - row index.
func (grid *Grid) SetBaselineRow(row int) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(row)

	C.gtk_grid_set_baseline_row(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(row)
}

// SetColumnHomogeneous sets whether all columns of grid will have the same
// width.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE to make columns homogeneous.
func (grid *Grid) SetColumnHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gboolean // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_grid_set_column_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(homogeneous)
}

// SetColumnSpacing sets the amount of space between columns of grid.
//
// The function takes the following parameters:
//
//   - spacing: amount of space to insert between columns.
func (grid *Grid) SetColumnSpacing(spacing uint) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.guint    // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_grid_set_column_spacing(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(spacing)
}

// SetRowBaselinePosition sets how the baseline should be positioned on row of
// the grid, in case that row is assigned more space than is requested.
//
// The function takes the following parameters:
//
//   - row index.
//   - pos: BaselinePosition.
func (grid *Grid) SetRowBaselinePosition(row int, pos BaselinePosition) {
	var _arg0 *C.GtkGrid            // out
	var _arg1 C.gint                // out
	var _arg2 C.GtkBaselinePosition // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.gint(row)
	_arg2 = C.GtkBaselinePosition(pos)

	C.gtk_grid_set_row_baseline_position(_arg0, _arg1, _arg2)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(row)
	runtime.KeepAlive(pos)
}

// SetRowHomogeneous sets whether all rows of grid will have the same height.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE to make rows homogeneous.
func (grid *Grid) SetRowHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.gboolean // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_grid_set_row_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(homogeneous)
}

// SetRowSpacing sets the amount of space between rows of grid.
//
// The function takes the following parameters:
//
//   - spacing: amount of space to insert between rows.
func (grid *Grid) SetRowSpacing(spacing uint) {
	var _arg0 *C.GtkGrid // out
	var _arg1 C.guint    // out

	_arg0 = (*C.GtkGrid)(unsafe.Pointer(coreglib.InternObject(grid).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_grid_set_row_spacing(_arg0, _arg1)
	runtime.KeepAlive(grid)
	runtime.KeepAlive(spacing)
}

// HBoxOverrides contains methods that are overridable.
type HBoxOverrides struct {
}

func defaultHBoxOverrides(v *HBox) HBoxOverrides {
	return HBoxOverrides{}
}

// HBox is a container that organizes child widgets into a single row.
//
// Use the Box packing interface to determine the arrangement, spacing, width,
// and alignment of HBox children.
//
// All children are allocated the same height.
//
// GtkHBox has been deprecated. You can use Box instead, which is a very quick
// and easy change. If you have derived your own classes from GtkHBox, you can
// simply change the inheritance to derive directly from Box. No further changes
// are needed, since the default value of the Orientable:orientation property is
// GTK_ORIENTATION_HORIZONTAL.
//
// If you have a grid-like layout composed of nested boxes, and you don’t need
// first-child or last-child styling, the recommendation is to switch to Grid.
// For more information about migrating to Grid, see [Migrating from other
// containers to GtkGrid][gtk-migrating-GtkGrid].
type HBox struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*HBox)(nil)
	_ coreglib.Objector = (*HBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HBox, *HBoxClass, HBoxOverrides](
		GTypeHBox,
		initHBoxClass,
		wrapHBox,
		defaultHBoxOverrides,
	)
}

func initHBoxClass(gclass unsafe.Pointer, overrides HBoxOverrides, classInitFunc func(*HBoxClass)) {
	if classInitFunc != nil {
		class := (*HBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHBox(obj *coreglib.Object) *HBox {
	return &HBox{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalHBox(p uintptr) (interface{}, error) {
	return wrapHBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHBox creates a new HBox.
//
// Deprecated: You should use gtk_box_new() with a GTK_ORIENTATION_HORIZONTAL
// Orientable:orientation instead.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE if all children are to be given equal space allotments.
//   - spacing: number of pixels to place by default between children.
//
// The function returns the following values:
//
//   - hBox: new HBox.
func NewHBox(homogeneous bool, spacing int) *HBox {
	var _arg1 C.gboolean   // out
	var _arg2 C.gint       // out
	var _cret *C.GtkWidget // in

	if homogeneous {
		_arg1 = C.TRUE
	}
	_arg2 = C.gint(spacing)

	_cret = C.gtk_hbox_new(_arg1, _arg2)
	runtime.KeepAlive(homogeneous)
	runtime.KeepAlive(spacing)

	var _hBox *HBox // out

	_hBox = wrapHBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _hBox
}

// HButtonBoxOverrides contains methods that are overridable.
type HButtonBoxOverrides struct {
}

func defaultHButtonBoxOverrides(v *HButtonBox) HButtonBoxOverrides {
	return HButtonBoxOverrides{}
}

type HButtonBox struct {
	_ [0]func() // equal guard
	ButtonBox
}

var (
	_ Containerer       = (*HButtonBox)(nil)
	_ coreglib.Objector = (*HButtonBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HButtonBox, *HButtonBoxClass, HButtonBoxOverrides](
		GTypeHButtonBox,
		initHButtonBoxClass,
		wrapHButtonBox,
		defaultHButtonBoxOverrides,
	)
}

func initHButtonBoxClass(gclass unsafe.Pointer, overrides HButtonBoxOverrides, classInitFunc func(*HButtonBoxClass)) {
	if classInitFunc != nil {
		class := (*HButtonBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHButtonBox(obj *coreglib.Object) *HButtonBox {
	return &HButtonBox{
		ButtonBox: ButtonBox{
			Box: Box{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalHButtonBox(p uintptr) (interface{}, error) {
	return wrapHButtonBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHButtonBox creates a new horizontal button box.
//
// Deprecated: Use gtk_button_box_new() with GTK_ORIENTATION_HORIZONTAL instead.
//
// The function returns the following values:
//
//   - hButtonBox: new button box Widget.
func NewHButtonBox() *HButtonBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_hbutton_box_new()

	var _hButtonBox *HButtonBox // out

	_hButtonBox = wrapHButtonBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _hButtonBox
}

// HPanedOverrides contains methods that are overridable.
type HPanedOverrides struct {
}

func defaultHPanedOverrides(v *HPaned) HPanedOverrides {
	return HPanedOverrides{}
}

// HPaned widget is a container widget with two children arranged horizontally.
// The division between the two panes is adjustable by the user by dragging a
// handle. See Paned for details.
//
// GtkHPaned has been deprecated, use Paned instead.
type HPaned struct {
	_ [0]func() // equal guard
	Paned
}

var (
	_ Containerer       = (*HPaned)(nil)
	_ coreglib.Objector = (*HPaned)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HPaned, *HPanedClass, HPanedOverrides](
		GTypeHPaned,
		initHPanedClass,
		wrapHPaned,
		defaultHPanedOverrides,
	)
}

func initHPanedClass(gclass unsafe.Pointer, overrides HPanedOverrides, classInitFunc func(*HPanedClass)) {
	if classInitFunc != nil {
		class := (*HPanedClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHPaned(obj *coreglib.Object) *HPaned {
	return &HPaned{
		Paned: Paned{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalHPaned(p uintptr) (interface{}, error) {
	return wrapHPaned(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHPaned: create a new HPaned
//
// Deprecated: Use gtk_paned_new() with GTK_ORIENTATION_HORIZONTAL instead.
//
// The function returns the following values:
//
//   - hPaned: new HPaned.
func NewHPaned() *HPaned {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_hpaned_new()

	var _hPaned *HPaned // out

	_hPaned = wrapHPaned(coreglib.Take(unsafe.Pointer(_cret)))

	return _hPaned
}

// HSVOverrides contains methods that are overridable.
type HSVOverrides struct {
	Changed func()
	Move    func(typ DirectionType)
}

func defaultHSVOverrides(v *HSV) HSVOverrides {
	return HSVOverrides{
		Changed: v.changed,
		Move:    v.move,
	}
}

// HSV is the “color wheel” part of a complete color selector widget. It allows
// to select a color by determining its HSV components in an intuitive way.
// Moving the selection around the outer ring changes the hue, and moving the
// selection point inside the inner triangle changes value and saturation.
//
// HSV has been deprecated together with ColorSelection, where it was used.
type HSV struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*HSV)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HSV, *HSVClass, HSVOverrides](
		GTypeHSV,
		initHSVClass,
		wrapHSV,
		defaultHSVOverrides,
	)
}

func initHSVClass(gclass unsafe.Pointer, overrides HSVOverrides, classInitFunc func(*HSVClass)) {
	pclass := (*C.GtkHSVClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeHSV))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_HSVClass_changed)
	}

	if overrides.Move != nil {
		pclass.move = (*[0]byte)(C._gotk4_gtk3_HSVClass_move)
	}

	if classInitFunc != nil {
		class := (*HSVClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHSV(obj *coreglib.Object) *HSV {
	return &HSV{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalHSV(p uintptr) (interface{}, error) {
	return wrapHSV(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (hsv *HSV) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(hsv, "changed", false, unsafe.Pointer(C._gotk4_gtk3_HSV_ConnectChanged), f)
}

func (hsv *HSV) ConnectMove(f func(object DirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(hsv, "move", false, unsafe.Pointer(C._gotk4_gtk3_HSV_ConnectMove), f)
}

// NewHSV creates a new HSV color selector.
//
// The function returns the following values:
//
//   - hsV: newly-created HSV color selector.
func NewHSV() *HSV {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_hsv_new()

	var _hsV *HSV // out

	_hsV = wrapHSV(coreglib.Take(unsafe.Pointer(_cret)))

	return _hsV
}

// Color queries the current color in an HSV color selector. Returned values
// will be in the [0.0, 1.0] range.
//
// The function returns the following values:
//
//   - h: return value for the hue.
//   - s: return value for the saturation.
//   - v: return value for the value.
func (hsv *HSV) Color() (h, s, v float64) {
	var _arg0 *C.GtkHSV // out
	var _arg1 C.gdouble // in
	var _arg2 C.gdouble // in
	var _arg3 C.gdouble // in

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))

	C.gtk_hsv_get_color(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(hsv)

	var _h float64 // out
	var _s float64 // out
	var _v float64 // out

	_h = float64(_arg1)
	_s = float64(_arg2)
	_v = float64(_arg3)

	return _h, _s, _v
}

// Metrics queries the size and ring width of an HSV color selector.
//
// The function returns the following values:
//
//   - size: return value for the diameter of the hue ring.
//   - ringWidth: return value for the width of the hue ring.
func (hsv *HSV) Metrics() (size, ringWidth int) {
	var _arg0 *C.GtkHSV // out
	var _arg1 C.gint    // in
	var _arg2 C.gint    // in

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))

	C.gtk_hsv_get_metrics(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(hsv)

	var _size int      // out
	var _ringWidth int // out

	_size = int(_arg1)
	_ringWidth = int(_arg2)

	return _size, _ringWidth
}

// IsAdjusting: HSV color selector can be said to be adjusting if multiple rapid
// changes are being made to its value, for example, when the user is adjusting
// the value with the mouse. This function queries whether the HSV color
// selector is being adjusted or not.
//
// The function returns the following values:
//
//   - ok: TRUE if clients can ignore changes to the color value, since they may
//     be transitory, or FALSE if they should consider the color value status to
//     be final.
func (hsv *HSV) IsAdjusting() bool {
	var _arg0 *C.GtkHSV  // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))

	_cret = C.gtk_hsv_is_adjusting(_arg0)
	runtime.KeepAlive(hsv)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetColor sets the current color in an HSV color selector. Color component
// values must be in the [0.0, 1.0] range.
//
// The function takes the following parameters:
//
//   - h: hue.
//   - s: saturation.
//   - v: value.
func (hsv *HSV) SetColor(h, s, v float64) {
	var _arg0 *C.GtkHSV // out
	var _arg1 C.double  // out
	var _arg2 C.double  // out
	var _arg3 C.double  // out

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))
	_arg1 = C.double(h)
	_arg2 = C.double(s)
	_arg3 = C.double(v)

	C.gtk_hsv_set_color(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(hsv)
	runtime.KeepAlive(h)
	runtime.KeepAlive(s)
	runtime.KeepAlive(v)
}

// SetMetrics sets the size and ring width of an HSV color selector.
//
// The function takes the following parameters:
//
//   - size: diameter for the hue ring.
//   - ringWidth: width of the hue ring.
func (hsv *HSV) SetMetrics(size, ringWidth int) {
	var _arg0 *C.GtkHSV // out
	var _arg1 C.gint    // out
	var _arg2 C.gint    // out

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))
	_arg1 = C.gint(size)
	_arg2 = C.gint(ringWidth)

	C.gtk_hsv_set_metrics(_arg0, _arg1, _arg2)
	runtime.KeepAlive(hsv)
	runtime.KeepAlive(size)
	runtime.KeepAlive(ringWidth)
}

func (hsv *HSV) changed() {
	gclass := (*C.GtkHSVClass)(coreglib.PeekParentClass(hsv))
	fnarg := gclass.changed

	var _arg0 *C.GtkHSV // out

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))

	C._gotk4_gtk3_HSV_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(hsv)
}

func (hsv *HSV) move(typ DirectionType) {
	gclass := (*C.GtkHSVClass)(coreglib.PeekParentClass(hsv))
	fnarg := gclass.move

	var _arg0 *C.GtkHSV          // out
	var _arg1 C.GtkDirectionType // out

	_arg0 = (*C.GtkHSV)(unsafe.Pointer(coreglib.InternObject(hsv).Native()))
	_arg1 = C.GtkDirectionType(typ)

	C._gotk4_gtk3_HSV_virtual_move(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(hsv)
	runtime.KeepAlive(typ)
}

// HSVToRGB converts a color from HSV space to RGB.
//
// Input values must be in the [0.0, 1.0] range; output values will be in the
// same range.
//
// The function takes the following parameters:
//
//   - h: hue.
//   - s: saturation.
//   - v: value.
//
// The function returns the following values:
//
//   - r: return value for the red component.
//   - g: return value for the green component.
//   - b: return value for the blue component.
func HSVToRGB(h, s, v float64) (r, g, b float64) {
	var _arg1 C.gdouble // out
	var _arg2 C.gdouble // out
	var _arg3 C.gdouble // out
	var _arg4 C.gdouble // in
	var _arg5 C.gdouble // in
	var _arg6 C.gdouble // in

	_arg1 = C.gdouble(h)
	_arg2 = C.gdouble(s)
	_arg3 = C.gdouble(v)

	C.gtk_hsv_to_rgb(_arg1, _arg2, _arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(h)
	runtime.KeepAlive(s)
	runtime.KeepAlive(v)

	var _r float64 // out
	var _g float64 // out
	var _b float64 // out

	_r = float64(_arg4)
	_g = float64(_arg5)
	_b = float64(_arg6)

	return _r, _g, _b
}

// HScaleOverrides contains methods that are overridable.
type HScaleOverrides struct {
}

func defaultHScaleOverrides(v *HScale) HScaleOverrides {
	return HScaleOverrides{}
}

// HScale widget is used to allow the user to select a value using a horizontal
// slider. To create one, use gtk_hscale_new_with_range().
//
// The position to show the current value, and the number of decimal places
// shown can be set using the parent Scale class’s functions.
//
// GtkHScale has been deprecated, use Scale instead.
type HScale struct {
	_ [0]func() // equal guard
	Scale
}

var (
	_ Ranger = (*HScale)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HScale, *HScaleClass, HScaleOverrides](
		GTypeHScale,
		initHScaleClass,
		wrapHScale,
		defaultHScaleOverrides,
	)
}

func initHScaleClass(gclass unsafe.Pointer, overrides HScaleOverrides, classInitFunc func(*HScaleClass)) {
	if classInitFunc != nil {
		class := (*HScaleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHScale(obj *coreglib.Object) *HScale {
	return &HScale{
		Scale: Scale{
			Range: Range{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalHScale(p uintptr) (interface{}, error) {
	return wrapHScale(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHScale creates a new HScale.
//
// Deprecated: Use gtk_scale_new() with GTK_ORIENTATION_HORIZONTAL instead.
//
// The function takes the following parameters:
//
//   - adjustment (optional) which sets the range of the scale.
//
// The function returns the following values:
//
//   - hScale: new HScale.
func NewHScale(adjustment *Adjustment) *HScale {
	var _arg1 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	_cret = C.gtk_hscale_new(_arg1)
	runtime.KeepAlive(adjustment)

	var _hScale *HScale // out

	_hScale = wrapHScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _hScale
}

// NewHScaleWithRange creates a new horizontal scale widget that lets the user
// input a number between min and max (including min and max) with the increment
// step. step must be nonzero; it’s the distance the slider moves when using the
// arrow keys to adjust the scale value.
//
// Note that the way in which the precision is derived works best if step is
// a power of ten. If the resulting precision is not suitable for your needs,
// use gtk_scale_set_digits() to correct it.
//
// Deprecated: Use gtk_scale_new_with_range() with GTK_ORIENTATION_HORIZONTAL
// instead.
//
// The function takes the following parameters:
//
//   - min: minimum value.
//   - max: maximum value.
//   - step increment (tick size) used with keyboard shortcuts.
//
// The function returns the following values:
//
//   - hScale: new HScale.
func NewHScaleWithRange(min, max, step float64) *HScale {
	var _arg1 C.gdouble    // out
	var _arg2 C.gdouble    // out
	var _arg3 C.gdouble    // out
	var _cret *C.GtkWidget // in

	_arg1 = C.gdouble(min)
	_arg2 = C.gdouble(max)
	_arg3 = C.gdouble(step)

	_cret = C.gtk_hscale_new_with_range(_arg1, _arg2, _arg3)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
	runtime.KeepAlive(step)

	var _hScale *HScale // out

	_hScale = wrapHScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _hScale
}

// HScrollbarOverrides contains methods that are overridable.
type HScrollbarOverrides struct {
}

func defaultHScrollbarOverrides(v *HScrollbar) HScrollbarOverrides {
	return HScrollbarOverrides{}
}

// HScrollbar widget is a widget arranged horizontally creating a scrollbar.
// See Scrollbar for details on scrollbars. Adjustment pointers may be added to
// handle the adjustment of the scrollbar or it may be left NULL in which case
// one will be created for you. See Scrollbar for a description of what the
// fields in an adjustment represent for a scrollbar.
//
// GtkHScrollbar has been deprecated, use Scrollbar instead.
type HScrollbar struct {
	_ [0]func() // equal guard
	Scrollbar
}

var (
	_ Ranger = (*HScrollbar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HScrollbar, *HScrollbarClass, HScrollbarOverrides](
		GTypeHScrollbar,
		initHScrollbarClass,
		wrapHScrollbar,
		defaultHScrollbarOverrides,
	)
}

func initHScrollbarClass(gclass unsafe.Pointer, overrides HScrollbarOverrides, classInitFunc func(*HScrollbarClass)) {
	if classInitFunc != nil {
		class := (*HScrollbarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHScrollbar(obj *coreglib.Object) *HScrollbar {
	return &HScrollbar{
		Scrollbar: Scrollbar{
			Range: Range{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalHScrollbar(p uintptr) (interface{}, error) {
	return wrapHScrollbar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHScrollbar creates a new horizontal scrollbar.
//
// Deprecated: Use gtk_scrollbar_new() with GTK_ORIENTATION_HORIZONTAL instead.
//
// The function takes the following parameters:
//
//   - adjustment (optional) to use, or NULL to create a new adjustment.
//
// The function returns the following values:
//
//   - hScrollbar: new HScrollbar.
func NewHScrollbar(adjustment *Adjustment) *HScrollbar {
	var _arg1 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	_cret = C.gtk_hscrollbar_new(_arg1)
	runtime.KeepAlive(adjustment)

	var _hScrollbar *HScrollbar // out

	_hScrollbar = wrapHScrollbar(coreglib.Take(unsafe.Pointer(_cret)))

	return _hScrollbar
}

// HSeparatorOverrides contains methods that are overridable.
type HSeparatorOverrides struct {
}

func defaultHSeparatorOverrides(v *HSeparator) HSeparatorOverrides {
	return HSeparatorOverrides{}
}

// HSeparator widget is a horizontal separator, used to group the widgets within
// a window. It displays a horizontal line with a shadow to make it appear
// sunken into the interface.
//
// > The HSeparator widget is not used as a separator within menus.
// > To create a separator in a menu create an empty SeparatorMenuItem >
// widget using gtk_separator_menu_item_new() and add it to the menu with >
// gtk_menu_shell_append().
//
// GtkHSeparator has been deprecated, use Separator instead.
type HSeparator struct {
	_ [0]func() // equal guard
	Separator
}

var (
	_ Widgetter         = (*HSeparator)(nil)
	_ coreglib.Objector = (*HSeparator)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HSeparator, *HSeparatorClass, HSeparatorOverrides](
		GTypeHSeparator,
		initHSeparatorClass,
		wrapHSeparator,
		defaultHSeparatorOverrides,
	)
}

func initHSeparatorClass(gclass unsafe.Pointer, overrides HSeparatorOverrides, classInitFunc func(*HSeparatorClass)) {
	if classInitFunc != nil {
		class := (*HSeparatorClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHSeparator(obj *coreglib.Object) *HSeparator {
	return &HSeparator{
		Separator: Separator{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalHSeparator(p uintptr) (interface{}, error) {
	return wrapHSeparator(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHSeparator creates a new HSeparator.
//
// Deprecated: Use gtk_separator_new() with GTK_ORIENTATION_HORIZONTAL instead.
//
// The function returns the following values:
//
//   - hSeparator: new HSeparator.
func NewHSeparator() *HSeparator {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_hseparator_new()

	var _hSeparator *HSeparator // out

	_hSeparator = wrapHSeparator(coreglib.Take(unsafe.Pointer(_cret)))

	return _hSeparator
}

// HandleBoxOverrides contains methods that are overridable.
type HandleBoxOverrides struct {
	// ChildAttached: signal emitted when the contents of the handlebox are
	// reattached to the main window. Deprecated: 3.4.
	ChildAttached func(child Widgetter)
	// ChildDetached: signal emitted when the contents of the handlebox are
	// detached from the main window. Deprecated: 3.4.
	ChildDetached func(child Widgetter)
}

func defaultHandleBoxOverrides(v *HandleBox) HandleBoxOverrides {
	return HandleBoxOverrides{
		ChildAttached: v.childAttached,
		ChildDetached: v.childDetached,
	}
}

// HandleBox widget allows a portion of a window to be "torn off". It is a bin
// widget which displays its child and a handle that the user can drag to tear
// off a separate window (the “float window”) containing the child widget. A
// thin “ghost” is drawn in the original location of the handlebox. By dragging
// the separate window back to its original location, it can be reattached.
//
// When reattaching, the ghost and float window, must be aligned along one of
// the edges, the “snap edge”. This either can be specified by the application
// programmer explicitly, or GTK+ will pick a reasonable default based on the
// handle position.
//
// To make detaching and reattaching the handlebox as minimally confusing as
// possible to the user, it is important to set the snap edge so that the
// snap edge does not move when the handlebox is deattached. For instance,
// if the handlebox is packed at the bottom of a VBox, then when the handlebox
// is detached, the bottom edge of the handlebox's allocation will remain fixed
// as the height of the handlebox shrinks, so the snap edge should be set to
// GTK_POS_BOTTOM.
//
// > HandleBox has been deprecated. It is very specialized, lacks features
// > to make it useful and most importantly does not fit well into modern >
// application design. Do not use it. There is no replacement.
type HandleBox struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*HandleBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HandleBox, *HandleBoxClass, HandleBoxOverrides](
		GTypeHandleBox,
		initHandleBoxClass,
		wrapHandleBox,
		defaultHandleBoxOverrides,
	)
}

func initHandleBoxClass(gclass unsafe.Pointer, overrides HandleBoxOverrides, classInitFunc func(*HandleBoxClass)) {
	pclass := (*C.GtkHandleBoxClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeHandleBox))))

	if overrides.ChildAttached != nil {
		pclass.child_attached = (*[0]byte)(C._gotk4_gtk3_HandleBoxClass_child_attached)
	}

	if overrides.ChildDetached != nil {
		pclass.child_detached = (*[0]byte)(C._gotk4_gtk3_HandleBoxClass_child_detached)
	}

	if classInitFunc != nil {
		class := (*HandleBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHandleBox(obj *coreglib.Object) *HandleBox {
	return &HandleBox{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalHandleBox(p uintptr) (interface{}, error) {
	return wrapHandleBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChildAttached: this signal is emitted when the contents of the
// handlebox are reattached to the main window.
func (handleBox *HandleBox) ConnectChildAttached(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(handleBox, "child-attached", false, unsafe.Pointer(C._gotk4_gtk3_HandleBox_ConnectChildAttached), f)
}

// ConnectChildDetached: this signal is emitted when the contents of the
// handlebox are detached from the main window.
func (handleBox *HandleBox) ConnectChildDetached(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(handleBox, "child-detached", false, unsafe.Pointer(C._gotk4_gtk3_HandleBox_ConnectChildDetached), f)
}

// NewHandleBox: create a new handle box.
//
// Deprecated: HandleBox has been deprecated.
//
// The function returns the following values:
//
//   - handleBox: new HandleBox.
func NewHandleBox() *HandleBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_handle_box_new()

	var _handleBox *HandleBox // out

	_handleBox = wrapHandleBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _handleBox
}

// ChildDetached: whether the handlebox’s child is currently detached.
//
// Deprecated: HandleBox has been deprecated.
//
// The function returns the following values:
//
//   - ok: TRUE if the child is currently detached, otherwise FALSE.
func (handleBox *HandleBox) ChildDetached() bool {
	var _arg0 *C.GtkHandleBox // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))

	_cret = C.gtk_handle_box_get_child_detached(_arg0)
	runtime.KeepAlive(handleBox)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HandlePosition gets the handle position of the handle box. See
// gtk_handle_box_set_handle_position().
//
// Deprecated: HandleBox has been deprecated.
//
// The function returns the following values:
//
//   - positionType: current handle position.
func (handleBox *HandleBox) HandlePosition() PositionType {
	var _arg0 *C.GtkHandleBox   // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))

	_cret = C.gtk_handle_box_get_handle_position(_arg0)
	runtime.KeepAlive(handleBox)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// ShadowType gets the type of shadow drawn around the handle box. See
// gtk_handle_box_set_shadow_type().
//
// Deprecated: HandleBox has been deprecated.
//
// The function returns the following values:
//
//   - shadowType: type of shadow currently drawn around the handle box.
func (handleBox *HandleBox) ShadowType() ShadowType {
	var _arg0 *C.GtkHandleBox // out
	var _cret C.GtkShadowType // in

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))

	_cret = C.gtk_handle_box_get_shadow_type(_arg0)
	runtime.KeepAlive(handleBox)

	var _shadowType ShadowType // out

	_shadowType = ShadowType(_cret)

	return _shadowType
}

// SnapEdge gets the edge used for determining reattachment of the handle box.
// See gtk_handle_box_set_snap_edge().
//
// Deprecated: HandleBox has been deprecated.
//
// The function returns the following values:
//
//   - positionType: edge used for determining reattachment, or
//     (GtkPositionType)-1 if this is determined (as per default) from the
//     handle position.
func (handleBox *HandleBox) SnapEdge() PositionType {
	var _arg0 *C.GtkHandleBox   // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))

	_cret = C.gtk_handle_box_get_snap_edge(_arg0)
	runtime.KeepAlive(handleBox)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// SetHandlePosition sets the side of the handlebox where the handle is drawn.
//
// Deprecated: HandleBox has been deprecated.
//
// The function takes the following parameters:
//
//   - position: side of the handlebox where the handle should be drawn.
func (handleBox *HandleBox) SetHandlePosition(position PositionType) {
	var _arg0 *C.GtkHandleBox   // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))
	_arg1 = C.GtkPositionType(position)

	C.gtk_handle_box_set_handle_position(_arg0, _arg1)
	runtime.KeepAlive(handleBox)
	runtime.KeepAlive(position)
}

// SetShadowType sets the type of shadow to be drawn around the border of the
// handle box.
//
// Deprecated: HandleBox has been deprecated.
//
// The function takes the following parameters:
//
//   - typ: shadow type.
func (handleBox *HandleBox) SetShadowType(typ ShadowType) {
	var _arg0 *C.GtkHandleBox // out
	var _arg1 C.GtkShadowType // out

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))
	_arg1 = C.GtkShadowType(typ)

	C.gtk_handle_box_set_shadow_type(_arg0, _arg1)
	runtime.KeepAlive(handleBox)
	runtime.KeepAlive(typ)
}

// SetSnapEdge sets the snap edge of a handlebox. The snap edge is the edge of
// the detached child that must be aligned with the corresponding edge of the
// “ghost” left behind when the child was detached to reattach the torn-off
// window. Usually, the snap edge should be chosen so that it stays in the same
// place on the screen when the handlebox is torn off.
//
// If the snap edge is not set, then an appropriate value will be guessed from
// the handle position. If the handle position is GTK_POS_RIGHT or GTK_POS_LEFT,
// then the snap edge will be GTK_POS_TOP, otherwise it will be GTK_POS_LEFT.
//
// Deprecated: HandleBox has been deprecated.
//
// The function takes the following parameters:
//
//   - edge: snap edge, or -1 to unset the value; in which case GTK+ will try to
//     guess an appropriate value in the future.
func (handleBox *HandleBox) SetSnapEdge(edge PositionType) {
	var _arg0 *C.GtkHandleBox   // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))
	_arg1 = C.GtkPositionType(edge)

	C.gtk_handle_box_set_snap_edge(_arg0, _arg1)
	runtime.KeepAlive(handleBox)
	runtime.KeepAlive(edge)
}

// childAttached: signal emitted when the contents of the handlebox are
// reattached to the main window. Deprecated: 3.4.
func (handleBox *HandleBox) childAttached(child Widgetter) {
	gclass := (*C.GtkHandleBoxClass)(coreglib.PeekParentClass(handleBox))
	fnarg := gclass.child_attached

	var _arg0 *C.GtkHandleBox // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C._gotk4_gtk3_HandleBox_virtual_child_attached(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(handleBox)
	runtime.KeepAlive(child)
}

// childDetached: signal emitted when the contents of the handlebox are detached
// from the main window. Deprecated: 3.4.
func (handleBox *HandleBox) childDetached(child Widgetter) {
	gclass := (*C.GtkHandleBoxClass)(coreglib.PeekParentClass(handleBox))
	fnarg := gclass.child_detached

	var _arg0 *C.GtkHandleBox // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkHandleBox)(unsafe.Pointer(coreglib.InternObject(handleBox).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C._gotk4_gtk3_HandleBox_virtual_child_detached(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(handleBox)
	runtime.KeepAlive(child)
}

// HeaderBarOverrides contains methods that are overridable.
type HeaderBarOverrides struct {
}

func defaultHeaderBarOverrides(v *HeaderBar) HeaderBarOverrides {
	return HeaderBarOverrides{}
}

// HeaderBar is similar to a horizontal Box. It allows children to be placed
// at the start or the end. In addition, it allows a title and subtitle to be
// displayed. The title will be centered with respect to the width of the box,
// even if the children at either side take up different amounts of space.
// The height of the titlebar will be set to provide sufficient space for the
// subtitle, even if none is currently set. If a subtitle is not needed, the
// space reservation can be turned off with gtk_header_bar_set_has_subtitle().
//
// GtkHeaderBar can add typical window frame controls, such as minimize,
// maximize and close buttons, or the window icon.
//
// For these reasons, GtkHeaderBar is the natural choice for use as the custom
// titlebar widget of a Window (see gtk_window_set_titlebar()), as it gives
// features typical of titlebars while allowing the addition of child widgets.
type HeaderBar struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*HeaderBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*HeaderBar, *HeaderBarClass, HeaderBarOverrides](
		GTypeHeaderBar,
		initHeaderBarClass,
		wrapHeaderBar,
		defaultHeaderBarOverrides,
	)
}

func initHeaderBarClass(gclass unsafe.Pointer, overrides HeaderBarOverrides, classInitFunc func(*HeaderBarClass)) {
	if classInitFunc != nil {
		class := (*HeaderBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapHeaderBar(obj *coreglib.Object) *HeaderBar {
	return &HeaderBar{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalHeaderBar(p uintptr) (interface{}, error) {
	return wrapHeaderBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewHeaderBar creates a new HeaderBar widget.
//
// The function returns the following values:
//
//   - headerBar: new HeaderBar.
func NewHeaderBar() *HeaderBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_header_bar_new()

	var _headerBar *HeaderBar // out

	_headerBar = wrapHeaderBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _headerBar
}

// CustomTitle retrieves the custom title widget of the header. See
// gtk_header_bar_set_custom_title().
//
// The function returns the following values:
//
//   - widget (optional): custom title widget of the header, or NULL if none has
//     been set explicitly.
func (bar *HeaderBar) CustomTitle() Widgetter {
	var _arg0 *C.GtkHeaderBar // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_custom_title(_arg0)
	runtime.KeepAlive(bar)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// DecorationLayout gets the decoration layout set with
// gtk_header_bar_set_decoration_layout().
//
// The function returns the following values:
//
//   - utf8: decoration layout.
func (bar *HeaderBar) DecorationLayout() string {
	var _arg0 *C.GtkHeaderBar // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_decoration_layout(_arg0)
	runtime.KeepAlive(bar)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// HasSubtitle retrieves whether the header bar reserves space for a subtitle,
// regardless if one is currently set or not.
//
// The function returns the following values:
//
//   - ok: TRUE if the header bar reserves space for a subtitle.
func (bar *HeaderBar) HasSubtitle() bool {
	var _arg0 *C.GtkHeaderBar // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_has_subtitle(_arg0)
	runtime.KeepAlive(bar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowCloseButton returns whether this header bar shows the standard window
// decorations.
//
// The function returns the following values:
//
//   - ok: TRUE if the decorations are shown.
func (bar *HeaderBar) ShowCloseButton() bool {
	var _arg0 *C.GtkHeaderBar // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_show_close_button(_arg0)
	runtime.KeepAlive(bar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Subtitle retrieves the subtitle of the header. See
// gtk_header_bar_set_subtitle().
//
// The function returns the following values:
//
//   - utf8 (optional): subtitle of the header, or NULL if none has been set
//     explicitly. The returned string is owned by the widget and must not be
//     modified or freed.
func (bar *HeaderBar) Subtitle() string {
	var _arg0 *C.GtkHeaderBar // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_subtitle(_arg0)
	runtime.KeepAlive(bar)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Title retrieves the title of the header. See gtk_header_bar_set_title().
//
// The function returns the following values:
//
//   - utf8 (optional): title of the header, or NULL if none has been set
//     explicitly. The returned string is owned by the widget and must not be
//     modified or freed.
func (bar *HeaderBar) Title() string {
	var _arg0 *C.GtkHeaderBar // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_header_bar_get_title(_arg0)
	runtime.KeepAlive(bar)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// PackEnd adds child to bar, packed with reference to the end of the bar.
//
// The function takes the following parameters:
//
//   - child to be added to bar.
func (bar *HeaderBar) PackEnd(child Widgetter) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_header_bar_pack_end(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(child)
}

// PackStart adds child to bar, packed with reference to the start of the bar.
//
// The function takes the following parameters:
//
//   - child to be added to bar.
func (bar *HeaderBar) PackStart(child Widgetter) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_header_bar_pack_start(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(child)
}

// SetCustomTitle sets a custom title for the HeaderBar.
//
// The title should help a user identify the current view. This supersedes any
// title set by gtk_header_bar_set_title() or gtk_header_bar_set_subtitle().
// To achieve the same style as the builtin title and subtitle, use the “title”
// and “subtitle” style classes.
//
// You should set the custom title to NULL, for the header title label to be
// visible again.
//
// The function takes the following parameters:
//
//   - titleWidget (optional): custom widget to use for a title.
func (bar *HeaderBar) SetCustomTitle(titleWidget Widgetter) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if titleWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(titleWidget).Native()))
	}

	C.gtk_header_bar_set_custom_title(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(titleWidget)
}

// SetDecorationLayout sets the decoration layout for this header bar,
// overriding the Settings:gtk-decoration-layout setting.
//
// There can be valid reasons for overriding the setting, such as a header bar
// design that does not allow for buttons to take room on the right, or only
// offers room for a single close button. Split header bars are another example
// for overriding the setting.
//
// The format of the string is button names, separated by commas. A colon
// separates the buttons that should appear on the left from those on the right.
// Recognized button names are minimize, maximize, close, icon (the window icon)
// and menu (a menu button for the fallback app menu).
//
// For example, “menu:minimize,maximize,close” specifies a menu on the left,
// and minimize, maximize and close buttons on the right.
//
// The function takes the following parameters:
//
//   - layout (optional): decoration layout, or NULL to unset the layout.
func (bar *HeaderBar) SetDecorationLayout(layout string) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if layout != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(layout)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_header_bar_set_decoration_layout(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(layout)
}

// SetHasSubtitle sets whether the header bar should reserve space for a
// subtitle, even if none is currently set.
//
// The function takes the following parameters:
//
//   - setting: TRUE to reserve space for a subtitle.
func (bar *HeaderBar) SetHasSubtitle(setting bool) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_header_bar_set_has_subtitle(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(setting)
}

// SetShowCloseButton sets whether this header bar shows the standard window
// decorations, including close, maximize, and minimize.
//
// The function takes the following parameters:
//
//   - setting: TRUE to show standard window decorations.
func (bar *HeaderBar) SetShowCloseButton(setting bool) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_header_bar_set_show_close_button(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(setting)
}

// SetSubtitle sets the subtitle of the HeaderBar. The title should give a user
// an additional detail to help him identify the current view.
//
// Note that GtkHeaderBar by default reserves room for the subtitle, even if
// none is currently set. If this is not desired, set the HeaderBar:has-subtitle
// property to FALSE.
//
// The function takes the following parameters:
//
//   - subtitle (optional): subtitle, or NULL.
func (bar *HeaderBar) SetSubtitle(subtitle string) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if subtitle != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(subtitle)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_header_bar_set_subtitle(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(subtitle)
}

// SetTitle sets the title of the HeaderBar. The title should help a user
// identify the current view. A good title should not include the application
// name.
//
// The function takes the following parameters:
//
//   - title (optional): title, or NULL.
func (bar *HeaderBar) SetTitle(title string) {
	var _arg0 *C.GtkHeaderBar // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkHeaderBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if title != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_header_bar_set_title(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(title)
}

type HeaderBarAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*HeaderBarAccessible)(nil)
)

func wrapHeaderBarAccessible(obj *coreglib.Object) *HeaderBarAccessible {
	return &HeaderBarAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

// IMContextOverrides contains methods that are overridable.
type IMContextOverrides struct {
	// Commit: default handler of the IMContext::commit signal.
	Commit func(str string)
	// DeleteSurrounding asks the widget that the input context is attached
	// to to delete characters around the cursor position by emitting the
	// GtkIMContext::delete_surrounding signal. Note that offset and n_chars are
	// in characters not in bytes which differs from the usage other places in
	// IMContext.
	//
	// In order to use this function, you should first call
	// gtk_im_context_get_surrounding() to get the current context, and call
	// this function immediately afterwards to make sure that you know what
	// you are deleting. You should also account for the fact that even if the
	// signal was handled, the input context might not have deleted all the
	// characters that were requested to be deleted.
	//
	// This function is used by an input method that wants to make subsitutions
	// in the existing text in response to new input. It is not useful for
	// applications.
	//
	// The function takes the following parameters:
	//
	//   - offset from cursor position in chars; a negative value means start
	//     before the cursor.
	//   - nChars: number of characters to delete.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if the signal was handled.
	DeleteSurrounding func(offset, nChars int) bool
	// FilterKeypress: allow an input method to internally handle key press and
	// release events. If this function returns TRUE, then no further processing
	// should be done for this key event.
	//
	// The function takes the following parameters:
	//
	//   - event: key event.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if the input method handled the key event.
	FilterKeypress func(event *gdk.EventKey) bool
	// FocusIn: notify the input method that the widget to which this input
	// context corresponds has gained focus. The input method may, for example,
	// change the displayed feedback to reflect this change.
	FocusIn func()
	// FocusOut: notify the input method that the widget to which this input
	// context corresponds has lost focus. The input method may, for example,
	// change the displayed feedback or reset the contexts state to reflect this
	// change.
	FocusOut func()
	// PreeditString: retrieve the current preedit string for the input context,
	// and a list of attributes to apply to the string. This string should be
	// displayed inserted at the insertion point.
	//
	// The function returns the following values:
	//
	//   - str: location to store the retrieved string. The string retrieved
	//     must be freed with g_free().
	//   - attrs: location to store the retrieved attribute list.
	//     When you are done with this list, you must unreference it with
	//     pango_attr_list_unref().
	//   - cursorPos: location to store position of cursor (in characters)
	//     within the preedit string.
	PreeditString func() (string, *pango.AttrList, int)
	// Surrounding retrieves context around the insertion point. Input methods
	// typically want context in order to constrain input text based on existing
	// text; this is important for languages such as Thai where only some
	// sequences of characters are allowed.
	//
	// This function is implemented by emitting the
	// GtkIMContext::retrieve_surrounding signal on the input method;
	// in response to this signal, a widget should provide as much
	// context as is available, up to an entire paragraph, by calling
	// gtk_im_context_set_surrounding(). Note that there is no obligation for a
	// widget to respond to the ::retrieve_surrounding signal, so input methods
	// must be prepared to function without context.
	//
	// The function returns the following values:
	//
	//   - text: location to store a UTF-8 encoded string of text holding
	//     context around the insertion point. If the function returns TRUE,
	//     then you must free the result stored in this location with g_free().
	//   - cursorIndex: location to store byte index of the insertion cursor
	//     within text.
	//   - ok: TRUE if surrounding text was provided; in this case you must free
	//     the result stored in *text.
	Surrounding func() (string, int, bool)
	// PreeditChanged: default handler of the IMContext::preedit-changed signal.
	PreeditChanged func()
	// PreeditEnd: default handler of the IMContext::preedit-end signal.
	PreeditEnd func()
	// PreeditStart: default handler of the IMContext::preedit-start signal.
	PreeditStart func()
	// Reset: notify the input method that a change such as a change in cursor
	// position has been made. This will typically cause the input method to
	// clear the preedit state.
	Reset func()
	// RetrieveSurrounding: default handler of the
	// IMContext::retrieve-surrounding signal.
	RetrieveSurrounding func() bool
	// SetClientWindow: set the client window for the input context; this is
	// the Window in which the input appears. This window is used in order to
	// correctly position status windows, and may also be used for purposes
	// internal to the input method.
	//
	// The function takes the following parameters:
	//
	//   - window (optional): client window. This may be NULL to indicate that
	//     the previous client window no longer exists.
	SetClientWindow func(window gdk.Windower)
	// SetCursorLocation: notify the input method that a change in cursor
	// position has been made. The location is relative to the client window.
	//
	// The function takes the following parameters:
	//
	//   - area: new location.
	SetCursorLocation func(area *gdk.Rectangle)
	// SetSurrounding sets surrounding context around the insertion point and
	// preedit string. This function is expected to be called in response to the
	// GtkIMContext::retrieve_surrounding signal, and will likely have no effect
	// if called at other times.
	//
	// The function takes the following parameters:
	//
	//   - text surrounding the insertion point, as UTF-8. the preedit string
	//     should not be included within text.
	//   - cursorIndex: byte index of the insertion cursor within text.
	SetSurrounding func(text string, cursorIndex int)
	// SetUsePreedit sets whether the IM context should use the preedit
	// string to display feedback. If use_preedit is FALSE (default is TRUE),
	// then the IM context may use some other method to display feedback,
	// such as displaying it in a child of the root window.
	//
	// The function takes the following parameters:
	//
	//   - usePreedit: whether the IM context should use the preedit string.
	SetUsePreedit func(usePreedit bool)
}

func defaultIMContextOverrides(v *IMContext) IMContextOverrides {
	return IMContextOverrides{
		Commit:              v.commit,
		DeleteSurrounding:   v.deleteSurrounding,
		FilterKeypress:      v.filterKeypress,
		FocusIn:             v.focusIn,
		FocusOut:            v.focusOut,
		PreeditString:       v.preeditString,
		Surrounding:         v.surrounding,
		PreeditChanged:      v.preeditChanged,
		PreeditEnd:          v.preeditEnd,
		PreeditStart:        v.preeditStart,
		Reset:               v.reset,
		RetrieveSurrounding: v.retrieveSurrounding,
		SetClientWindow:     v.setClientWindow,
		SetCursorLocation:   v.setCursorLocation,
		SetSurrounding:      v.setSurrounding,
		SetUsePreedit:       v.setUsePreedit,
	}
}

// IMContext defines the interface for GTK+ input methods. An input method is
// used by GTK+ text input widgets like Entry to map from key events to Unicode
// character strings.
//
// The default input method can be set programmatically via the
// Settings:gtk-im-module GtkSettings property. Alternatively, you may set
// the GTK_IM_MODULE environment variable as documented in [Running GTK+
// Applications][gtk-running].
//
// The Entry Entry:im-module and TextView TextView:im-module properties may also
// be used to set input methods for specific widget instances. For instance,
// a certain entry widget might be expected to contain certain characters which
// would be easier to input with a certain input method.
//
// An input method may consume multiple key events in sequence and finally
// output the composed result. This is called preediting, and an input method
// may provide feedback about this process by displaying the intermediate
// composition states as preedit text. For instance, the default GTK+ input
// method implements the input of arbitrary Unicode code points by holding down
// the Control and Shift keys and then typing “U” followed by the hexadecimal
// digits of the code point. When releasing the Control and Shift keys,
// preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for
// example results in the € sign.
//
// Additional input methods can be made available for use by GTK+ widgets as
// loadable modules. An input method module is a small shared library which
// implements a subclass of IMContext or IMContextSimple and exports these four
// functions:
//
//	GtkIMContext * im_module_create(const gchar *context_id);
//
// This function should return a pointer to a newly created instance of the
// IMContext subclass identified by context_id. The context ID is the same as
// specified in the IMContextInfo array returned by im_module_list().
//
// After a new loadable input method module has been installed on the system,
// the configuration file gtk.immodules needs to be regenerated by
// [gtk-query-immodules-3.0][gtk-query-immodules-3.0], in order for the new
// input method to become available to GTK+ applications.
type IMContext struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*IMContext)(nil)
)

// IMContexter describes types inherited from class IMContext.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type IMContexter interface {
	coreglib.Objector
	baseIMContext() *IMContext
}

var _ IMContexter = (*IMContext)(nil)

func init() {
	coreglib.RegisterClassInfo[*IMContext, *IMContextClass, IMContextOverrides](
		GTypeIMContext,
		initIMContextClass,
		wrapIMContext,
		defaultIMContextOverrides,
	)
}

func initIMContextClass(gclass unsafe.Pointer, overrides IMContextOverrides, classInitFunc func(*IMContextClass)) {
	pclass := (*C.GtkIMContextClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeIMContext))))

	if overrides.Commit != nil {
		pclass.commit = (*[0]byte)(C._gotk4_gtk3_IMContextClass_commit)
	}

	if overrides.DeleteSurrounding != nil {
		pclass.delete_surrounding = (*[0]byte)(C._gotk4_gtk3_IMContextClass_delete_surrounding)
	}

	if overrides.FilterKeypress != nil {
		pclass.filter_keypress = (*[0]byte)(C._gotk4_gtk3_IMContextClass_filter_keypress)
	}

	if overrides.FocusIn != nil {
		pclass.focus_in = (*[0]byte)(C._gotk4_gtk3_IMContextClass_focus_in)
	}

	if overrides.FocusOut != nil {
		pclass.focus_out = (*[0]byte)(C._gotk4_gtk3_IMContextClass_focus_out)
	}

	if overrides.PreeditString != nil {
		pclass.get_preedit_string = (*[0]byte)(C._gotk4_gtk3_IMContextClass_get_preedit_string)
	}

	if overrides.Surrounding != nil {
		pclass.get_surrounding = (*[0]byte)(C._gotk4_gtk3_IMContextClass_get_surrounding)
	}

	if overrides.PreeditChanged != nil {
		pclass.preedit_changed = (*[0]byte)(C._gotk4_gtk3_IMContextClass_preedit_changed)
	}

	if overrides.PreeditEnd != nil {
		pclass.preedit_end = (*[0]byte)(C._gotk4_gtk3_IMContextClass_preedit_end)
	}

	if overrides.PreeditStart != nil {
		pclass.preedit_start = (*[0]byte)(C._gotk4_gtk3_IMContextClass_preedit_start)
	}

	if overrides.Reset != nil {
		pclass.reset = (*[0]byte)(C._gotk4_gtk3_IMContextClass_reset)
	}

	if overrides.RetrieveSurrounding != nil {
		pclass.retrieve_surrounding = (*[0]byte)(C._gotk4_gtk3_IMContextClass_retrieve_surrounding)
	}

	if overrides.SetClientWindow != nil {
		pclass.set_client_window = (*[0]byte)(C._gotk4_gtk3_IMContextClass_set_client_window)
	}

	if overrides.SetCursorLocation != nil {
		pclass.set_cursor_location = (*[0]byte)(C._gotk4_gtk3_IMContextClass_set_cursor_location)
	}

	if overrides.SetSurrounding != nil {
		pclass.set_surrounding = (*[0]byte)(C._gotk4_gtk3_IMContextClass_set_surrounding)
	}

	if overrides.SetUsePreedit != nil {
		pclass.set_use_preedit = (*[0]byte)(C._gotk4_gtk3_IMContextClass_set_use_preedit)
	}

	if classInitFunc != nil {
		class := (*IMContextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIMContext(obj *coreglib.Object) *IMContext {
	return &IMContext{
		Object: obj,
	}
}

func marshalIMContext(p uintptr) (interface{}, error) {
	return wrapIMContext(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (context *IMContext) baseIMContext() *IMContext {
	return context
}

// BaseIMContext returns the underlying base object.
func BaseIMContext(obj IMContexter) *IMContext {
	return obj.baseIMContext()
}

// ConnectCommit signal is emitted when a complete input sequence has been
// entered by the user. This can be a single character immediately after a key
// press or the final result of preediting.
func (context *IMContext) ConnectCommit(f func(str string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "commit", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectCommit), f)
}

// ConnectDeleteSurrounding signal is emitted when the input method needs to
// delete all or part of the context surrounding the cursor.
func (context *IMContext) ConnectDeleteSurrounding(f func(offset, nChars int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "delete-surrounding", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectDeleteSurrounding), f)
}

// ConnectPreeditChanged signal is emitted whenever the preedit sequence
// currently being entered has changed. It is also emitted at the end of a
// preedit sequence, in which case gtk_im_context_get_preedit_string() returns
// the empty string.
func (context *IMContext) ConnectPreeditChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "preedit-changed", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectPreeditChanged), f)
}

// ConnectPreeditEnd signal is emitted when a preediting sequence has been
// completed or canceled.
func (context *IMContext) ConnectPreeditEnd(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "preedit-end", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectPreeditEnd), f)
}

// ConnectPreeditStart signal is emitted when a new preediting sequence starts.
func (context *IMContext) ConnectPreeditStart(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "preedit-start", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectPreeditStart), f)
}

// ConnectRetrieveSurrounding signal is emitted when the input method requires
// the context surrounding the cursor. The callback should set the input method
// surrounding context by calling the gtk_im_context_set_surrounding() method.
func (context *IMContext) ConnectRetrieveSurrounding(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "retrieve-surrounding", false, unsafe.Pointer(C._gotk4_gtk3_IMContext_ConnectRetrieveSurrounding), f)
}

// DeleteSurrounding asks the widget that the input context is attached
// to to delete characters around the cursor position by emitting the
// GtkIMContext::delete_surrounding signal. Note that offset and n_chars are
// in characters not in bytes which differs from the usage other places in
// IMContext.
//
// In order to use this function, you should first call
// gtk_im_context_get_surrounding() to get the current context, and call this
// function immediately afterwards to make sure that you know what you are
// deleting. You should also account for the fact that even if the signal was
// handled, the input context might not have deleted all the characters that
// were requested to be deleted.
//
// This function is used by an input method that wants to make subsitutions
// in the existing text in response to new input. It is not useful for
// applications.
//
// The function takes the following parameters:
//
//   - offset from cursor position in chars; a negative value means start before
//     the cursor.
//   - nChars: number of characters to delete.
//
// The function returns the following values:
//
//   - ok: TRUE if the signal was handled.
func (context *IMContext) DeleteSurrounding(offset, nChars int) bool {
	var _arg0 *C.GtkIMContext // out
	var _arg1 C.gint          // out
	var _arg2 C.gint          // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(offset)
	_arg2 = C.gint(nChars)

	_cret = C.gtk_im_context_delete_surrounding(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(offset)
	runtime.KeepAlive(nChars)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FilterKeypress: allow an input method to internally handle key press and
// release events. If this function returns TRUE, then no further processing
// should be done for this key event.
//
// The function takes the following parameters:
//
//   - event: key event.
//
// The function returns the following values:
//
//   - ok: TRUE if the input method handled the key event.
func (context *IMContext) FilterKeypress(event *gdk.EventKey) bool {
	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkEventKey  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_im_context_filter_keypress(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FocusIn: notify the input method that the widget to which this input context
// corresponds has gained focus. The input method may, for example, change the
// displayed feedback to reflect this change.
func (context *IMContext) FocusIn() {
	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_im_context_focus_in(_arg0)
	runtime.KeepAlive(context)
}

// FocusOut: notify the input method that the widget to which this input context
// corresponds has lost focus. The input method may, for example, change the
// displayed feedback or reset the contexts state to reflect this change.
func (context *IMContext) FocusOut() {
	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_im_context_focus_out(_arg0)
	runtime.KeepAlive(context)
}

// PreeditString: retrieve the current preedit string for the input context, and
// a list of attributes to apply to the string. This string should be displayed
// inserted at the insertion point.
//
// The function returns the following values:
//
//   - str: location to store the retrieved string. The string retrieved must be
//     freed with g_free().
//   - attrs: location to store the retrieved attribute list. When you are done
//     with this list, you must unreference it with pango_attr_list_unref().
//   - cursorPos: location to store position of cursor (in characters) within
//     the preedit string.
func (context *IMContext) PreeditString() (string, *pango.AttrList, int) {
	var _arg0 *C.GtkIMContext  // out
	var _arg1 *C.gchar         // in
	var _arg2 *C.PangoAttrList // in
	var _arg3 C.gint           // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_im_context_get_preedit_string(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)

	var _str string            // out
	var _attrs *pango.AttrList // out
	var _cursorPos int         // out

	_str = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	defer C.free(unsafe.Pointer(_arg1))
	_attrs = (*pango.AttrList)(gextras.NewStructNative(unsafe.Pointer(_arg2)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_attrs)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.pango_attr_list_unref((*C.PangoAttrList)(intern.C))
		},
	)
	_cursorPos = int(_arg3)

	return _str, _attrs, _cursorPos
}

// Surrounding retrieves context around the insertion point. Input methods
// typically want context in order to constrain input text based on existing
// text; this is important for languages such as Thai where only some sequences
// of characters are allowed.
//
// This function is implemented by emitting the
// GtkIMContext::retrieve_surrounding signal on the input method; in response to
// this signal, a widget should provide as much context as is available, up to
// an entire paragraph, by calling gtk_im_context_set_surrounding(). Note that
// there is no obligation for a widget to respond to the ::retrieve_surrounding
// signal, so input methods must be prepared to function without context.
//
// The function returns the following values:
//
//   - text: location to store a UTF-8 encoded string of text holding context
//     around the insertion point. If the function returns TRUE, then you must
//     free the result stored in this location with g_free().
//   - cursorIndex: location to store byte index of the insertion cursor within
//     text.
//   - ok: TRUE if surrounding text was provided; in this case you must free the
//     result stored in *text.
func (context *IMContext) Surrounding() (string, int, bool) {
	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.gchar        // in
	var _arg2 C.gint          // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_im_context_get_surrounding(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(context)

	var _text string     // out
	var _cursorIndex int // out
	var _ok bool         // out

	_text = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	defer C.free(unsafe.Pointer(_arg1))
	_cursorIndex = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _text, _cursorIndex, _ok
}

// Reset: notify the input method that a change such as a change in cursor
// position has been made. This will typically cause the input method to clear
// the preedit state.
func (context *IMContext) Reset() {
	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_im_context_reset(_arg0)
	runtime.KeepAlive(context)
}

// SetClientWindow: set the client window for the input context; this is the
// Window in which the input appears. This window is used in order to correctly
// position status windows, and may also be used for purposes internal to the
// input method.
//
// The function takes the following parameters:
//
//   - window (optional): client window. This may be NULL to indicate that the
//     previous client window no longer exists.
func (context *IMContext) SetClientWindow(window gdk.Windower) {
	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkWindow    // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if window != nil {
		_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	}

	C.gtk_im_context_set_client_window(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(window)
}

// SetCursorLocation: notify the input method that a change in cursor position
// has been made. The location is relative to the client window.
//
// The function takes the following parameters:
//
//   - area: new location.
func (context *IMContext) SetCursorLocation(area *gdk.Rectangle) {
	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkRectangle // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(area)))

	C.gtk_im_context_set_cursor_location(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(area)
}

// SetSurrounding sets surrounding context around the insertion point and
// preedit string. This function is expected to be called in response to the
// GtkIMContext::retrieve_surrounding signal, and will likely have no effect if
// called at other times.
//
// The function takes the following parameters:
//
//   - text surrounding the insertion point, as UTF-8. the preedit string should
//     not be included within text.
//   - cursorIndex: byte index of the insertion cursor within text.
func (context *IMContext) SetSurrounding(text string, cursorIndex int) {
	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.gchar        // out
	var _arg2 C.gint
	var _arg3 C.gint // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))
	_arg3 = C.gint(cursorIndex)

	C.gtk_im_context_set_surrounding(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(text)
	runtime.KeepAlive(cursorIndex)
}

// SetUsePreedit sets whether the IM context should use the preedit string to
// display feedback. If use_preedit is FALSE (default is TRUE), then the IM
// context may use some other method to display feedback, such as displaying it
// in a child of the root window.
//
// The function takes the following parameters:
//
//   - usePreedit: whether the IM context should use the preedit string.
func (context *IMContext) SetUsePreedit(usePreedit bool) {
	var _arg0 *C.GtkIMContext // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if usePreedit {
		_arg1 = C.TRUE
	}

	C.gtk_im_context_set_use_preedit(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(usePreedit)
}

// Commit: default handler of the IMContext::commit signal.
func (context *IMContext) commit(str string) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.commit

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_IMContext_virtual_commit(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(str)
}

// deleteSurrounding asks the widget that the input context is attached
// to to delete characters around the cursor position by emitting the
// GtkIMContext::delete_surrounding signal. Note that offset and n_chars are
// in characters not in bytes which differs from the usage other places in
// IMContext.
//
// In order to use this function, you should first call
// gtk_im_context_get_surrounding() to get the current context, and call this
// function immediately afterwards to make sure that you know what you are
// deleting. You should also account for the fact that even if the signal was
// handled, the input context might not have deleted all the characters that
// were requested to be deleted.
//
// This function is used by an input method that wants to make subsitutions
// in the existing text in response to new input. It is not useful for
// applications.
//
// The function takes the following parameters:
//
//   - offset from cursor position in chars; a negative value means start before
//     the cursor.
//   - nChars: number of characters to delete.
//
// The function returns the following values:
//
//   - ok: TRUE if the signal was handled.
func (context *IMContext) deleteSurrounding(offset, nChars int) bool {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.delete_surrounding

	var _arg0 *C.GtkIMContext // out
	var _arg1 C.gint          // out
	var _arg2 C.gint          // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(offset)
	_arg2 = C.gint(nChars)

	_cret = C._gotk4_gtk3_IMContext_virtual_delete_surrounding(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(offset)
	runtime.KeepAlive(nChars)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// filterKeypress: allow an input method to internally handle key press and
// release events. If this function returns TRUE, then no further processing
// should be done for this key event.
//
// The function takes the following parameters:
//
//   - event: key event.
//
// The function returns the following values:
//
//   - ok: TRUE if the input method handled the key event.
func (context *IMContext) filterKeypress(event *gdk.EventKey) bool {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.filter_keypress

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkEventKey  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_IMContext_virtual_filter_keypress(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// focusIn: notify the input method that the widget to which this input context
// corresponds has gained focus. The input method may, for example, change the
// displayed feedback to reflect this change.
func (context *IMContext) focusIn() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.focus_in

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_focus_in(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// focusOut: notify the input method that the widget to which this input context
// corresponds has lost focus. The input method may, for example, change the
// displayed feedback or reset the contexts state to reflect this change.
func (context *IMContext) focusOut() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.focus_out

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_focus_out(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// preeditString: retrieve the current preedit string for the input context, and
// a list of attributes to apply to the string. This string should be displayed
// inserted at the insertion point.
//
// The function returns the following values:
//
//   - str: location to store the retrieved string. The string retrieved must be
//     freed with g_free().
//   - attrs: location to store the retrieved attribute list. When you are done
//     with this list, you must unreference it with pango_attr_list_unref().
//   - cursorPos: location to store position of cursor (in characters) within
//     the preedit string.
func (context *IMContext) preeditString() (string, *pango.AttrList, int) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.get_preedit_string

	var _arg0 *C.GtkIMContext  // out
	var _arg1 *C.gchar         // in
	var _arg2 *C.PangoAttrList // in
	var _arg3 C.gint           // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_get_preedit_string(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(context)

	var _str string            // out
	var _attrs *pango.AttrList // out
	var _cursorPos int         // out

	_str = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	defer C.free(unsafe.Pointer(_arg1))
	_attrs = (*pango.AttrList)(gextras.NewStructNative(unsafe.Pointer(_arg2)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_attrs)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.pango_attr_list_unref((*C.PangoAttrList)(intern.C))
		},
	)
	_cursorPos = int(_arg3)

	return _str, _attrs, _cursorPos
}

// Surrounding retrieves context around the insertion point. Input methods
// typically want context in order to constrain input text based on existing
// text; this is important for languages such as Thai where only some sequences
// of characters are allowed.
//
// This function is implemented by emitting the
// GtkIMContext::retrieve_surrounding signal on the input method; in response to
// this signal, a widget should provide as much context as is available, up to
// an entire paragraph, by calling gtk_im_context_set_surrounding(). Note that
// there is no obligation for a widget to respond to the ::retrieve_surrounding
// signal, so input methods must be prepared to function without context.
//
// The function returns the following values:
//
//   - text: location to store a UTF-8 encoded string of text holding context
//     around the insertion point. If the function returns TRUE, then you must
//     free the result stored in this location with g_free().
//   - cursorIndex: location to store byte index of the insertion cursor within
//     text.
//   - ok: TRUE if surrounding text was provided; in this case you must free the
//     result stored in *text.
func (context *IMContext) surrounding() (string, int, bool) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.get_surrounding

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.gchar        // in
	var _arg2 C.gint          // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C._gotk4_gtk3_IMContext_virtual_get_surrounding(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(context)

	var _text string     // out
	var _cursorIndex int // out
	var _ok bool         // out

	_text = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	defer C.free(unsafe.Pointer(_arg1))
	_cursorIndex = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _text, _cursorIndex, _ok
}

// preeditChanged: default handler of the IMContext::preedit-changed signal.
func (context *IMContext) preeditChanged() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.preedit_changed

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_preedit_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// preeditEnd: default handler of the IMContext::preedit-end signal.
func (context *IMContext) preeditEnd() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.preedit_end

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_preedit_end(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// preeditStart: default handler of the IMContext::preedit-start signal.
func (context *IMContext) preeditStart() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.preedit_start

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_preedit_start(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// Reset: notify the input method that a change such as a change in cursor
// position has been made. This will typically cause the input method to clear
// the preedit state.
func (context *IMContext) reset() {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.reset

	var _arg0 *C.GtkIMContext // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_IMContext_virtual_reset(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// retrieveSurrounding: default handler of the IMContext::retrieve-surrounding
// signal.
func (context *IMContext) retrieveSurrounding() bool {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.retrieve_surrounding

	var _arg0 *C.GtkIMContext // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C._gotk4_gtk3_IMContext_virtual_retrieve_surrounding(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// setClientWindow: set the client window for the input context; this is the
// Window in which the input appears. This window is used in order to correctly
// position status windows, and may also be used for purposes internal to the
// input method.
//
// The function takes the following parameters:
//
//   - window (optional): client window. This may be NULL to indicate that the
//     previous client window no longer exists.
func (context *IMContext) setClientWindow(window gdk.Windower) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.set_client_window

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkWindow    // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if window != nil {
		_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	}

	C._gotk4_gtk3_IMContext_virtual_set_client_window(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(window)
}

// setCursorLocation: notify the input method that a change in cursor position
// has been made. The location is relative to the client window.
//
// The function takes the following parameters:
//
//   - area: new location.
func (context *IMContext) setCursorLocation(area *gdk.Rectangle) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.set_cursor_location

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.GdkRectangle // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(area)))

	C._gotk4_gtk3_IMContext_virtual_set_cursor_location(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(area)
}

// setSurrounding sets surrounding context around the insertion point and
// preedit string. This function is expected to be called in response to the
// GtkIMContext::retrieve_surrounding signal, and will likely have no effect if
// called at other times.
//
// The function takes the following parameters:
//
//   - text surrounding the insertion point, as UTF-8. the preedit string should
//     not be included within text.
//   - cursorIndex: byte index of the insertion cursor within text.
func (context *IMContext) setSurrounding(text string, cursorIndex int) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.set_surrounding

	var _arg0 *C.GtkIMContext // out
	var _arg1 *C.gchar        // out
	var _arg2 C.gint
	var _arg3 C.gint // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))
	_arg3 = C.gint(cursorIndex)

	C._gotk4_gtk3_IMContext_virtual_set_surrounding(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(text)
	runtime.KeepAlive(cursorIndex)
}

// setUsePreedit sets whether the IM context should use the preedit string to
// display feedback. If use_preedit is FALSE (default is TRUE), then the IM
// context may use some other method to display feedback, such as displaying it
// in a child of the root window.
//
// The function takes the following parameters:
//
//   - usePreedit: whether the IM context should use the preedit string.
func (context *IMContext) setUsePreedit(usePreedit bool) {
	gclass := (*C.GtkIMContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.set_use_preedit

	var _arg0 *C.GtkIMContext // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkIMContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if usePreedit {
		_arg1 = C.TRUE
	}

	C._gotk4_gtk3_IMContext_virtual_set_use_preedit(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(usePreedit)
}

// IMContextSimpleOverrides contains methods that are overridable.
type IMContextSimpleOverrides struct {
}

func defaultIMContextSimpleOverrides(v *IMContextSimple) IMContextSimpleOverrides {
	return IMContextSimpleOverrides{}
}

// IMContextSimple is a simple input method context supporting table-based input
// methods. It has a built-in table of compose sequences that is derived from
// the X11 Compose files.
//
// GtkIMContextSimple reads additional compose sequences from the first of
// the following files that is found: ~/.config/gtk-3.0/Compose, ~/.XCompose,
// /usr/share/X11/locale/$locale/Compose (for locales that have a nontrivial
// Compose file). The syntax of these files is described in the Compose(5)
// manual page.
//
// # Unicode characters
//
// GtkIMContextSimple also supports numeric entry of Unicode characters
// by typing Ctrl-Shift-u, followed by a hexadecimal Unicode codepoint.
// For example, Ctrl-Shift-u 1 2 3 Enter yields U+0123 LATIN SMALL LETTER G WITH
// CEDILLA, i.e. ģ.
type IMContextSimple struct {
	_ [0]func() // equal guard
	IMContext
}

var (
	_ IMContexter = (*IMContextSimple)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IMContextSimple, *IMContextSimpleClass, IMContextSimpleOverrides](
		GTypeIMContextSimple,
		initIMContextSimpleClass,
		wrapIMContextSimple,
		defaultIMContextSimpleOverrides,
	)
}

func initIMContextSimpleClass(gclass unsafe.Pointer, overrides IMContextSimpleOverrides, classInitFunc func(*IMContextSimpleClass)) {
	if classInitFunc != nil {
		class := (*IMContextSimpleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIMContextSimple(obj *coreglib.Object) *IMContextSimple {
	return &IMContextSimple{
		IMContext: IMContext{
			Object: obj,
		},
	}
}

func marshalIMContextSimple(p uintptr) (interface{}, error) {
	return wrapIMContextSimple(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewIMContextSimple creates a new IMContextSimple.
//
// The function returns the following values:
//
//   - imContextSimple: new IMContextSimple.
func NewIMContextSimple() *IMContextSimple {
	var _cret *C.GtkIMContext // in

	_cret = C.gtk_im_context_simple_new()

	var _imContextSimple *IMContextSimple // out

	_imContextSimple = wrapIMContextSimple(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _imContextSimple
}

// AddComposeFile adds an additional table from the X11 compose file.
//
// The function takes the following parameters:
//
//   - composeFile: path of compose file.
func (contextSimple *IMContextSimple) AddComposeFile(composeFile string) {
	var _arg0 *C.GtkIMContextSimple // out
	var _arg1 *C.gchar              // out

	_arg0 = (*C.GtkIMContextSimple)(unsafe.Pointer(coreglib.InternObject(contextSimple).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(composeFile)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_im_context_simple_add_compose_file(_arg0, _arg1)
	runtime.KeepAlive(contextSimple)
	runtime.KeepAlive(composeFile)
}

// IMMulticontextOverrides contains methods that are overridable.
type IMMulticontextOverrides struct {
}

func defaultIMMulticontextOverrides(v *IMMulticontext) IMMulticontextOverrides {
	return IMMulticontextOverrides{}
}

type IMMulticontext struct {
	_ [0]func() // equal guard
	IMContext
}

var (
	_ IMContexter = (*IMMulticontext)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IMMulticontext, *IMMulticontextClass, IMMulticontextOverrides](
		GTypeIMMulticontext,
		initIMMulticontextClass,
		wrapIMMulticontext,
		defaultIMMulticontextOverrides,
	)
}

func initIMMulticontextClass(gclass unsafe.Pointer, overrides IMMulticontextOverrides, classInitFunc func(*IMMulticontextClass)) {
	if classInitFunc != nil {
		class := (*IMMulticontextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIMMulticontext(obj *coreglib.Object) *IMMulticontext {
	return &IMMulticontext{
		IMContext: IMContext{
			Object: obj,
		},
	}
}

func marshalIMMulticontext(p uintptr) (interface{}, error) {
	return wrapIMMulticontext(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewIMMulticontext creates a new IMMulticontext.
//
// The function returns the following values:
//
//   - imMulticontext: new IMMulticontext.
func NewIMMulticontext() *IMMulticontext {
	var _cret *C.GtkIMContext // in

	_cret = C.gtk_im_multicontext_new()

	var _imMulticontext *IMMulticontext // out

	_imMulticontext = wrapIMMulticontext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _imMulticontext
}

// AppendMenuitems: add menuitems for various available input methods to a menu;
// the menuitems, when selected, will switch the input method for the context
// and the global default input method.
//
// Deprecated: It is better to use the system-wide input method framework for
// changing input methods. Modern desktop shells offer on-screen displays for
// this that can triggered with a keyboard shortcut, e.g. Super-Space.
//
// The function takes the following parameters:
//
//   - menushell: MenuShell.
func (context *IMMulticontext) AppendMenuitems(menushell MenuSheller) {
	var _arg0 *C.GtkIMMulticontext // out
	var _arg1 *C.GtkMenuShell      // out

	_arg0 = (*C.GtkIMMulticontext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menushell).Native()))

	C.gtk_im_multicontext_append_menuitems(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(menushell)
}

// ContextID gets the id of the currently active slave of the context.
//
// The function returns the following values:
//
//   - utf8: id of the currently active slave.
func (context *IMMulticontext) ContextID() string {
	var _arg0 *C.GtkIMMulticontext // out
	var _cret *C.char              // in

	_arg0 = (*C.GtkIMMulticontext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_im_multicontext_get_context_id(_arg0)
	runtime.KeepAlive(context)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// SetContextID sets the context id for context.
//
// This causes the currently active slave of context to be replaced by the slave
// corresponding to the new context id.
//
// The function takes the following parameters:
//
//   - contextId: id to use.
func (context *IMMulticontext) SetContextID(contextId string) {
	var _arg0 *C.GtkIMMulticontext // out
	var _arg1 *C.char              // out

	_arg0 = (*C.GtkIMMulticontext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(contextId)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_im_multicontext_set_context_id(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(contextId)
}

// IconFactoryOverrides contains methods that are overridable.
type IconFactoryOverrides struct {
}

func defaultIconFactoryOverrides(v *IconFactory) IconFactoryOverrides {
	return IconFactoryOverrides{}
}

// IconFactory: icon factory manages a collection of IconSet; a IconSet
// manages a set of variants of a particular icon (i.e. a IconSet contains
// variants for different sizes and widget states). Icons in an icon factory
// are named by a stock ID, which is a simple string identifying the icon.
// Each Style has a list of IconFactory derived from the current theme;
// those icon factories are consulted first when searching for an icon.
// If the theme doesn’t set a particular icon, GTK+ looks for the icon in a
// list of default icon factories, maintained by gtk_icon_factory_add_default()
// and gtk_icon_factory_remove_default(). Applications with icons should add a
// default icon factory with their icons, which will allow themes to override
// the icons for the application.
//
// To display an icon, always use gtk_style_lookup_icon_set() on the widget that
// will display the icon, or the convenience function gtk_widget_render_icon().
// These functions take the theme into account when looking up the icon to use
// for a given stock ID.
//
// # GtkIconFactory as GtkBuildable
//
// GtkIconFactory supports a custom <sources> element, which can contain
// multiple <source> elements. The following attributes are allowed:
//
// - stock-id
//
//	The stock id of the source, a string. This attribute is
//	mandatory
//
// - filename
//
//	The filename of the source, a string.  This attribute is
//	optional
//
// - icon-name
//
//	The icon name for the source, a string.  This attribute is
//	optional.
//
// - size
//
//	Size of the icon, a IconSize enum value.  This attribute is
//	optional.
//
// - direction
//
//	Direction of the source, a TextDirection enum value.  This
//	attribute is optional.
//
// - state
//
//	State of the source, a StateType enum value.  This
//	attribute is optional.
//
// A IconFactory UI definition fragment. ##
//
//	<object class="GtkIconFactory" id="iconfactory1">
//	  <sources>
//	    <source stock-id="apple-red" filename="apple-red.png"/>
//	  </sources>
//	</object>
//	<object class="GtkWindow" id="window1">
//	  <child>
//	    <object class="GtkButton" id="apple_button">
//	      <property name="label">apple-red</property>
//	      <property name="use-stock">True</property>
//	    </object>
//	  </child>
//	</object>.
type IconFactory struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*IconFactory)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IconFactory, *IconFactoryClass, IconFactoryOverrides](
		GTypeIconFactory,
		initIconFactoryClass,
		wrapIconFactory,
		defaultIconFactoryOverrides,
	)
}

func initIconFactoryClass(gclass unsafe.Pointer, overrides IconFactoryOverrides, classInitFunc func(*IconFactoryClass)) {
	if classInitFunc != nil {
		class := (*IconFactoryClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIconFactory(obj *coreglib.Object) *IconFactory {
	return &IconFactory{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalIconFactory(p uintptr) (interface{}, error) {
	return wrapIconFactory(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewIconFactory creates a new IconFactory. An icon factory manages a
// collection of IconSets; a IconSet manages a set of variants of a particular
// icon (i.e. a IconSet contains variants for different sizes and widget
// states). Icons in an icon factory are named by a stock ID, which is a
// simple string identifying the icon. Each Style has a list of IconFactorys
// derived from the current theme; those icon factories are consulted first
// when searching for an icon. If the theme doesn’t set a particular icon,
// GTK+ looks for the icon in a list of default icon factories, maintained
// by gtk_icon_factory_add_default() and gtk_icon_factory_remove_default().
// Applications with icons should add a default icon factory with their icons,
// which will allow themes to override the icons for the application.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - iconFactory: new IconFactory.
func NewIconFactory() *IconFactory {
	var _cret *C.GtkIconFactory // in

	_cret = C.gtk_icon_factory_new()

	var _iconFactory *IconFactory // out

	_iconFactory = wrapIconFactory(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _iconFactory
}

// Add adds the given icon_set to the icon factory, under the name
// stock_id. stock_id should be namespaced for your application, e.g.
// “myapp-whatever-icon”. Normally applications create a IconFactory, then add
// it to the list of default factories with gtk_icon_factory_add_default().
// Then they pass the stock_id to widgets such as Image to display the icon.
// Themes can provide an icon with the same name (such as "myapp-whatever-icon")
// to override your application’s default icons. If an icon already existed in
// factory for stock_id, it is unreferenced and replaced with the new icon_set.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - stockId: icon name.
//   - iconSet: icon set.
func (factory *IconFactory) Add(stockId string, iconSet *IconSet) {
	var _arg0 *C.GtkIconFactory // out
	var _arg1 *C.gchar          // out
	var _arg2 *C.GtkIconSet     // out

	_arg0 = (*C.GtkIconFactory)(unsafe.Pointer(coreglib.InternObject(factory).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))

	C.gtk_icon_factory_add(_arg0, _arg1, _arg2)
	runtime.KeepAlive(factory)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(iconSet)
}

// AddDefault adds an icon factory to the list of icon factories
// searched by gtk_style_lookup_icon_set(). This means that, for example,
// gtk_image_new_from_stock() will be able to find icons in factory. There will
// normally be an icon factory added for each library or application that comes
// with icons. The default icon factories can be overridden by themes.
//
// Deprecated: Use IconTheme instead.
func (factory *IconFactory) AddDefault() {
	var _arg0 *C.GtkIconFactory // out

	_arg0 = (*C.GtkIconFactory)(unsafe.Pointer(coreglib.InternObject(factory).Native()))

	C.gtk_icon_factory_add_default(_arg0)
	runtime.KeepAlive(factory)
}

// Lookup looks up stock_id in the icon factory, returning an icon set
// if found, otherwise NULL. For display to the user, you should use
// gtk_style_lookup_icon_set() on the Style for the widget that will display the
// icon, instead of using this function directly, so that themes are taken into
// account.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - stockId: icon name.
//
// The function returns the following values:
//
//   - iconSet: icon set of stock_id.
func (factory *IconFactory) Lookup(stockId string) *IconSet {
	var _arg0 *C.GtkIconFactory // out
	var _arg1 *C.gchar          // out
	var _cret *C.GtkIconSet     // in

	_arg0 = (*C.GtkIconFactory)(unsafe.Pointer(coreglib.InternObject(factory).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_icon_factory_lookup(_arg0, _arg1)
	runtime.KeepAlive(factory)
	runtime.KeepAlive(stockId)

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_icon_set_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// RemoveDefault removes an icon factory from the list of default icon
// factories. Not normally used; you might use it for a library that can be
// unloaded or shut down.
//
// Deprecated: Use IconTheme instead.
func (factory *IconFactory) RemoveDefault() {
	var _arg0 *C.GtkIconFactory // out

	_arg0 = (*C.GtkIconFactory)(unsafe.Pointer(coreglib.InternObject(factory).Native()))

	C.gtk_icon_factory_remove_default(_arg0)
	runtime.KeepAlive(factory)
}

// IconFactoryLookupDefault looks for an icon in the list of
// default icon factories. For display to the user, you should use
// gtk_style_lookup_icon_set() on the Style for the widget that will display the
// icon, instead of using this function directly, so that themes are taken into
// account.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - stockId: icon name.
//
// The function returns the following values:
//
//   - iconSet or NULL.
func IconFactoryLookupDefault(stockId string) *IconSet {
	var _arg1 *C.gchar      // out
	var _cret *C.GtkIconSet // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_icon_factory_lookup_default(_arg1)
	runtime.KeepAlive(stockId)

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_icon_set_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// IconInfo contains information found when looking up an icon in an icon theme.
type IconInfo struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*IconInfo)(nil)
)

func wrapIconInfo(obj *coreglib.Object) *IconInfo {
	return &IconInfo{
		Object: obj,
	}
}

func marshalIconInfo(p uintptr) (interface{}, error) {
	return wrapIconInfo(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewIconInfoForPixbuf creates a IconInfo for a Pixbuf.
//
// The function takes the following parameters:
//
//   - iconTheme: IconTheme.
//   - pixbuf to wrap in a IconInfo.
//
// The function returns the following values:
//
//   - iconInfo: IconInfo.
func NewIconInfoForPixbuf(iconTheme *IconTheme, pixbuf *gdkpixbuf.Pixbuf) *IconInfo {
	var _arg1 *C.GtkIconTheme // out
	var _arg2 *C.GdkPixbuf    // out
	var _cret *C.GtkIconInfo  // in

	_arg1 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	_cret = C.gtk_icon_info_new_for_pixbuf(_arg1, _arg2)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(pixbuf)

	var _iconInfo *IconInfo // out

	_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _iconInfo
}

// AttachPoints: this function is deprecated and always returns FALSE.
//
// Deprecated: Attachment points are deprecated.
//
// The function returns the following values:
//
//   - points (optional): location to store pointer to an array of points,
//     or NULL free the array of points with g_free().
//   - ok: FALSE.
func (iconInfo *IconInfo) AttachPoints() ([]gdk.Point, bool) {
	var _arg0 *C.GtkIconInfo // out
	var _arg1 *C.GdkPoint    // in
	var _arg2 C.gint         // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_attach_points(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconInfo)

	var _points []gdk.Point // out
	var _ok bool            // out

	if _arg1 != nil {
		defer C.free(unsafe.Pointer(_arg1))
		{
			src := unsafe.Slice((*C.GdkPoint)(_arg1), _arg2)
			_points = make([]gdk.Point, _arg2)
			for i := 0; i < int(_arg2); i++ {
				_points[i] = *(*gdk.Point)(gextras.NewStructNative(unsafe.Pointer((&src[i]))))
				runtime.SetFinalizer(
					gextras.StructIntern(unsafe.Pointer(&_points[i])),
					func(intern *struct{ C unsafe.Pointer }) {
						C.free(intern.C)
					},
				)
			}
		}
	}
	if _cret != 0 {
		_ok = true
	}

	return _points, _ok
}

// BaseScale gets the base scale for the icon. The base scale is a scale for the
// icon that was specified by the icon theme creator. For instance an icon drawn
// for a high-dpi screen with window scale 2 for a base size of 32 will be 64
// pixels tall and have a base scale of 2.
//
// The function returns the following values:
//
//   - gint: base scale.
func (iconInfo *IconInfo) BaseScale() int {
	var _arg0 *C.GtkIconInfo // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_base_scale(_arg0)
	runtime.KeepAlive(iconInfo)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// BaseSize gets the base size for the icon. The base size is a size for the
// icon that was specified by the icon theme creator. This may be different than
// the actual size of image; an example of this is small emblem icons that can
// be attached to a larger icon. These icons will be given the same base size as
// the larger icons to which they are attached.
//
// Note that for scaled icons the base size does not include the base scale.
//
// The function returns the following values:
//
//   - gint: base size, or 0, if no base size is known for the icon.
func (iconInfo *IconInfo) BaseSize() int {
	var _arg0 *C.GtkIconInfo // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_base_size(_arg0)
	runtime.KeepAlive(iconInfo)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// BuiltinPixbuf gets the built-in image for this icon, if any. To allow GTK+
// to use built in icon images, you must pass the GTK_ICON_LOOKUP_USE_BUILTIN to
// gtk_icon_theme_lookup_icon().
//
// Deprecated: This function is deprecated, use
// gtk_icon_theme_add_resource_path() instead of builtin icons.
//
// The function returns the following values:
//
//   - pixbuf (optional): built-in image pixbuf, or NULL. No extra reference
//     is added to the returned pixbuf, so if you want to keep it around,
//     you must use g_object_ref(). The returned image must not be modified.
func (iconInfo *IconInfo) BuiltinPixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkIconInfo // out
	var _cret *C.GdkPixbuf   // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_builtin_pixbuf(_arg0)
	runtime.KeepAlive(iconInfo)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// DisplayName: this function is deprecated and always returns NULL.
//
// Deprecated: Display names are deprecated.
//
// The function returns the following values:
//
//   - utf8: NULL.
func (iconInfo *IconInfo) DisplayName() string {
	var _arg0 *C.GtkIconInfo // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_display_name(_arg0)
	runtime.KeepAlive(iconInfo)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// EmbeddedRect: this function is deprecated and always returns FALSE.
//
// Deprecated: Embedded rectangles are deprecated.
//
// The function returns the following values:
//
//   - rectangle in which to store embedded rectangle coordinates; coordinates
//     are only stored when this function returns TRUE.
//   - ok: FALSE.
func (iconInfo *IconInfo) EmbeddedRect() (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkIconInfo // out
	var _arg1 C.GdkRectangle // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_embedded_rect(_arg0, &_arg1)
	runtime.KeepAlive(iconInfo)

	var _rectangle *gdk.Rectangle // out
	var _ok bool                  // out

	_rectangle = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _rectangle, _ok
}

// Filename gets the filename for the icon. If the GTK_ICON_LOOKUP_USE_BUILTIN
// flag was passed to gtk_icon_theme_lookup_icon(), there may be no
// filename if a builtin icon is returned; in this case, you should use
// gtk_icon_info_get_builtin_pixbuf().
//
// The function returns the following values:
//
//   - filename (optional) for the icon, or NULL if
//     gtk_icon_info_get_builtin_pixbuf() should be used instead. The return
//     value is owned by GTK+ and should not be modified or freed.
func (iconInfo *IconInfo) Filename() string {
	var _arg0 *C.GtkIconInfo // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_get_filename(_arg0)
	runtime.KeepAlive(iconInfo)

	var _filename string // out

	if _cret != nil {
		_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _filename
}

// IsSymbolic checks if the icon is symbolic or not. This currently uses only
// the file name and not the file contents for determining this. This behaviour
// may change in the future.
//
// The function returns the following values:
//
//   - ok: TRUE if the icon is symbolic, FALSE otherwise.
func (iconInfo *IconInfo) IsSymbolic() bool {
	var _arg0 *C.GtkIconInfo // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_is_symbolic(_arg0)
	runtime.KeepAlive(iconInfo)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LoadIcon renders an icon previously looked up in an icon theme using
// gtk_icon_theme_lookup_icon(); the size will be based on the size passed
// to gtk_icon_theme_lookup_icon(). Note that the resulting pixbuf may not be
// exactly this size; an icon theme may have icons that differ slightly from
// their nominal sizes, and in addition GTK+ will avoid scaling icons that it
// considers sufficiently close to the requested size or for which the source
// image would have to be scaled up too far. (This maintains sharpness.). This
// behaviour can be changed by passing the GTK_ICON_LOOKUP_FORCE_SIZE flag when
// obtaining the IconInfo. If this flag has been specified, the pixbuf returned
// by this function will be scaled to the exact size.
//
// The function returns the following values:
//
//   - pixbuf: rendered icon; this may be a newly created icon or a new
//     reference to an internal icon, so you must not modify the icon. Use
//     g_object_unref() to release your reference to the icon.
func (iconInfo *IconInfo) LoadIcon() (*gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo // out
	var _cret *C.GdkPixbuf   // in
	var _cerr *C.GError      // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))

	_cret = C.gtk_icon_info_load_icon(_arg0, &_cerr)
	runtime.KeepAlive(iconInfo)

	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pixbuf, _goerr
}

// LoadIconAsync: asynchronously load, render and scale an icon previously
// looked up from the icon theme using gtk_icon_theme_lookup_icon().
//
// For more details, see gtk_icon_info_load_icon() which is the synchronous
// version of this call.
//
// The function takes the following parameters:
//
//   - ctx (optional): optional #GCancellable object, NULL to ignore.
//   - callback (optional) to call when the request is satisfied.
func (iconInfo *IconInfo) LoadIconAsync(ctx context.Context, callback gio.AsyncReadyCallback) {
	var _arg0 *C.GtkIconInfo        // out
	var _arg1 *C.GCancellable       // out
	var _arg2 C.GAsyncReadyCallback // out
	var _arg3 C.gpointer

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	{
		cancellable := gcancel.GCancellableFromContext(ctx)
		defer runtime.KeepAlive(cancellable)
		_arg1 = (*C.GCancellable)(unsafe.Pointer(cancellable.Native()))
	}
	if callback != nil {
		_arg2 = (*[0]byte)(C._gotk4_gio2_AsyncReadyCallback)
		_arg3 = C.gpointer(gbox.AssignOnce(callback))
	}

	C.gtk_icon_info_load_icon_async(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(ctx)
	runtime.KeepAlive(callback)
}

// LoadIconFinish finishes an async icon load, see
// gtk_icon_info_load_icon_async().
//
// The function takes the following parameters:
//
//   - res: Result.
//
// The function returns the following values:
//
//   - pixbuf: rendered icon; this may be a newly created icon or a new
//     reference to an internal icon, so you must not modify the icon. Use
//     g_object_unref() to release your reference to the icon.
func (iconInfo *IconInfo) LoadIconFinish(res gio.AsyncResulter) (*gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo  // out
	var _arg1 *C.GAsyncResult // out
	var _cret *C.GdkPixbuf    // in
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GAsyncResult)(unsafe.Pointer(coreglib.InternObject(res).Native()))

	_cret = C.gtk_icon_info_load_icon_finish(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(res)

	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pixbuf, _goerr
}

// LoadSurface renders an icon previously looked up in an icon theme using
// gtk_icon_theme_lookup_icon(); the size will be based on the size passed to
// gtk_icon_theme_lookup_icon(). Note that the resulting surface may not be
// exactly this size; an icon theme may have icons that differ slightly from
// their nominal sizes, and in addition GTK+ will avoid scaling icons that it
// considers sufficiently close to the requested size or for which the source
// image would have to be scaled up too far. (This maintains sharpness.). This
// behaviour can be changed by passing the GTK_ICON_LOOKUP_FORCE_SIZE flag when
// obtaining the IconInfo. If this flag has been specified, the pixbuf returned
// by this function will be scaled to the exact size.
//
// The function takes the following parameters:
//
//   - forWindow (optional) to optimize drawing for, or NULL.
//
// The function returns the following values:
//
//   - surface: rendered icon; this may be a newly created icon or a new
//     reference to an internal icon, so you must not modify the icon.
//     Use cairo_surface_destroy() to release your reference to the icon.
func (iconInfo *IconInfo) LoadSurface(forWindow gdk.Windower) (*cairo.Surface, error) {
	var _arg0 *C.GtkIconInfo     // out
	var _arg1 *C.GdkWindow       // out
	var _cret *C.cairo_surface_t // in
	var _cerr *C.GError          // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	if forWindow != nil {
		_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(forWindow).Native()))
	}

	_cret = C.gtk_icon_info_load_surface(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(forWindow)

	var _surface *cairo.Surface // out
	var _goerr error            // out

	_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
		C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
	})
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _surface, _goerr
}

// LoadSymbolic loads an icon, modifying it to match the system colours
// for the foreground, success, warning and error colors provided. If the
// icon is not a symbolic one, the function will return the result from
// gtk_icon_info_load_icon().
//
// This allows loading symbolic icons that will match the system theme.
//
// Unless you are implementing a widget, you will want to use
// g_themed_icon_new_with_default_fallbacks() to load the icon.
//
// As implementation details, the icon loaded needs to be of SVG type, contain
// the “symbolic” term as the last component of the icon name, and use the “fg”,
// “success”, “warning” and “error” CSS styles in the SVG file itself.
//
// See the Symbolic Icons Specification
// (http://www.freedesktop.org/wiki/SymbolicIcons) for more information about
// symbolic icons.
//
// The function takes the following parameters:
//
//   - fg representing the foreground color of the icon.
//   - successColor (optional) representing the warning color of the icon or
//     NULL to use the default color.
//   - warningColor (optional) representing the warning color of the icon or
//     NULL to use the default color.
//   - errorColor (optional) representing the error color of the icon or NULL to
//     use the default color (allow-none).
//
// The function returns the following values:
//
//   - wasSymbolic (optional) returns whether the loaded icon was a symbolic one
//     and whether the fg color was applied to it.
//   - pixbuf representing the loaded icon.
func (iconInfo *IconInfo) LoadSymbolic(fg, successColor, warningColor, errorColor *gdk.RGBA) (bool, *gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo // out
	var _arg1 *C.GdkRGBA     // out
	var _arg2 *C.GdkRGBA     // out
	var _arg3 *C.GdkRGBA     // out
	var _arg4 *C.GdkRGBA     // out
	var _arg5 C.gboolean     // in
	var _cret *C.GdkPixbuf   // in
	var _cerr *C.GError      // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(fg)))
	if successColor != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(successColor)))
	}
	if warningColor != nil {
		_arg3 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(warningColor)))
	}
	if errorColor != nil {
		_arg4 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(errorColor)))
	}

	_cret = C.gtk_icon_info_load_symbolic(_arg0, _arg1, _arg2, _arg3, _arg4, &_arg5, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(fg)
	runtime.KeepAlive(successColor)
	runtime.KeepAlive(warningColor)
	runtime.KeepAlive(errorColor)

	var _wasSymbolic bool         // out
	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _arg5 != 0 {
		_wasSymbolic = true
	}
	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _wasSymbolic, _pixbuf, _goerr
}

// LoadSymbolicAsync: asynchronously load, render and scale a symbolic icon
// previously looked up from the icon theme using gtk_icon_theme_lookup_icon().
//
// For more details, see gtk_icon_info_load_symbolic() which is the synchronous
// version of this call.
//
// The function takes the following parameters:
//
//   - ctx (optional): optional #GCancellable object, NULL to ignore.
//   - fg representing the foreground color of the icon.
//   - successColor (optional) representing the warning color of the icon or
//     NULL to use the default color.
//   - warningColor (optional) representing the warning color of the icon or
//     NULL to use the default color.
//   - errorColor (optional) representing the error color of the icon or NULL to
//     use the default color (allow-none).
//   - callback (optional) to call when the request is satisfied.
func (iconInfo *IconInfo) LoadSymbolicAsync(ctx context.Context, fg, successColor, warningColor, errorColor *gdk.RGBA, callback gio.AsyncReadyCallback) {
	var _arg0 *C.GtkIconInfo        // out
	var _arg5 *C.GCancellable       // out
	var _arg1 *C.GdkRGBA            // out
	var _arg2 *C.GdkRGBA            // out
	var _arg3 *C.GdkRGBA            // out
	var _arg4 *C.GdkRGBA            // out
	var _arg6 C.GAsyncReadyCallback // out
	var _arg7 C.gpointer

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	{
		cancellable := gcancel.GCancellableFromContext(ctx)
		defer runtime.KeepAlive(cancellable)
		_arg5 = (*C.GCancellable)(unsafe.Pointer(cancellable.Native()))
	}
	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(fg)))
	if successColor != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(successColor)))
	}
	if warningColor != nil {
		_arg3 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(warningColor)))
	}
	if errorColor != nil {
		_arg4 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(errorColor)))
	}
	if callback != nil {
		_arg6 = (*[0]byte)(C._gotk4_gio2_AsyncReadyCallback)
		_arg7 = C.gpointer(gbox.AssignOnce(callback))
	}

	C.gtk_icon_info_load_symbolic_async(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(ctx)
	runtime.KeepAlive(fg)
	runtime.KeepAlive(successColor)
	runtime.KeepAlive(warningColor)
	runtime.KeepAlive(errorColor)
	runtime.KeepAlive(callback)
}

// LoadSymbolicFinish finishes an async icon load, see
// gtk_icon_info_load_symbolic_async().
//
// The function takes the following parameters:
//
//   - res: Result.
//
// The function returns the following values:
//
//   - wasSymbolic (optional) returns whether the loaded icon was a symbolic one
//     and whether the fg color was applied to it.
//   - pixbuf: rendered icon; this may be a newly created icon or a new
//     reference to an internal icon, so you must not modify the icon. Use
//     g_object_unref() to release your reference to the icon.
func (iconInfo *IconInfo) LoadSymbolicFinish(res gio.AsyncResulter) (bool, *gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo  // out
	var _arg1 *C.GAsyncResult // out
	var _arg2 C.gboolean      // in
	var _cret *C.GdkPixbuf    // in
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GAsyncResult)(unsafe.Pointer(coreglib.InternObject(res).Native()))

	_cret = C.gtk_icon_info_load_symbolic_finish(_arg0, _arg1, &_arg2, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(res)

	var _wasSymbolic bool         // out
	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _arg2 != 0 {
		_wasSymbolic = true
	}
	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _wasSymbolic, _pixbuf, _goerr
}

// LoadSymbolicForContext loads an icon, modifying it to match the system
// colors for the foreground, success, warning and error colors provided.
// If the icon is not a symbolic one, the function will return the result from
// gtk_icon_info_load_icon(). This function uses the regular foreground color
// and the symbolic colors with the names “success_color”, “warning_color” and
// “error_color” from the context.
//
// This allows loading symbolic icons that will match the system theme.
//
// See gtk_icon_info_load_symbolic() for more details.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//
// The function returns the following values:
//
//   - wasSymbolic (optional) returns whether the loaded icon was a symbolic one
//     and whether the fg color was applied to it.
//   - pixbuf representing the loaded icon.
func (iconInfo *IconInfo) LoadSymbolicForContext(context *StyleContext) (bool, *gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo     // out
	var _arg1 *C.GtkStyleContext // out
	var _arg2 C.gboolean         // in
	var _cret *C.GdkPixbuf       // in
	var _cerr *C.GError          // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_icon_info_load_symbolic_for_context(_arg0, _arg1, &_arg2, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(context)

	var _wasSymbolic bool         // out
	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _arg2 != 0 {
		_wasSymbolic = true
	}
	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _wasSymbolic, _pixbuf, _goerr
}

// LoadSymbolicForContextAsync: asynchronously load, render and scale
// a symbolic icon previously looked up from the icon theme using
// gtk_icon_theme_lookup_icon().
//
// For more details, see gtk_icon_info_load_symbolic_for_context() which is the
// synchronous version of this call.
//
// The function takes the following parameters:
//
//   - ctx (optional): optional #GCancellable object, NULL to ignore.
//   - context: StyleContext.
//   - callback (optional) to call when the request is satisfied.
func (iconInfo *IconInfo) LoadSymbolicForContextAsync(ctx context.Context, context *StyleContext, callback gio.AsyncReadyCallback) {
	var _arg0 *C.GtkIconInfo        // out
	var _arg2 *C.GCancellable       // out
	var _arg1 *C.GtkStyleContext    // out
	var _arg3 C.GAsyncReadyCallback // out
	var _arg4 C.gpointer

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	{
		cancellable := gcancel.GCancellableFromContext(ctx)
		defer runtime.KeepAlive(cancellable)
		_arg2 = (*C.GCancellable)(unsafe.Pointer(cancellable.Native()))
	}
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if callback != nil {
		_arg3 = (*[0]byte)(C._gotk4_gio2_AsyncReadyCallback)
		_arg4 = C.gpointer(gbox.AssignOnce(callback))
	}

	C.gtk_icon_info_load_symbolic_for_context_async(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(ctx)
	runtime.KeepAlive(context)
	runtime.KeepAlive(callback)
}

// LoadSymbolicForContextFinish finishes an async icon load, see
// gtk_icon_info_load_symbolic_for_context_async().
//
// The function takes the following parameters:
//
//   - res: Result.
//
// The function returns the following values:
//
//   - wasSymbolic (optional) returns whether the loaded icon was a symbolic one
//     and whether the fg color was applied to it.
//   - pixbuf: rendered icon; this may be a newly created icon or a new
//     reference to an internal icon, so you must not modify the icon. Use
//     g_object_unref() to release your reference to the icon.
func (iconInfo *IconInfo) LoadSymbolicForContextFinish(res gio.AsyncResulter) (bool, *gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo  // out
	var _arg1 *C.GAsyncResult // out
	var _arg2 C.gboolean      // in
	var _cret *C.GdkPixbuf    // in
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GAsyncResult)(unsafe.Pointer(coreglib.InternObject(res).Native()))

	_cret = C.gtk_icon_info_load_symbolic_for_context_finish(_arg0, _arg1, &_arg2, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(res)

	var _wasSymbolic bool         // out
	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _arg2 != 0 {
		_wasSymbolic = true
	}
	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _wasSymbolic, _pixbuf, _goerr
}

// LoadSymbolicForStyle loads an icon, modifying it to match the system
// colours for the foreground, success, warning and error colors provided.
// If the icon is not a symbolic one, the function will return the result from
// gtk_icon_info_load_icon().
//
// This allows loading symbolic icons that will match the system theme.
//
// See gtk_icon_info_load_symbolic() for more details.
//
// Deprecated: Use gtk_icon_info_load_symbolic_for_context() instead.
//
// The function takes the following parameters:
//
//   - style to take the colors from.
//   - state: widget state to use for colors.
//
// The function returns the following values:
//
//   - wasSymbolic (optional) returns whether the loaded icon was a symbolic one
//     and whether the fg color was applied to it.
//   - pixbuf representing the loaded icon.
func (iconInfo *IconInfo) LoadSymbolicForStyle(style *Style, state StateType) (bool, *gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconInfo // out
	var _arg1 *C.GtkStyle    // out
	var _arg2 C.GtkStateType // out
	var _arg3 C.gboolean     // in
	var _cret *C.GdkPixbuf   // in
	var _cerr *C.GError      // in

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg2 = C.GtkStateType(state)

	_cret = C.gtk_icon_info_load_symbolic_for_style(_arg0, _arg1, _arg2, &_arg3, &_cerr)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(style)
	runtime.KeepAlive(state)

	var _wasSymbolic bool         // out
	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _arg3 != 0 {
		_wasSymbolic = true
	}
	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _wasSymbolic, _pixbuf, _goerr
}

// SetRawCoordinates sets whether the coordinates returned by
// gtk_icon_info_get_embedded_rect() and gtk_icon_info_get_attach_points()
// should be returned in their original form as specified in the icon
// theme, instead of scaled appropriately for the pixbuf returned by
// gtk_icon_info_load_icon().
//
// Raw coordinates are somewhat strange; they are specified to be with
// respect to the unscaled pixmap for PNG and XPM icons, but for SVG icons,
// they are in a 1000x1000 coordinate space that is scaled to the final
// size of the icon. You can determine if the icon is an SVG icon by using
// gtk_icon_info_get_filename(), and seeing if it is non-NULL and ends in
// “.svg”.
//
// This function is provided primarily to allow compatibility wrappers for older
// API's, and is not expected to be useful for applications.
//
// Deprecated: Embedded rectangles and attachment points are deprecated.
//
// The function takes the following parameters:
//
//   - rawCoordinates: whether the coordinates of embedded rectangles and
//     attached points should be returned in their original (unscaled) form.
func (iconInfo *IconInfo) SetRawCoordinates(rawCoordinates bool) {
	var _arg0 *C.GtkIconInfo // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkIconInfo)(unsafe.Pointer(coreglib.InternObject(iconInfo).Native()))
	if rawCoordinates {
		_arg1 = C.TRUE
	}

	C.gtk_icon_info_set_raw_coordinates(_arg0, _arg1)
	runtime.KeepAlive(iconInfo)
	runtime.KeepAlive(rawCoordinates)
}

// IconThemeOverrides contains methods that are overridable.
type IconThemeOverrides struct {
	// Changed: signal emitted when the current icon theme is switched or GTK+
	// detects that a change has occurred in the contents of the current icon
	// theme.
	Changed func()
}

func defaultIconThemeOverrides(v *IconTheme) IconThemeOverrides {
	return IconThemeOverrides{
		Changed: v.changed,
	}
}

// IconTheme provides a facility for looking up icons by name and size. The main
// reason for using a name rather than simply providing a filename is to allow
// different icons to be used depending on what “icon theme” is selected by the
// user. The operation of icon themes on Linux and Unix follows the Icon Theme
// Specification (http://www.freedesktop.org/Standards/icon-theme-spec) There
// is a fallback icon theme, named hicolor, where applications should install
// their icons, but additional icon themes can be installed as operating system
// vendors and users choose.
//
// Named icons are similar to the deprecated [Stock Items][gtkstock], and the
// distinction between the two may be a bit confusing. A few things to keep in
// mind:
//
// - Stock images usually are used in conjunction with [Stock Items][gtkstock],
// such as GTK_STOCK_OK or GTK_STOCK_OPEN. Named icons are easier to set up and
// therefore are more useful for new icons that an application wants to add,
// such as application icons or window icons.
//
// - Stock images can only be loaded at the symbolic sizes defined by the
// IconSize enumeration, or by custom sizes defined by gtk_icon_size_register(),
// while named icons are more flexible and any pixel size can be specified.
//
// - Because stock images are closely tied to stock items, and thus to actions
// in the user interface, stock images may come in multiple variants for
// different widget states or writing directions.
//
// A good rule of thumb is that if there is a stock image for what you want
// to use, use it, otherwise use a named icon. It turns out that internally
// stock images are generally defined in terms of one or more named icons. (An
// example of the more than one case is icons that depend on writing direction;
// GTK_STOCK_GO_FORWARD uses the two themed icons “gtk-stock-go-forward-ltr” and
// “gtk-stock-go-forward-rtl”.)
//
// In many cases, named themes are used indirectly, via Image or stock items,
// rather than directly, but looking up icons directly is also simple. The
// IconTheme object acts as a database of all the icons in the current theme.
// You can create new IconTheme objects, but it’s much more efficient to use
// the standard icon theme for the Screen so that the icon information is shared
// with other people looking up icons.
//
//	GError *error = NULL;
//	GtkIconTheme *icon_theme;
//	GdkPixbuf *pixbuf;
//
//	icon_theme = gtk_icon_theme_get_default ();
//	pixbuf = gtk_icon_theme_load_icon (icon_theme,
//	                                   "my-icon-name", // icon name
//	                                   48, // icon size
//	                                   0,  // flags
//	                                   &error);
//	if (!pixbuf)
//	  {
//	    g_warning ("Couldn’t load icon: s", error->message);
//	    g_error_free (error);
//	  }
//	else
//	  {
//	    // Use the pixbuf
//	    g_object_unref (pixbuf);
//	  }.
type IconTheme struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*IconTheme)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IconTheme, *IconThemeClass, IconThemeOverrides](
		GTypeIconTheme,
		initIconThemeClass,
		wrapIconTheme,
		defaultIconThemeOverrides,
	)
}

func initIconThemeClass(gclass unsafe.Pointer, overrides IconThemeOverrides, classInitFunc func(*IconThemeClass)) {
	pclass := (*C.GtkIconThemeClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeIconTheme))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_IconThemeClass_changed)
	}

	if classInitFunc != nil {
		class := (*IconThemeClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIconTheme(obj *coreglib.Object) *IconTheme {
	return &IconTheme{
		Object: obj,
	}
}

func marshalIconTheme(p uintptr) (interface{}, error) {
	return wrapIconTheme(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged is emitted when the current icon theme is switched or GTK+
// detects that a change has occurred in the contents of the current icon theme.
func (iconTheme *IconTheme) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconTheme, "changed", false, unsafe.Pointer(C._gotk4_gtk3_IconTheme_ConnectChanged), f)
}

// NewIconTheme creates a new icon theme object. Icon theme objects are used to
// lookup up an icon by name in a particular icon theme. Usually, you’ll want to
// use gtk_icon_theme_get_default() or gtk_icon_theme_get_for_screen() rather
// than creating a new icon theme object for scratch.
//
// The function returns the following values:
//
//   - iconTheme: newly created IconTheme object.
func NewIconTheme() *IconTheme {
	var _cret *C.GtkIconTheme // in

	_cret = C.gtk_icon_theme_new()

	var _iconTheme *IconTheme // out

	_iconTheme = wrapIconTheme(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _iconTheme
}

// AddResourcePath adds a resource path that will be looked at when looking for
// icons, similar to search paths.
//
// This function should be used to make application-specific icons available as
// part of the icon theme.
//
// The resources are considered as part of the hicolor icon theme and must be
// located in subdirectories that are defined in the hicolor icon theme, such as
// path/16x16/actions/run.png. Icons that are directly placed in the resource
// path instead of a subdirectory are also considered as ultimate fallback.
//
// The function takes the following parameters:
//
//   - path: resource path.
func (iconTheme *IconTheme) AddResourcePath(path string) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_icon_theme_add_resource_path(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(path)
}

// AppendSearchPath appends a directory to the search path. See
// gtk_icon_theme_set_search_path().
//
// The function takes the following parameters:
//
//   - path: directory name to append to the icon path.
func (iconTheme *IconTheme) AppendSearchPath(path string) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_icon_theme_append_search_path(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(path)
}

// ChooseIcon looks up a named icon and returns a IconInfo containing
// information such as the filename of the icon. The icon can then be rendered
// into a pixbuf using gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
// combines these two steps if all you need is the pixbuf.)
//
// If icon_names contains more than one name, this function tries them all in
// the given order before falling back to inherited icon themes.
//
// The function takes the following parameters:
//
//   - iconNames: NULL-terminated array of icon names to lookup.
//   - size: desired icon size.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) object containing information about the icon, or NULL
//     if the icon wasn’t found.
func (iconTheme *IconTheme) ChooseIcon(iconNames []string, size int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 **C.gchar            // out
	var _arg2 C.gint               // out
	var _arg3 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(iconNames) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(iconNames)+1)
			var zero *C.gchar
			out[len(iconNames)] = zero
			for i := range iconNames {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(iconNames[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}
	_arg2 = C.gint(size)
	_arg3 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_choose_icon(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconNames)
	runtime.KeepAlive(size)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// ChooseIconForScale looks up a named icon for a particular window scale and
// returns a IconInfo containing information such as the filename of the icon.
// The icon can then be rendered into a pixbuf using gtk_icon_info_load_icon().
// (gtk_icon_theme_load_icon() combines these two steps if all you need is the
// pixbuf.)
//
// If icon_names contains more than one name, this function tries them all in
// the given order before falling back to inherited icon themes.
//
// The function takes the following parameters:
//
//   - iconNames: NULL-terminated array of icon names to lookup.
//   - size: desired icon size.
//   - scale: desired scale.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) object containing information about the icon, or NULL
//     if the icon wasn’t found.
func (iconTheme *IconTheme) ChooseIconForScale(iconNames []string, size, scale int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 **C.gchar            // out
	var _arg2 C.gint               // out
	var _arg3 C.gint               // out
	var _arg4 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(iconNames) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(iconNames)+1)
			var zero *C.gchar
			out[len(iconNames)] = zero
			for i := range iconNames {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(iconNames[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}
	_arg2 = C.gint(size)
	_arg3 = C.gint(scale)
	_arg4 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_choose_icon_for_scale(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconNames)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// ExampleIconName gets the name of an icon that is representative of the
// current theme (for instance, to use when presenting a list of themes to the
// user.).
//
// The function returns the following values:
//
//   - utf8 (optional): name of an example icon or NULL. Free with g_free().
func (iconTheme *IconTheme) ExampleIconName() string {
	var _arg0 *C.GtkIconTheme // out
	var _cret *C.char         // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))

	_cret = C.gtk_icon_theme_get_example_icon_name(_arg0)
	runtime.KeepAlive(iconTheme)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// IconSizes returns an array of integers describing the sizes at which the icon
// is available without scaling. A size of -1 means that the icon is available
// in a scalable format. The array is zero-terminated.
//
// The function takes the following parameters:
//
//   - iconName: name of an icon.
//
// The function returns the following values:
//
//   - gints: newly allocated array describing the sizes at which the icon is
//     available. The array should be freed with g_free() when it is no longer
//     needed.
func (iconTheme *IconTheme) IconSizes(iconName string) []int {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out
	var _cret *C.gint         // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_icon_theme_get_icon_sizes(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)

	var _gints []int // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z C.gint
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_gints = make([]int, i)
		for i := range src {
			_gints[i] = int(src[i])
		}
	}

	return _gints
}

// SearchPath gets the current search path. See
// gtk_icon_theme_set_search_path().
//
// The function returns the following values:
//
//   - path (optional): location to store a list of icon theme path directories
//     or NULL. The stored value should be freed with g_strfreev().
func (iconTheme *IconTheme) SearchPath() []string {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 **C.gchar       // in
	var _arg2 C.gint          // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))

	C.gtk_icon_theme_get_search_path(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconTheme)

	var _path []string // out

	if _arg1 != nil {
		defer C.free(unsafe.Pointer(_arg1))
		{
			src := unsafe.Slice((**C.gchar)(_arg1), _arg2)
			_path = make([]string, _arg2)
			for i := 0; i < int(_arg2); i++ {
				_path[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
				defer C.free(unsafe.Pointer(src[i]))
			}
		}
	}

	return _path
}

// HasIcon checks whether an icon theme includes an icon for a particular name.
//
// The function takes the following parameters:
//
//   - iconName: name of an icon.
//
// The function returns the following values:
//
//   - ok: TRUE if icon_theme includes an icon for icon_name.
func (iconTheme *IconTheme) HasIcon(iconName string) bool {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_icon_theme_has_icon(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListContexts gets the list of contexts available within the current hierarchy
// of icon themes. See gtk_icon_theme_list_icons() for details about contexts.
//
// The function returns the following values:
//
//   - list list holding the names of all the contexts in the theme. You must
//     first free each element in the list with g_free(), then free the list
//     itself with g_list_free().
func (iconTheme *IconTheme) ListContexts() []string {
	var _arg0 *C.GtkIconTheme // out
	var _cret *C.GList        // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))

	_cret = C.gtk_icon_theme_list_contexts(_arg0)
	runtime.KeepAlive(iconTheme)

	var _list []string // out

	_list = make([]string, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		defer C.free(unsafe.Pointer(src))
		_list = append(_list, dst)
	})

	return _list
}

// ListIcons lists the icons in the current icon theme. Only a
// subset of the icons can be listed by providing a context string.
// The set of values for the context string is system dependent,
// but will typically include such values as “Applications” and
// “MimeTypes”. Contexts are explained in the Icon Theme Specification
// (http://www.freedesktop.org/wiki/Specifications/icon-theme-spec).
// The standard contexts are listed in the Icon Naming Specification
// (http://www.freedesktop.org/wiki/Specifications/icon-naming-spec). Also see
// gtk_icon_theme_list_contexts().
//
// The function takes the following parameters:
//
//   - context (optional): string identifying a particular type of icon, or NULL
//     to list all icons.
//
// The function returns the following values:
//
//   - list list holding the names of all the icons in the theme. You must first
//     free each element in the list with g_free(), then free the list itself
//     with g_list_free().
func (iconTheme *IconTheme) ListIcons(context string) []string {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out
	var _cret *C.GList        // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	if context != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(context)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_icon_theme_list_icons(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(context)

	var _list []string // out

	_list = make([]string, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		defer C.free(unsafe.Pointer(src))
		_list = append(_list, dst)
	})

	return _list
}

// LoadIcon looks up an icon in an icon theme, scales it to the given size and
// renders it into a pixbuf. This is a convenience function; if more details
// about the icon are needed, use gtk_icon_theme_lookup_icon() followed by
// gtk_icon_info_load_icon().
//
// Note that you probably want to listen for icon theme changes and update the
// icon. This is usually done by connecting to the GtkWidget::style-set signal.
// If for some reason you do not want to update the icon when the icon theme
// changes, you should consider using gdk_pixbuf_copy() to make a private copy
// of the pixbuf returned by this function. Otherwise GTK+ may need to keep the
// old icon theme loaded, which would be a waste of memory.
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to lookup.
//   - size: desired icon size. The resulting icon may not be exactly this size;
//     see gtk_icon_info_load_icon().
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - pixbuf (optional): rendered icon; this may be a newly created icon or
//     a new reference to an internal icon, so you must not modify the icon.
//     Use g_object_unref() to release your reference to the icon. NULL if the
//     icon isn’t found.
func (iconTheme *IconTheme) LoadIcon(iconName string, size int, flags IconLookupFlags) (*gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.gchar             // out
	var _arg2 C.gint               // out
	var _arg3 C.GtkIconLookupFlags // out
	var _cret *C.GdkPixbuf         // in
	var _cerr *C.GError            // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_load_icon(_arg0, _arg1, _arg2, _arg3, &_cerr)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(flags)

	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pixbuf, _goerr
}

// LoadIconForScale looks up an icon in an icon theme for a particular
// window scale, scales it to the given size and renders it into a pixbuf.
// This is a convenience function; if more details about the icon are needed,
// use gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_icon().
//
// Note that you probably want to listen for icon theme changes and update the
// icon. This is usually done by connecting to the GtkWidget::style-set signal.
// If for some reason you do not want to update the icon when the icon theme
// changes, you should consider using gdk_pixbuf_copy() to make a private copy
// of the pixbuf returned by this function. Otherwise GTK+ may need to keep the
// old icon theme loaded, which would be a waste of memory.
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to lookup.
//   - size: desired icon size. The resulting icon may not be exactly this size;
//     see gtk_icon_info_load_icon().
//   - scale: desired scale.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - pixbuf (optional): rendered icon; this may be a newly created icon or
//     a new reference to an internal icon, so you must not modify the icon.
//     Use g_object_unref() to release your reference to the icon. NULL if the
//     icon isn’t found.
func (iconTheme *IconTheme) LoadIconForScale(iconName string, size, scale int, flags IconLookupFlags) (*gdkpixbuf.Pixbuf, error) {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.gchar             // out
	var _arg2 C.gint               // out
	var _arg3 C.gint               // out
	var _arg4 C.GtkIconLookupFlags // out
	var _cret *C.GdkPixbuf         // in
	var _cerr *C.GError            // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = C.gint(scale)
	_arg4 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_load_icon_for_scale(_arg0, _arg1, _arg2, _arg3, _arg4, &_cerr)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(flags)

	var _pixbuf *gdkpixbuf.Pixbuf // out
	var _goerr error              // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pixbuf, _goerr
}

// LoadSurface looks up an icon in an icon theme for a particular window
// scale, scales it to the given size and renders it into a cairo surface.
// This is a convenience function; if more details about the icon are needed,
// use gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_surface().
//
// Note that you probably want to listen for icon theme changes and update the
// icon. This is usually done by connecting to the GtkWidget::style-set signal.
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to lookup.
//   - size: desired icon size. The resulting icon may not be exactly this size;
//     see gtk_icon_info_load_icon().
//   - scale: desired scale.
//   - forWindow (optional) to optimize drawing for, or NULL.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - surface (optional): rendered icon; this may be a newly created icon or
//     a new reference to an internal icon, so you must not modify the icon.
//     Use cairo_surface_destroy() to release your reference to the icon.
//     NULL if the icon isn’t found.
func (iconTheme *IconTheme) LoadSurface(iconName string, size, scale int, forWindow gdk.Windower, flags IconLookupFlags) (*cairo.Surface, error) {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.gchar             // out
	var _arg2 C.gint               // out
	var _arg3 C.gint               // out
	var _arg4 *C.GdkWindow         // out
	var _arg5 C.GtkIconLookupFlags // out
	var _cret *C.cairo_surface_t   // in
	var _cerr *C.GError            // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = C.gint(scale)
	if forWindow != nil {
		_arg4 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(forWindow).Native()))
	}
	_arg5 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_load_surface(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, &_cerr)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(forWindow)
	runtime.KeepAlive(flags)

	var _surface *cairo.Surface // out
	var _goerr error            // out

	if _cret != nil {
		_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
			C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
		})
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _surface, _goerr
}

// LookupByGIcon looks up an icon and returns a IconInfo containing information
// such as the filename of the icon. The icon can then be rendered into a pixbuf
// using gtk_icon_info_load_icon().
//
// When rendering on displays with high pixel densities you should not
// use a size multiplied by the scaling factor returned by functions
// like gdk_window_get_scale_factor(). Instead, you should use
// gtk_icon_theme_lookup_by_gicon_for_scale(), as the assets loaded for a given
// scaling factor may be different.
//
// The function takes the following parameters:
//
//   - icon to look up.
//   - size: desired icon size.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) containing information about the icon, or NULL if the
//     icon wasn’t found. Unref with g_object_unref().
func (iconTheme *IconTheme) LookupByGIcon(icon gio.Iconner, size int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.GIcon             // out
	var _arg2 C.gint               // out
	var _arg3 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	_arg2 = C.gint(size)
	_arg3 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_lookup_by_gicon(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(icon)
	runtime.KeepAlive(size)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// LookupByGIconForScale looks up an icon and returns a IconInfo containing
// information such as the filename of the icon. The icon can then be rendered
// into a pixbuf using gtk_icon_info_load_icon().
//
// The function takes the following parameters:
//
//   - icon to look up.
//   - size: desired icon size.
//   - scale: desired scale.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) containing information about the icon, or NULL if the
//     icon wasn’t found. Unref with g_object_unref().
func (iconTheme *IconTheme) LookupByGIconForScale(icon gio.Iconner, size, scale int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.GIcon             // out
	var _arg2 C.gint               // out
	var _arg3 C.gint               // out
	var _arg4 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	_arg2 = C.gint(size)
	_arg3 = C.gint(scale)
	_arg4 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_lookup_by_gicon_for_scale(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(icon)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// LookupIcon looks up a named icon and returns a IconInfo containing
// information such as the filename of the icon. The icon can then be rendered
// into a pixbuf using gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
// combines these two steps if all you need is the pixbuf.)
//
// When rendering on displays with high pixel densities you should not
// use a size multiplied by the scaling factor returned by functions
// like gdk_window_get_scale_factor(). Instead, you should use
// gtk_icon_theme_lookup_icon_for_scale(), as the assets loaded for a given
// scaling factor may be different.
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to lookup.
//   - size: desired icon size.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) object containing information about the icon, or NULL
//     if the icon wasn’t found.
func (iconTheme *IconTheme) LookupIcon(iconName string, size int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.gchar             // out
	var _arg2 C.gint               // out
	var _arg3 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_lookup_icon(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// LookupIconForScale looks up a named icon for a particular window scale and
// returns a IconInfo containing information such as the filename of the icon.
// The icon can then be rendered into a pixbuf using gtk_icon_info_load_icon().
// (gtk_icon_theme_load_icon() combines these two steps if all you need is the
// pixbuf.).
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to lookup.
//   - size: desired icon size.
//   - scale: desired scale.
//   - flags modifying the behavior of the icon lookup.
//
// The function returns the following values:
//
//   - iconInfo (optional) object containing information about the icon, or NULL
//     if the icon wasn’t found.
func (iconTheme *IconTheme) LookupIconForScale(iconName string, size, scale int, flags IconLookupFlags) *IconInfo {
	var _arg0 *C.GtkIconTheme      // out
	var _arg1 *C.gchar             // out
	var _arg2 C.gint               // out
	var _arg3 C.gint               // out
	var _arg4 C.GtkIconLookupFlags // out
	var _cret *C.GtkIconInfo       // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = C.gint(scale)
	_arg4 = C.GtkIconLookupFlags(flags)

	_cret = C.gtk_icon_theme_lookup_icon_for_scale(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(flags)

	var _iconInfo *IconInfo // out

	if _cret != nil {
		_iconInfo = wrapIconInfo(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	}

	return _iconInfo
}

// PrependSearchPath prepends a directory to the search path. See
// gtk_icon_theme_set_search_path().
//
// The function takes the following parameters:
//
//   - path: directory name to prepend to the icon path.
func (iconTheme *IconTheme) PrependSearchPath(path string) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_icon_theme_prepend_search_path(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(path)
}

// RescanIfNeeded checks to see if the icon theme has changed; if it has,
// any currently cached information is discarded and will be reloaded next time
// icon_theme is accessed.
//
// The function returns the following values:
//
//   - ok: TRUE if the icon theme has changed and needed to be reloaded.
func (iconTheme *IconTheme) RescanIfNeeded() bool {
	var _arg0 *C.GtkIconTheme // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))

	_cret = C.gtk_icon_theme_rescan_if_needed(_arg0)
	runtime.KeepAlive(iconTheme)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetCustomTheme sets the name of the icon theme that the IconTheme object
// uses overriding system configuration. This function cannot be called on
// the icon theme objects returned from gtk_icon_theme_get_default() and
// gtk_icon_theme_get_for_screen().
//
// The function takes the following parameters:
//
//   - themeName (optional): name of icon theme to use instead of configured
//     theme, or NULL to unset a previously set custom theme.
func (iconTheme *IconTheme) SetCustomTheme(themeName string) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.gchar        // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	if themeName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(themeName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_icon_theme_set_custom_theme(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(themeName)
}

// SetScreen sets the screen for an icon theme; the screen is used to track
// the user’s currently configured icon theme, which might be different for
// different screens.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (iconTheme *IconTheme) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 *C.GdkScreen    // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_icon_theme_set_screen(_arg0, _arg1)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(screen)
}

// SetSearchPath sets the search path for the icon theme object. When looking
// for an icon theme, GTK+ will search for a subdirectory of one or more of
// the directories in path with the same name as the icon theme containing an
// index.theme file. (Themes from multiple of the path elements are combined to
// allow themes to be extended by adding icons in the user’s home directory.)
//
// In addition if an icon found isn’t found either in the current icon theme
// or the default icon theme, and an image file with the right name is found
// directly in one of the elements of path, then that image will be used for
// the icon name. (This is legacy feature, and new icons should be put into the
// fallback icon theme, which is called hicolor, rather than directly on the
// icon path.).
//
// The function takes the following parameters:
//
//   - path: array of directories that are searched for icon themes.
func (iconTheme *IconTheme) SetSearchPath(path []string) {
	var _arg0 *C.GtkIconTheme // out
	var _arg1 **C.gchar       // out
	var _arg2 C.gint

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))
	_arg2 = (C.gint)(len(path))
	_arg1 = (**C.gchar)(C.calloc(C.size_t(len(path)), C.size_t(unsafe.Sizeof(uint(0)))))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((**C.gchar)(_arg1), len(path))
		for i := range path {
			out[i] = (*C.gchar)(unsafe.Pointer(C.CString(path[i])))
			defer C.free(unsafe.Pointer(out[i]))
		}
	}

	C.gtk_icon_theme_set_search_path(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconTheme)
	runtime.KeepAlive(path)
}

// Changed: signal emitted when the current icon theme is switched or GTK+
// detects that a change has occurred in the contents of the current icon theme.
func (iconTheme *IconTheme) changed() {
	gclass := (*C.GtkIconThemeClass)(coreglib.PeekParentClass(iconTheme))
	fnarg := gclass.changed

	var _arg0 *C.GtkIconTheme // out

	_arg0 = (*C.GtkIconTheme)(unsafe.Pointer(coreglib.InternObject(iconTheme).Native()))

	C._gotk4_gtk3_IconTheme_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconTheme)
}

// IconThemeAddBuiltinIcon registers a built-in icon for icon theme lookups.
// The idea of built-in icons is to allow an application or library that uses
// themed icons to function requiring files to be present in the file system.
// For instance, the default images for all of GTK+’s stock icons are registered
// as built-icons.
//
// In general, if you use gtk_icon_theme_add_builtin_icon() you should also
// install the icon in the icon theme, so that the icon is generally available.
//
// This function will generally be used with pixbufs loaded via
// gdk_pixbuf_new_from_inline().
//
// Deprecated: Use gtk_icon_theme_add_resource_path() to add
// application-specific icons to the icon theme.
//
// The function takes the following parameters:
//
//   - iconName: name of the icon to register.
//   - size in pixels at which to register the icon (different images can be
//     registered for the same icon name at different sizes.).
//   - pixbuf that contains the image to use for icon_name.
func IconThemeAddBuiltinIcon(iconName string, size int, pixbuf *gdkpixbuf.Pixbuf) {
	var _arg1 *C.gchar     // out
	var _arg2 C.gint       // out
	var _arg3 *C.GdkPixbuf // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(size)
	_arg3 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C.gtk_icon_theme_add_builtin_icon(_arg1, _arg2, _arg3)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
	runtime.KeepAlive(pixbuf)
}

// IconThemeGetDefault gets the icon theme for the default screen. See
// gtk_icon_theme_get_for_screen().
//
// The function returns the following values:
//
//   - iconTheme: unique IconTheme associated with the default screen. This icon
//     theme is associated with the screen and can be used as long as the screen
//     is open. Do not ref or unref it.
func IconThemeGetDefault() *IconTheme {
	var _cret *C.GtkIconTheme // in

	_cret = C.gtk_icon_theme_get_default()

	var _iconTheme *IconTheme // out

	_iconTheme = wrapIconTheme(coreglib.Take(unsafe.Pointer(_cret)))

	return _iconTheme
}

// IconThemeGetForScreen gets the icon theme object associated with screen;
// if this function has not previously been called for the given screen,
// a new icon theme object will be created and associated with the screen.
// Icon theme objects are fairly expensive to create, so using this function is
// usually a better choice than calling than gtk_icon_theme_new() and setting
// the screen yourself; by using this function a single icon theme object will
// be shared between users.
//
// The function takes the following parameters:
//
//   - screen: Screen.
//
// The function returns the following values:
//
//   - iconTheme: unique IconTheme associated with the given screen. This icon
//     theme is associated with the screen and can be used as long as the screen
//     is open. Do not ref or unref it.
func IconThemeGetForScreen(screen *gdk.Screen) *IconTheme {
	var _arg1 *C.GdkScreen    // out
	var _cret *C.GtkIconTheme // in

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	_cret = C.gtk_icon_theme_get_for_screen(_arg1)
	runtime.KeepAlive(screen)

	var _iconTheme *IconTheme // out

	_iconTheme = wrapIconTheme(coreglib.Take(unsafe.Pointer(_cret)))

	return _iconTheme
}

// IconViewOverrides contains methods that are overridable.
type IconViewOverrides struct {
	ActivateCursorItem func() bool
	// ItemActivated activates the item determined by path.
	//
	// The function takes the following parameters:
	//
	//   - path to be activated.
	ItemActivated func(path *TreePath)
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	MoveCursor func(step MovementStep, count int) bool
	// SelectAll selects all the icons. icon_view must has its selection mode
	// set to K_SELECTION_MULTIPLE.
	SelectAll        func()
	SelectCursorItem func()
	SelectionChanged func()
	ToggleCursorItem func()
	// UnselectAll unselects all the icons.
	UnselectAll func()
}

func defaultIconViewOverrides(v *IconView) IconViewOverrides {
	return IconViewOverrides{
		ActivateCursorItem: v.activateCursorItem,
		ItemActivated:      v.itemActivated,
		MoveCursor:         v.moveCursor,
		SelectAll:          v.selectAll,
		SelectCursorItem:   v.selectCursorItem,
		SelectionChanged:   v.selectionChanged,
		ToggleCursorItem:   v.toggleCursorItem,
		UnselectAll:        v.unselectAll,
	}
}

// IconView provides an alternative view on a TreeModel. It displays
// the model as a grid of icons with labels. Like TreeView, it allows
// to select one or multiple items (depending on the selection mode, see
// gtk_icon_view_set_selection_mode()). In addition to selection with the arrow
// keys, IconView supports rubberband selection, which is controlled by dragging
// the pointer.
//
// Note that if the tree model is backed by an actual tree store (as opposed
// to a flat list where the mapping to icons is obvious), IconView will only
// display the first level of the tree and ignore the tree’s branches.
//
// CSS nodes
//
//	iconview.view
//	╰── [rubberband]
//
// GtkIconView has a single CSS node with name iconview and style class .view.
// For rubberband selection, a subnode with name rubberband is used.
type IconView struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	CellLayout
	Scrollable
}

var (
	_ Containerer       = (*IconView)(nil)
	_ coreglib.Objector = (*IconView)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IconView, *IconViewClass, IconViewOverrides](
		GTypeIconView,
		initIconViewClass,
		wrapIconView,
		defaultIconViewOverrides,
	)
}

func initIconViewClass(gclass unsafe.Pointer, overrides IconViewOverrides, classInitFunc func(*IconViewClass)) {
	pclass := (*C.GtkIconViewClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeIconView))))

	if overrides.ActivateCursorItem != nil {
		pclass.activate_cursor_item = (*[0]byte)(C._gotk4_gtk3_IconViewClass_activate_cursor_item)
	}

	if overrides.ItemActivated != nil {
		pclass.item_activated = (*[0]byte)(C._gotk4_gtk3_IconViewClass_item_activated)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_IconViewClass_move_cursor)
	}

	if overrides.SelectAll != nil {
		pclass.select_all = (*[0]byte)(C._gotk4_gtk3_IconViewClass_select_all)
	}

	if overrides.SelectCursorItem != nil {
		pclass.select_cursor_item = (*[0]byte)(C._gotk4_gtk3_IconViewClass_select_cursor_item)
	}

	if overrides.SelectionChanged != nil {
		pclass.selection_changed = (*[0]byte)(C._gotk4_gtk3_IconViewClass_selection_changed)
	}

	if overrides.ToggleCursorItem != nil {
		pclass.toggle_cursor_item = (*[0]byte)(C._gotk4_gtk3_IconViewClass_toggle_cursor_item)
	}

	if overrides.UnselectAll != nil {
		pclass.unselect_all = (*[0]byte)(C._gotk4_gtk3_IconViewClass_unselect_all)
	}

	if classInitFunc != nil {
		class := (*IconViewClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIconView(obj *coreglib.Object) *IconView {
	return &IconView{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		CellLayout: CellLayout{
			Object: obj,
		},
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalIconView(p uintptr) (interface{}, error) {
	return wrapIconView(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateCursorItem: [keybinding signal][GtkBindingSignal] which gets
// emitted when the user activates the currently focused item.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control activation programmatically.
//
// The default bindings for this signal are Space, Return and Enter.
func (iconView *IconView) ConnectActivateCursorItem(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "activate-cursor-item", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectActivateCursorItem), f)
}

// ConnectItemActivated signal is emitted when the method
// gtk_icon_view_item_activated() is called, when the user double clicks an item
// with the "activate-on-single-click" property set to FALSE, or when the user
// single clicks an item when the "activate-on-single-click" property set to
// TRUE. It is also emitted when a non-editable item is selected and one of the
// keys: Space, Return or Enter is pressed.
func (iconView *IconView) ConnectItemActivated(f func(path *TreePath)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "item-activated", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectItemActivated), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a cursor movement.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// # The default bindings for this signal include
//
// - Arrow keys which move by individual steps
//
// - Home/End keys which move to the first/last item
//
// - PageUp/PageDown which move by "pages" All of these will extend the
// selection when combined with the Shift modifier.
func (iconView *IconView) ConnectMoveCursor(f func(step MovementStep, count int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectMoveCursor), f)
}

// ConnectSelectAll: [keybinding signal][GtkBindingSignal] which gets emitted
// when the user selects all items.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control selection programmatically.
//
// The default binding for this signal is Ctrl-a.
func (iconView *IconView) ConnectSelectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "select-all", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectSelectAll), f)
}

// ConnectSelectCursorItem: [keybinding signal][GtkBindingSignal] which gets
// emitted when the user selects the item that is currently focused.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control selection programmatically.
//
// There is no default binding for this signal.
func (iconView *IconView) ConnectSelectCursorItem(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "select-cursor-item", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectSelectCursorItem), f)
}

// ConnectSelectionChanged signal is emitted when the selection (i.e. the set of
// selected items) changes.
func (iconView *IconView) ConnectSelectionChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "selection-changed", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectSelectionChanged), f)
}

// ConnectToggleCursorItem: [keybinding signal][GtkBindingSignal] which gets
// emitted when the user toggles whether the currently focused item is selected
// or not. The exact effect of this depend on the selection mode.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control selection programmatically.
//
// There is no default binding for this signal is Ctrl-Space.
func (iconView *IconView) ConnectToggleCursorItem(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "toggle-cursor-item", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectToggleCursorItem), f)
}

// ConnectUnselectAll: [keybinding signal][GtkBindingSignal] which gets emitted
// when the user unselects all items.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control selection programmatically.
//
// The default binding for this signal is Ctrl-Shift-a.
func (iconView *IconView) ConnectUnselectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(iconView, "unselect-all", false, unsafe.Pointer(C._gotk4_gtk3_IconView_ConnectUnselectAll), f)
}

// NewIconView creates a new IconView widget.
//
// The function returns the following values:
//
//   - iconView: newly created IconView widget.
func NewIconView() *IconView {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_icon_view_new()

	var _iconView *IconView // out

	_iconView = wrapIconView(coreglib.Take(unsafe.Pointer(_cret)))

	return _iconView
}

// NewIconViewWithArea creates a new IconView widget using the specified area to
// layout cells inside the icons.
//
// The function takes the following parameters:
//
//   - area to use to layout cells.
//
// The function returns the following values:
//
//   - iconView: newly created IconView widget.
func NewIconViewWithArea(area CellAreaer) *IconView {
	var _arg1 *C.GtkCellArea // out
	var _cret *C.GtkWidget   // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_icon_view_new_with_area(_arg1)
	runtime.KeepAlive(area)

	var _iconView *IconView // out

	_iconView = wrapIconView(coreglib.Take(unsafe.Pointer(_cret)))

	return _iconView
}

// NewIconViewWithModel creates a new IconView widget with the model model.
//
// The function takes the following parameters:
//
//   - model: model.
//
// The function returns the following values:
//
//   - iconView: newly created IconView widget.
func NewIconViewWithModel(model TreeModeller) *IconView {
	var _arg1 *C.GtkTreeModel // out
	var _cret *C.GtkWidget    // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_icon_view_new_with_model(_arg1)
	runtime.KeepAlive(model)

	var _iconView *IconView // out

	_iconView = wrapIconView(coreglib.Take(unsafe.Pointer(_cret)))

	return _iconView
}

// ConvertWidgetToBinWindowCoords converts widget coordinates to coordinates for
// the bin_window, as expected by e.g. gtk_icon_view_get_path_at_pos().
//
// The function takes the following parameters:
//
//   - wx: x coordinate relative to the widget.
//   - wy: y coordinate relative to the widget.
//
// The function returns the following values:
//
//   - bx: return location for bin_window X coordinate.
//   - by: return location for bin_window Y coordinate.
func (iconView *IconView) ConvertWidgetToBinWindowCoords(wx, wy int) (bx, by int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(wx)
	_arg2 = C.gint(wy)

	C.gtk_icon_view_convert_widget_to_bin_window_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(wx)
	runtime.KeepAlive(wy)

	var _bx int // out
	var _by int // out

	_bx = int(_arg3)
	_by = int(_arg4)

	return _bx, _by
}

// CreateDragIcon creates a #cairo_surface_t representation of the item at path.
// This image is used for a drag icon.
//
// The function takes the following parameters:
//
//   - path in icon_view.
//
// The function returns the following values:
//
//   - surface: newly-allocated surface of the drag icon.
func (iconView *IconView) CreateDragIcon(path *TreePath) *cairo.Surface {
	var _arg0 *C.GtkIconView     // out
	var _arg1 *C.GtkTreePath     // out
	var _cret *C.cairo_surface_t // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_icon_view_create_drag_icon(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)

	var _surface *cairo.Surface // out

	_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
		C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
	})

	return _surface
}

// EnableModelDragDest turns icon_view into a drop destination for automatic
// DND. Calling this method sets IconView:reorderable to FALSE.
//
// The function takes the following parameters:
//
//   - targets: table of targets that the drag will support.
//   - actions: bitmask of possible actions for a drag to this widget.
func (iconView *IconView) EnableModelDragDest(targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkIconView    // out
	var _arg1 *C.GtkTargetEntry // out
	var _arg2 C.gint
	var _arg3 C.GdkDragAction // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg2 = (C.gint)(len(targets))
	_arg1 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg1), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg3 = C.GdkDragAction(actions)

	C.gtk_icon_view_enable_model_drag_dest(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// EnableModelDragSource turns icon_view into a drag source for automatic DND.
// Calling this method sets IconView:reorderable to FALSE.
//
// The function takes the following parameters:
//
//   - startButtonMask: mask of allowed buttons to start drag.
//   - targets: table of targets that the drag will support.
//   - actions: bitmask of possible actions for a drag from this widget.
func (iconView *IconView) EnableModelDragSource(startButtonMask gdk.ModifierType, targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkIconView    // out
	var _arg1 C.GdkModifierType // out
	var _arg2 *C.GtkTargetEntry // out
	var _arg3 C.gint
	var _arg4 C.GdkDragAction // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.GdkModifierType(startButtonMask)
	_arg3 = (C.gint)(len(targets))
	_arg2 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg2), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg4 = C.GdkDragAction(actions)

	C.gtk_icon_view_enable_model_drag_source(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(startButtonMask)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// ActivateOnSingleClick gets the setting set by
// gtk_icon_view_set_activate_on_single_click().
//
// The function returns the following values:
//
//   - ok: TRUE if item-activated will be emitted on a single click.
func (iconView *IconView) ActivateOnSingleClick() bool {
	var _arg0 *C.GtkIconView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_activate_on_single_click(_arg0)
	runtime.KeepAlive(iconView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CellRect fills the bounding rectangle in widget coordinates for the cell
// specified by path and cell. If cell is NULL the main cell area is used.
//
// This function is only valid if icon_view is realized.
//
// The function takes the following parameters:
//
//   - path: TreePath.
//   - cell (optional) or NULL.
//
// The function returns the following values:
//
//   - rect: rectangle to fill with cell rect.
//   - ok: FALSE if there is no such item, TRUE otherwise.
func (iconView *IconView) CellRect(path *TreePath, cell CellRendererer) (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 *C.GtkTreePath     // out
	var _arg2 *C.GtkCellRenderer // out
	var _arg3 C.GdkRectangle     // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if cell != nil {
		_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	}

	_cret = C.gtk_icon_view_get_cell_rect(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(cell)

	var _rect *gdk.Rectangle // out
	var _ok bool             // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))
	if _cret != 0 {
		_ok = true
	}

	return _rect, _ok
}

// ColumnSpacing returns the value of the ::column-spacing property.
//
// The function returns the following values:
//
//   - gint: space between columns.
func (iconView *IconView) ColumnSpacing() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_column_spacing(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Columns returns the value of the ::columns property.
//
// The function returns the following values:
//
//   - gint: number of columns, or -1.
func (iconView *IconView) Columns() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_columns(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Cursor fills in path and cell with the current cursor path and cell. If the
// cursor isn’t currently set, then *path will be NULL. If no cell currently has
// focus, then *cell will be NULL.
//
// The returned TreePath must be freed with gtk_tree_path_free().
//
// The function returns the following values:
//
//   - path (optional): return location for the current cursor path, or NULL.
//   - cell (optional): return location the current focus cell, or NULL.
//   - ok: TRUE if the cursor is set.
func (iconView *IconView) Cursor() (*TreePath, CellRendererer, bool) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 *C.GtkTreePath     // in
	var _arg2 *C.GtkCellRenderer // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_cursor(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconView)

	var _path *TreePath      // out
	var _cell CellRendererer // out
	var _ok bool             // out

	if _arg1 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg2 != nil {
		{
			objptr := unsafe.Pointer(_arg2)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			_cell = rv
		}
	}
	if _cret != 0 {
		_ok = true
	}

	return _path, _cell, _ok
}

// DestItemAtPos determines the destination item for a given position.
//
// The function takes the following parameters:
//
//   - dragX: position to determine the destination item for.
//   - dragY: position to determine the destination item for.
//
// The function returns the following values:
//
//   - path (optional): return location for the path of the item, or NULL.
//   - pos (optional): return location for the drop position, or NULL.
//   - ok: whether there is an item at the given position.
func (iconView *IconView) DestItemAtPos(dragX, dragY int) (*TreePath, IconViewDropPosition, bool) {
	var _arg0 *C.GtkIconView            // out
	var _arg1 C.gint                    // out
	var _arg2 C.gint                    // out
	var _arg3 *C.GtkTreePath            // in
	var _arg4 C.GtkIconViewDropPosition // in
	var _cret C.gboolean                // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(dragX)
	_arg2 = C.gint(dragY)

	_cret = C.gtk_icon_view_get_dest_item_at_pos(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(dragX)
	runtime.KeepAlive(dragY)

	var _path *TreePath           // out
	var _pos IconViewDropPosition // out
	var _ok bool                  // out

	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	_pos = IconViewDropPosition(_arg4)
	if _cret != 0 {
		_ok = true
	}

	return _path, _pos, _ok
}

// DragDestItem gets information about the item that is highlighted for
// feedback.
//
// The function returns the following values:
//
//   - path (optional): return location for the path of the highlighted item,
//     or NULL.
//   - pos (optional): return location for the drop position, or NULL.
func (iconView *IconView) DragDestItem() (*TreePath, IconViewDropPosition) {
	var _arg0 *C.GtkIconView            // out
	var _arg1 *C.GtkTreePath            // in
	var _arg2 C.GtkIconViewDropPosition // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C.gtk_icon_view_get_drag_dest_item(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconView)

	var _path *TreePath           // out
	var _pos IconViewDropPosition // out

	if _arg1 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	_pos = IconViewDropPosition(_arg2)

	return _path, _pos
}

// ItemAtPos finds the path at the point (x, y), relative to bin_window
// coordinates. In contrast to gtk_icon_view_get_path_at_pos(),
// this function also obtains the cell at the specified position.
// The returned path should be freed with gtk_tree_path_free(). See
// gtk_icon_view_convert_widget_to_bin_window_coords() for converting widget
// coordinates to bin_window coordinates.
//
// The function takes the following parameters:
//
//   - x position to be identified.
//   - y position to be identified.
//
// The function returns the following values:
//
//   - path (optional): return location for the path, or NULL.
//   - cell (optional): return location for the renderer responsible for the
//     cell at (x, y), or NULL.
//   - ok: TRUE if an item exists at the specified position.
func (iconView *IconView) ItemAtPos(x, y int) (*TreePath, CellRendererer, bool) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 C.gint             // out
	var _arg2 C.gint             // out
	var _arg3 *C.GtkTreePath     // in
	var _arg4 *C.GtkCellRenderer // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_icon_view_get_item_at_pos(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _path *TreePath      // out
	var _cell CellRendererer // out
	var _ok bool             // out

	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg4 != nil {
		{
			objptr := unsafe.Pointer(_arg4)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(CellRendererer)
				return ok
			})
			rv, ok := casted.(CellRendererer)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.CellRendererer")
			}
			_cell = rv
		}
	}
	if _cret != 0 {
		_ok = true
	}

	return _path, _cell, _ok
}

// ItemColumn gets the column in which the item path is currently displayed.
// Column numbers start at 0.
//
// The function takes the following parameters:
//
//   - path of the item.
//
// The function returns the following values:
//
//   - gint: column in which the item is displayed.
func (iconView *IconView) ItemColumn(path *TreePath) int {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_icon_view_get_item_column(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ItemOrientation returns the value of the ::item-orientation property which
// determines whether the labels are drawn beside the icons instead of below.
//
// The function returns the following values:
//
//   - orientation: relative position of texts and icons.
func (iconView *IconView) ItemOrientation() Orientation {
	var _arg0 *C.GtkIconView   // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_item_orientation(_arg0)
	runtime.KeepAlive(iconView)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// ItemPadding returns the value of the ::item-padding property.
//
// The function returns the following values:
//
//   - gint: padding around items.
func (iconView *IconView) ItemPadding() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_item_padding(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ItemRow gets the row in which the item path is currently displayed. Row
// numbers start at 0.
//
// The function takes the following parameters:
//
//   - path of the item.
//
// The function returns the following values:
//
//   - gint: row in which the item is displayed.
func (iconView *IconView) ItemRow(path *TreePath) int {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_icon_view_get_item_row(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ItemWidth returns the value of the ::item-width property.
//
// The function returns the following values:
//
//   - gint: width of a single item, or -1.
func (iconView *IconView) ItemWidth() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_item_width(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Margin returns the value of the ::margin property.
//
// The function returns the following values:
//
//   - gint: space at the borders.
func (iconView *IconView) Margin() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_margin(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarkupColumn returns the column with markup text for icon_view.
//
// The function returns the following values:
//
//   - gint: markup column, or -1 if it’s unset.
func (iconView *IconView) MarkupColumn() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_markup_column(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Model returns the model the IconView is based on. Returns NULL if the model
// is unset.
//
// The function returns the following values:
//
//   - treeModel (optional) or NULL if none is currently being used.
func (iconView *IconView) Model() *TreeModel {
	var _arg0 *C.GtkIconView  // out
	var _cret *C.GtkTreeModel // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_model(_arg0)
	runtime.KeepAlive(iconView)

	var _treeModel *TreeModel // out

	if _cret != nil {
		_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _treeModel
}

// PathAtPos finds the path at the point (x, y), relative to
// bin_window coordinates. See gtk_icon_view_get_item_at_pos(),
// if you are also interested in the cell at the specified position.
// See gtk_icon_view_convert_widget_to_bin_window_coords() for converting widget
// coordinates to bin_window coordinates.
//
// The function takes the following parameters:
//
//   - x position to be identified.
//   - y position to be identified.
//
// The function returns the following values:
//
//   - treePath (optional) corresponding to the icon or NULL if no icon exists
//     at that position.
func (iconView *IconView) PathAtPos(x, y int) *TreePath {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _cret *C.GtkTreePath // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_icon_view_get_path_at_pos(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// PixbufColumn returns the column with pixbufs for icon_view.
//
// The function returns the following values:
//
//   - gint: pixbuf column, or -1 if it’s unset.
func (iconView *IconView) PixbufColumn() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_pixbuf_column(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Reorderable retrieves whether the user can reorder the list via
// drag-and-drop. See gtk_icon_view_set_reorderable().
//
// The function returns the following values:
//
//   - ok: TRUE if the list can be reordered.
func (iconView *IconView) Reorderable() bool {
	var _arg0 *C.GtkIconView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_reorderable(_arg0)
	runtime.KeepAlive(iconView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowSpacing returns the value of the ::row-spacing property.
//
// The function returns the following values:
//
//   - gint: space between rows.
func (iconView *IconView) RowSpacing() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_row_spacing(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SelectedItems creates a list of paths of all selected items. Additionally,
// if you are planning on modifying the model after calling this function,
// you may want to convert the returned list into a list of TreeRowReferences.
// To do this, you can use gtk_tree_row_reference_new().
//
// To free the return value, use:
//
//	g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);.
//
// The function returns the following values:
//
//   - list containing a TreePath for each selected row.
func (iconView *IconView) SelectedItems() []*TreePath {
	var _arg0 *C.GtkIconView // out
	var _cret *C.GList       // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_selected_items(_arg0)
	runtime.KeepAlive(iconView)

	var _list []*TreePath // out

	_list = make([]*TreePath, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTreePath)(v)
		var dst *TreePath // out
		dst = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _list
}

// SelectionMode gets the selection mode of the icon_view.
//
// The function returns the following values:
//
//   - selectionMode: current selection mode.
func (iconView *IconView) SelectionMode() SelectionMode {
	var _arg0 *C.GtkIconView     // out
	var _cret C.GtkSelectionMode // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_selection_mode(_arg0)
	runtime.KeepAlive(iconView)

	var _selectionMode SelectionMode // out

	_selectionMode = SelectionMode(_cret)

	return _selectionMode
}

// Spacing returns the value of the ::spacing property.
//
// The function returns the following values:
//
//   - gint: space between cells.
func (iconView *IconView) Spacing() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_spacing(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// TextColumn returns the column with text for icon_view.
//
// The function returns the following values:
//
//   - gint: text column, or -1 if it’s unset.
func (iconView *IconView) TextColumn() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_text_column(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// TooltipColumn returns the column of icon_view’s model which is being used for
// displaying tooltips on icon_view’s rows.
//
// The function returns the following values:
//
//   - gint: index of the tooltip column that is currently being used, or -1 if
//     this is disabled.
func (iconView *IconView) TooltipColumn() int {
	var _arg0 *C.GtkIconView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_tooltip_column(_arg0)
	runtime.KeepAlive(iconView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// VisibleRange sets start_path and end_path to be the first and last visible
// path. Note that there may be invisible paths in between.
//
// Both paths should be freed with gtk_tree_path_free() after use.
//
// The function returns the following values:
//
//   - startPath (optional): return location for start of region, or NULL.
//   - endPath (optional): return location for end of region, or NULL.
//   - ok: TRUE, if valid paths were placed in start_path and end_path.
func (iconView *IconView) VisibleRange() (startPath, endPath *TreePath, ok bool) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // in
	var _arg2 *C.GtkTreePath // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C.gtk_icon_view_get_visible_range(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconView)

	var _startPath *TreePath // out
	var _endPath *TreePath   // out
	var _ok bool             // out

	if _arg1 != nil {
		_startPath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_startPath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg2 != nil {
		_endPath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg2)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_endPath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _cret != 0 {
		_ok = true
	}

	return _startPath, _endPath, _ok
}

// ItemActivated activates the item determined by path.
//
// The function takes the following parameters:
//
//   - path to be activated.
func (iconView *IconView) ItemActivated(path *TreePath) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_icon_view_item_activated(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
}

// PathIsSelected returns TRUE if the icon pointed to by path is currently
// selected. If path does not point to a valid location, FALSE is returned.
//
// The function takes the following parameters:
//
//   - path to check selection on.
//
// The function returns the following values:
//
//   - ok: TRUE if path is selected.
func (iconView *IconView) PathIsSelected(path *TreePath) bool {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_icon_view_path_is_selected(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ScrollToPath moves the alignments of icon_view to the position specified by
// path. row_align determines where the row is placed, and col_align determines
// where column is placed. Both are expected to be between 0.0 and 1.0. 0.0
// means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.
//
// If use_align is FALSE, then the alignment arguments are ignored, and the
// tree does the minimum amount of work to scroll the item onto the screen.
// This means that the item will be scrolled to the edge closest to its current
// position. If the item is currently visible on the screen, nothing is done.
//
// This function only works if the model is set, and path is a valid row on the
// model. If the model changes before the icon_view is realized, the centered
// path will be modified to reflect this change.
//
// The function takes the following parameters:
//
//   - path of the item to move to.
//   - useAlign: whether to use alignment arguments, or FALSE.
//   - rowAlign: vertical alignment of the item specified by path.
//   - colAlign: horizontal alignment of the item specified by path.
func (iconView *IconView) ScrollToPath(path *TreePath, useAlign bool, rowAlign, colAlign float32) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out
	var _arg2 C.gboolean     // out
	var _arg3 C.gfloat       // out
	var _arg4 C.gfloat       // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if useAlign {
		_arg2 = C.TRUE
	}
	_arg3 = C.gfloat(rowAlign)
	_arg4 = C.gfloat(colAlign)

	C.gtk_icon_view_scroll_to_path(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(useAlign)
	runtime.KeepAlive(rowAlign)
	runtime.KeepAlive(colAlign)
}

// SelectAll selects all the icons. icon_view must has its selection mode set to
// K_SELECTION_MULTIPLE.
func (iconView *IconView) SelectAll() {
	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C.gtk_icon_view_select_all(_arg0)
	runtime.KeepAlive(iconView)
}

// SelectPath selects the row at path.
//
// The function takes the following parameters:
//
//   - path to be selected.
func (iconView *IconView) SelectPath(path *TreePath) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_icon_view_select_path(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
}

// SelectedForEach calls a function for each selected icon. Note that the model
// or selection cannot be modified from within this function.
//
// The function takes the following parameters:
//
//   - fn: function to call for each selected icon.
func (iconView *IconView) SelectedForEach(fn IconViewForEachFunc) {
	var _arg0 *C.GtkIconView           // out
	var _arg1 C.GtkIconViewForeachFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_IconViewForEachFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_icon_view_selected_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(fn)
}

// SetActivateOnSingleClick causes the IconView::item-activated signal to be
// emitted on a single click instead of a double click.
//
// The function takes the following parameters:
//
//   - single: TRUE to emit item-activated on a single click.
func (iconView *IconView) SetActivateOnSingleClick(single bool) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	if single {
		_arg1 = C.TRUE
	}

	C.gtk_icon_view_set_activate_on_single_click(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(single)
}

// SetColumnSpacing sets the ::column-spacing property which specifies the space
// which is inserted between the columns of the icon view.
//
// The function takes the following parameters:
//
//   - columnSpacing: column spacing.
func (iconView *IconView) SetColumnSpacing(columnSpacing int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(columnSpacing)

	C.gtk_icon_view_set_column_spacing(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(columnSpacing)
}

// SetColumns sets the ::columns property which determines in how many columns
// the icons are arranged. If columns is -1, the number of columns will be
// chosen automatically to fill the available area.
//
// The function takes the following parameters:
//
//   - columns: number of columns.
func (iconView *IconView) SetColumns(columns int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(columns)

	C.gtk_icon_view_set_columns(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(columns)
}

// SetCursor sets the current keyboard focus to be at path, and selects it.
// This is useful when you want to focus the user’s attention on a particular
// item. If cell is not NULL, then focus is given to the cell specified by it.
// Additionally, if start_editing is TRUE, then editing should be started in the
// specified cell.
//
// This function is often followed by gtk_widget_grab_focus (icon_view) in
// order to give keyboard focus to the widget. Please note that editing can only
// happen when the widget is realized.
//
// The function takes the following parameters:
//
//   - path: TreePath.
//   - cell (optional): one of the cell renderers of icon_view, or NULL.
//   - startEditing: TRUE if the specified cell should start being edited.
func (iconView *IconView) SetCursor(path *TreePath, cell CellRendererer, startEditing bool) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 *C.GtkTreePath     // out
	var _arg2 *C.GtkCellRenderer // out
	var _arg3 C.gboolean         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if cell != nil {
		_arg2 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	}
	if startEditing {
		_arg3 = C.TRUE
	}

	C.gtk_icon_view_set_cursor(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(startEditing)
}

// SetDragDestItem sets the item that is highlighted for feedback.
//
// The function takes the following parameters:
//
//   - path (optional) of the item to highlight, or NULL.
//   - pos specifies where to drop, relative to the item.
func (iconView *IconView) SetDragDestItem(path *TreePath, pos IconViewDropPosition) {
	var _arg0 *C.GtkIconView            // out
	var _arg1 *C.GtkTreePath            // out
	var _arg2 C.GtkIconViewDropPosition // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	_arg2 = C.GtkIconViewDropPosition(pos)

	C.gtk_icon_view_set_drag_dest_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
}

// SetItemOrientation sets the ::item-orientation property which determines
// whether the labels are drawn beside the icons instead of below.
//
// The function takes the following parameters:
//
//   - orientation: relative position of texts and icons.
func (iconView *IconView) SetItemOrientation(orientation Orientation) {
	var _arg0 *C.GtkIconView   // out
	var _arg1 C.GtkOrientation // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.GtkOrientation(orientation)

	C.gtk_icon_view_set_item_orientation(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(orientation)
}

// SetItemPadding sets the IconView:item-padding property which specifies the
// padding around each of the icon view’s items.
//
// The function takes the following parameters:
//
//   - itemPadding: item padding.
func (iconView *IconView) SetItemPadding(itemPadding int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(itemPadding)

	C.gtk_icon_view_set_item_padding(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(itemPadding)
}

// SetItemWidth sets the ::item-width property which specifies the width to use
// for each item. If it is set to -1, the icon view will automatically determine
// a suitable item size.
//
// The function takes the following parameters:
//
//   - itemWidth: width for each item.
func (iconView *IconView) SetItemWidth(itemWidth int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(itemWidth)

	C.gtk_icon_view_set_item_width(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(itemWidth)
}

// SetMargin sets the ::margin property which specifies the space which is
// inserted at the top, bottom, left and right of the icon view.
//
// The function takes the following parameters:
//
//   - margin: margin.
func (iconView *IconView) SetMargin(margin int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(margin)

	C.gtk_icon_view_set_margin(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(margin)
}

// SetMarkupColumn sets the column with markup information for icon_view
// to be column. The markup column must be of type TYPE_STRING. If the
// markup column is set to something, it overrides the text column set by
// gtk_icon_view_set_text_column().
//
// The function takes the following parameters:
//
//   - column in the currently used model, or -1 to display no text.
func (iconView *IconView) SetMarkupColumn(column int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(column)

	C.gtk_icon_view_set_markup_column(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(column)
}

// SetModel sets the model for a IconView. If the icon_view already has a model
// set, it will remove it before setting the new model. If model is NULL,
// then it will unset the old model.
//
// The function takes the following parameters:
//
//   - model (optional): model.
func (iconView *IconView) SetModel(model TreeModeller) {
	var _arg0 *C.GtkIconView  // out
	var _arg1 *C.GtkTreeModel // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	if model != nil {
		_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}

	C.gtk_icon_view_set_model(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(model)
}

// SetPixbufColumn sets the column with pixbufs for icon_view to be column.
// The pixbuf column must be of type K_TYPE_PIXBUF.
//
// The function takes the following parameters:
//
//   - column in the currently used model, or -1 to disable.
func (iconView *IconView) SetPixbufColumn(column int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(column)

	C.gtk_icon_view_set_pixbuf_column(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(column)
}

// SetReorderable: this function is a convenience function to allow
// you to reorder models that support the TreeDragSourceIface and the
// TreeDragDestIface. Both TreeStore and ListStore support these. If reorderable
// is TRUE, then the user can reorder the model by dragging and dropping rows.
// The developer can listen to these changes by connecting to the model's
// row_inserted and row_deleted signals. The reordering is implemented by
// setting up the icon view as a drag source and destination. Therefore,
// drag and drop can not be used in a reorderable view for any other purpose.
//
// This function does not give you any degree of control over the order -- any
// reordering is allowed. If more control is needed, you should probably handle
// drag and drop manually.
//
// The function takes the following parameters:
//
//   - reorderable: TRUE, if the list of items can be reordered.
func (iconView *IconView) SetReorderable(reorderable bool) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	if reorderable {
		_arg1 = C.TRUE
	}

	C.gtk_icon_view_set_reorderable(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(reorderable)
}

// SetRowSpacing sets the ::row-spacing property which specifies the space which
// is inserted between the rows of the icon view.
//
// The function takes the following parameters:
//
//   - rowSpacing: row spacing.
func (iconView *IconView) SetRowSpacing(rowSpacing int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(rowSpacing)

	C.gtk_icon_view_set_row_spacing(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(rowSpacing)
}

// SetSelectionMode sets the selection mode of the icon_view.
//
// The function takes the following parameters:
//
//   - mode: selection mode.
func (iconView *IconView) SetSelectionMode(mode SelectionMode) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 C.GtkSelectionMode // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.GtkSelectionMode(mode)

	C.gtk_icon_view_set_selection_mode(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(mode)
}

// SetSpacing sets the ::spacing property which specifies the space which is
// inserted between the cells (i.e. the icon and the text) of an item.
//
// The function takes the following parameters:
//
//   - spacing: spacing.
func (iconView *IconView) SetSpacing(spacing int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(spacing)

	C.gtk_icon_view_set_spacing(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(spacing)
}

// SetTextColumn sets the column with text for icon_view to be column. The text
// column must be of type TYPE_STRING.
//
// The function takes the following parameters:
//
//   - column in the currently used model, or -1 to display no text.
func (iconView *IconView) SetTextColumn(column int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(column)

	C.gtk_icon_view_set_text_column(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(column)
}

// SetTooltipCell sets the tip area of tooltip to the area which cell occupies
// in the item pointed to by path. See also gtk_tooltip_set_tip_area().
//
// See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
//
// The function takes the following parameters:
//
//   - tooltip: Tooltip.
//   - path: TreePath.
//   - cell (optional) or NULL.
func (iconView *IconView) SetTooltipCell(tooltip *Tooltip, path *TreePath, cell CellRendererer) {
	var _arg0 *C.GtkIconView     // out
	var _arg1 *C.GtkTooltip      // out
	var _arg2 *C.GtkTreePath     // out
	var _arg3 *C.GtkCellRenderer // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if cell != nil {
		_arg3 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	}

	C.gtk_icon_view_set_tooltip_cell(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(path)
	runtime.KeepAlive(cell)
}

// SetTooltipColumn: if you only plan to have simple (text-only) tooltips
// on full items, you can use this function to have IconView handle these
// automatically for you. column should be set to the column in icon_view’s
// model containing the tooltip texts, or -1 to disable this feature.
//
// When enabled, Widget:has-tooltip will be set to TRUE and icon_view will
// connect a Widget::query-tooltip signal handler.
//
// Note that the signal handler sets the text with gtk_tooltip_set_markup(),
// so &, <, etc have to be escaped in the text.
//
// The function takes the following parameters:
//
//   - column: integer, which is a valid column number for icon_view’s model.
func (iconView *IconView) SetTooltipColumn(column int) {
	var _arg0 *C.GtkIconView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.gint(column)

	C.gtk_icon_view_set_tooltip_column(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(column)
}

// SetTooltipItem sets the tip area of tooltip to be the area covered by the
// item at path. See also gtk_icon_view_set_tooltip_column() for a simpler
// alternative. See also gtk_tooltip_set_tip_area().
//
// The function takes the following parameters:
//
//   - tooltip: Tooltip.
//   - path: TreePath.
func (iconView *IconView) SetTooltipItem(tooltip *Tooltip, path *TreePath) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTooltip  // out
	var _arg2 *C.GtkTreePath // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_icon_view_set_tooltip_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(path)
}

// UnselectAll unselects all the icons.
func (iconView *IconView) UnselectAll() {
	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C.gtk_icon_view_unselect_all(_arg0)
	runtime.KeepAlive(iconView)
}

// UnselectPath unselects the row at path.
//
// The function takes the following parameters:
//
//   - path to be unselected.
func (iconView *IconView) UnselectPath(path *TreePath) {
	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_icon_view_unselect_path(_arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
}

// UnsetModelDragDest undoes the effect of
// gtk_icon_view_enable_model_drag_dest(). Calling this method sets
// IconView:reorderable to FALSE.
func (iconView *IconView) UnsetModelDragDest() {
	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C.gtk_icon_view_unset_model_drag_dest(_arg0)
	runtime.KeepAlive(iconView)
}

// UnsetModelDragSource undoes the effect of
// gtk_icon_view_enable_model_drag_source(). Calling this method sets
// IconView:reorderable to FALSE.
func (iconView *IconView) UnsetModelDragSource() {
	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C.gtk_icon_view_unset_model_drag_source(_arg0)
	runtime.KeepAlive(iconView)
}

func (iconView *IconView) activateCursorItem() bool {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.activate_cursor_item

	var _arg0 *C.GtkIconView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	_cret = C._gotk4_gtk3_IconView_virtual_activate_cursor_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// itemActivated activates the item determined by path.
//
// The function takes the following parameters:
//
//   - path to be activated.
func (iconView *IconView) itemActivated(path *TreePath) {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.item_activated

	var _arg0 *C.GtkIconView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C._gotk4_gtk3_IconView_virtual_item_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(path)
}

// The function takes the following parameters:
//
//   - step
//   - count
func (iconView *IconView) moveCursor(step MovementStep, count int) bool {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkIconView    // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)

	_cret = C._gotk4_gtk3_IconView_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(iconView)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// selectAll selects all the icons. icon_view must has its selection mode set to
// K_SELECTION_MULTIPLE.
func (iconView *IconView) selectAll() {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.select_all

	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C._gotk4_gtk3_IconView_virtual_select_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)
}

func (iconView *IconView) selectCursorItem() {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.select_cursor_item

	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C._gotk4_gtk3_IconView_virtual_select_cursor_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)
}

func (iconView *IconView) selectionChanged() {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.selection_changed

	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C._gotk4_gtk3_IconView_virtual_selection_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)
}

func (iconView *IconView) toggleCursorItem() {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.toggle_cursor_item

	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C._gotk4_gtk3_IconView_virtual_toggle_cursor_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)
}

// unselectAll unselects all the icons.
func (iconView *IconView) unselectAll() {
	gclass := (*C.GtkIconViewClass)(coreglib.PeekParentClass(iconView))
	fnarg := gclass.unselect_all

	var _arg0 *C.GtkIconView // out

	_arg0 = (*C.GtkIconView)(unsafe.Pointer(coreglib.InternObject(iconView).Native()))

	C._gotk4_gtk3_IconView_virtual_unselect_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(iconView)
}

// IconViewAccessibleOverrides contains methods that are overridable.
type IconViewAccessibleOverrides struct {
}

func defaultIconViewAccessibleOverrides(v *IconViewAccessible) IconViewAccessibleOverrides {
	return IconViewAccessibleOverrides{}
}

type IconViewAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Selection
}

var (
	_ coreglib.Objector = (*IconViewAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*IconViewAccessible, *IconViewAccessibleClass, IconViewAccessibleOverrides](
		GTypeIconViewAccessible,
		initIconViewAccessibleClass,
		wrapIconViewAccessible,
		defaultIconViewAccessibleOverrides,
	)
}

func initIconViewAccessibleClass(gclass unsafe.Pointer, overrides IconViewAccessibleOverrides, classInitFunc func(*IconViewAccessibleClass)) {
	if classInitFunc != nil {
		class := (*IconViewAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapIconViewAccessible(obj *coreglib.Object) *IconViewAccessible {
	return &IconViewAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalIconViewAccessible(p uintptr) (interface{}, error) {
	return wrapIconViewAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ImageOverrides contains methods that are overridable.
type ImageOverrides struct {
}

func defaultImageOverrides(v *Image) ImageOverrides {
	return ImageOverrides{}
}

// Image widget displays an image. Various kinds of object can be displayed
// as an image; most typically, you would load a Pixbuf ("pixel buffer") from
// a file, and then display that. There’s a convenience function to do this,
// gtk_image_new_from_file(), used as follows:
//
//	static gboolean
//	button_press_callback (GtkWidget      *event_box,
//	                       GdkEventButton *event,
//	                       gpointer        data)
//	{
//	  g_print ("Event box clicked at coordinates f,f\n",
//	           event->x, event->y);
//
//	  // Returning TRUE means we handled the event, so the signal
//	  // emission should be stopped (don’t call any further callbacks
//	  // that may be connected). Return FALSE to continue invoking callbacks.
//	  return TRUE;
//	}
//
//	static GtkWidget*
//	create_image (void)
//	{
//	  GtkWidget *image;
//	  GtkWidget *event_box;
//
//	  image = gtk_image_new_from_file ("myfile.png");
//
//	  event_box = gtk_event_box_new ();
//
//	  gtk_container_add (GTK_CONTAINER (event_box), image);
//
//	  g_signal_connect (G_OBJECT (event_box),
//	                    "button_press_event",
//	                    G_CALLBACK (button_press_callback),
//	                    image);
//
//	  return image;
//	}
//
// When handling events on the event box, keep in mind that coordinates in the
// image may be different from event box coordinates due to the alignment and
// padding settings on the image (see Misc). The simplest way to solve this
// is to set the alignment to 0.0 (left/top), and set the padding to zero.
// Then the origin of the image will be the same as the origin of the event box.
//
// Sometimes an application will want to avoid depending on external data
// files, such as image files. GTK+ comes with a program to avoid this,
// called “gdk-pixbuf-csource”. This library allows you to convert an image
// into a C variable declaration, which can then be loaded into a Pixbuf using
// gdk_pixbuf_new_from_inline().
//
// # CSS nodes
//
// GtkImage has a single CSS node with the name image. The style classes may
// appear on image CSS nodes: .icon-dropshadow, .lowres-icon.
type Image struct {
	_ [0]func() // equal guard
	Misc
}

var (
	_ Miscer = (*Image)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Image, *ImageClass, ImageOverrides](
		GTypeImage,
		initImageClass,
		wrapImage,
		defaultImageOverrides,
	)
}

func initImageClass(gclass unsafe.Pointer, overrides ImageOverrides, classInitFunc func(*ImageClass)) {
	if classInitFunc != nil {
		class := (*ImageClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapImage(obj *coreglib.Object) *Image {
	return &Image{
		Misc: Misc{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalImage(p uintptr) (interface{}, error) {
	return wrapImage(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewImage creates a new empty Image widget.
//
// The function returns the following values:
//
//   - image: newly created Image widget.
func NewImage() *Image {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_image_new()

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromAnimation creates a Image displaying the given animation.
// The Image does not assume a reference to the animation; you still need to
// unref it if you own references. Image will add its own reference rather than
// adopting yours.
//
// Note that the animation frames are shown using a timeout with
// PRIORITY_DEFAULT. When using animations to indicate busyness, keep in mind
// that the animation will only be shown if the main loop is not busy with
// something that has a higher priority.
//
// The function takes the following parameters:
//
//   - animation: animation.
//
// The function returns the following values:
//
//   - image: new Image widget.
func NewImageFromAnimation(animation *gdkpixbuf.PixbufAnimation) *Image {
	var _arg1 *C.GdkPixbufAnimation // out
	var _cret *C.GtkWidget          // in

	_arg1 = (*C.GdkPixbufAnimation)(unsafe.Pointer(coreglib.InternObject(animation).Native()))

	_cret = C.gtk_image_new_from_animation(_arg1)
	runtime.KeepAlive(animation)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromFile creates a new Image displaying the file filename.
// If the file isn’t found or can’t be loaded, the resulting Image will display
// a “broken image” icon. This function never returns NULL, it always returns a
// valid Image widget.
//
// If the file contains an animation, the image will contain an animation.
//
// If you need to detect failures to load the file,
// use gdk_pixbuf_new_from_file() to load the file yourself,
// then create the Image from the pixbuf. (Or for animations, use
// gdk_pixbuf_animation_new_from_file()).
//
// The storage type (gtk_image_get_storage_type()) of the returned image is not
// defined, it will be whatever is appropriate for displaying the file.
//
// The function takes the following parameters:
//
//   - filename: filename.
//
// The function returns the following values:
//
//   - image: new Image.
func NewImageFromFile(filename string) *Image {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_image_new_from_file(_arg1)
	runtime.KeepAlive(filename)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromGIcon creates a Image displaying an icon from the current icon
// theme. If the icon name isn’t known, a “broken image” icon will be displayed
// instead. If the current icon theme is changed, the icon will be updated
// appropriately.
//
// The function takes the following parameters:
//
//   - icon: icon.
//   - size: stock icon size (IconSize).
//
// The function returns the following values:
//
//   - image: new Image displaying the themed icon.
func NewImageFromGIcon(icon gio.Iconner, size int) *Image {
	var _arg1 *C.GIcon      // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_image_new_from_gicon(_arg1, _arg2)
	runtime.KeepAlive(icon)
	runtime.KeepAlive(size)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromIconName creates a Image displaying an icon from the current icon
// theme. If the icon name isn’t known, a “broken image” icon will be displayed
// instead. If the current icon theme is changed, the icon will be updated
// appropriately.
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name or NULL.
//   - size: stock icon size (IconSize).
//
// The function returns the following values:
//
//   - image: new Image displaying the themed icon.
func NewImageFromIconName(iconName string, size int) *Image {
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_image_new_from_icon_name(_arg1, _arg2)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromIconSet creates a Image displaying an icon set. Sample stock
// sizes are K_ICON_SIZE_MENU, K_ICON_SIZE_SMALL_TOOLBAR. Instead of using this
// function, usually it’s better to create a IconFactory, put your icon sets
// in the icon factory, add the icon factory to the list of default factories
// with gtk_icon_factory_add_default(), and then use gtk_image_new_from_stock().
// This will allow themes to override the icon you ship with your application.
//
// The Image does not assume a reference to the icon set; you still need to
// unref it if you own references. Image will add its own reference rather than
// adopting yours.
//
// Deprecated: Use gtk_image_new_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - iconSet: IconSet.
//   - size: stock icon size (IconSize).
//
// The function returns the following values:
//
//   - image: new Image.
func NewImageFromIconSet(iconSet *IconSet, size int) *Image {
	var _arg1 *C.GtkIconSet // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	_arg1 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_image_new_from_icon_set(_arg1, _arg2)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(size)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromPixbuf creates a new Image displaying pixbuf. The Image does
// not assume a reference to the pixbuf; you still need to unref it if you own
// references. Image will add its own reference rather than adopting yours.
//
// Note that this function just creates an Image from the pixbuf. The Image
// created will not react to state changes. Should you want that, you should use
// gtk_image_new_from_icon_name().
//
// The function takes the following parameters:
//
//   - pixbuf (optional) or NULL.
//
// The function returns the following values:
//
//   - image: new Image.
func NewImageFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) *Image {
	var _arg1 *C.GdkPixbuf // out
	var _cret *C.GtkWidget // in

	if pixbuf != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	_cret = C.gtk_image_new_from_pixbuf(_arg1)
	runtime.KeepAlive(pixbuf)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromResource creates a new Image displaying the resource file
// resource_path. If the file isn’t found or can’t be loaded, the resulting
// Image will display a “broken image” icon. This function never returns NULL,
// it always returns a valid Image widget.
//
// If the file contains an animation, the image will contain an animation.
//
// If you need to detect failures to load the file,
// use gdk_pixbuf_new_from_file() to load the file yourself,
// then create the Image from the pixbuf. (Or for animations, use
// gdk_pixbuf_animation_new_from_file()).
//
// The storage type (gtk_image_get_storage_type()) of the returned image is not
// defined, it will be whatever is appropriate for displaying the file.
//
// The function takes the following parameters:
//
//   - resourcePath: resource path.
//
// The function returns the following values:
//
//   - image: new Image.
func NewImageFromResource(resourcePath string) *Image {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_image_new_from_resource(_arg1)
	runtime.KeepAlive(resourcePath)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromStock creates a Image displaying a stock icon. Sample
// stock icon names are K_STOCK_OPEN, K_STOCK_QUIT. Sample stock sizes are
// K_ICON_SIZE_MENU, K_ICON_SIZE_SMALL_TOOLBAR. If the stock icon name isn’t
// known, the image will be empty. You can register your own stock icon names,
// see gtk_icon_factory_add_default() and gtk_icon_factory_add().
//
// Deprecated: Use gtk_image_new_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId: stock icon name.
//   - size: stock icon size (IconSize).
//
// The function returns the following values:
//
//   - image: new Image displaying the stock icon.
func NewImageFromStock(stockId string, size int) *Image {
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GtkWidget  // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_image_new_from_stock(_arg1, _arg2)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(size)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// NewImageFromSurface creates a new Image displaying surface. The Image does
// not assume a reference to the surface; you still need to unref it if you own
// references. Image will add its own reference rather than adopting yours.
//
// The function takes the following parameters:
//
//   - surface (optional) or NULL.
//
// The function returns the following values:
//
//   - image: new Image.
func NewImageFromSurface(surface *cairo.Surface) *Image {
	var _arg1 *C.cairo_surface_t // out
	var _cret *C.GtkWidget       // in

	if surface != nil {
		_arg1 = (*C.cairo_surface_t)(unsafe.Pointer(surface.Native()))
	}

	_cret = C.gtk_image_new_from_surface(_arg1)
	runtime.KeepAlive(surface)

	var _image *Image // out

	_image = wrapImage(coreglib.Take(unsafe.Pointer(_cret)))

	return _image
}

// Clear resets the image to be empty.
func (image *Image) Clear() {
	var _arg0 *C.GtkImage // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_image_clear(_arg0)
	runtime.KeepAlive(image)
}

// Animation gets the PixbufAnimation being displayed by the Image. The storage
// type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_ANIMATION (see
// gtk_image_get_storage_type()). The caller of this function does not own a
// reference to the returned animation.
//
// The function returns the following values:
//
//   - pixbufAnimation (optional): displayed animation, or NULL if the image is
//     empty.
func (image *Image) Animation() *gdkpixbuf.PixbufAnimation {
	var _arg0 *C.GtkImage           // out
	var _cret *C.GdkPixbufAnimation // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	_cret = C.gtk_image_get_animation(_arg0)
	runtime.KeepAlive(image)

	var _pixbufAnimation *gdkpixbuf.PixbufAnimation // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbufAnimation = &gdkpixbuf.PixbufAnimation{
				Object: obj,
			}
		}
	}

	return _pixbufAnimation
}

// GIcon gets the #GIcon and size being displayed by the Image. The storage
// type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_GICON (see
// gtk_image_get_storage_type()). The caller of this function does not own a
// reference to the returned #GIcon.
//
// The function returns the following values:
//
//   - gicon (optional): place to store a #GIcon, or NULL.
//   - size (optional): place to store an icon size (IconSize), or NULL.
func (image *Image) GIcon() (*gio.Icon, int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.GIcon      // in
	var _arg2 C.GtkIconSize // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_image_get_gicon(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(image)

	var _gicon *gio.Icon // out
	var _size int        // out

	if _arg1 != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_arg1))
			_gicon = &gio.Icon{
				Object: obj,
			}
		}
	}
	_size = int(_arg2)

	return _gicon, _size
}

// IconName gets the icon name and size being displayed by the Image. The
// storage type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_ICON_NAME (see
// gtk_image_get_storage_type()). The returned string is owned by the Image and
// should not be freed.
//
// The function returns the following values:
//
//   - iconName (optional): place to store an icon name, or NULL.
//   - size (optional): place to store an icon size (IconSize), or NULL.
func (image *Image) IconName() (string, int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.gchar      // in
	var _arg2 C.GtkIconSize // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_image_get_icon_name(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(image)

	var _iconName string // out
	var _size int        // out

	if _arg1 != nil {
		_iconName = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	}
	_size = int(_arg2)

	return _iconName, _size
}

// IconSet gets the icon set and size being displayed by the Image. The storage
// type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_ICON_SET (see
// gtk_image_get_storage_type()).
//
// Deprecated: Use gtk_image_get_icon_name() instead.
//
// The function returns the following values:
//
//   - iconSet (optional): location to store a IconSet, or NULL.
//   - size (optional): location to store a stock icon size (IconSize), or NULL.
func (image *Image) IconSet() (*IconSet, int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.GtkIconSet // in
	var _arg2 C.GtkIconSize // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_image_get_icon_set(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(image)

	var _iconSet *IconSet // out
	var _size int         // out

	if _arg1 != nil {
		_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		C.gtk_icon_set_ref(_arg1)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_iconSet)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
			},
		)
	}
	_size = int(_arg2)

	return _iconSet, _size
}

// Pixbuf gets the Pixbuf being displayed by the Image. The storage
// type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_PIXBUF (see
// gtk_image_get_storage_type()). The caller of this function does not own a
// reference to the returned pixbuf.
//
// The function returns the following values:
//
//   - pixbuf (optional): displayed pixbuf, or NULL if the image is empty.
func (image *Image) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkImage  // out
	var _cret *C.GdkPixbuf // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	_cret = C.gtk_image_get_pixbuf(_arg0)
	runtime.KeepAlive(image)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// PixelSize gets the pixel size used for named icons.
//
// The function returns the following values:
//
//   - gint: pixel size used for named icons.
func (image *Image) PixelSize() int {
	var _arg0 *C.GtkImage // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	_cret = C.gtk_image_get_pixel_size(_arg0)
	runtime.KeepAlive(image)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Stock gets the stock icon name and size being displayed by the Image.
// The storage type of the image must be GTK_IMAGE_EMPTY or GTK_IMAGE_STOCK (see
// gtk_image_get_storage_type()). The returned string is owned by the Image and
// should not be freed.
//
// Deprecated: Use gtk_image_get_icon_name() instead.
//
// The function returns the following values:
//
//   - stockId (optional): place to store a stock icon name, or NULL.
//   - size (optional): place to store a stock icon size (IconSize), or NULL.
func (image *Image) Stock() (string, int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.gchar      // in
	var _arg2 C.GtkIconSize // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_image_get_stock(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(image)

	var _stockId string // out
	var _size int       // out

	if _arg1 != nil {
		_stockId = C.GoString((*C.gchar)(unsafe.Pointer(_arg1)))
	}
	_size = int(_arg2)

	return _stockId, _size
}

// StorageType gets the type of representation being used by the Image to
// store image data. If the Image has no image data, the return value will be
// GTK_IMAGE_EMPTY.
//
// The function returns the following values:
//
//   - imageType: image representation being used.
func (image *Image) StorageType() ImageType {
	var _arg0 *C.GtkImage    // out
	var _cret C.GtkImageType // in

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	_cret = C.gtk_image_get_storage_type(_arg0)
	runtime.KeepAlive(image)

	var _imageType ImageType // out

	_imageType = ImageType(_cret)

	return _imageType
}

// SetFromAnimation causes the Image to display the given animation (or display
// nothing, if you set the animation to NULL).
//
// The function takes the following parameters:
//
//   - animation: PixbufAnimation.
func (image *Image) SetFromAnimation(animation *gdkpixbuf.PixbufAnimation) {
	var _arg0 *C.GtkImage           // out
	var _arg1 *C.GdkPixbufAnimation // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	_arg1 = (*C.GdkPixbufAnimation)(unsafe.Pointer(coreglib.InternObject(animation).Native()))

	C.gtk_image_set_from_animation(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(animation)
}

// SetFromFile: see gtk_image_new_from_file() for details.
//
// The function takes the following parameters:
//
//   - filename (optional) or NULL.
func (image *Image) SetFromFile(filename string) {
	var _arg0 *C.GtkImage // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	if filename != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_image_set_from_file(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(filename)
}

// SetFromGIcon: see gtk_image_new_from_gicon() for details.
//
// The function takes the following parameters:
//
//   - icon: icon.
//   - size: icon size (IconSize).
func (image *Image) SetFromGIcon(icon gio.Iconner, size int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.GIcon      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	_arg2 = C.GtkIconSize(size)

	C.gtk_image_set_from_gicon(_arg0, _arg1, _arg2)
	runtime.KeepAlive(image)
	runtime.KeepAlive(icon)
	runtime.KeepAlive(size)
}

// SetFromIconName: see gtk_image_new_from_icon_name() for details.
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name or NULL.
//   - size: icon size (IconSize).
func (image *Image) SetFromIconName(iconName string, size int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GtkIconSize(size)

	C.gtk_image_set_from_icon_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(image)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
}

// SetFromIconSet: see gtk_image_new_from_icon_set() for details.
//
// Deprecated: Use gtk_image_set_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - iconSet: IconSet.
//   - size: stock icon size (IconSize).
func (image *Image) SetFromIconSet(iconSet *IconSet, size int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.GtkIconSet // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	_arg1 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	_arg2 = C.GtkIconSize(size)

	C.gtk_image_set_from_icon_set(_arg0, _arg1, _arg2)
	runtime.KeepAlive(image)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(size)
}

// SetFromPixbuf: see gtk_image_new_from_pixbuf() for details.
//
// The function takes the following parameters:
//
//   - pixbuf (optional) or NULL.
func (image *Image) SetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkImage  // out
	var _arg1 *C.GdkPixbuf // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	if pixbuf != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_image_set_from_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(pixbuf)
}

// SetFromResource: see gtk_image_new_from_resource() for details.
//
// The function takes the following parameters:
//
//   - resourcePath (optional): resource path or NULL.
func (image *Image) SetFromResource(resourcePath string) {
	var _arg0 *C.GtkImage // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	if resourcePath != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_image_set_from_resource(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(resourcePath)
}

// SetFromStock: see gtk_image_new_from_stock() for details.
//
// Deprecated: Use gtk_image_set_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId: stock icon name.
//   - size: stock icon size (IconSize).
func (image *Image) SetFromStock(stockId string, size int) {
	var _arg0 *C.GtkImage   // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkIconSize(size)

	C.gtk_image_set_from_stock(_arg0, _arg1, _arg2)
	runtime.KeepAlive(image)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(size)
}

// SetFromSurface: see gtk_image_new_from_surface() for details.
//
// The function takes the following parameters:
//
//   - surface (optional): cairo_surface_t or NULL.
func (image *Image) SetFromSurface(surface *cairo.Surface) {
	var _arg0 *C.GtkImage        // out
	var _arg1 *C.cairo_surface_t // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	if surface != nil {
		_arg1 = (*C.cairo_surface_t)(unsafe.Pointer(surface.Native()))
	}

	C.gtk_image_set_from_surface(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(surface)
}

// SetPixelSize sets the pixel size to use for named icons. If the pixel
// size is set to a value != -1, it is used instead of the icon size set by
// gtk_image_set_from_icon_name().
//
// The function takes the following parameters:
//
//   - pixelSize: new pixel size.
func (image *Image) SetPixelSize(pixelSize int) {
	var _arg0 *C.GtkImage // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkImage)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	_arg1 = C.gint(pixelSize)

	C.gtk_image_set_pixel_size(_arg0, _arg1)
	runtime.KeepAlive(image)
	runtime.KeepAlive(pixelSize)
}

// ImageAccessibleOverrides contains methods that are overridable.
type ImageAccessibleOverrides struct {
}

func defaultImageAccessibleOverrides(v *ImageAccessible) ImageAccessibleOverrides {
	return ImageAccessibleOverrides{}
}

type ImageAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Image
}

var (
	_ coreglib.Objector = (*ImageAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ImageAccessible, *ImageAccessibleClass, ImageAccessibleOverrides](
		GTypeImageAccessible,
		initImageAccessibleClass,
		wrapImageAccessible,
		defaultImageAccessibleOverrides,
	)
}

func initImageAccessibleClass(gclass unsafe.Pointer, overrides ImageAccessibleOverrides, classInitFunc func(*ImageAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ImageAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapImageAccessible(obj *coreglib.Object) *ImageAccessible {
	return &ImageAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Image: atk.Image{
			Object: obj,
		},
	}
}

func marshalImageAccessible(p uintptr) (interface{}, error) {
	return wrapImageAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ImageCellAccessibleOverrides contains methods that are overridable.
type ImageCellAccessibleOverrides struct {
}

func defaultImageCellAccessibleOverrides(v *ImageCellAccessible) ImageCellAccessibleOverrides {
	return ImageCellAccessibleOverrides{}
}

type ImageCellAccessible struct {
	_ [0]func() // equal guard
	RendererCellAccessible

	*coreglib.Object
	atk.AtkObject
	atk.Image
}

var (
	_ coreglib.Objector = (*ImageCellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ImageCellAccessible, *ImageCellAccessibleClass, ImageCellAccessibleOverrides](
		GTypeImageCellAccessible,
		initImageCellAccessibleClass,
		wrapImageCellAccessible,
		defaultImageCellAccessibleOverrides,
	)
}

func initImageCellAccessibleClass(gclass unsafe.Pointer, overrides ImageCellAccessibleOverrides, classInitFunc func(*ImageCellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ImageCellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapImageCellAccessible(obj *coreglib.Object) *ImageCellAccessible {
	return &ImageCellAccessible{
		RendererCellAccessible: RendererCellAccessible{
			CellAccessible: CellAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				AtkObject: atk.AtkObject{
					Object: obj,
				},
				Component: atk.Component{
					Object: obj,
				},
				TableCell: atk.TableCell{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		AtkObject: atk.AtkObject{
			Object: obj,
		},
		Image: atk.Image{
			Object: obj,
		},
	}
}

func marshalImageCellAccessible(p uintptr) (interface{}, error) {
	return wrapImageCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ImageMenuItemOverrides contains methods that are overridable.
type ImageMenuItemOverrides struct {
}

func defaultImageMenuItemOverrides(v *ImageMenuItem) ImageMenuItemOverrides {
	return ImageMenuItemOverrides{}
}

// ImageMenuItem is a menu item which has an icon next to the text label.
//
// This is functionally equivalent to:
//
//	GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
//	GtkWidget *icon = gtk_image_new_from_icon_name ("folder-music-symbolic", GTK_ICON_SIZE_MENU);
//	GtkWidget *label = gtk_accel_label_new ("Music");
//	GtkWidget *menu_item = gtk_menu_item_new ();
//	GtkAccelGroup *accel_group = gtk_accel_group_new ();
//
//	gtk_container_add (GTK_CONTAINER (box), icon);
//
//	gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
//	gtk_label_set_xalign (GTK_LABEL (label), 0.0);
//
//	gtk_widget_add_accelerator (menu_item, "activate", accel_group,
//	                            GDK_KEY_m, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
//	gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (label), menu_item);
//
//	gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0);
//
//	gtk_container_add (GTK_CONTAINER (menu_item), box);
//
//	gtk_widget_show_all (menu_item);.
type ImageMenuItem struct {
	_ [0]func() // equal guard
	MenuItem
}

var (
	_ Binner            = (*ImageMenuItem)(nil)
	_ coreglib.Objector = (*ImageMenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ImageMenuItem, *ImageMenuItemClass, ImageMenuItemOverrides](
		GTypeImageMenuItem,
		initImageMenuItemClass,
		wrapImageMenuItem,
		defaultImageMenuItemOverrides,
	)
}

func initImageMenuItemClass(gclass unsafe.Pointer, overrides ImageMenuItemOverrides, classInitFunc func(*ImageMenuItemClass)) {
	if classInitFunc != nil {
		class := (*ImageMenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapImageMenuItem(obj *coreglib.Object) *ImageMenuItem {
	return &ImageMenuItem{
		MenuItem: MenuItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalImageMenuItem(p uintptr) (interface{}, error) {
	return wrapImageMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewImageMenuItem creates a new ImageMenuItem with an empty label.
//
// Deprecated: Use gtk_menu_item_new() instead.
//
// The function returns the following values:
//
//   - imageMenuItem: new ImageMenuItem.
func NewImageMenuItem() *ImageMenuItem {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_image_menu_item_new()

	var _imageMenuItem *ImageMenuItem // out

	_imageMenuItem = wrapImageMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _imageMenuItem
}

// NewImageMenuItemFromStock creates a new ImageMenuItem containing the image
// and text from a stock item. Some stock ids have preprocessor macros like
// K_STOCK_OK and K_STOCK_APPLY.
//
// If you want this menu item to have changeable accelerators, then pass in
// NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an
// appropriate path for the menu item, use gtk_stock_lookup() to look up
// the standard accelerator for the stock item, and if one is found, call
// gtk_accel_map_add_entry() to register it.
//
// Deprecated: Use gtk_menu_item_new_with_mnemonic() instead.
//
// The function takes the following parameters:
//
//   - stockId: name of the stock item.
//   - accelGroup (optional) to add the menu items accelerator to, or NULL.
//
// The function returns the following values:
//
//   - imageMenuItem: new ImageMenuItem.
func NewImageMenuItemFromStock(stockId string, accelGroup *AccelGroup) *ImageMenuItem {
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkAccelGroup // out
	var _cret *C.GtkWidget     // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	if accelGroup != nil {
		_arg2 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	}

	_cret = C.gtk_image_menu_item_new_from_stock(_arg1, _arg2)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(accelGroup)

	var _imageMenuItem *ImageMenuItem // out

	_imageMenuItem = wrapImageMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _imageMenuItem
}

// NewImageMenuItemWithLabel creates a new ImageMenuItem containing a label.
//
// Deprecated: Use gtk_menu_item_new_with_label() instead.
//
// The function takes the following parameters:
//
//   - label: text of the menu item.
//
// The function returns the following values:
//
//   - imageMenuItem: new ImageMenuItem.
func NewImageMenuItemWithLabel(label string) *ImageMenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_image_menu_item_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _imageMenuItem *ImageMenuItem // out

	_imageMenuItem = wrapImageMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _imageMenuItem
}

// NewImageMenuItemWithMnemonic creates a new ImageMenuItem containing a label.
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the menu item.
//
// Deprecated: Use gtk_menu_item_new_with_mnemonic() instead.
//
// The function takes the following parameters:
//
//   - label: text of the menu item, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - imageMenuItem: new ImageMenuItem.
func NewImageMenuItemWithMnemonic(label string) *ImageMenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_image_menu_item_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _imageMenuItem *ImageMenuItem // out

	_imageMenuItem = wrapImageMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _imageMenuItem
}

// AlwaysShowImage returns whether the menu item will ignore the
// Settings:gtk-menu-images setting and always show the image, if available.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the menu item will always show the image.
func (imageMenuItem *ImageMenuItem) AlwaysShowImage() bool {
	var _arg0 *C.GtkImageMenuItem // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))

	_cret = C.gtk_image_menu_item_get_always_show_image(_arg0)
	runtime.KeepAlive(imageMenuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Image gets the widget that is currently set as the image of image_menu_item.
// See gtk_image_menu_item_set_image().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - widget set as image of image_menu_item.
func (imageMenuItem *ImageMenuItem) Image() Widgetter {
	var _arg0 *C.GtkImageMenuItem // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))

	_cret = C.gtk_image_menu_item_get_image(_arg0)
	runtime.KeepAlive(imageMenuItem)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// UseStock checks whether the label set in the menuitem is used as a stock id
// to select the stock item for the item.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the label set in the menuitem is used as a stock id to select
//     the stock item for the item.
func (imageMenuItem *ImageMenuItem) UseStock() bool {
	var _arg0 *C.GtkImageMenuItem // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))

	_cret = C.gtk_image_menu_item_get_use_stock(_arg0)
	runtime.KeepAlive(imageMenuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAccelGroup specifies an accel_group to add the menu items accelerator
// to (this only applies to stock items so a stock item must already
// be set, make sure to call gtk_image_menu_item_set_use_stock() and
// gtk_menu_item_set_label() with a valid stock item first).
//
// If you want this menu item to have changeable accelerators then you shouldnt
// need this (see gtk_image_menu_item_new_from_stock()).
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - accelGroup: AccelGroup.
func (imageMenuItem *ImageMenuItem) SetAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkImageMenuItem // out
	var _arg1 *C.GtkAccelGroup    // out

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))
	_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	C.gtk_image_menu_item_set_accel_group(_arg0, _arg1)
	runtime.KeepAlive(imageMenuItem)
	runtime.KeepAlive(accelGroup)
}

// SetAlwaysShowImage: if TRUE, the menu item will ignore the
// Settings:gtk-menu-images setting and always show the image, if available.
//
// Use this property if the menuitem would be useless or hard to use without the
// image.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - alwaysShow: TRUE if the menuitem should always show the image.
func (imageMenuItem *ImageMenuItem) SetAlwaysShowImage(alwaysShow bool) {
	var _arg0 *C.GtkImageMenuItem // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))
	if alwaysShow {
		_arg1 = C.TRUE
	}

	C.gtk_image_menu_item_set_always_show_image(_arg0, _arg1)
	runtime.KeepAlive(imageMenuItem)
	runtime.KeepAlive(alwaysShow)
}

// SetImage sets the image of image_menu_item to the given widget. Note that it
// depends on the show-menu-images setting whether the image will be displayed
// or not.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - image (optional): widget to set as the image for the menu item.
func (imageMenuItem *ImageMenuItem) SetImage(image Widgetter) {
	var _arg0 *C.GtkImageMenuItem // out
	var _arg1 *C.GtkWidget        // out

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))
	if image != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(image).Native()))
	}

	C.gtk_image_menu_item_set_image(_arg0, _arg1)
	runtime.KeepAlive(imageMenuItem)
	runtime.KeepAlive(image)
}

// SetUseStock: if TRUE, the label set in the menuitem is used as a stock id to
// select the stock item for the item.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - useStock: TRUE if the menuitem should use a stock item.
func (imageMenuItem *ImageMenuItem) SetUseStock(useStock bool) {
	var _arg0 *C.GtkImageMenuItem // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkImageMenuItem)(unsafe.Pointer(coreglib.InternObject(imageMenuItem).Native()))
	if useStock {
		_arg1 = C.TRUE
	}

	C.gtk_image_menu_item_set_use_stock(_arg0, _arg1)
	runtime.KeepAlive(imageMenuItem)
	runtime.KeepAlive(useStock)
}

// InfoBarOverrides contains methods that are overridable.
type InfoBarOverrides struct {
	Close func()
	// Response emits the “response” signal with the given response_id.
	//
	// The function takes the following parameters:
	//
	//   - responseId: response ID.
	Response func(responseId int)
}

func defaultInfoBarOverrides(v *InfoBar) InfoBarOverrides {
	return InfoBarOverrides{
		Close:    v.close,
		Response: v.response,
	}
}

// InfoBar is a widget that can be used to show messages to the user without
// showing a dialog. It is often temporarily shown at the top or bottom of a
// document. In contrast to Dialog, which has a action area at the bottom,
// InfoBar has an action area at the side.
//
// The API of InfoBar is very similar to Dialog, allowing you to
// add buttons to the action area with gtk_info_bar_add_button() or
// gtk_info_bar_new_with_buttons(). The sensitivity of action widgets can be
// controlled with gtk_info_bar_set_response_sensitive(). To add widgets to the
// main content area of a InfoBar, use gtk_info_bar_get_content_area() and add
// your widgets to the container.
//
// Similar to MessageDialog, the contents of a InfoBar can by classified
// as error message, warning, informational message, etc, by using
// gtk_info_bar_set_message_type(). GTK+ may use the message type to determine
// how the message is displayed.
//
// A simple example for using a InfoBar:
//
//	GtkWidget *widget, *message_label, *content_area;
//	GtkWidget *grid;
//	GtkInfoBar *bar;
//
//	// set up info bar
//	widget = gtk_info_bar_new ();
//	bar = GTK_INFO_BAR (widget);
//	grid = gtk_grid_new ();
//
//	gtk_widget_set_no_show_all (widget, TRUE);
//	message_label = gtk_label_new ("");
//	content_area = gtk_info_bar_get_content_area (bar);
//	gtk_container_add (GTK_CONTAINER (content_area),
//	                   message_label);
//	gtk_info_bar_add_button (bar,
//	                         _("_OK"),
//	                         GTK_RESPONSE_OK);
//	g_signal_connect (bar,
//	                  "response",
//	                  G_CALLBACK (gtk_widget_hide),
//	                  NULL);
//	gtk_grid_attach (GTK_GRID (grid),
//	                 widget,
//	                 0, 2, 1, 1);
//
//	// ...
//
//	// show an error message
//	gtk_label_set_text (GTK_LABEL (message_label), "An error occurred!");
//	gtk_info_bar_set_message_type (bar,
//	                               GTK_MESSAGE_ERROR);
//	gtk_widget_show (bar);
//
// # GtkInfoBar as GtkBuildable
//
// The GtkInfoBar implementation of the GtkBuildable interface exposes
// the content area and action area as internal children with the names
// “content_area” and “action_area”.
//
// GtkInfoBar supports a custom <action-widgets> element, which can contain
// multiple <action-widget> elements. The “response” attribute specifies a
// numeric response, and the content of the element is the id of widget (which
// should be a child of the dialogs action_area).
//
// # CSS nodes
//
// GtkInfoBar has a single CSS node with name infobar. The node may get one
// of the style classes .info, .warning, .error or .question, depending on the
// message type.
type InfoBar struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*InfoBar)(nil)
	_ coreglib.Objector = (*InfoBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*InfoBar, *InfoBarClass, InfoBarOverrides](
		GTypeInfoBar,
		initInfoBarClass,
		wrapInfoBar,
		defaultInfoBarOverrides,
	)
}

func initInfoBarClass(gclass unsafe.Pointer, overrides InfoBarOverrides, classInitFunc func(*InfoBarClass)) {
	pclass := (*C.GtkInfoBarClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeInfoBar))))

	if overrides.Close != nil {
		pclass.close = (*[0]byte)(C._gotk4_gtk3_InfoBarClass_close)
	}

	if overrides.Response != nil {
		pclass.response = (*[0]byte)(C._gotk4_gtk3_InfoBarClass_response)
	}

	if classInitFunc != nil {
		class := (*InfoBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapInfoBar(obj *coreglib.Object) *InfoBar {
	return &InfoBar{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalInfoBar(p uintptr) (interface{}, error) {
	return wrapInfoBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectClose signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user uses a keybinding to dismiss the info bar.
//
// The default binding for this signal is the Escape key.
func (infoBar *InfoBar) ConnectClose(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(infoBar, "close", false, unsafe.Pointer(C._gotk4_gtk3_InfoBar_ConnectClose), f)
}

// ConnectResponse is emitted when an action widget is clicked or the
// application programmer calls gtk_dialog_response(). The response_id depends
// on which action widget was clicked.
func (infoBar *InfoBar) ConnectResponse(f func(responseId int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(infoBar, "response", false, unsafe.Pointer(C._gotk4_gtk3_InfoBar_ConnectResponse), f)
}

// NewInfoBar creates a new InfoBar object.
//
// The function returns the following values:
//
//   - infoBar: new InfoBar object.
func NewInfoBar() *InfoBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_info_bar_new()

	var _infoBar *InfoBar // out

	_infoBar = wrapInfoBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _infoBar
}

// AddActionWidget: add an activatable widget to the action area of a InfoBar,
// connecting a signal handler that will emit the InfoBar::response signal on
// the message area when the widget is activated. The widget is appended to the
// end of the message areas action area.
//
// The function takes the following parameters:
//
//   - child: activatable widget.
//   - responseId: response ID for child.
func (infoBar *InfoBar) AddActionWidget(child Widgetter, responseId int) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gint        // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(responseId)

	C.gtk_info_bar_add_action_widget(_arg0, _arg1, _arg2)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(child)
	runtime.KeepAlive(responseId)
}

// AddButton adds a button with the given text and sets things up so that
// clicking the button will emit the “response” signal with the given
// response_id. The button is appended to the end of the info bars's action
// area. The button widget is returned, but usually you don't need it.
//
// The function takes the following parameters:
//
//   - buttonText: text of button.
//   - responseId: response ID for the button.
//
// The function returns the following values:
//
//   - button widget that was added.
func (infoBar *InfoBar) AddButton(buttonText string, responseId int) *Button {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 *C.gchar      // out
	var _arg2 C.gint        // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(buttonText)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(responseId)

	_cret = C.gtk_info_bar_add_button(_arg0, _arg1, _arg2)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(buttonText)
	runtime.KeepAlive(responseId)

	var _button *Button // out

	_button = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _button
}

// ActionArea returns the action area of info_bar.
//
// The function returns the following values:
//
//   - box: action area.
func (infoBar *InfoBar) ActionArea() *Box {
	var _arg0 *C.GtkInfoBar // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	_cret = C.gtk_info_bar_get_action_area(_arg0)
	runtime.KeepAlive(infoBar)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// ContentArea returns the content area of info_bar.
//
// The function returns the following values:
//
//   - box: content area.
func (infoBar *InfoBar) ContentArea() *Box {
	var _arg0 *C.GtkInfoBar // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	_cret = C.gtk_info_bar_get_content_area(_arg0)
	runtime.KeepAlive(infoBar)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// MessageType returns the message type of the message area.
//
// The function returns the following values:
//
//   - messageType: message type of the message area.
func (infoBar *InfoBar) MessageType() MessageType {
	var _arg0 *C.GtkInfoBar    // out
	var _cret C.GtkMessageType // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	_cret = C.gtk_info_bar_get_message_type(_arg0)
	runtime.KeepAlive(infoBar)

	var _messageType MessageType // out

	_messageType = MessageType(_cret)

	return _messageType
}

// The function returns the following values:
//
//   - ok: current value of the GtkInfoBar:revealed property.
func (infoBar *InfoBar) Revealed() bool {
	var _arg0 *C.GtkInfoBar // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	_cret = C.gtk_info_bar_get_revealed(_arg0)
	runtime.KeepAlive(infoBar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowCloseButton returns whether the widget will display a standard close
// button.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget displays standard close button.
func (infoBar *InfoBar) ShowCloseButton() bool {
	var _arg0 *C.GtkInfoBar // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	_cret = C.gtk_info_bar_get_show_close_button(_arg0)
	runtime.KeepAlive(infoBar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Response emits the “response” signal with the given response_id.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (infoBar *InfoBar) Response(responseId int) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gint        // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = C.gint(responseId)

	C.gtk_info_bar_response(_arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(responseId)
}

// SetDefaultResponse sets the last widget in the info bar’s action area with
// the given response_id as the default widget for the dialog. Pressing “Enter”
// normally activates the default widget.
//
// Note that this function currently requires info_bar to be added to a widget
// hierarchy.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (infoBar *InfoBar) SetDefaultResponse(responseId int) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gint        // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = C.gint(responseId)

	C.gtk_info_bar_set_default_response(_arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(responseId)
}

// SetMessageType sets the message type of the message area.
//
// GTK+ uses this type to determine how the message is displayed.
//
// The function takes the following parameters:
//
//   - messageType: MessageType.
func (infoBar *InfoBar) SetMessageType(messageType MessageType) {
	var _arg0 *C.GtkInfoBar    // out
	var _arg1 C.GtkMessageType // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = C.GtkMessageType(messageType)

	C.gtk_info_bar_set_message_type(_arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(messageType)
}

// SetResponseSensitive calls gtk_widget_set_sensitive (widget, setting) for
// each widget in the info bars’s action area with the given response_id.
// A convenient way to sensitize/desensitize dialog buttons.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
//   - setting: TRUE for sensitive.
func (infoBar *InfoBar) SetResponseSensitive(responseId int, setting bool) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gint        // out
	var _arg2 C.gboolean    // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = C.gint(responseId)
	if setting {
		_arg2 = C.TRUE
	}

	C.gtk_info_bar_set_response_sensitive(_arg0, _arg1, _arg2)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(responseId)
	runtime.KeepAlive(setting)
}

// SetRevealed sets the GtkInfoBar:revealed property to revealed. This will
// cause info_bar to show up with a slide-in transition.
//
// Note that this property does not automatically show info_bar and thus won’t
// have any effect if it is invisible.
//
// The function takes the following parameters:
//
//   - revealed: new value of the property.
func (infoBar *InfoBar) SetRevealed(revealed bool) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	if revealed {
		_arg1 = C.TRUE
	}

	C.gtk_info_bar_set_revealed(_arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(revealed)
}

// SetShowCloseButton: if true, a standard close button is shown. When clicked
// it emits the response GTK_RESPONSE_CLOSE.
//
// The function takes the following parameters:
//
//   - setting: TRUE to include a close button.
func (infoBar *InfoBar) SetShowCloseButton(setting bool) {
	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_info_bar_set_show_close_button(_arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(setting)
}

func (infoBar *InfoBar) close() {
	gclass := (*C.GtkInfoBarClass)(coreglib.PeekParentClass(infoBar))
	fnarg := gclass.close

	var _arg0 *C.GtkInfoBar // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))

	C._gotk4_gtk3_InfoBar_virtual_close(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(infoBar)
}

// Response emits the “response” signal with the given response_id.
//
// The function takes the following parameters:
//
//   - responseId: response ID.
func (infoBar *InfoBar) response(responseId int) {
	gclass := (*C.GtkInfoBarClass)(coreglib.PeekParentClass(infoBar))
	fnarg := gclass.response

	var _arg0 *C.GtkInfoBar // out
	var _arg1 C.gint        // out

	_arg0 = (*C.GtkInfoBar)(unsafe.Pointer(coreglib.InternObject(infoBar).Native()))
	_arg1 = C.gint(responseId)

	C._gotk4_gtk3_InfoBar_virtual_response(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(infoBar)
	runtime.KeepAlive(responseId)
}

// InvisibleOverrides contains methods that are overridable.
type InvisibleOverrides struct {
}

func defaultInvisibleOverrides(v *Invisible) InvisibleOverrides {
	return InvisibleOverrides{}
}

// Invisible widget is used internally in GTK+, and is probably not very useful
// for application developers.
//
// It is used for reliable pointer grabs and selection handling in the code for
// drag-and-drop.
type Invisible struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Invisible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Invisible, *InvisibleClass, InvisibleOverrides](
		GTypeInvisible,
		initInvisibleClass,
		wrapInvisible,
		defaultInvisibleOverrides,
	)
}

func initInvisibleClass(gclass unsafe.Pointer, overrides InvisibleOverrides, classInitFunc func(*InvisibleClass)) {
	if classInitFunc != nil {
		class := (*InvisibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapInvisible(obj *coreglib.Object) *Invisible {
	return &Invisible{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalInvisible(p uintptr) (interface{}, error) {
	return wrapInvisible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewInvisible creates a new Invisible.
//
// The function returns the following values:
//
//   - invisible: new Invisible.
func NewInvisible() *Invisible {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_invisible_new()

	var _invisible *Invisible // out

	_invisible = wrapInvisible(coreglib.Take(unsafe.Pointer(_cret)))

	return _invisible
}

// NewInvisibleForScreen creates a new Invisible object for a specified screen.
//
// The function takes the following parameters:
//
//   - screen which identifies on which the new Invisible will be created.
//
// The function returns the following values:
//
//   - invisible: newly created Invisible object.
func NewInvisibleForScreen(screen *gdk.Screen) *Invisible {
	var _arg1 *C.GdkScreen // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	_cret = C.gtk_invisible_new_for_screen(_arg1)
	runtime.KeepAlive(screen)

	var _invisible *Invisible // out

	_invisible = wrapInvisible(coreglib.Take(unsafe.Pointer(_cret)))

	return _invisible
}

// Screen returns the Screen object associated with invisible.
//
// The function returns the following values:
//
//   - screen: associated Screen.
func (invisible *Invisible) Screen() *gdk.Screen {
	var _arg0 *C.GtkInvisible // out
	var _cret *C.GdkScreen    // in

	_arg0 = (*C.GtkInvisible)(unsafe.Pointer(coreglib.InternObject(invisible).Native()))

	_cret = C.gtk_invisible_get_screen(_arg0)
	runtime.KeepAlive(invisible)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// SetScreen sets the Screen where the Invisible object will be displayed.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (invisible *Invisible) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkInvisible // out
	var _arg1 *C.GdkScreen    // out

	_arg0 = (*C.GtkInvisible)(unsafe.Pointer(coreglib.InternObject(invisible).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_invisible_set_screen(_arg0, _arg1)
	runtime.KeepAlive(invisible)
	runtime.KeepAlive(screen)
}

// LabelOverrides contains methods that are overridable.
type LabelOverrides struct {
	ActivateLink  func(uri string) bool
	CopyClipboard func()
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	//   - extendSelection
	MoveCursor    func(step MovementStep, count int, extendSelection bool)
	PopulatePopup func(menu *Menu)
}

func defaultLabelOverrides(v *Label) LabelOverrides {
	return LabelOverrides{
		ActivateLink:  v.activateLink,
		CopyClipboard: v.copyClipboard,
		MoveCursor:    v.moveCursor,
		PopulatePopup: v.populatePopup,
	}
}

// Label widget displays a small amount of text. As the name implies,
// most labels are used to label another widget such as a Button, a MenuItem,
// or a ComboBox.
//
// CSS nodes
//
//	const gchar *text =
//	"Go to the"
//	"<a href=\"http://www.gtk.org title=\"&lt;i&gt;Our&lt;/i&gt; website\">"
//	"GTK+ website</a> for more...";
//	GtkWidget *label = gtk_label_new (NULL);
//	gtk_label_set_markup (GTK_LABEL (label), text);
//
// It is possible to implement custom handling for links and their tooltips with
// the Label::activate-link signal and the gtk_label_get_current_uri() function.
type Label struct {
	_ [0]func() // equal guard
	Misc
}

var (
	_ Miscer = (*Label)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Label, *LabelClass, LabelOverrides](
		GTypeLabel,
		initLabelClass,
		wrapLabel,
		defaultLabelOverrides,
	)
}

func initLabelClass(gclass unsafe.Pointer, overrides LabelOverrides, classInitFunc func(*LabelClass)) {
	pclass := (*C.GtkLabelClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeLabel))))

	if overrides.ActivateLink != nil {
		pclass.activate_link = (*[0]byte)(C._gotk4_gtk3_LabelClass_activate_link)
	}

	if overrides.CopyClipboard != nil {
		pclass.copy_clipboard = (*[0]byte)(C._gotk4_gtk3_LabelClass_copy_clipboard)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_LabelClass_move_cursor)
	}

	if overrides.PopulatePopup != nil {
		pclass.populate_popup = (*[0]byte)(C._gotk4_gtk3_LabelClass_populate_popup)
	}

	if classInitFunc != nil {
		class := (*LabelClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLabel(obj *coreglib.Object) *Label {
	return &Label{
		Misc: Misc{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalLabel(p uintptr) (interface{}, error) {
	return wrapLabel(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateCurrentLink: [keybinding signal][GtkBindingSignal] which gets
// emitted when the user activates a link in the label.
//
// Applications may also emit the signal with g_signal_emit_by_name() if they
// need to control activation of URIs programmatically.
//
// The default bindings for this signal are all forms of the Enter key.
func (label *Label) ConnectActivateCurrentLink(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(label, "activate-current-link", false, unsafe.Pointer(C._gotk4_gtk3_Label_ConnectActivateCurrentLink), f)
}

// ConnectActivateLink: signal which gets emitted to activate a URI.
// Applications may connect to it to override the default behaviour, which is to
// call gtk_show_uri_on_window().
func (label *Label) ConnectActivateLink(f func(uri string) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(label, "activate-link", false, unsafe.Pointer(C._gotk4_gtk3_Label_ConnectActivateLink), f)
}

// ConnectCopyClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to copy the selection to the clipboard.
//
// The default binding for this signal is Ctrl-c.
func (label *Label) ConnectCopyClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(label, "copy-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_Label_ConnectCopyClipboard), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a cursor movement. If the cursor is not
// visible in entry, this signal causes the viewport to be moved instead.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// The default bindings for this signal come in two variants, the variant with
// the Shift modifier extends the selection, the variant without the Shift
// modifer does not. There are too many key combinations to list them all here.
//
// - Arrow keys move by individual characters/lines
//
// - Ctrl-arrow key combinations move by words/paragraphs
//
// - Home/End keys move to the ends of the buffer.
func (label *Label) ConnectMoveCursor(f func(step MovementStep, count int, extendSelection bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(label, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_Label_ConnectMoveCursor), f)
}

// ConnectPopulatePopup signal gets emitted before showing the context menu of
// the label. Note that only selectable labels have context menus.
//
// If you need to add items to the context menu, connect to this signal and
// append your menuitems to the menu.
func (label *Label) ConnectPopulatePopup(f func(menu *Menu)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(label, "populate-popup", false, unsafe.Pointer(C._gotk4_gtk3_Label_ConnectPopulatePopup), f)
}

// NewLabel creates a new label with the given text inside it. You can pass NULL
// to get an empty label widget.
//
// The function takes the following parameters:
//
//   - str (optional): text of the label.
//
// The function returns the following values:
//
//   - label: new Label.
func NewLabel(str string) *Label {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if str != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_label_new(_arg1)
	runtime.KeepAlive(str)

	var _label *Label // out

	_label = wrapLabel(coreglib.Take(unsafe.Pointer(_cret)))

	return _label
}

// NewLabelWithMnemonic creates a new Label, containing the text in str.
//
// If characters in str are preceded by an underscore, they are underlined.
// If you need a literal underscore character in a label, use '__' (two
// underscores). The first underlined character represents a keyboard
// accelerator called a mnemonic. The mnemonic key can be used to
// activate another widget, chosen automatically, or explicitly using
// gtk_label_set_mnemonic_widget().
//
// If gtk_label_set_mnemonic_widget() is not called, then the first activatable
// ancestor of the Label will be chosen as the mnemonic widget. For instance,
// if the label is inside a button or menu item, the button or menu item will
// automatically become the mnemonic widget and be activated by the mnemonic.
//
// The function takes the following parameters:
//
//   - str (optional): text of the label, with an underscore in front of the
//     mnemonic character.
//
// The function returns the following values:
//
//   - label: new Label.
func NewLabelWithMnemonic(str string) *Label {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if str != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_label_new_with_mnemonic(_arg1)
	runtime.KeepAlive(str)

	var _label *Label // out

	_label = wrapLabel(coreglib.Take(unsafe.Pointer(_cret)))

	return _label
}

// Angle gets the angle of rotation for the label. See gtk_label_set_angle().
//
// The function returns the following values:
//
//   - gdouble: angle of rotation for the label.
func (label *Label) Angle() float64 {
	var _arg0 *C.GtkLabel // out
	var _cret C.gdouble   // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_angle(_arg0)
	runtime.KeepAlive(label)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Attributes gets the attribute list that was set on the label using
// gtk_label_set_attributes(), if any. This function does not reflect attributes
// that come from the labels markup (see gtk_label_set_markup()). If you want to
// get the effective attributes for the label, use pango_layout_get_attribute
// (gtk_label_get_layout (label)).
//
// The function returns the following values:
//
//   - attrList (optional): attribute list, or NULL if none was set.
func (label *Label) Attributes() *pango.AttrList {
	var _arg0 *C.GtkLabel      // out
	var _cret *C.PangoAttrList // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_attributes(_arg0)
	runtime.KeepAlive(label)

	var _attrList *pango.AttrList // out

	if _cret != nil {
		_attrList = (*pango.AttrList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.pango_attr_list_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_attrList)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.pango_attr_list_unref((*C.PangoAttrList)(intern.C))
			},
		)
	}

	return _attrList
}

// CurrentURI returns the URI for the currently active link in the label.
// The active link is the one under the mouse pointer or, in a selectable label,
// the link in which the text cursor is currently positioned.
//
// This function is intended for use in a Label::activate-link handler or for
// use in a Widget::query-tooltip handler.
//
// The function returns the following values:
//
//   - utf8: currently active URI. The string is owned by GTK+ and must not be
//     freed or modified.
func (label *Label) CurrentURI() string {
	var _arg0 *C.GtkLabel // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_current_uri(_arg0)
	runtime.KeepAlive(label)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Ellipsize returns the ellipsizing position of the label. See
// gtk_label_set_ellipsize().
//
// The function returns the following values:
//
//   - ellipsizeMode: EllipsizeMode.
func (label *Label) Ellipsize() pango.EllipsizeMode {
	var _arg0 *C.GtkLabel          // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_ellipsize(_arg0)
	runtime.KeepAlive(label)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// Justify returns the justification of the label. See gtk_label_set_justify().
//
// The function returns the following values:
//
//   - justification: Justification.
func (label *Label) Justify() Justification {
	var _arg0 *C.GtkLabel        // out
	var _cret C.GtkJustification // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_justify(_arg0)
	runtime.KeepAlive(label)

	var _justification Justification // out

	_justification = Justification(_cret)

	return _justification
}

// Label fetches the text from a label widget including any embedded underlines
// indicating mnemonics and Pango markup. (See gtk_label_get_text()).
//
// The function returns the following values:
//
//   - utf8: text of the label widget. This string is owned by the widget and
//     must not be modified or freed.
func (label *Label) Label() string {
	var _arg0 *C.GtkLabel // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_label(_arg0)
	runtime.KeepAlive(label)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Layout gets the Layout used to display the label. The layout is useful
// to e.g. convert text positions to pixel positions, in combination with
// gtk_label_get_layout_offsets(). The returned layout is owned by the label so
// need not be freed by the caller. The label is free to recreate its layout at
// any time, so it should be considered read-only.
//
// The function returns the following values:
//
//   - layout for this label.
func (label *Label) Layout() *pango.Layout {
	var _arg0 *C.GtkLabel    // out
	var _cret *C.PangoLayout // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_layout(_arg0)
	runtime.KeepAlive(label)

	var _layout *pango.Layout // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_layout = &pango.Layout{
			Object: obj,
		}
	}

	return _layout
}

// LayoutOffsets obtains the coordinates where the label will draw the Layout
// representing the text in the label; useful to convert mouse events into
// coordinates inside the Layout, e.g. to take some action if some part of the
// label is clicked. Of course you will need to create a EventBox to receive
// the events, and pack the label inside it, since labels are windowless (they
// return FALSE from gtk_widget_get_has_window()). Remember when using the
// Layout functions you need to convert to and from pixels using PANGO_PIXELS()
// or NGO_SCALE.
//
// The function returns the following values:
//
//   - x (optional): location to store X offset of layout, or NULL.
//   - y (optional): location to store Y offset of layout, or NULL.
func (label *Label) LayoutOffsets() (x, y int) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	C.gtk_label_get_layout_offsets(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(label)

	var _x int // out
	var _y int // out

	_x = int(_arg1)
	_y = int(_arg2)

	return _x, _y
}

// LineWrap returns whether lines in the label are automatically wrapped.
// See gtk_label_set_line_wrap().
//
// The function returns the following values:
//
//   - ok: TRUE if the lines of the label are automatically wrapped.
func (label *Label) LineWrap() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_line_wrap(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LineWrapMode returns line wrap mode used by the label. See
// gtk_label_set_line_wrap_mode().
//
// The function returns the following values:
//
//   - wrapMode: TRUE if the lines of the label are automatically wrapped.
func (label *Label) LineWrapMode() pango.WrapMode {
	var _arg0 *C.GtkLabel     // out
	var _cret C.PangoWrapMode // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_line_wrap_mode(_arg0)
	runtime.KeepAlive(label)

	var _wrapMode pango.WrapMode // out

	_wrapMode = pango.WrapMode(_cret)

	return _wrapMode
}

// Lines gets the number of lines to which an ellipsized, wrapping label should
// be limited. See gtk_label_set_lines().
//
// The function returns the following values:
//
//   - gint: number of lines.
func (label *Label) Lines() int {
	var _arg0 *C.GtkLabel // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_lines(_arg0)
	runtime.KeepAlive(label)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MaxWidthChars retrieves the desired maximum width of label, in characters.
// See gtk_label_set_width_chars().
//
// The function returns the following values:
//
//   - gint: maximum width of the label in characters.
func (label *Label) MaxWidthChars() int {
	var _arg0 *C.GtkLabel // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_max_width_chars(_arg0)
	runtime.KeepAlive(label)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MnemonicKeyval: if the label has been set so that it has an mnemonic key this
// function returns the keyval used for the mnemonic accelerator. If there is no
// mnemonic set up it returns K_KEY_VoidSymbol.
//
// The function returns the following values:
//
//   - guint: GDK keyval usable for accelerators, or K_KEY_VoidSymbol.
func (label *Label) MnemonicKeyval() uint {
	var _arg0 *C.GtkLabel // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_mnemonic_keyval(_arg0)
	runtime.KeepAlive(label)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// MnemonicWidget retrieves the target of the mnemonic (keyboard shortcut) of
// this label. See gtk_label_set_mnemonic_widget().
//
// The function returns the following values:
//
//   - widget (optional): target of the label’s mnemonic, or NULL if none has
//     been set and the default algorithm will be used.
func (label *Label) MnemonicWidget() Widgetter {
	var _arg0 *C.GtkLabel  // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_mnemonic_widget(_arg0)
	runtime.KeepAlive(label)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Selectable gets the value set by gtk_label_set_selectable().
//
// The function returns the following values:
//
//   - ok: TRUE if the user can copy text from the label.
func (label *Label) Selectable() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_selectable(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SelectionBounds gets the selected range of characters in the label, returning
// TRUE if there’s a selection.
//
// The function returns the following values:
//
//   - start: return location for start of selection, as a character offset.
//   - end: return location for end of selection, as a character offset.
//   - ok: TRUE if selection is non-empty.
func (label *Label) SelectionBounds() (start, end int, ok bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_selection_bounds(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(label)

	var _start int // out
	var _end int   // out
	var _ok bool   // out

	_start = int(_arg1)
	_end = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _start, _end, _ok
}

// SingleLineMode returns whether the label is in single line mode.
//
// The function returns the following values:
//
//   - ok: TRUE when the label is in single line mode.
func (label *Label) SingleLineMode() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_single_line_mode(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Text fetches the text from a label widget, as displayed on the screen.
// This does not include any embedded underlines indicating mnemonics or Pango
// markup. (See gtk_label_get_label()).
//
// The function returns the following values:
//
//   - utf8: text in the label widget. This is the internal string used by the
//     label, and must not be modified.
func (label *Label) Text() string {
	var _arg0 *C.GtkLabel // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_text(_arg0)
	runtime.KeepAlive(label)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TrackVisitedLinks returns whether the label is currently keeping track of
// clicked links.
//
// The function returns the following values:
//
//   - ok: TRUE if clicked links are remembered.
func (label *Label) TrackVisitedLinks() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_track_visited_links(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UseMarkup returns whether the label’s text is interpreted as marked
// up with the [Pango text markup language][PangoMarkupFormat]. See
// gtk_label_set_use_markup ().
//
// The function returns the following values:
//
//   - ok: TRUE if the label’s text will be parsed for markup.
func (label *Label) UseMarkup() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_use_markup(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UseUnderline returns whether an embedded underline in the label indicates a
// mnemonic. See gtk_label_set_use_underline().
//
// The function returns the following values:
//
//   - ok: TRUE whether an embedded underline in the label indicates the
//     mnemonic accelerator keys.
func (label *Label) UseUnderline() bool {
	var _arg0 *C.GtkLabel // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_use_underline(_arg0)
	runtime.KeepAlive(label)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WidthChars retrieves the desired width of label, in characters. See
// gtk_label_set_width_chars().
//
// The function returns the following values:
//
//   - gint: width of the label in characters.
func (label *Label) WidthChars() int {
	var _arg0 *C.GtkLabel // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_width_chars(_arg0)
	runtime.KeepAlive(label)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// XAlign gets the Label:xalign property for label.
//
// The function returns the following values:
//
//   - gfloat: xalign property.
func (label *Label) XAlign() float32 {
	var _arg0 *C.GtkLabel // out
	var _cret C.gfloat    // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_xalign(_arg0)
	runtime.KeepAlive(label)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// YAlign gets the Label:yalign property for label.
//
// The function returns the following values:
//
//   - gfloat: yalign property.
func (label *Label) YAlign() float32 {
	var _arg0 *C.GtkLabel // out
	var _cret C.gfloat    // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	_cret = C.gtk_label_get_yalign(_arg0)
	runtime.KeepAlive(label)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// SelectRegion selects a range of characters in the label, if the label is
// selectable. See gtk_label_set_selectable(). If the label is not selectable,
// this function has no effect. If start_offset or end_offset are -1, then the
// end of the label will be substituted.
//
// The function takes the following parameters:
//
//   - startOffset: start offset (in characters not bytes).
//   - endOffset: end offset (in characters not bytes).
func (label *Label) SelectRegion(startOffset, endOffset int) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // out
	var _arg2 C.gint      // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gint(startOffset)
	_arg2 = C.gint(endOffset)

	C.gtk_label_select_region(_arg0, _arg1, _arg2)
	runtime.KeepAlive(label)
	runtime.KeepAlive(startOffset)
	runtime.KeepAlive(endOffset)
}

// SetAngle sets the angle of rotation for the label. An angle of 90 reads from
// from bottom to top, an angle of 270, from top to bottom. The angle setting
// for the label is ignored if the label is selectable, wrapped, or ellipsized.
//
// The function takes the following parameters:
//
//   - angle that the baseline of the label makes with the horizontal,
//     in degrees, measured counterclockwise.
func (label *Label) SetAngle(angle float64) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gdouble(angle)

	C.gtk_label_set_angle(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(angle)
}

// SetAttributes sets a AttrList; the attributes in the list are applied to the
// label text.
//
// The attributes set with this function will be applied and merged with any
// other attributes previously effected by way of the Label:use-underline
// or Label:use-markup properties. While it is not recommended to mix markup
// strings with manually set attributes, if you must; know that the attributes
// will be applied to the label after the markup string is parsed.
//
// The function takes the following parameters:
//
//   - attrs (optional) or NULL.
func (label *Label) SetAttributes(attrs *pango.AttrList) {
	var _arg0 *C.GtkLabel      // out
	var _arg1 *C.PangoAttrList // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if attrs != nil {
		_arg1 = (*C.PangoAttrList)(gextras.StructNative(unsafe.Pointer(attrs)))
	}

	C.gtk_label_set_attributes(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(attrs)
}

// SetEllipsize sets the mode used to ellipsize (add an ellipsis: "...") to the
// text if there is not enough space to render the entire string.
//
// The function takes the following parameters:
//
//   - mode: EllipsizeMode.
func (label *Label) SetEllipsize(mode pango.EllipsizeMode) {
	var _arg0 *C.GtkLabel          // out
	var _arg1 C.PangoEllipsizeMode // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.PangoEllipsizeMode(mode)

	C.gtk_label_set_ellipsize(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(mode)
}

// SetJustify sets the alignment of the lines in the text of the label
// relative to each other. GTK_JUSTIFY_LEFT is the default value when the
// widget is first created with gtk_label_new(). If you instead want to set
// the alignment of the label as a whole, use gtk_widget_set_halign() instead.
// gtk_label_set_justify() has no effect on labels containing only a single
// line.
//
// The function takes the following parameters:
//
//   - jtype: Justification.
func (label *Label) SetJustify(jtype Justification) {
	var _arg0 *C.GtkLabel        // out
	var _arg1 C.GtkJustification // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.GtkJustification(jtype)

	C.gtk_label_set_justify(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(jtype)
}

// SetLabel sets the text of the label. The label is interpreted as including
// embedded underlines and/or Pango markup depending on the values of the
// Label:use-underline and Label:use-markup properties.
//
// The function takes the following parameters:
//
//   - str: new text to set for the label.
func (label *Label) SetLabel(str string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_label(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(str)
}

// SetLineWrap toggles line wrapping within the Label widget. TRUE makes it
// break lines if text exceeds the widget’s size. FALSE lets the text get cut
// off by the edge of the widget if it exceeds the widget size.
//
// Note that setting line wrapping to TRUE does not make the label wrap
// at its parent container’s width, because GTK+ widgets conceptually
// can’t make their requisition depend on the parent container’s size.
// For a label that wraps at a specific position, set the label’s width using
// gtk_widget_set_size_request().
//
// The function takes the following parameters:
//
//   - wrap: setting.
func (label *Label) SetLineWrap(wrap bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if wrap {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_line_wrap(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(wrap)
}

// SetLineWrapMode: if line wrapping is on (see gtk_label_set_line_wrap()) this
// controls how the line wrapping is done. The default is PANGO_WRAP_WORD which
// means wrap on word boundaries.
//
// The function takes the following parameters:
//
//   - wrapMode: line wrapping mode.
func (label *Label) SetLineWrapMode(wrapMode pango.WrapMode) {
	var _arg0 *C.GtkLabel     // out
	var _arg1 C.PangoWrapMode // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.PangoWrapMode(wrapMode)

	C.gtk_label_set_line_wrap_mode(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(wrapMode)
}

// SetLines sets the number of lines to which an ellipsized, wrapping label
// should be limited. This has no effect if the label is not wrapping or
// ellipsized. Set this to -1 if you don’t want to limit the number of lines.
//
// The function takes the following parameters:
//
//   - lines: desired number of lines, or -1.
func (label *Label) SetLines(lines int) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gint(lines)

	C.gtk_label_set_lines(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(lines)
}

// SetMarkup parses str which is marked up with the [Pango text markup
// language][PangoMarkupFormat], setting the label’s text and attribute list
// based on the parse results.
//
// If the str is external data, you may need to escape it with
// g_markup_escape_text() or g_markup_printf_escaped():
//
//	GtkWidget *label = gtk_label_new (NULL);
//	const char *str = "some text";
//	const char *format = "<span style=\"italic\">\s</span>";
//	char *markup;
//
//	markup = g_markup_printf_escaped (format, str);
//	gtk_label_set_markup (GTK_LABEL (label), markup);
//	g_free (markup);
//
// This function will set the Label:use-markup property to TRUE as a side
// effect.
//
// If you set the label contents using the Label:label property you should also
// ensure that you set the Label:use-markup property accordingly.
//
// See also: gtk_label_set_text().
//
// The function takes the following parameters:
//
//   - str: markup string (see [Pango markup format][PangoMarkupFormat]).
func (label *Label) SetMarkup(str string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_markup(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(str)
}

// SetMarkupWithMnemonic parses str which is marked up with the [Pango text
// markup language][PangoMarkupFormat], setting the label’s text and attribute
// list based on the parse results. If characters in str are preceded by an
// underscore, they are underlined indicating that they represent a keyboard
// accelerator called a mnemonic.
//
// The mnemonic key can be used to activate another widget, chosen
// automatically, or explicitly using gtk_label_set_mnemonic_widget().
//
// The function takes the following parameters:
//
//   - str: markup string (see [Pango markup format][PangoMarkupFormat]).
func (label *Label) SetMarkupWithMnemonic(str string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_markup_with_mnemonic(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(str)
}

// SetMaxWidthChars sets the desired maximum width in characters of label to
// n_chars.
//
// The function takes the following parameters:
//
//   - nChars: new desired maximum width, in characters.
func (label *Label) SetMaxWidthChars(nChars int) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gint(nChars)

	C.gtk_label_set_max_width_chars(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(nChars)
}

// SetMnemonicWidget: if the label has been set so that it has an
// mnemonic key (using i.e. gtk_label_set_markup_with_mnemonic(),
// gtk_label_set_text_with_mnemonic(), gtk_label_new_with_mnemonic() or the
// “use_underline” property) the label can be associated with a widget that is
// the target of the mnemonic. When the label is inside a widget (like a Button
// or a Notebook tab) it is automatically associated with the correct widget,
// but sometimes (i.e. when the target is a Entry next to the label) you need to
// set it explicitly using this function.
//
// The target widget will be accelerated by emitting the
// GtkWidget::mnemonic-activate signal on it. The default handler for this
// signal will activate the widget if there are no mnemonic collisions and
// toggle focus between the colliding widgets otherwise.
//
// The function takes the following parameters:
//
//   - widget (optional): target Widget, or NULL to unset.
func (label *Label) SetMnemonicWidget(widget Widgetter) {
	var _arg0 *C.GtkLabel  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}

	C.gtk_label_set_mnemonic_widget(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(widget)
}

// SetPattern: pattern of underlines you want under the existing text within the
// Label widget. For example if the current text of the label says “FooBarBaz”
// passing a pattern of “___ ___” will underline “Foo” and “Baz” but not “Bar”.
//
// The function takes the following parameters:
//
//   - pattern as described above.
func (label *Label) SetPattern(pattern string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(pattern)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_pattern(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(pattern)
}

// SetSelectable: selectable labels allow the user to select text from the
// label, for copy-and-paste.
//
// The function takes the following parameters:
//
//   - setting: TRUE to allow selecting text in the label.
func (label *Label) SetSelectable(setting bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_selectable(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(setting)
}

// SetSingleLineMode sets whether the label is in single line mode.
//
// The function takes the following parameters:
//
//   - singleLineMode: TRUE if the label should be in single line mode.
func (label *Label) SetSingleLineMode(singleLineMode bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if singleLineMode {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_single_line_mode(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(singleLineMode)
}

// SetText sets the text within the Label widget. It overwrites any text that
// was there before.
//
// This function will clear any previously set mnemonic accelerators, and set
// the Label:use-underline property to FALSE as a side effect.
//
// This function will set the Label:use-markup property to FALSE as a side
// effect.
//
// See also: gtk_label_set_markup().
//
// The function takes the following parameters:
//
//   - str: text you want to set.
func (label *Label) SetText(str string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_text(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(str)
}

// SetTextWithMnemonic sets the label’s text from the string str. If characters
// in str are preceded by an underscore, they are underlined indicating that
// they represent a keyboard accelerator called a mnemonic. The mnemonic key can
// be used to activate another widget, chosen automatically, or explicitly using
// gtk_label_set_mnemonic_widget().
//
// The function takes the following parameters:
//
//   - str: string.
func (label *Label) SetTextWithMnemonic(str string) {
	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_label_set_text_with_mnemonic(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(str)
}

// SetTrackVisitedLinks sets whether the label should keep track of clicked
// links (and use a different color for them).
//
// The function takes the following parameters:
//
//   - trackLinks: TRUE to track visited links.
func (label *Label) SetTrackVisitedLinks(trackLinks bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if trackLinks {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_track_visited_links(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(trackLinks)
}

// SetUseMarkup sets whether the text of the label contains markup in [Pango’s
// text markup language][PangoMarkupFormat]. See gtk_label_set_markup().
//
// The function takes the following parameters:
//
//   - setting: TRUE if the label’s text should be parsed for markup.
func (label *Label) SetUseMarkup(setting bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_use_markup(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(setting)
}

// SetUseUnderline: if true, an underline in the text indicates the next
// character should be used for the mnemonic accelerator key.
//
// The function takes the following parameters:
//
//   - setting: TRUE if underlines in the text indicate mnemonics.
func (label *Label) SetUseUnderline(setting bool) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_label_set_use_underline(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(setting)
}

// SetWidthChars sets the desired width in characters of label to n_chars.
//
// The function takes the following parameters:
//
//   - nChars: new desired width, in characters.
func (label *Label) SetWidthChars(nChars int) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gint(nChars)

	C.gtk_label_set_width_chars(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(nChars)
}

// SetXAlign sets the Label:xalign property for label.
//
// The function takes the following parameters:
//
//   - xalign: new xalign value, between 0 and 1.
func (label *Label) SetXAlign(xalign float32) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gfloat    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gfloat(xalign)

	C.gtk_label_set_xalign(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(xalign)
}

// SetYAlign sets the Label:yalign property for label.
//
// The function takes the following parameters:
//
//   - yalign: new yalign value, between 0 and 1.
func (label *Label) SetYAlign(yalign float32) {
	var _arg0 *C.GtkLabel // out
	var _arg1 C.gfloat    // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.gfloat(yalign)

	C.gtk_label_set_yalign(_arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(yalign)
}

func (label *Label) activateLink(uri string) bool {
	gclass := (*C.GtkLabelClass)(coreglib.PeekParentClass(label))
	fnarg := gclass.activate_link

	var _arg0 *C.GtkLabel // out
	var _arg1 *C.gchar    // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_Label_virtual_activate_link(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (label *Label) copyClipboard() {
	gclass := (*C.GtkLabelClass)(coreglib.PeekParentClass(label))
	fnarg := gclass.copy_clipboard

	var _arg0 *C.GtkLabel // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	C._gotk4_gtk3_Label_virtual_copy_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(label)
}

// The function takes the following parameters:
//
//   - step
//   - count
//   - extendSelection
func (label *Label) moveCursor(step MovementStep, count int, extendSelection bool) {
	gclass := (*C.GtkLabelClass)(coreglib.PeekParentClass(label))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkLabel       // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _arg3 C.gboolean        // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)
	if extendSelection {
		_arg3 = C.TRUE
	}

	C._gotk4_gtk3_Label_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(label)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)
	runtime.KeepAlive(extendSelection)
}

func (label *Label) populatePopup(menu *Menu) {
	gclass := (*C.GtkLabelClass)(coreglib.PeekParentClass(label))
	fnarg := gclass.populate_popup

	var _arg0 *C.GtkLabel // out
	var _arg1 *C.GtkMenu  // out

	_arg0 = (*C.GtkLabel)(unsafe.Pointer(coreglib.InternObject(label).Native()))
	_arg1 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	C._gotk4_gtk3_Label_virtual_populate_popup(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(label)
	runtime.KeepAlive(menu)
}

// LabelAccessibleOverrides contains methods that are overridable.
type LabelAccessibleOverrides struct {
}

func defaultLabelAccessibleOverrides(v *LabelAccessible) LabelAccessibleOverrides {
	return LabelAccessibleOverrides{}
}

type LabelAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	*coreglib.Object
	atk.Hypertext
	atk.Text
}

var (
	_ coreglib.Objector = (*LabelAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LabelAccessible, *LabelAccessibleClass, LabelAccessibleOverrides](
		GTypeLabelAccessible,
		initLabelAccessibleClass,
		wrapLabelAccessible,
		defaultLabelAccessibleOverrides,
	)
}

func initLabelAccessibleClass(gclass unsafe.Pointer, overrides LabelAccessibleOverrides, classInitFunc func(*LabelAccessibleClass)) {
	if classInitFunc != nil {
		class := (*LabelAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLabelAccessible(obj *coreglib.Object) *LabelAccessible {
	return &LabelAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Object: obj,
		Hypertext: atk.Hypertext{
			Object: obj,
		},
		Text: atk.Text{
			Object: obj,
		},
	}
}

func marshalLabelAccessible(p uintptr) (interface{}, error) {
	return wrapLabelAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// LayoutOverrides contains methods that are overridable.
type LayoutOverrides struct {
}

func defaultLayoutOverrides(v *Layout) LayoutOverrides {
	return LayoutOverrides{}
}

// Layout is similar to DrawingArea in that it’s a “blank slate” and doesn’t
// do anything except paint a blank background by default. It’s different in
// that it supports scrolling natively due to implementing Scrollable, and can
// contain child widgets since it’s a Container.
//
// If you just want to draw, a DrawingArea is a better choice since it has lower
// overhead. If you just need to position child widgets at specific points,
// then Fixed provides that functionality on its own.
//
// When handling expose events on a Layout, you must draw to the Window
// returned by gtk_layout_get_bin_window(), rather than to the one returned by
// gtk_widget_get_window() as you would for a DrawingArea.
type Layout struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Scrollable
}

var (
	_ Containerer       = (*Layout)(nil)
	_ coreglib.Objector = (*Layout)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Layout, *LayoutClass, LayoutOverrides](
		GTypeLayout,
		initLayoutClass,
		wrapLayout,
		defaultLayoutOverrides,
	)
}

func initLayoutClass(gclass unsafe.Pointer, overrides LayoutOverrides, classInitFunc func(*LayoutClass)) {
	if classInitFunc != nil {
		class := (*LayoutClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLayout(obj *coreglib.Object) *Layout {
	return &Layout{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalLayout(p uintptr) (interface{}, error) {
	return wrapLayout(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewLayout creates a new Layout. Unless you have a specific adjustment
// you’d like the layout to use for scrolling, pass NULL for hadjustment and
// vadjustment.
//
// The function takes the following parameters:
//
//   - hadjustment (optional): horizontal scroll adjustment, or NULL.
//   - vadjustment (optional): vertical scroll adjustment, or NULL.
//
// The function returns the following values:
//
//   - layout: new Layout.
func NewLayout(hadjustment, vadjustment *Adjustment) *Layout {
	var _arg1 *C.GtkAdjustment // out
	var _arg2 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if hadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(hadjustment).Native()))
	}
	if vadjustment != nil {
		_arg2 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(vadjustment).Native()))
	}

	_cret = C.gtk_layout_new(_arg1, _arg2)
	runtime.KeepAlive(hadjustment)
	runtime.KeepAlive(vadjustment)

	var _layout *Layout // out

	_layout = wrapLayout(coreglib.Take(unsafe.Pointer(_cret)))

	return _layout
}

// BinWindow: retrieve the bin window of the layout used for drawing operations.
//
// The function returns the following values:
//
//   - window: Window.
func (layout *Layout) BinWindow() gdk.Windower {
	var _arg0 *C.GtkLayout // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	_cret = C.gtk_layout_get_bin_window(_arg0)
	runtime.KeepAlive(layout)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// HAdjustment: this function should only be called after the layout has been
// placed in a ScrolledWindow or otherwise configured for scrolling. It returns
// the Adjustment used for communication between the horizontal scrollbar and
// layout.
//
// See ScrolledWindow, Scrollbar, Adjustment for details.
//
// Deprecated: Use gtk_scrollable_get_hadjustment().
//
// The function returns the following values:
//
//   - adjustment: horizontal scroll adjustment.
func (layout *Layout) HAdjustment() *Adjustment {
	var _arg0 *C.GtkLayout     // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	_cret = C.gtk_layout_get_hadjustment(_arg0)
	runtime.KeepAlive(layout)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// Size gets the size that has been set on the layout, and that determines the
// total extents of the layout’s scrollbar area. See gtk_layout_set_size ().
//
// The function returns the following values:
//
//   - width (optional): location to store the width set on layout, or NULL.
//   - height (optional): location to store the height set on layout, or NULL.
func (layout *Layout) Size() (width, height uint) {
	var _arg0 *C.GtkLayout // out
	var _arg1 C.guint      // in
	var _arg2 C.guint      // in

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	C.gtk_layout_get_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(layout)

	var _width uint  // out
	var _height uint // out

	_width = uint(_arg1)
	_height = uint(_arg2)

	return _width, _height
}

// VAdjustment: this function should only be called after the layout has been
// placed in a ScrolledWindow or otherwise configured for scrolling. It returns
// the Adjustment used for communication between the vertical scrollbar and
// layout.
//
// See ScrolledWindow, Scrollbar, Adjustment for details.
//
// Deprecated: Use gtk_scrollable_get_vadjustment().
//
// The function returns the following values:
//
//   - adjustment: vertical scroll adjustment.
func (layout *Layout) VAdjustment() *Adjustment {
	var _arg0 *C.GtkLayout     // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	_cret = C.gtk_layout_get_vadjustment(_arg0)
	runtime.KeepAlive(layout)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// Move moves a current child of layout to a new position.
//
// The function takes the following parameters:
//
//   - childWidget: current child of layout.
//   - x: x position to move to.
//   - y: y position to move to.
func (layout *Layout) Move(childWidget Widgetter, x, y int) {
	var _arg0 *C.GtkLayout // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(childWidget).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)

	C.gtk_layout_move(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(childWidget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// Put adds child_widget to layout, at position (x,y). layout becomes the new
// parent container of child_widget.
//
// The function takes the following parameters:
//
//   - childWidget: child widget.
//   - x: x position of child widget.
//   - y: y position of child widget.
func (layout *Layout) Put(childWidget Widgetter, x, y int) {
	var _arg0 *C.GtkLayout // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(childWidget).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)

	C.gtk_layout_put(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(childWidget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// SetHAdjustment sets the horizontal scroll adjustment for the layout.
//
// See ScrolledWindow, Scrollbar, Adjustment for details.
//
// Deprecated: Use gtk_scrollable_set_hadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional): new scroll adjustment.
func (layout *Layout) SetHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkLayout     // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_layout_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(adjustment)
}

// SetSize sets the size of the scrollable area of the layout.
//
// The function takes the following parameters:
//
//   - width of entire scrollable area.
//   - height of entire scrollable area.
func (layout *Layout) SetSize(width, height uint) {
	var _arg0 *C.GtkLayout // out
	var _arg1 C.guint      // out
	var _arg2 C.guint      // out

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	_arg1 = C.guint(width)
	_arg2 = C.guint(height)

	C.gtk_layout_set_size(_arg0, _arg1, _arg2)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetVAdjustment sets the vertical scroll adjustment for the layout.
//
// See ScrolledWindow, Scrollbar, Adjustment for details.
//
// Deprecated: Use gtk_scrollable_set_vadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional): new scroll adjustment.
func (layout *Layout) SetVAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkLayout     // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_layout_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(layout)
	runtime.KeepAlive(adjustment)
}

// LevelBarOverrides contains methods that are overridable.
type LevelBarOverrides struct {
	OffsetChanged func(name string)
}

func defaultLevelBarOverrides(v *LevelBar) LevelBarOverrides {
	return LevelBarOverrides{
		OffsetChanged: v.offsetChanged,
	}
}

// LevelBar is a bar widget that can be used as a level indicator. Typical use
// cases are displaying the strength of a password, or showing the charge level
// of a battery.
//
// Use gtk_level_bar_set_value() to set the current value, and
// gtk_level_bar_add_offset_value() to set the value offsets at which the
// bar will be considered in a different state. GTK will add a few offsets by
// default on the level bar: K_LEVEL_BAR_OFFSET_LOW, K_LEVEL_BAR_OFFSET_HIGH and
// K_LEVEL_BAR_OFFSET_FULL, with values 0.25, 0.75 and 1.0 respectively.
//
// Note that it is your responsibility to update preexisting offsets when
// changing the minimum or maximum value. GTK+ will simply clamp them to the new
// range.
//
// Adding a custom offset on the bar
//
//	levelbar[.discrete]
//	╰── trough
//	    ├── block.filled.level-name
//	    ┊
//	    ├── block.empty
//	    ┊
//
// GtkLevelBar has a main CSS node with name levelbar and one of the
// style classes .discrete or .continuous and a subnode with name trough.
// Below the trough node are a number of nodes with name block and style class
// .filled or .empty. In continuous mode, there is exactly one node of each, in
// discrete mode, the number of filled and unfilled nodes corresponds to blocks
// that are drawn. The block.filled nodes also get a style class .level-name
// corresponding to the level for the current value.
//
// In horizontal orientation, the nodes are always arranged from left to right,
// regardless of text direction.
type LevelBar struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	Orientable
}

var (
	_ Widgetter         = (*LevelBar)(nil)
	_ coreglib.Objector = (*LevelBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LevelBar, *LevelBarClass, LevelBarOverrides](
		GTypeLevelBar,
		initLevelBarClass,
		wrapLevelBar,
		defaultLevelBarOverrides,
	)
}

func initLevelBarClass(gclass unsafe.Pointer, overrides LevelBarOverrides, classInitFunc func(*LevelBarClass)) {
	pclass := (*C.GtkLevelBarClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeLevelBar))))

	if overrides.OffsetChanged != nil {
		pclass.offset_changed = (*[0]byte)(C._gotk4_gtk3_LevelBarClass_offset_changed)
	}

	if classInitFunc != nil {
		class := (*LevelBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLevelBar(obj *coreglib.Object) *LevelBar {
	return &LevelBar{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalLevelBar(p uintptr) (interface{}, error) {
	return wrapLevelBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectOffsetChanged is emitted when an offset specified on the bar changes
// value as an effect to gtk_level_bar_add_offset_value() being called.
//
// The signal supports detailed connections; you can connect to the detailed
// signal "changed::x" in order to only receive callbacks when the value of
// offset "x" changes.
func (self *LevelBar) ConnectOffsetChanged(f func(name string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "offset-changed", false, unsafe.Pointer(C._gotk4_gtk3_LevelBar_ConnectOffsetChanged), f)
}

// NewLevelBar creates a new LevelBar.
//
// The function returns the following values:
//
//   - levelBar: LevelBar.
func NewLevelBar() *LevelBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_level_bar_new()

	var _levelBar *LevelBar // out

	_levelBar = wrapLevelBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _levelBar
}

// NewLevelBarForInterval: utility constructor that creates a new LevelBar for
// the specified interval.
//
// The function takes the following parameters:
//
//   - minValue: positive value.
//   - maxValue: positive value.
//
// The function returns the following values:
//
//   - levelBar: LevelBar.
func NewLevelBarForInterval(minValue, maxValue float64) *LevelBar {
	var _arg1 C.gdouble    // out
	var _arg2 C.gdouble    // out
	var _cret *C.GtkWidget // in

	_arg1 = C.gdouble(minValue)
	_arg2 = C.gdouble(maxValue)

	_cret = C.gtk_level_bar_new_for_interval(_arg1, _arg2)
	runtime.KeepAlive(minValue)
	runtime.KeepAlive(maxValue)

	var _levelBar *LevelBar // out

	_levelBar = wrapLevelBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _levelBar
}

// AddOffsetValue adds a new offset marker on self at the position specified
// by value. When the bar value is in the interval topped by value (or between
// value and LevelBar:max-value in case the offset is the last one on the bar)
// a style class named level-name will be applied when rendering the level bar
// fill. If another offset marker named name exists, its value will be replaced
// by value.
//
// The function takes the following parameters:
//
//   - name of the new offset.
//   - value for the new offset.
func (self *LevelBar) AddOffsetValue(name string, value float64) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 *C.gchar       // out
	var _arg2 C.gdouble      // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(value)

	C.gtk_level_bar_add_offset_value(_arg0, _arg1, _arg2)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)
	runtime.KeepAlive(value)
}

// Inverted: return the value of the LevelBar:inverted property.
//
// The function returns the following values:
//
//   - ok: TRUE if the level bar is inverted.
func (self *LevelBar) Inverted() bool {
	var _arg0 *C.GtkLevelBar // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_level_bar_get_inverted(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MaxValue returns the value of the LevelBar:max-value property.
//
// The function returns the following values:
//
//   - gdouble: positive value.
func (self *LevelBar) MaxValue() float64 {
	var _arg0 *C.GtkLevelBar // out
	var _cret C.gdouble      // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_level_bar_get_max_value(_arg0)
	runtime.KeepAlive(self)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// MinValue returns the value of the LevelBar:min-value property.
//
// The function returns the following values:
//
//   - gdouble: positive value.
func (self *LevelBar) MinValue() float64 {
	var _arg0 *C.GtkLevelBar // out
	var _cret C.gdouble      // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_level_bar_get_min_value(_arg0)
	runtime.KeepAlive(self)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Mode returns the value of the LevelBar:mode property.
//
// The function returns the following values:
//
//   - levelBarMode: LevelBarMode.
func (self *LevelBar) Mode() LevelBarMode {
	var _arg0 *C.GtkLevelBar    // out
	var _cret C.GtkLevelBarMode // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_level_bar_get_mode(_arg0)
	runtime.KeepAlive(self)

	var _levelBarMode LevelBarMode // out

	_levelBarMode = LevelBarMode(_cret)

	return _levelBarMode
}

// OffsetValue fetches the value specified for the offset marker name in self,
// returning TRUE in case an offset named name was found.
//
// The function takes the following parameters:
//
//   - name (optional) of an offset in the bar.
//
// The function returns the following values:
//
//   - value: location where to store the value.
//   - ok: TRUE if the specified offset is found.
func (self *LevelBar) OffsetValue(name string) (float64, bool) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 *C.gchar       // out
	var _arg2 C.gdouble      // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_level_bar_get_offset_value(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)

	var _value float64 // out
	var _ok bool       // out

	_value = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _value, _ok
}

// Value returns the value of the LevelBar:value property.
//
// The function returns the following values:
//
//   - gdouble: value in the interval between LevelBar:min-value and
//     LevelBar:max-value.
func (self *LevelBar) Value() float64 {
	var _arg0 *C.GtkLevelBar // out
	var _cret C.gdouble      // in

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_level_bar_get_value(_arg0)
	runtime.KeepAlive(self)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// RemoveOffsetValue removes an offset marker previously added with
// gtk_level_bar_add_offset_value().
//
// The function takes the following parameters:
//
//   - name (optional) of an offset in the bar.
func (self *LevelBar) RemoveOffsetValue(name string) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_level_bar_remove_offset_value(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)
}

// SetInverted sets the value of the LevelBar:inverted property.
//
// The function takes the following parameters:
//
//   - inverted: TRUE to invert the level bar.
func (self *LevelBar) SetInverted(inverted bool) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if inverted {
		_arg1 = C.TRUE
	}

	C.gtk_level_bar_set_inverted(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(inverted)
}

// SetMaxValue sets the value of the LevelBar:max-value property.
//
// You probably want to update preexisting level offsets after calling this
// function.
//
// The function takes the following parameters:
//
//   - value: positive value.
func (self *LevelBar) SetMaxValue(value float64) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 C.gdouble      // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_level_bar_set_max_value(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(value)
}

// SetMinValue sets the value of the LevelBar:min-value property.
//
// You probably want to update preexisting level offsets after calling this
// function.
//
// The function takes the following parameters:
//
//   - value: positive value.
func (self *LevelBar) SetMinValue(value float64) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 C.gdouble      // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_level_bar_set_min_value(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(value)
}

// SetMode sets the value of the LevelBar:mode property.
//
// The function takes the following parameters:
//
//   - mode: LevelBarMode.
func (self *LevelBar) SetMode(mode LevelBarMode) {
	var _arg0 *C.GtkLevelBar    // out
	var _arg1 C.GtkLevelBarMode // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.GtkLevelBarMode(mode)

	C.gtk_level_bar_set_mode(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(mode)
}

// SetValue sets the value of the LevelBar:value property.
//
// The function takes the following parameters:
//
//   - value in the interval between LevelBar:min-value and LevelBar:max-value.
func (self *LevelBar) SetValue(value float64) {
	var _arg0 *C.GtkLevelBar // out
	var _arg1 C.gdouble      // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_level_bar_set_value(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(value)
}

func (self *LevelBar) offsetChanged(name string) {
	gclass := (*C.GtkLevelBarClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.offset_changed

	var _arg0 *C.GtkLevelBar // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkLevelBar)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_LevelBar_virtual_offset_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(name)
}

// LevelBarAccessibleOverrides contains methods that are overridable.
type LevelBarAccessibleOverrides struct {
}

func defaultLevelBarAccessibleOverrides(v *LevelBarAccessible) LevelBarAccessibleOverrides {
	return LevelBarAccessibleOverrides{}
}

type LevelBarAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Value
}

var (
	_ coreglib.Objector = (*LevelBarAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LevelBarAccessible, *LevelBarAccessibleClass, LevelBarAccessibleOverrides](
		GTypeLevelBarAccessible,
		initLevelBarAccessibleClass,
		wrapLevelBarAccessible,
		defaultLevelBarAccessibleOverrides,
	)
}

func initLevelBarAccessibleClass(gclass unsafe.Pointer, overrides LevelBarAccessibleOverrides, classInitFunc func(*LevelBarAccessibleClass)) {
	if classInitFunc != nil {
		class := (*LevelBarAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLevelBarAccessible(obj *coreglib.Object) *LevelBarAccessible {
	return &LevelBarAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalLevelBarAccessible(p uintptr) (interface{}, error) {
	return wrapLevelBarAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// LinkButtonOverrides contains methods that are overridable.
type LinkButtonOverrides struct {
	// ActivateLink class handler for the LinkButton::activate-link signal.
	ActivateLink func() bool
}

func defaultLinkButtonOverrides(v *LinkButton) LinkButtonOverrides {
	return LinkButtonOverrides{
		ActivateLink: v.activateLink,
	}
}

// LinkButton is a Button with a hyperlink, similar to the one used by web
// browsers, which triggers an action when clicked. It is useful to show quick
// links to resources.
//
// A link button is created by calling either gtk_link_button_new() or
// gtk_link_button_new_with_label(). If using the former, the URI you pass to
// the constructor is used as a label for the widget.
//
// The URI bound to a GtkLinkButton can be set specifically using
// gtk_link_button_set_uri(), and retrieved using gtk_link_button_get_uri().
//
// By default, GtkLinkButton calls gtk_show_uri_on_window() when the
// button is clicked. This behaviour can be overridden by connecting to the
// LinkButton::activate-link signal and returning TRUE from the signal handler.
//
// # CSS nodes
//
// GtkLinkButton has a single CSS node with name button. To differentiate it
// from a plain Button, it gets the .link style class.
type LinkButton struct {
	_ [0]func() // equal guard
	Button
}

var (
	_ Binner            = (*LinkButton)(nil)
	_ coreglib.Objector = (*LinkButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LinkButton, *LinkButtonClass, LinkButtonOverrides](
		GTypeLinkButton,
		initLinkButtonClass,
		wrapLinkButton,
		defaultLinkButtonOverrides,
	)
}

func initLinkButtonClass(gclass unsafe.Pointer, overrides LinkButtonOverrides, classInitFunc func(*LinkButtonClass)) {
	pclass := (*C.GtkLinkButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeLinkButton))))

	if overrides.ActivateLink != nil {
		pclass.activate_link = (*[0]byte)(C._gotk4_gtk3_LinkButtonClass_activate_link)
	}

	if classInitFunc != nil {
		class := (*LinkButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLinkButton(obj *coreglib.Object) *LinkButton {
	return &LinkButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalLinkButton(p uintptr) (interface{}, error) {
	return wrapLinkButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateLink signal is emitted each time the LinkButton has been
// clicked.
//
// The default handler will call gtk_show_uri_on_window() with the URI stored
// inside the LinkButton:uri property.
//
// To override the default behavior, you can connect to the ::activate-link
// signal and stop the propagation of the signal by returning TRUE from your
// handler.
func (linkButton *LinkButton) ConnectActivateLink(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(linkButton, "activate-link", false, unsafe.Pointer(C._gotk4_gtk3_LinkButton_ConnectActivateLink), f)
}

// NewLinkButton creates a new LinkButton with the URI as its text.
//
// The function takes the following parameters:
//
//   - uri: valid URI.
//
// The function returns the following values:
//
//   - linkButton: new link button widget.
func NewLinkButton(uri string) *LinkButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_link_button_new(_arg1)
	runtime.KeepAlive(uri)

	var _linkButton *LinkButton // out

	_linkButton = wrapLinkButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _linkButton
}

// NewLinkButtonWithLabel creates a new LinkButton containing a label.
//
// The function takes the following parameters:
//
//   - uri: valid URI.
//   - label (optional): text of the button.
//
// The function returns the following values:
//
//   - linkButton: new link button widget.
func NewLinkButtonWithLabel(uri, label string) *LinkButton {
	var _arg1 *C.gchar     // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_link_button_new_with_label(_arg1, _arg2)
	runtime.KeepAlive(uri)
	runtime.KeepAlive(label)

	var _linkButton *LinkButton // out

	_linkButton = wrapLinkButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _linkButton
}

// URI retrieves the URI set using gtk_link_button_set_uri().
//
// The function returns the following values:
//
//   - utf8: valid URI. The returned string is owned by the link button and
//     should not be modified or freed.
func (linkButton *LinkButton) URI() string {
	var _arg0 *C.GtkLinkButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkLinkButton)(unsafe.Pointer(coreglib.InternObject(linkButton).Native()))

	_cret = C.gtk_link_button_get_uri(_arg0)
	runtime.KeepAlive(linkButton)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Visited retrieves the “visited” state of the URI where the LinkButton points.
// The button becomes visited when it is clicked. If the URI is changed on the
// button, the “visited” state is unset again.
//
// The state may also be changed using gtk_link_button_set_visited().
//
// The function returns the following values:
//
//   - ok: TRUE if the link has been visited, FALSE otherwise.
func (linkButton *LinkButton) Visited() bool {
	var _arg0 *C.GtkLinkButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkLinkButton)(unsafe.Pointer(coreglib.InternObject(linkButton).Native()))

	_cret = C.gtk_link_button_get_visited(_arg0)
	runtime.KeepAlive(linkButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetURI sets uri as the URI where the LinkButton points. As a side-effect this
// unsets the “visited” state of the button.
//
// The function takes the following parameters:
//
//   - uri: valid URI.
func (linkButton *LinkButton) SetURI(uri string) {
	var _arg0 *C.GtkLinkButton // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkLinkButton)(unsafe.Pointer(coreglib.InternObject(linkButton).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_link_button_set_uri(_arg0, _arg1)
	runtime.KeepAlive(linkButton)
	runtime.KeepAlive(uri)
}

// SetVisited sets the “visited” state of the URI where the LinkButton points.
// See gtk_link_button_get_visited() for more details.
//
// The function takes the following parameters:
//
//   - visited: new “visited” state.
func (linkButton *LinkButton) SetVisited(visited bool) {
	var _arg0 *C.GtkLinkButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkLinkButton)(unsafe.Pointer(coreglib.InternObject(linkButton).Native()))
	if visited {
		_arg1 = C.TRUE
	}

	C.gtk_link_button_set_visited(_arg0, _arg1)
	runtime.KeepAlive(linkButton)
	runtime.KeepAlive(visited)
}

// activateLink class handler for the LinkButton::activate-link signal.
func (button *LinkButton) activateLink() bool {
	gclass := (*C.GtkLinkButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.activate_link

	var _arg0 *C.GtkLinkButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkLinkButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C._gotk4_gtk3_LinkButton_virtual_activate_link(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LinkButtonAccessibleOverrides contains methods that are overridable.
type LinkButtonAccessibleOverrides struct {
}

func defaultLinkButtonAccessibleOverrides(v *LinkButtonAccessible) LinkButtonAccessibleOverrides {
	return LinkButtonAccessibleOverrides{}
}

type LinkButtonAccessible struct {
	_ [0]func() // equal guard
	ButtonAccessible

	*coreglib.Object
	atk.HyperlinkImpl
}

var (
	_ coreglib.Objector = (*LinkButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LinkButtonAccessible, *LinkButtonAccessibleClass, LinkButtonAccessibleOverrides](
		GTypeLinkButtonAccessible,
		initLinkButtonAccessibleClass,
		wrapLinkButtonAccessible,
		defaultLinkButtonAccessibleOverrides,
	)
}

func initLinkButtonAccessibleClass(gclass unsafe.Pointer, overrides LinkButtonAccessibleOverrides, classInitFunc func(*LinkButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*LinkButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLinkButtonAccessible(obj *coreglib.Object) *LinkButtonAccessible {
	return &LinkButtonAccessible{
		ButtonAccessible: ButtonAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			Image: atk.Image{
				Object: obj,
			},
		},
		Object: obj,
		HyperlinkImpl: atk.HyperlinkImpl{
			Object: obj,
		},
	}
}

func marshalLinkButtonAccessible(p uintptr) (interface{}, error) {
	return wrapLinkButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ListBoxOverrides contains methods that are overridable.
type ListBoxOverrides struct {
	// ActivateCursorRow class handler for the ListBox::activate-cursor-row
	// signal.
	ActivateCursorRow func()
	// MoveCursor class handler for the ListBox::move-cursor signal.
	//
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	MoveCursor func(step MovementStep, count int)
	// RowActivated class handler for the ListBox::row-activated signal.
	RowActivated func(row *ListBoxRow)
	// RowSelected class handler for the ListBox::row-selected signal.
	RowSelected func(row *ListBoxRow)
	// SelectAll: select all children of box, if the selection mode allows it.
	SelectAll func()
	// SelectedRowsChanged class handler for the ListBox::selected-rows-changed
	// signal.
	SelectedRowsChanged func()
	// ToggleCursorRow class handler for the ListBox::toggle-cursor-row signal.
	ToggleCursorRow func()
	// UnselectAll: unselect all children of box, if the selection mode allows
	// it.
	UnselectAll func()
}

func defaultListBoxOverrides(v *ListBox) ListBoxOverrides {
	return ListBoxOverrides{
		ActivateCursorRow:   v.activateCursorRow,
		MoveCursor:          v.moveCursor,
		RowActivated:        v.rowActivated,
		RowSelected:         v.rowSelected,
		SelectAll:           v.selectAll,
		SelectedRowsChanged: v.selectedRowsChanged,
		ToggleCursorRow:     v.toggleCursorRow,
		UnselectAll:         v.unselectAll,
	}
}

// ListBox is a vertical container that contains GtkListBoxRow children.
// These rows can be dynamically sorted and filtered, and headers can be added
// dynamically depending on the row content. It also allows keyboard and mouse
// navigation and selection like a typical list.
//
// Using GtkListBox is often an alternative to TreeView, especially when
// the list contents has a more complicated layout than what is allowed by a
// CellRenderer, or when the contents is interactive (i.e. has a button in it).
//
// Although a ListBox must have only ListBoxRow children you can add any
// kind of widget to it via gtk_container_add(), and a ListBoxRow widget will
// automatically be inserted between the list and the widget.
//
// ListBoxRows can be marked as activatable or selectable. If a row is
// activatable, ListBox::row-activated will be emitted for it when the user
// tries to activate it. If it is selectable, the row will be marked as selected
// when the user tries to select it.
//
// The GtkListBox widget was added in GTK+ 3.10.
//
// # GtkListBox as GtkBuildable
//
// The GtkListBox implementation of the Buildable interface supports setting a
// child as the placeholder by specifying “placeholder” as the “type” attribute
// of a <child> element. See gtk_list_box_set_placeholder() for info.
//
// CSS nodes
//
//	list
//	╰── row[.activatable]
//
// GtkListBox uses a single CSS node named list. Each GtkListBoxRow uses a
// single CSS node named row. The row nodes get the .activatable style class
// added when appropriate.
type ListBox struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*ListBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ListBox, *ListBoxClass, ListBoxOverrides](
		GTypeListBox,
		initListBoxClass,
		wrapListBox,
		defaultListBoxOverrides,
	)
}

func initListBoxClass(gclass unsafe.Pointer, overrides ListBoxOverrides, classInitFunc func(*ListBoxClass)) {
	pclass := (*C.GtkListBoxClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeListBox))))

	if overrides.ActivateCursorRow != nil {
		pclass.activate_cursor_row = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_activate_cursor_row)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_move_cursor)
	}

	if overrides.RowActivated != nil {
		pclass.row_activated = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_row_activated)
	}

	if overrides.RowSelected != nil {
		pclass.row_selected = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_row_selected)
	}

	if overrides.SelectAll != nil {
		pclass.select_all = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_select_all)
	}

	if overrides.SelectedRowsChanged != nil {
		pclass.selected_rows_changed = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_selected_rows_changed)
	}

	if overrides.ToggleCursorRow != nil {
		pclass.toggle_cursor_row = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_toggle_cursor_row)
	}

	if overrides.UnselectAll != nil {
		pclass.unselect_all = (*[0]byte)(C._gotk4_gtk3_ListBoxClass_unselect_all)
	}

	if classInitFunc != nil {
		class := (*ListBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapListBox(obj *coreglib.Object) *ListBox {
	return &ListBox{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalListBox(p uintptr) (interface{}, error) {
	return wrapListBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (box *ListBox) ConnectActivateCursorRow(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "activate-cursor-row", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectActivateCursorRow), f)
}

func (box *ListBox) ConnectMoveCursor(f func(object MovementStep, p0 int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectMoveCursor), f)
}

// ConnectRowActivated signal is emitted when a row has been activated by the
// user.
func (box *ListBox) ConnectRowActivated(f func(row *ListBoxRow)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "row-activated", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectRowActivated), f)
}

// ConnectRowSelected signal is emitted when a new row is selected, or (with a
// NULL row) when the selection is cleared.
//
// When the box is using K_SELECTION_MULTIPLE, this signal will not give
// you the full picture of selection changes, and you should use the
// ListBox::selected-rows-changed signal instead.
func (box *ListBox) ConnectRowSelected(f func(row *ListBoxRow)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "row-selected", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectRowSelected), f)
}

// ConnectSelectAll signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to select all children of the box, if the selection mode permits it.
//
// The default bindings for this signal is Ctrl-a.
func (box *ListBox) ConnectSelectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "select-all", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectSelectAll), f)
}

// ConnectSelectedRowsChanged signal is emitted when the set of selected rows
// changes.
func (box *ListBox) ConnectSelectedRowsChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "selected-rows-changed", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectSelectedRowsChanged), f)
}

func (box *ListBox) ConnectToggleCursorRow(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "toggle-cursor-row", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectToggleCursorRow), f)
}

// ConnectUnselectAll signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to unselect all children of the box, if the selection mode
// permits it.
//
// The default bindings for this signal is Ctrl-Shift-a.
func (box *ListBox) ConnectUnselectAll(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(box, "unselect-all", false, unsafe.Pointer(C._gotk4_gtk3_ListBox_ConnectUnselectAll), f)
}

// NewListBox creates a new ListBox container.
//
// The function returns the following values:
//
//   - listBox: new ListBox.
func NewListBox() *ListBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_list_box_new()

	var _listBox *ListBox // out

	_listBox = wrapListBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _listBox
}

// BindModel binds model to box.
//
// If box was already bound to a model, that previous binding is destroyed.
//
// The contents of box are cleared and then filled with widgets that represent
// items from model. box is updated whenever model changes. If model is NULL,
// box is left empty.
//
// It is undefined to add or remove widgets directly (for example, with
// gtk_list_box_insert() or gtk_container_add()) while box is bound to a model.
//
// Note that using a model is incompatible with the filtering and sorting
// functionality in GtkListBox. When using a model, filtering and sorting should
// be implemented by the model.
//
// The function takes the following parameters:
//
//   - model (optional) to be bound to box.
//   - createWidgetFunc (optional): function that creates widgets for items or
//     NULL in case you also passed NULL as model.
func (box *ListBox) BindModel(model gio.ListModeller, createWidgetFunc ListBoxCreateWidgetFunc) {
	var _arg0 *C.GtkListBox                // out
	var _arg1 *C.GListModel                // out
	var _arg2 C.GtkListBoxCreateWidgetFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if model != nil {
		_arg1 = (*C.GListModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}
	if createWidgetFunc != nil {
		_arg2 = (*[0]byte)(C._gotk4_gtk3_ListBoxCreateWidgetFunc)
		_arg3 = C.gpointer(gbox.Assign(createWidgetFunc))
		_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_list_box_bind_model(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(box)
	runtime.KeepAlive(model)
	runtime.KeepAlive(createWidgetFunc)
}

// DragHighlightRow: this is a helper function for implementing DnD onto a
// ListBox. The passed in row will be highlighted via gtk_drag_highlight(),
// and any previously highlighted row will be unhighlighted.
//
// The row will also be unhighlighted when the widget gets a drag leave event.
//
// The function takes the following parameters:
//
//   - row: ListBoxRow.
func (box *ListBox) DragHighlightRow(row *ListBoxRow) {
	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C.gtk_list_box_drag_highlight_row(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(row)
}

// DragUnhighlightRow: if a row has previously been highlighted via
// gtk_list_box_drag_highlight_row() it will have the highlight removed.
func (box *ListBox) DragUnhighlightRow() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_drag_unhighlight_row(_arg0)
	runtime.KeepAlive(box)
}

// ActivateOnSingleClick returns whether rows activate on single clicks.
//
// The function returns the following values:
//
//   - ok: TRUE if rows are activated on single click, FALSE otherwise.
func (box *ListBox) ActivateOnSingleClick() bool {
	var _arg0 *C.GtkListBox // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_list_box_get_activate_on_single_click(_arg0)
	runtime.KeepAlive(box)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Adjustment gets the adjustment (if any) that the widget uses to for vertical
// scrolling.
//
// The function returns the following values:
//
//   - adjustment: adjustment.
func (box *ListBox) Adjustment() *Adjustment {
	var _arg0 *C.GtkListBox    // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_list_box_get_adjustment(_arg0)
	runtime.KeepAlive(box)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// RowAtIndex gets the n-th child in the list (not counting headers). If _index
// is negative or larger than the number of items in the list, NULL is returned.
//
// The function takes the following parameters:
//
//   - index_: index of the row.
//
// The function returns the following values:
//
//   - listBoxRow (optional): child Widget or NULL.
func (box *ListBox) RowAtIndex(index_ int) *ListBoxRow {
	var _arg0 *C.GtkListBox    // out
	var _arg1 C.gint           // out
	var _cret *C.GtkListBoxRow // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(index_)

	_cret = C.gtk_list_box_get_row_at_index(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(index_)

	var _listBoxRow *ListBoxRow // out

	if _cret != nil {
		_listBoxRow = wrapListBoxRow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _listBoxRow
}

// RowAtY gets the row at the y position.
//
// The function takes the following parameters:
//
//   - y: position.
//
// The function returns the following values:
//
//   - listBoxRow (optional): row or NULL in case no row exists for the given y
//     coordinate.
func (box *ListBox) RowAtY(y int) *ListBoxRow {
	var _arg0 *C.GtkListBox    // out
	var _arg1 C.gint           // out
	var _cret *C.GtkListBoxRow // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.gint(y)

	_cret = C.gtk_list_box_get_row_at_y(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(y)

	var _listBoxRow *ListBoxRow // out

	if _cret != nil {
		_listBoxRow = wrapListBoxRow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _listBoxRow
}

// SelectedRow gets the selected row.
//
// Note that the box may allow multiple selection, in which case you should use
// gtk_list_box_selected_foreach() to find all selected rows.
//
// The function returns the following values:
//
//   - listBoxRow: selected row.
func (box *ListBox) SelectedRow() *ListBoxRow {
	var _arg0 *C.GtkListBox    // out
	var _cret *C.GtkListBoxRow // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_list_box_get_selected_row(_arg0)
	runtime.KeepAlive(box)

	var _listBoxRow *ListBoxRow // out

	_listBoxRow = wrapListBoxRow(coreglib.Take(unsafe.Pointer(_cret)))

	return _listBoxRow
}

// SelectedRows creates a list of all selected children.
//
// The function returns the following values:
//
//   - list: A #GList containing the Widget for each selected child. Free with
//     g_list_free() when done.
func (box *ListBox) SelectedRows() []*ListBoxRow {
	var _arg0 *C.GtkListBox // out
	var _cret *C.GList      // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_list_box_get_selected_rows(_arg0)
	runtime.KeepAlive(box)

	var _list []*ListBoxRow // out

	_list = make([]*ListBoxRow, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkListBoxRow)(v)
		var dst *ListBoxRow // out
		dst = wrapListBoxRow(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// SelectionMode gets the selection mode of the listbox.
//
// The function returns the following values:
//
//   - selectionMode: SelectionMode.
func (box *ListBox) SelectionMode() SelectionMode {
	var _arg0 *C.GtkListBox      // out
	var _cret C.GtkSelectionMode // in

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	_cret = C.gtk_list_box_get_selection_mode(_arg0)
	runtime.KeepAlive(box)

	var _selectionMode SelectionMode // out

	_selectionMode = SelectionMode(_cret)

	return _selectionMode
}

// Insert the child into the box at position. If a sort function is set, the
// widget will actually be inserted at the calculated position and this function
// has the same effect of gtk_container_add().
//
// If position is -1, or larger than the total number of items in the box,
// then the child will be appended to the end.
//
// The function takes the following parameters:
//
//   - child to add.
//   - position to insert child in.
func (box *ListBox) Insert(child Widgetter, position int) {
	var _arg0 *C.GtkListBox // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gint        // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C.gtk_list_box_insert(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

// InvalidateFilter: update the filtering for all rows. Call this when result
// of the filter function on the box is changed due to an external factor.
// For instance, this would be used if the filter function just looked for a
// specific search string and the entry with the search string has changed.
func (box *ListBox) InvalidateFilter() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_invalidate_filter(_arg0)
	runtime.KeepAlive(box)
}

// InvalidateHeaders: update the separators for all rows. Call this when result
// of the header function on the box is changed due to an external factor.
func (box *ListBox) InvalidateHeaders() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_invalidate_headers(_arg0)
	runtime.KeepAlive(box)
}

// InvalidateSort: update the sorting for all rows. Call this when result of the
// sort function on the box is changed due to an external factor.
func (box *ListBox) InvalidateSort() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_invalidate_sort(_arg0)
	runtime.KeepAlive(box)
}

// Prepend a widget to the list. If a sort function is set, the widget will
// actually be inserted at the calculated position and this function has the
// same effect of gtk_container_add().
//
// The function takes the following parameters:
//
//   - child to add.
func (box *ListBox) Prepend(child Widgetter) {
	var _arg0 *C.GtkListBox // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_list_box_prepend(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(child)
}

// SelectAll: select all children of box, if the selection mode allows it.
func (box *ListBox) SelectAll() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_select_all(_arg0)
	runtime.KeepAlive(box)
}

// SelectRow: make row the currently selected row.
//
// The function takes the following parameters:
//
//   - row (optional) to select or NULL.
func (box *ListBox) SelectRow(row *ListBoxRow) {
	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if row != nil {
		_arg1 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))
	}

	C.gtk_list_box_select_row(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(row)
}

// SelectedForEach calls a function for each selected child.
//
// Note that the selection cannot be modified from within this function.
//
// The function takes the following parameters:
//
//   - fn: function to call for each selected child.
func (box *ListBox) SelectedForEach(fn ListBoxForEachFunc) {
	var _arg0 *C.GtkListBox           // out
	var _arg1 C.GtkListBoxForeachFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_ListBoxForEachFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_list_box_selected_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(fn)
}

// SetActivateOnSingleClick: if single is TRUE, rows will be activated when you
// click on them, otherwise you need to double-click.
//
// The function takes the following parameters:
//
//   - single: boolean.
func (box *ListBox) SetActivateOnSingleClick(single bool) {
	var _arg0 *C.GtkListBox // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if single {
		_arg1 = C.TRUE
	}

	C.gtk_list_box_set_activate_on_single_click(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(single)
}

// SetAdjustment sets the adjustment (if any) that the widget uses to for
// vertical scrolling. For instance, this is used to get the page size for
// PageUp/Down key handling.
//
// In the normal case when the box is packed inside a ScrolledWindow the
// adjustment from that will be picked up automatically, so there is no need to
// manually do that.
//
// The function takes the following parameters:
//
//   - adjustment (optional): adjustment, or NULL.
func (box *ListBox) SetAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_list_box_set_adjustment(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(adjustment)
}

// SetFilterFunc: by setting a filter function on the box one can decide
// dynamically which of the rows to show. For instance, to implement a search
// function on a list that filters the original list to only show the matching
// rows.
//
// The filter_func will be called for each row after the call,
// and it will continue to be called each time a row changes (via
// gtk_list_box_row_changed()) or when gtk_list_box_invalidate_filter() is
// called.
//
// Note that using a filter function is incompatible with using a model (see
// gtk_list_box_bind_model()).
//
// The function takes the following parameters:
//
//   - filterFunc (optional): callback that lets you filter which rows to show.
func (box *ListBox) SetFilterFunc(filterFunc ListBoxFilterFunc) {
	var _arg0 *C.GtkListBox          // out
	var _arg1 C.GtkListBoxFilterFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if filterFunc != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_ListBoxFilterFunc)
		_arg2 = C.gpointer(gbox.Assign(filterFunc))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_list_box_set_filter_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(box)
	runtime.KeepAlive(filterFunc)
}

// SetHeaderFunc: by setting a header function on the box one can dynamically
// add headers in front of rows, depending on the contents of the row and its
// position in the list. For instance, one could use it to add headers in front
// of the first item of a new kind, in a list sorted by the kind.
//
// The update_header can look at the current header widget using
// gtk_list_box_row_get_header() and either update the state of the widget as
// needed, or set a new one using gtk_list_box_row_set_header(). If no header is
// needed, set the header to NULL.
//
// Note that you may get many calls update_header to this for a particular row
// when e.g. changing things that don’t affect the header. In this case it is
// important for performance to not blindly replace an existing header with an
// identical one.
//
// The update_header function will be called for each row after the call,
// and it will continue to be called each time a row changes (via
// gtk_list_box_row_changed()) and when the row before changes (either by
// gtk_list_box_row_changed() on the previous row, or when the previous
// row becomes a different row). It is also called for all rows when
// gtk_list_box_invalidate_headers() is called.
//
// The function takes the following parameters:
//
//   - updateHeader (optional): callback that lets you add row headers.
func (box *ListBox) SetHeaderFunc(updateHeader ListBoxUpdateHeaderFunc) {
	var _arg0 *C.GtkListBox                // out
	var _arg1 C.GtkListBoxUpdateHeaderFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if updateHeader != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_ListBoxUpdateHeaderFunc)
		_arg2 = C.gpointer(gbox.Assign(updateHeader))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_list_box_set_header_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(box)
	runtime.KeepAlive(updateHeader)
}

// SetPlaceholder sets the placeholder widget that is shown in the list when it
// doesn't display any visible children.
//
// The function takes the following parameters:
//
//   - placeholder (optional) or NULL.
func (box *ListBox) SetPlaceholder(placeholder Widgetter) {
	var _arg0 *C.GtkListBox // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if placeholder != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(placeholder).Native()))
	}

	C.gtk_list_box_set_placeholder(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(placeholder)
}

// SetSelectionMode sets how selection works in the listbox. See SelectionMode
// for details.
//
// The function takes the following parameters:
//
//   - mode: SelectionMode.
func (box *ListBox) SetSelectionMode(mode SelectionMode) {
	var _arg0 *C.GtkListBox      // out
	var _arg1 C.GtkSelectionMode // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.GtkSelectionMode(mode)

	C.gtk_list_box_set_selection_mode(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(mode)
}

// SetSortFunc: by setting a sort function on the box one can dynamically
// reorder the rows of the list, based on the contents of the rows.
//
// The sort_func will be called for each row after the call, and will continue
// to be called each time a row changes (via gtk_list_box_row_changed()) and
// when gtk_list_box_invalidate_sort() is called.
//
// Note that using a sort function is incompatible with using a model (see
// gtk_list_box_bind_model()).
//
// The function takes the following parameters:
//
//   - sortFunc (optional): sort function.
func (box *ListBox) SetSortFunc(sortFunc ListBoxSortFunc) {
	var _arg0 *C.GtkListBox        // out
	var _arg1 C.GtkListBoxSortFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	if sortFunc != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_ListBoxSortFunc)
		_arg2 = C.gpointer(gbox.Assign(sortFunc))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_list_box_set_sort_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(box)
	runtime.KeepAlive(sortFunc)
}

// UnselectAll: unselect all children of box, if the selection mode allows it.
func (box *ListBox) UnselectAll() {
	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C.gtk_list_box_unselect_all(_arg0)
	runtime.KeepAlive(box)
}

// UnselectRow unselects a single row of box, if the selection mode allows it.
//
// The function takes the following parameters:
//
//   - row to unselected.
func (box *ListBox) UnselectRow(row *ListBoxRow) {
	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C.gtk_list_box_unselect_row(_arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(row)
}

// activateCursorRow class handler for the ListBox::activate-cursor-row signal.
func (box *ListBox) activateCursorRow() {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.activate_cursor_row

	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_ListBox_virtual_activate_cursor_row(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// moveCursor class handler for the ListBox::move-cursor signal.
//
// The function takes the following parameters:
//
//   - step
//   - count
func (box *ListBox) moveCursor(step MovementStep, count int) {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkListBox     // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)

	C._gotk4_gtk3_ListBox_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(box)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)
}

// rowActivated class handler for the ListBox::row-activated signal.
func (box *ListBox) rowActivated(row *ListBoxRow) {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.row_activated

	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C._gotk4_gtk3_ListBox_virtual_row_activated(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(row)
}

// rowSelected class handler for the ListBox::row-selected signal.
func (box *ListBox) rowSelected(row *ListBoxRow) {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.row_selected

	var _arg0 *C.GtkListBox    // out
	var _arg1 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))
	_arg1 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C._gotk4_gtk3_ListBox_virtual_row_selected(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(box)
	runtime.KeepAlive(row)
}

// selectAll: select all children of box, if the selection mode allows it.
func (box *ListBox) selectAll() {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.select_all

	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_ListBox_virtual_select_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// selectedRowsChanged class handler for the ListBox::selected-rows-changed
// signal.
func (box *ListBox) selectedRowsChanged() {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.selected_rows_changed

	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_ListBox_virtual_selected_rows_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// toggleCursorRow class handler for the ListBox::toggle-cursor-row signal.
func (box *ListBox) toggleCursorRow() {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.toggle_cursor_row

	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_ListBox_virtual_toggle_cursor_row(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// unselectAll: unselect all children of box, if the selection mode allows it.
func (box *ListBox) unselectAll() {
	gclass := (*C.GtkListBoxClass)(coreglib.PeekParentClass(box))
	fnarg := gclass.unselect_all

	var _arg0 *C.GtkListBox // out

	_arg0 = (*C.GtkListBox)(unsafe.Pointer(coreglib.InternObject(box).Native()))

	C._gotk4_gtk3_ListBox_virtual_unselect_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(box)
}

// ListBoxAccessibleOverrides contains methods that are overridable.
type ListBoxAccessibleOverrides struct {
}

func defaultListBoxAccessibleOverrides(v *ListBoxAccessible) ListBoxAccessibleOverrides {
	return ListBoxAccessibleOverrides{}
}

type ListBoxAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Selection
}

var (
	_ coreglib.Objector = (*ListBoxAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ListBoxAccessible, *ListBoxAccessibleClass, ListBoxAccessibleOverrides](
		GTypeListBoxAccessible,
		initListBoxAccessibleClass,
		wrapListBoxAccessible,
		defaultListBoxAccessibleOverrides,
	)
}

func initListBoxAccessibleClass(gclass unsafe.Pointer, overrides ListBoxAccessibleOverrides, classInitFunc func(*ListBoxAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ListBoxAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapListBoxAccessible(obj *coreglib.Object) *ListBoxAccessible {
	return &ListBoxAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalListBoxAccessible(p uintptr) (interface{}, error) {
	return wrapListBoxAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ListBoxRowOverrides contains methods that are overridable.
type ListBoxRowOverrides struct {
	Activate func()
}

func defaultListBoxRowOverrides(v *ListBoxRow) ListBoxRowOverrides {
	return ListBoxRowOverrides{
		Activate: v.activate,
	}
}

type ListBoxRow struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	Actionable
}

var (
	_ Binner            = (*ListBoxRow)(nil)
	_ coreglib.Objector = (*ListBoxRow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ListBoxRow, *ListBoxRowClass, ListBoxRowOverrides](
		GTypeListBoxRow,
		initListBoxRowClass,
		wrapListBoxRow,
		defaultListBoxRowOverrides,
	)
}

func initListBoxRowClass(gclass unsafe.Pointer, overrides ListBoxRowOverrides, classInitFunc func(*ListBoxRowClass)) {
	pclass := (*C.GtkListBoxRowClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeListBoxRow))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_ListBoxRowClass_activate)
	}

	if classInitFunc != nil {
		class := (*ListBoxRowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapListBoxRow(obj *coreglib.Object) *ListBoxRow {
	return &ListBoxRow{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		Actionable: Actionable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalListBoxRow(p uintptr) (interface{}, error) {
	return wrapListBoxRow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate: this is a keybinding signal, which will cause this row to be
// activated.
//
// If you want to be notified when the user activates a row (by key or not),
// use the ListBox::row-activated signal on the row’s parent ListBox.
func (row *ListBoxRow) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(row, "activate", false, unsafe.Pointer(C._gotk4_gtk3_ListBoxRow_ConnectActivate), f)
}

// NewListBoxRow creates a new ListBoxRow, to be used as a child of a ListBox.
//
// The function returns the following values:
//
//   - listBoxRow: new ListBoxRow.
func NewListBoxRow() *ListBoxRow {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_list_box_row_new()

	var _listBoxRow *ListBoxRow // out

	_listBoxRow = wrapListBoxRow(coreglib.Take(unsafe.Pointer(_cret)))

	return _listBoxRow
}

// Changed marks row as changed, causing any state that depends on this to be
// updated. This affects sorting, filtering and headers.
//
// Note that calls to this method must be in sync with the data used for the row
// functions. For instance, if the list is mirroring some external data set,
// and *two* rows changed in the external data set then when you call
// gtk_list_box_row_changed() on the first row the sort function must only read
// the new data for the first of the two changed rows, otherwise the resorting
// of the rows will be wrong.
//
// This generally means that if you don’t fully control the data model
// you have to duplicate the data that affects the listbox row functions
// into the row widgets themselves. Another alternative is to call
// gtk_list_box_invalidate_sort() on any model change, but that is more
// expensive.
func (row *ListBoxRow) Changed() {
	var _arg0 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C.gtk_list_box_row_changed(_arg0)
	runtime.KeepAlive(row)
}

// Activatable gets the value of the ListBoxRow:activatable property for this
// row.
//
// The function returns the following values:
//
//   - ok: TRUE if the row is activatable.
func (row *ListBoxRow) Activatable() bool {
	var _arg0 *C.GtkListBoxRow // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	_cret = C.gtk_list_box_row_get_activatable(_arg0)
	runtime.KeepAlive(row)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Header returns the current header of the row. This can be used in a
// ListBoxUpdateHeaderFunc to see if there is a header set already, and if so to
// update the state of it.
//
// The function returns the following values:
//
//   - widget (optional): current header, or NULL if none.
func (row *ListBoxRow) Header() Widgetter {
	var _arg0 *C.GtkListBoxRow // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	_cret = C.gtk_list_box_row_get_header(_arg0)
	runtime.KeepAlive(row)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Index gets the current index of the row in its ListBox container.
//
// The function returns the following values:
//
//   - gint: index of the row, or -1 if the row is not in a listbox.
func (row *ListBoxRow) Index() int {
	var _arg0 *C.GtkListBoxRow // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	_cret = C.gtk_list_box_row_get_index(_arg0)
	runtime.KeepAlive(row)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Selectable gets the value of the ListBoxRow:selectable property for this row.
//
// The function returns the following values:
//
//   - ok: TRUE if the row is selectable.
func (row *ListBoxRow) Selectable() bool {
	var _arg0 *C.GtkListBoxRow // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	_cret = C.gtk_list_box_row_get_selectable(_arg0)
	runtime.KeepAlive(row)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsSelected returns whether the child is currently selected in its ListBox
// container.
//
// The function returns the following values:
//
//   - ok: TRUE if row is selected.
func (row *ListBoxRow) IsSelected() bool {
	var _arg0 *C.GtkListBoxRow // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	_cret = C.gtk_list_box_row_is_selected(_arg0)
	runtime.KeepAlive(row)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActivatable: set the ListBoxRow:activatable property for this row.
//
// The function takes the following parameters:
//
//   - activatable: TRUE to mark the row as activatable.
func (row *ListBoxRow) SetActivatable(activatable bool) {
	var _arg0 *C.GtkListBoxRow // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))
	if activatable {
		_arg1 = C.TRUE
	}

	C.gtk_list_box_row_set_activatable(_arg0, _arg1)
	runtime.KeepAlive(row)
	runtime.KeepAlive(activatable)
}

// SetHeader sets the current header of the row. This is only allowed to be
// called from a ListBoxUpdateHeaderFunc. It will replace any existing header in
// the row, and be shown in front of the row in the listbox.
//
// The function takes the following parameters:
//
//   - header (optional): header, or NULL.
func (row *ListBoxRow) SetHeader(header Widgetter) {
	var _arg0 *C.GtkListBoxRow // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))
	if header != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(header).Native()))
	}

	C.gtk_list_box_row_set_header(_arg0, _arg1)
	runtime.KeepAlive(row)
	runtime.KeepAlive(header)
}

// SetSelectable: set the ListBoxRow:selectable property for this row.
//
// The function takes the following parameters:
//
//   - selectable: TRUE to mark the row as selectable.
func (row *ListBoxRow) SetSelectable(selectable bool) {
	var _arg0 *C.GtkListBoxRow // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))
	if selectable {
		_arg1 = C.TRUE
	}

	C.gtk_list_box_row_set_selectable(_arg0, _arg1)
	runtime.KeepAlive(row)
	runtime.KeepAlive(selectable)
}

func (row *ListBoxRow) activate() {
	gclass := (*C.GtkListBoxRowClass)(coreglib.PeekParentClass(row))
	fnarg := gclass.activate

	var _arg0 *C.GtkListBoxRow // out

	_arg0 = (*C.GtkListBoxRow)(unsafe.Pointer(coreglib.InternObject(row).Native()))

	C._gotk4_gtk3_ListBoxRow_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(row)
}

// ListBoxRowAccessibleOverrides contains methods that are overridable.
type ListBoxRowAccessibleOverrides struct {
}

func defaultListBoxRowAccessibleOverrides(v *ListBoxRowAccessible) ListBoxRowAccessibleOverrides {
	return ListBoxRowAccessibleOverrides{}
}

type ListBoxRowAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*ListBoxRowAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ListBoxRowAccessible, *ListBoxRowAccessibleClass, ListBoxRowAccessibleOverrides](
		GTypeListBoxRowAccessible,
		initListBoxRowAccessibleClass,
		wrapListBoxRowAccessible,
		defaultListBoxRowAccessibleOverrides,
	)
}

func initListBoxRowAccessibleClass(gclass unsafe.Pointer, overrides ListBoxRowAccessibleOverrides, classInitFunc func(*ListBoxRowAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ListBoxRowAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapListBoxRowAccessible(obj *coreglib.Object) *ListBoxRowAccessible {
	return &ListBoxRowAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalListBoxRowAccessible(p uintptr) (interface{}, error) {
	return wrapListBoxRowAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ListStoreOverrides contains methods that are overridable.
type ListStoreOverrides struct {
}

func defaultListStoreOverrides(v *ListStore) ListStoreOverrides {
	return ListStoreOverrides{}
}

// ListStore object is a list model for use with a TreeView widget.
// It implements the TreeModel interface, and consequentialy, can use all of the
// methods available there. It also implements the TreeSortable interface so it
// can be sorted by the view. Finally, it also implements the tree [drag and
// drop][gtk3-GtkTreeView-drag-and-drop] interfaces.
//
// The ListStore can accept most GObject types as a column type, though it can’t
// accept all custom types. Internally, it will keep a copy of data passed in
// (such as a string or a boxed pointer). Columns that accept #GObjects are
// handled a little differently. The ListStore will keep a reference to the
// object instead of copying the value. As a result, if the object is modified,
// it is up to the application writer to call gtk_tree_model_row_changed() to
// emit the TreeModel::row_changed signal. This most commonly affects lists with
// Pixbufs stored.
//
// An example for creating a simple list store:
//
//	<object class="GtkListStore">
//	  <columns>
//	    <column type="gchararray"/>
//	    <column type="gchararray"/>
//	    <column type="gint"/>
//	  </columns>
//	  <data>
//	    <row>
//	      <col id="0">John</col>
//	      <col id="1">Doe</col>
//	      <col id="2">25</col>
//	    </row>
//	    <row>
//	      <col id="0">Johan</col>
//	      <col id="1">Dahlin</col>
//	      <col id="2">50</col>
//	    </row>
//	  </data>
//	</object>.
type ListStore struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
	TreeDragDest
	TreeDragSource
	TreeSortable
}

var (
	_ coreglib.Objector = (*ListStore)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ListStore, *ListStoreClass, ListStoreOverrides](
		GTypeListStore,
		initListStoreClass,
		wrapListStore,
		defaultListStoreOverrides,
	)
}

func initListStoreClass(gclass unsafe.Pointer, overrides ListStoreOverrides, classInitFunc func(*ListStoreClass)) {
	if classInitFunc != nil {
		class := (*ListStoreClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapListStore(obj *coreglib.Object) *ListStore {
	return &ListStore{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
		TreeDragDest: TreeDragDest{
			Object: obj,
		},
		TreeDragSource: TreeDragSource{
			Object: obj,
		},
		TreeSortable: TreeSortable{
			TreeModel: TreeModel{
				Object: obj,
			},
		},
	}
}

func marshalListStore(p uintptr) (interface{}, error) {
	return wrapListStore(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewListStore: non-vararg creation function. Used primarily by language
// bindings.
//
// The function takes the following parameters:
//
//   - types: array of #GType types for the columns, from first to last.
//
// The function returns the following values:
//
//   - listStore: new ListStore.
func NewListStore(types []coreglib.Type) *ListStore {
	var _arg2 *C.GType // out
	var _arg1 C.gint
	var _cret *C.GtkListStore // in

	_arg1 = (C.gint)(len(types))
	_arg2 = (*C.GType)(C.calloc(C.size_t(len(types)), C.size_t(C.sizeof_GType)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GType)(_arg2), len(types))
		for i := range types {
			out[i] = C.GType(types[i])
		}
	}

	_cret = C.gtk_list_store_newv(_arg1, _arg2)
	runtime.KeepAlive(types)

	var _listStore *ListStore // out

	_listStore = wrapListStore(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _listStore
}

// Append appends a new row to list_store. iter will be changed to point to
// this new row. The row will be empty after this function is called. To fill in
// values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the appended row.
func (listStore *ListStore) Append() *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))

	C.gtk_list_store_append(_arg0, &_arg1)
	runtime.KeepAlive(listStore)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// Clear removes all rows from the list store.
func (listStore *ListStore) Clear() {
	var _arg0 *C.GtkListStore // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))

	C.gtk_list_store_clear(_arg0)
	runtime.KeepAlive(listStore)
}

// Insert creates a new row at position. iter will be changed to point to
// this new row. If position is -1 or is larger than the number of rows on
// the list, then the new row will be appended to the list. The row will be
// empty after this function is called. To fill in values, you need to call
// gtk_list_store_set() or gtk_list_store_set_value().
//
// The function takes the following parameters:
//
//   - position to insert the new row, or -1 for last.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (listStore *ListStore) Insert(position int) *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 C.gint          // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg2 = C.gint(position)

	C.gtk_list_store_insert(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(position)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertAfter inserts a new row after sibling. If sibling is NULL,
// then the row will be prepended to the beginning of the list. iter will be
// changed to point to this new row. The row will be empty after this function
// is called. To fill in values, you need to call gtk_list_store_set() or
// gtk_list_store_set_value().
//
// The function takes the following parameters:
//
//   - sibling (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (listStore *ListStore) InsertAfter(sibling *TreeIter) *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	if sibling != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(sibling)))
	}

	C.gtk_list_store_insert_after(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(sibling)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertBefore inserts a new row before sibling. If sibling is NULL, then the
// row will be appended to the end of the list. iter will be changed to point to
// this new row. The row will be empty after this function is called. To fill in
// values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
//
// The function takes the following parameters:
//
//   - sibling (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (listStore *ListStore) InsertBefore(sibling *TreeIter) *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	if sibling != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(sibling)))
	}

	C.gtk_list_store_insert_before(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(sibling)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertWithValuesv: variant of gtk_list_store_insert_with_values() which takes
// the columns and values as two arrays, instead of varargs. This function is
// mainly intended for language-bindings.
//
// The function takes the following parameters:
//
//   - position to insert the new row, or -1 for last.
//   - columns: array of column numbers.
//   - values: array of GValues.
//
// The function returns the following values:
//
//   - iter (optional): unset TreeIter to set to the new row, or NULL.
func (listStore *ListStore) InsertWithValuesv(position int, columns []int, values []coreglib.Value) *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 C.gint          // out
	var _arg3 *C.gint         // out
	var _arg5 C.gint
	var _arg4 *C.GValue // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg2 = C.gint(position)
	_arg5 = (C.gint)(len(columns))
	_arg3 = (*C.gint)(C.calloc(C.size_t(len(columns)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg3))
	{
		out := unsafe.Slice((*C.gint)(_arg3), len(columns))
		for i := range columns {
			out[i] = C.gint(columns[i])
		}
	}
	_arg5 = (C.gint)(len(values))
	_arg4 = (*C.GValue)(C.calloc(C.size_t(len(values)), C.size_t(C.sizeof_GValue)))
	defer C.free(unsafe.Pointer(_arg4))
	{
		out := unsafe.Slice((*C.GValue)(_arg4), len(values))
		for i := range values {
			out[i] = *(*C.GValue)(unsafe.Pointer((&values[i]).Native()))
		}
	}

	C.gtk_list_store_insert_with_valuesv(_arg0, &_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(position)
	runtime.KeepAlive(columns)
	runtime.KeepAlive(values)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterIsValid: > This function is slow. Only use it for debugging and/or
// testing > purposes.
//
// Checks if the given iter is a valid iter for this ListStore.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE if the iter is valid, FALSE if the iter is invalid.
func (listStore *ListStore) IterIsValid(iter *TreeIter) bool {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_list_store_iter_is_valid(_arg0, _arg1)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MoveAfter moves iter in store to the position after position. Note that this
// function only works with unsorted stores. If position is NULL, iter will be
// moved to the start of the list.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//   - position (optional) or NULL.
func (store *ListStore) MoveAfter(iter, position *TreeIter) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(store).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if position != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(position)))
	}

	C.gtk_list_store_move_after(_arg0, _arg1, _arg2)
	runtime.KeepAlive(store)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(position)
}

// MoveBefore moves iter in store to the position before position. Note that
// this function only works with unsorted stores. If position is NULL, iter will
// be moved to the end of the list.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//   - position (optional) or NULL.
func (store *ListStore) MoveBefore(iter, position *TreeIter) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(store).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if position != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(position)))
	}

	C.gtk_list_store_move_before(_arg0, _arg1, _arg2)
	runtime.KeepAlive(store)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(position)
}

// Prepend prepends a new row to list_store. iter will be changed to point to
// this new row. The row will be empty after this function is called. To fill in
// values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the prepend row.
func (listStore *ListStore) Prepend() *TreeIter {
	var _arg0 *C.GtkListStore // out
	var _arg1 C.GtkTreeIter   // in

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))

	C.gtk_list_store_prepend(_arg0, &_arg1)
	runtime.KeepAlive(listStore)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// Remove removes the given row from the list store. After being removed,
// iter is set to be the next valid row, or invalidated if it pointed to the
// last row in list_store.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter is valid, FALSE if not.
func (listStore *ListStore) Remove(iter *TreeIter) bool {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_list_store_remove(_arg0, _arg1)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Reorder reorders store to follow the order indicated by new_order. Note that
// this function only works with unsorted stores.
//
// The function takes the following parameters:
//
//   - newOrder: array of integers mapping the new position of each child to its
//     old position before the re-ordering, i.e. new_order[newpos] = oldpos.
//     It must have exactly as many items as the list store’s length.
func (store *ListStore) Reorder(newOrder []int) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.gint         // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(store).Native()))
	{
		_arg1 = (*C.gint)(C.calloc(C.size_t((len(newOrder) + 1)), C.size_t(C.sizeof_gint)))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(newOrder)+1)
			var zero C.gint
			out[len(newOrder)] = zero
			for i := range newOrder {
				out[i] = C.gint(newOrder[i])
			}
		}
	}

	C.gtk_list_store_reorder(_arg0, _arg1)
	runtime.KeepAlive(store)
	runtime.KeepAlive(newOrder)
}

// SetColumnTypes: this function is meant primarily for #GObjects that inherit
// from ListStore, and should only be used when constructing a new ListStore.
// It will not function after a row has been added, or a method on the TreeModel
// interface is called.
//
// The function takes the following parameters:
//
//   - types: array length n of #GTypes.
func (listStore *ListStore) SetColumnTypes(types []coreglib.Type) {
	var _arg0 *C.GtkListStore // out
	var _arg2 *C.GType        // out
	var _arg1 C.gint

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg1 = (C.gint)(len(types))
	_arg2 = (*C.GType)(C.calloc(C.size_t(len(types)), C.size_t(C.sizeof_GType)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GType)(_arg2), len(types))
		for i := range types {
			out[i] = C.GType(types[i])
		}
	}

	C.gtk_list_store_set_column_types(_arg0, _arg1, _arg2)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(types)
}

// SetValue sets the data in the cell specified by iter and column. The type of
// value must be convertible to the type of the column.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter for the row being modified.
//   - column number to modify.
//   - value: new value for the cell.
func (listStore *ListStore) SetValue(iter *TreeIter, column int, value *coreglib.Value) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 C.gint          // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gint(column)
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_list_store_set_value(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(column)
	runtime.KeepAlive(value)
}

// Set: variant of gtk_list_store_set_valist() which takes the columns and
// values as two arrays, instead of varargs. This function is mainly intended
// for language-bindings and in case the number of columns to change is not
// known until run-time.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter for the row being modified.
//   - columns: array of column numbers.
//   - values: array of GValues.
func (listStore *ListStore) Set(iter *TreeIter, columns []int, values []coreglib.Value) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.gint         // out
	var _arg4 C.gint
	var _arg3 *C.GValue // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(listStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg4 = (C.gint)(len(columns))
	_arg2 = (*C.gint)(C.calloc(C.size_t(len(columns)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.gint)(_arg2), len(columns))
		for i := range columns {
			out[i] = C.gint(columns[i])
		}
	}
	_arg4 = (C.gint)(len(values))
	_arg3 = (*C.GValue)(C.calloc(C.size_t(len(values)), C.size_t(C.sizeof_GValue)))
	defer C.free(unsafe.Pointer(_arg3))
	{
		out := unsafe.Slice((*C.GValue)(_arg3), len(values))
		for i := range values {
			out[i] = *(*C.GValue)(unsafe.Pointer((&values[i]).Native()))
		}
	}

	C.gtk_list_store_set_valuesv(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(listStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(columns)
	runtime.KeepAlive(values)
}

// Swap swaps a and b in store. Note that this function only works with unsorted
// stores.
//
// The function takes the following parameters:
//
//   - a: TreeIter.
//   - b: another TreeIter.
func (store *ListStore) Swap(a, b *TreeIter) {
	var _arg0 *C.GtkListStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkListStore)(unsafe.Pointer(coreglib.InternObject(store).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(a)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(b)))

	C.gtk_list_store_swap(_arg0, _arg1, _arg2)
	runtime.KeepAlive(store)
	runtime.KeepAlive(a)
	runtime.KeepAlive(b)
}

// LockButtonOverrides contains methods that are overridable.
type LockButtonOverrides struct {
}

func defaultLockButtonOverrides(v *LockButton) LockButtonOverrides {
	return LockButtonOverrides{}
}

// LockButton is a widget that can be used in control panels or preference
// dialogs to allow users to obtain and revoke authorizations needed to operate
// the controls. The required authorization is represented by a #GPermission
// object. Concrete implementations of #GPermission may use PolicyKit or some
// other authorization framework. To obtain a PolicyKit-based #GPermission,
// use polkit_permission_new().
//
// If the user is not currently allowed to perform the action, but can obtain
// the permission, the widget looks like this:
//
// ! (lockbutton-locked.png)
//
// and the user can click the button to request the permission. Depending on
// the platform, this may pop up an authentication dialog or ask the user to
// authenticate in some other way. Once the user has obtained the permission,
// the widget changes to this:
//
// ! (lockbutton-unlocked.png)
//
// and the permission can be dropped again by clicking the button. If the user
// is not able to obtain the permission at all, the widget looks like this:
//
// ! (lockbutton-sorry.png)
//
// If the user has the permission and cannot drop it, the button is hidden.
//
// The text (and tooltips) that are shown in the various cases can be
// adjusted with the LockButton:text-lock, LockButton:text-unlock,
// LockButton:tooltip-lock, LockButton:tooltip-unlock and
// LockButton:tooltip-not-authorized properties.
type LockButton struct {
	_ [0]func() // equal guard
	Button
}

var (
	_ Binner            = (*LockButton)(nil)
	_ coreglib.Objector = (*LockButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LockButton, *LockButtonClass, LockButtonOverrides](
		GTypeLockButton,
		initLockButtonClass,
		wrapLockButton,
		defaultLockButtonOverrides,
	)
}

func initLockButtonClass(gclass unsafe.Pointer, overrides LockButtonOverrides, classInitFunc func(*LockButtonClass)) {
	if classInitFunc != nil {
		class := (*LockButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLockButton(obj *coreglib.Object) *LockButton {
	return &LockButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalLockButton(p uintptr) (interface{}, error) {
	return wrapLockButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewLockButton creates a new lock button which reflects the permission.
//
// The function takes the following parameters:
//
//   - permission (optional): #GPermission.
//
// The function returns the following values:
//
//   - lockButton: new LockButton.
func NewLockButton(permission gio.Permissioner) *LockButton {
	var _arg1 *C.GPermission // out
	var _cret *C.GtkWidget   // in

	if permission != nil {
		_arg1 = (*C.GPermission)(unsafe.Pointer(coreglib.InternObject(permission).Native()))
	}

	_cret = C.gtk_lock_button_new(_arg1)
	runtime.KeepAlive(permission)

	var _lockButton *LockButton // out

	_lockButton = wrapLockButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _lockButton
}

// Permission obtains the #GPermission object that controls button.
//
// The function returns the following values:
//
//   - permission of button.
func (button *LockButton) Permission() gio.Permissioner {
	var _arg0 *C.GtkLockButton // out
	var _cret *C.GPermission   // in

	_arg0 = (*C.GtkLockButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_lock_button_get_permission(_arg0)
	runtime.KeepAlive(button)

	var _permission gio.Permissioner // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gio.Permissioner is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gio.Permissioner)
			return ok
		})
		rv, ok := casted.(gio.Permissioner)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gio.Permissioner")
		}
		_permission = rv
	}

	return _permission
}

// SetPermission sets the #GPermission object that controls button.
//
// The function takes the following parameters:
//
//   - permission (optional) object, or NULL.
func (button *LockButton) SetPermission(permission gio.Permissioner) {
	var _arg0 *C.GtkLockButton // out
	var _arg1 *C.GPermission   // out

	_arg0 = (*C.GtkLockButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if permission != nil {
		_arg1 = (*C.GPermission)(unsafe.Pointer(coreglib.InternObject(permission).Native()))
	}

	C.gtk_lock_button_set_permission(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(permission)
}

// LockButtonAccessibleOverrides contains methods that are overridable.
type LockButtonAccessibleOverrides struct {
}

func defaultLockButtonAccessibleOverrides(v *LockButtonAccessible) LockButtonAccessibleOverrides {
	return LockButtonAccessibleOverrides{}
}

type LockButtonAccessible struct {
	_ [0]func() // equal guard
	ButtonAccessible
}

var (
	_ coreglib.Objector = (*LockButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*LockButtonAccessible, *LockButtonAccessibleClass, LockButtonAccessibleOverrides](
		GTypeLockButtonAccessible,
		initLockButtonAccessibleClass,
		wrapLockButtonAccessible,
		defaultLockButtonAccessibleOverrides,
	)
}

func initLockButtonAccessibleClass(gclass unsafe.Pointer, overrides LockButtonAccessibleOverrides, classInitFunc func(*LockButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*LockButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapLockButtonAccessible(obj *coreglib.Object) *LockButtonAccessible {
	return &LockButtonAccessible{
		ButtonAccessible: ButtonAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			Image: atk.Image{
				Object: obj,
			},
		},
	}
}

func marshalLockButtonAccessible(p uintptr) (interface{}, error) {
	return wrapLockButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// MenuOverrides contains methods that are overridable.
type MenuOverrides struct {
}

func defaultMenuOverrides(v *Menu) MenuOverrides {
	return MenuOverrides{}
}

// Menu is a MenuShell that implements a drop down menu consisting of a list of
// MenuItem objects which can be navigated and activated by the user to perform
// application functions.
//
// A Menu is most commonly dropped down by activating a MenuItem in a MenuBar or
// popped up by activating a MenuItem in another Menu.
//
// A Menu can also be popped up by activating a ComboBox. Other composite
// widgets such as the Notebook can pop up a Menu as well.
//
// Applications can display a Menu as a popup menu by calling the
// gtk_menu_popup() function. The example below shows how an application can pop
// up a menu when the 3rd mouse button is pressed.
//
// Connecting the popup signal handler.
//
//	menu
//	├── arrow.top
//	├── <child>
//	┊
//	├── <child>
//	╰── arrow.bottom
//
// The main CSS node of GtkMenu has name menu, and there are two subnodes
// with name arrow, for scrolling menu arrows. These subnodes get the .top and
// .bottom style classes.
type Menu struct {
	_ [0]func() // equal guard
	MenuShell
}

var (
	_ MenuSheller = (*Menu)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Menu, *MenuClass, MenuOverrides](
		GTypeMenu,
		initMenuClass,
		wrapMenu,
		defaultMenuOverrides,
	)
}

func initMenuClass(gclass unsafe.Pointer, overrides MenuOverrides, classInitFunc func(*MenuClass)) {
	if classInitFunc != nil {
		class := (*MenuClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenu(obj *coreglib.Object) *Menu {
	return &Menu{
		MenuShell: MenuShell{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalMenu(p uintptr) (interface{}, error) {
	return wrapMenu(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (menu *Menu) ConnectMoveScroll(f func(scrollType ScrollType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menu, "move-scroll", false, unsafe.Pointer(C._gotk4_gtk3_Menu_ConnectMoveScroll), f)
}

// ConnectPoppedUp is emitted when the position of menu is finalized after being
// popped up using gtk_menu_popup_at_rect (), gtk_menu_popup_at_widget (),
// or gtk_menu_popup_at_pointer ().
//
// menu might be flipped over the anchor rectangle in order to keep it
// on-screen, in which case flipped_x and flipped_y will be set to TRUE
// accordingly.
//
// flipped_rect is the ideal position of menu after any possible flipping,
// but before any possible sliding. final_rect is flipped_rect, but possibly
// translated in the case that flipping is still ineffective in keeping menu
// on-screen.
//
// ! (popup-slide.png)
//
// The blue menu is menu's ideal position, the green menu is flipped_rect,
// and the red menu is final_rect.
//
// See gtk_menu_popup_at_rect (), gtk_menu_popup_at_widget (),
// gtk_menu_popup_at_pointer (), Menu:anchor-hints, Menu:rect-anchor-dx,
// Menu:rect-anchor-dy, and Menu:menu-type-hint.
func (menu *Menu) ConnectPoppedUp(f func(flippedRect, finalRect unsafe.Pointer, flippedX, flippedY bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menu, "popped-up", false, unsafe.Pointer(C._gotk4_gtk3_Menu_ConnectPoppedUp), f)
}

// NewMenu creates a new Menu.
//
// The function returns the following values:
//
//   - menu: new Menu.
func NewMenu() *Menu {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_menu_new()

	var _menu *Menu // out

	_menu = wrapMenu(coreglib.Take(unsafe.Pointer(_cret)))

	return _menu
}

// NewMenuFromModel creates a Menu and populates it with menu items and submenus
// according to model.
//
// The created menu items are connected to actions found in the
// ApplicationWindow to which the menu belongs - typically by means of being
// attached to a widget (see gtk_menu_attach_to_widget()) that is contained
// within the ApplicationWindows widget hierarchy.
//
// Actions can also be added using gtk_widget_insert_action_group() on the
// menu's attach widget or on any of its parent widgets.
//
// The function takes the following parameters:
//
//   - model: Model.
//
// The function returns the following values:
//
//   - menu: new Menu.
func NewMenuFromModel(model gio.MenuModeller) *Menu {
	var _arg1 *C.GMenuModel // out
	var _cret *C.GtkWidget  // in

	_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_menu_new_from_model(_arg1)
	runtime.KeepAlive(model)

	var _menu *Menu // out

	_menu = wrapMenu(coreglib.Take(unsafe.Pointer(_cret)))

	return _menu
}

// Attach adds a new MenuItem to a (table) menu. The number of “cells” that an
// item will occupy is specified by left_attach, right_attach, top_attach and
// bottom_attach. These each represent the leftmost, rightmost, uppermost and
// lower column and row numbers of the table. (Columns and rows are indexed from
// zero).
//
// Note that this function is not related to gtk_menu_detach().
//
// The function takes the following parameters:
//
//   - child: MenuItem.
//   - leftAttach: column number to attach the left side of the item to.
//   - rightAttach: column number to attach the right side of the item to.
//   - topAttach: row number to attach the top of the item to.
//   - bottomAttach: row number to attach the bottom of the item to.
func (menu *Menu) Attach(child Widgetter, leftAttach, rightAttach, topAttach, bottomAttach uint) {
	var _arg0 *C.GtkMenu   // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.guint      // out
	var _arg3 C.guint      // out
	var _arg4 C.guint      // out
	var _arg5 C.guint      // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.guint(leftAttach)
	_arg3 = C.guint(rightAttach)
	_arg4 = C.guint(topAttach)
	_arg5 = C.guint(bottomAttach)

	C.gtk_menu_attach(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(child)
	runtime.KeepAlive(leftAttach)
	runtime.KeepAlive(rightAttach)
	runtime.KeepAlive(topAttach)
	runtime.KeepAlive(bottomAttach)
}

// Detach detaches the menu from the widget to which it had been attached.
// This function will call the callback function, detacher, provided when the
// gtk_menu_attach_to_widget() function was called.
func (menu *Menu) Detach() {
	var _arg0 *C.GtkMenu // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	C.gtk_menu_detach(_arg0)
	runtime.KeepAlive(menu)
}

// AccelGroup gets the AccelGroup which holds global accelerators for the menu.
// See gtk_menu_set_accel_group().
//
// The function returns the following values:
//
//   - accelGroup associated with the menu.
func (menu *Menu) AccelGroup() *AccelGroup {
	var _arg0 *C.GtkMenu       // out
	var _cret *C.GtkAccelGroup // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_accel_group(_arg0)
	runtime.KeepAlive(menu)

	var _accelGroup *AccelGroup // out

	_accelGroup = wrapAccelGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _accelGroup
}

// AccelPath retrieves the accelerator path set on the menu.
//
// The function returns the following values:
//
//   - utf8: accelerator path set on the menu.
func (menu *Menu) AccelPath() string {
	var _arg0 *C.GtkMenu // out
	var _cret *C.gchar   // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_accel_path(_arg0)
	runtime.KeepAlive(menu)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Active returns the selected menu item from the menu. This is used by the
// ComboBox.
//
// The function returns the following values:
//
//   - widget that was last selected in the menu. If a selection has not yet
//     been made, the first menu item is selected.
func (menu *Menu) Active() Widgetter {
	var _arg0 *C.GtkMenu   // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_active(_arg0)
	runtime.KeepAlive(menu)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// AttachWidget returns the Widget that the menu is attached to.
//
// The function returns the following values:
//
//   - widget that the menu is attached to.
func (menu *Menu) AttachWidget() Widgetter {
	var _arg0 *C.GtkMenu   // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_attach_widget(_arg0)
	runtime.KeepAlive(menu)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// Monitor retrieves the number of the monitor on which to show the menu.
//
// The function returns the following values:
//
//   - gint: number of the monitor on which the menu should be popped up or -1,
//     if no monitor has been set.
func (menu *Menu) Monitor() int {
	var _arg0 *C.GtkMenu // out
	var _cret C.gint     // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_monitor(_arg0)
	runtime.KeepAlive(menu)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ReserveToggleSize returns whether the menu reserves space for toggles and
// icons, regardless of their actual presence.
//
// The function returns the following values:
//
//   - ok: whether the menu reserves toggle space.
func (menu *Menu) ReserveToggleSize() bool {
	var _arg0 *C.GtkMenu // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_reserve_toggle_size(_arg0)
	runtime.KeepAlive(menu)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TearoffState returns whether the menu is torn off. See
// gtk_menu_set_tearoff_state().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if the menu is currently torn off.
func (menu *Menu) TearoffState() bool {
	var _arg0 *C.GtkMenu // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_tearoff_state(_arg0)
	runtime.KeepAlive(menu)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Title returns the title of the menu. See gtk_menu_set_title().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - utf8: title of the menu, or NULL if the menu has no title set on it.
//     This string is owned by GTK+ and should not be modified or freed.
func (menu *Menu) Title() string {
	var _arg0 *C.GtkMenu // out
	var _cret *C.gchar   // in

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_menu_get_title(_arg0)
	runtime.KeepAlive(menu)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PlaceOnMonitor places menu on the given monitor.
//
// The function takes the following parameters:
//
//   - monitor to place the menu on.
func (menu *Menu) PlaceOnMonitor(monitor *gdk.Monitor) {
	var _arg0 *C.GtkMenu    // out
	var _arg1 *C.GdkMonitor // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = (*C.GdkMonitor)(unsafe.Pointer(coreglib.InternObject(monitor).Native()))

	C.gtk_menu_place_on_monitor(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(monitor)
}

// Popdown removes the menu from the screen.
func (menu *Menu) Popdown() {
	var _arg0 *C.GtkMenu // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	C.gtk_menu_popdown(_arg0)
	runtime.KeepAlive(menu)
}

// PopupAtPointer displays menu and makes it available for selection.
//
// See gtk_menu_popup_at_widget () to pop up a menu at a widget.
// gtk_menu_popup_at_rect () also allows you to position a menu at an arbitrary
// rectangle.
//
// menu will be positioned at the pointer associated with trigger_event.
//
// Properties that influence the behaviour of this function are
// Menu:anchor-hints, Menu:rect-anchor-dx, Menu:rect-anchor-dy, and
// Menu:menu-type-hint. Connect to the Menu::popped-up signal to find out how it
// was actually positioned.
//
// The function takes the following parameters:
//
//   - triggerEvent (optional) that initiated this request or NULL if it's the
//     current event.
func (menu *Menu) PopupAtPointer(triggerEvent *gdk.Event) {
	var _arg0 *C.GtkMenu  // out
	var _arg1 *C.GdkEvent // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if triggerEvent != nil {
		_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(triggerEvent)))
	}

	C.gtk_menu_popup_at_pointer(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(triggerEvent)
}

// PopupAtRect displays menu and makes it available for selection.
//
// See gtk_menu_popup_at_widget () and gtk_menu_popup_at_pointer (), which
// handle more common cases for popping up menus.
//
// menu will be positioned at rect, aligning their anchor points. rect is
// relative to the top-left corner of rect_window. rect_anchor and menu_anchor
// determine anchor points on rect and menu to pin together. menu can optionally
// be offset by Menu:rect-anchor-dx and Menu:rect-anchor-dy.
//
// Anchors should be specified under the assumption that the text direction is
// left-to-right; they will be flipped horizontally automatically if the text
// direction is right-to-left.
//
// Other properties that influence the behaviour of this function are
// Menu:anchor-hints and Menu:menu-type-hint. Connect to the Menu::popped-up
// signal to find out how it was actually positioned.
//
// The function takes the following parameters:
//
//   - rectWindow rect is relative to.
//   - rect to align menu with.
//   - rectAnchor: point on rect to align with menu's anchor point.
//   - menuAnchor: point on menu to align with rect's anchor point.
//   - triggerEvent (optional) that initiated this request or NULL if it's the
//     current event.
func (menu *Menu) PopupAtRect(rectWindow gdk.Windower, rect *gdk.Rectangle, rectAnchor, menuAnchor gdk.Gravity, triggerEvent *gdk.Event) {
	var _arg0 *C.GtkMenu      // out
	var _arg1 *C.GdkWindow    // out
	var _arg2 *C.GdkRectangle // out
	var _arg3 C.GdkGravity    // out
	var _arg4 C.GdkGravity    // out
	var _arg5 *C.GdkEvent     // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(rectWindow).Native()))
	_arg2 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(rect)))
	_arg3 = C.GdkGravity(rectAnchor)
	_arg4 = C.GdkGravity(menuAnchor)
	if triggerEvent != nil {
		_arg5 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(triggerEvent)))
	}

	C.gtk_menu_popup_at_rect(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(rectWindow)
	runtime.KeepAlive(rect)
	runtime.KeepAlive(rectAnchor)
	runtime.KeepAlive(menuAnchor)
	runtime.KeepAlive(triggerEvent)
}

// PopupAtWidget displays menu and makes it available for selection.
//
// See gtk_menu_popup_at_pointer () to pop up a menu at the master pointer.
// gtk_menu_popup_at_rect () also allows you to position a menu at an arbitrary
// rectangle.
//
// ! (popup-anchors.png)
//
// menu will be positioned at widget, aligning their anchor points.
// widget_anchor and menu_anchor determine anchor points on widget and menu
// to pin together. menu can optionally be offset by Menu:rect-anchor-dx and
// Menu:rect-anchor-dy.
//
// Anchors should be specified under the assumption that the text direction is
// left-to-right; they will be flipped horizontally automatically if the text
// direction is right-to-left.
//
// Other properties that influence the behaviour of this function are
// Menu:anchor-hints and Menu:menu-type-hint. Connect to the Menu::popped-up
// signal to find out how it was actually positioned.
//
// The function takes the following parameters:
//
//   - widget to align menu with.
//   - widgetAnchor: point on widget to align with menu's anchor point.
//   - menuAnchor: point on menu to align with widget's anchor point.
//   - triggerEvent (optional) that initiated this request or NULL if it's the
//     current event.
func (menu *Menu) PopupAtWidget(widget Widgetter, widgetAnchor, menuAnchor gdk.Gravity, triggerEvent *gdk.Event) {
	var _arg0 *C.GtkMenu   // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.GdkGravity // out
	var _arg3 C.GdkGravity // out
	var _arg4 *C.GdkEvent  // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GdkGravity(widgetAnchor)
	_arg3 = C.GdkGravity(menuAnchor)
	if triggerEvent != nil {
		_arg4 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(triggerEvent)))
	}

	C.gtk_menu_popup_at_widget(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(widgetAnchor)
	runtime.KeepAlive(menuAnchor)
	runtime.KeepAlive(triggerEvent)
}

// ReorderChild moves child to a new position in the list of menu children.
//
// The function takes the following parameters:
//
//   - child to move.
//   - position: new position to place child. Positions are numbered from 0 to n
//   - 1.
func (menu *Menu) ReorderChild(child Widgetter, position int) {
	var _arg0 *C.GtkMenu   // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C.gtk_menu_reorder_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

// Reposition repositions the menu according to its position function.
func (menu *Menu) Reposition() {
	var _arg0 *C.GtkMenu // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	C.gtk_menu_reposition(_arg0)
	runtime.KeepAlive(menu)
}

// SetAccelGroup: set the AccelGroup which holds global accelerators for the
// menu. This accelerator group needs to also be added to all windows that this
// menu is being used in with gtk_window_add_accel_group(), in order for those
// windows to support all the accelerators contained in this group.
//
// The function takes the following parameters:
//
//   - accelGroup (optional) to be associated with the menu.
func (menu *Menu) SetAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkMenu       // out
	var _arg1 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if accelGroup != nil {
		_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	}

	C.gtk_menu_set_accel_group(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(accelGroup)
}

// SetAccelPath sets an accelerator path for this menu from which accelerator
// paths for its immediate children, its menu items, can be constructed. The
// main purpose of this function is to spare the programmer the inconvenience
// of having to call gtk_menu_item_set_accel_path() on each menu item that
// should support runtime user changable accelerators. Instead, by just calling
// gtk_menu_set_accel_path() on their parent, each menu item of this menu,
// that contains a label describing its purpose, automatically gets an accel
// path assigned.
//
// For example, a menu containing menu items “New” and “Exit”, will,
// after gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File"); has been
// called, assign its items the accel paths: "<Gnumeric-Sheet>/File/New" and
// "<Gnumeric-Sheet>/File/Exit".
//
// Assigning accel paths to menu items then enables the user to change their
// accelerators at runtime. More details about accelerator paths and their
// default setups can be found at gtk_accel_map_add_entry().
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath (optional): valid accelerator path, or NULL to unset the path.
func (menu *Menu) SetAccelPath(accelPath string) {
	var _arg0 *C.GtkMenu // out
	var _arg1 *C.gchar   // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if accelPath != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_menu_set_accel_path(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(accelPath)
}

// SetActive selects the specified menu item within the menu. This is used by
// the ComboBox and should not be used by anyone else.
//
// The function takes the following parameters:
//
//   - index of the menu item to select. Index values are from 0 to n-1.
func (menu *Menu) SetActive(index uint) {
	var _arg0 *C.GtkMenu // out
	var _arg1 C.guint    // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = C.guint(index)

	C.gtk_menu_set_active(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(index)
}

// SetMonitor informs GTK+ on which monitor a menu should be popped up.
// See gdk_monitor_get_geometry().
//
// This function should be called from a MenuPositionFunc if the menu should not
// appear on the same monitor as the pointer. This information can’t be reliably
// inferred from the coordinates returned by a MenuPositionFunc, since, for very
// long menus, these coordinates may extend beyond the monitor boundaries or
// even the screen boundaries.
//
// The function takes the following parameters:
//
//   - monitorNum: number of the monitor on which the menu should be popped up.
func (menu *Menu) SetMonitor(monitorNum int) {
	var _arg0 *C.GtkMenu // out
	var _arg1 C.gint     // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	_arg1 = C.gint(monitorNum)

	C.gtk_menu_set_monitor(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(monitorNum)
}

// SetReserveToggleSize sets whether the menu should reserve space for drawing
// toggles or icons, regardless of their actual presence.
//
// The function takes the following parameters:
//
//   - reserveToggleSize: whether to reserve size for toggles.
func (menu *Menu) SetReserveToggleSize(reserveToggleSize bool) {
	var _arg0 *C.GtkMenu // out
	var _arg1 C.gboolean // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if reserveToggleSize {
		_arg1 = C.TRUE
	}

	C.gtk_menu_set_reserve_toggle_size(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(reserveToggleSize)
}

// SetScreen sets the Screen on which the menu will be displayed.
//
// The function takes the following parameters:
//
//   - screen (optional) or NULL if the screen should be determined by the
//     widget the menu is attached to.
func (menu *Menu) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkMenu   // out
	var _arg1 *C.GdkScreen // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if screen != nil {
		_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	}

	C.gtk_menu_set_screen(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(screen)
}

// SetTearoffState changes the tearoff state of the menu. A menu is normally
// displayed as drop down menu which persists as long as the menu is active.
// It can also be displayed as a tearoff menu which persists until it is closed
// or reattached.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - tornOff: if TRUE, menu is displayed as a tearoff menu.
func (menu *Menu) SetTearoffState(tornOff bool) {
	var _arg0 *C.GtkMenu // out
	var _arg1 C.gboolean // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if tornOff {
		_arg1 = C.TRUE
	}

	C.gtk_menu_set_tearoff_state(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(tornOff)
}

// SetTitle sets the title string for the menu.
//
// The title is displayed when the menu is shown as a tearoff menu. If title is
// NULL, the menu will see if it is attached to a parent menu item, and if so it
// will try to use the same text as that menu item’s label.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - title (optional): string containing the title for the menu, or NULL to
//     inherit the title of the parent menu item, if any.
func (menu *Menu) SetTitle(title string) {
	var _arg0 *C.GtkMenu // out
	var _arg1 *C.gchar   // out

	_arg0 = (*C.GtkMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if title != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_menu_set_title(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(title)
}

// MenuGetForAttachWidget returns a list of the menus which are attached to this
// widget. This list is owned by GTK+ and must not be modified.
//
// The function takes the following parameters:
//
//   - widget: Widget.
//
// The function returns the following values:
//
//   - list: list of menus attached to his widget.
func MenuGetForAttachWidget(widget Widgetter) []Widgetter {
	var _arg1 *C.GtkWidget // out
	var _cret *C.GList     // in

	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_menu_get_for_attach_widget(_arg1)
	runtime.KeepAlive(widget)

	var _list []Widgetter // out

	_list = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// MenuAccessibleOverrides contains methods that are overridable.
type MenuAccessibleOverrides struct {
}

func defaultMenuAccessibleOverrides(v *MenuAccessible) MenuAccessibleOverrides {
	return MenuAccessibleOverrides{}
}

type MenuAccessible struct {
	_ [0]func() // equal guard
	MenuShellAccessible
}

var (
	_ coreglib.Objector = (*MenuAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuAccessible, *MenuAccessibleClass, MenuAccessibleOverrides](
		GTypeMenuAccessible,
		initMenuAccessibleClass,
		wrapMenuAccessible,
		defaultMenuAccessibleOverrides,
	)
}

func initMenuAccessibleClass(gclass unsafe.Pointer, overrides MenuAccessibleOverrides, classInitFunc func(*MenuAccessibleClass)) {
	if classInitFunc != nil {
		class := (*MenuAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuAccessible(obj *coreglib.Object) *MenuAccessible {
	return &MenuAccessible{
		MenuShellAccessible: MenuShellAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Selection: atk.Selection{
				Object: obj,
			},
		},
	}
}

func marshalMenuAccessible(p uintptr) (interface{}, error) {
	return wrapMenuAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// MenuBarOverrides contains methods that are overridable.
type MenuBarOverrides struct {
}

func defaultMenuBarOverrides(v *MenuBar) MenuBarOverrides {
	return MenuBarOverrides{}
}

// MenuBar is a subclass of MenuShell which contains one or more MenuItems.
// The result is a standard menu bar which can hold many menu items.
//
// # CSS nodes
//
// GtkMenuBar has a single CSS node with name menubar.
type MenuBar struct {
	_ [0]func() // equal guard
	MenuShell
}

var (
	_ MenuSheller = (*MenuBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuBar, *MenuBarClass, MenuBarOverrides](
		GTypeMenuBar,
		initMenuBarClass,
		wrapMenuBar,
		defaultMenuBarOverrides,
	)
}

func initMenuBarClass(gclass unsafe.Pointer, overrides MenuBarOverrides, classInitFunc func(*MenuBarClass)) {
	if classInitFunc != nil {
		class := (*MenuBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuBar(obj *coreglib.Object) *MenuBar {
	return &MenuBar{
		MenuShell: MenuShell{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalMenuBar(p uintptr) (interface{}, error) {
	return wrapMenuBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewMenuBar creates a new MenuBar.
//
// The function returns the following values:
//
//   - menuBar: new menu bar, as a Widget.
func NewMenuBar() *MenuBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_menu_bar_new()

	var _menuBar *MenuBar // out

	_menuBar = wrapMenuBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuBar
}

// NewMenuBarFromModel creates a new MenuBar and populates it with menu items
// and submenus according to model.
//
// The created menu items are connected to actions found in the
// ApplicationWindow to which the menu bar belongs - typically by means of being
// contained within the ApplicationWindows widget hierarchy.
//
// The function takes the following parameters:
//
//   - model: Model.
//
// The function returns the following values:
//
//   - menuBar: new MenuBar.
func NewMenuBarFromModel(model gio.MenuModeller) *MenuBar {
	var _arg1 *C.GMenuModel // out
	var _cret *C.GtkWidget  // in

	_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_menu_bar_new_from_model(_arg1)
	runtime.KeepAlive(model)

	var _menuBar *MenuBar // out

	_menuBar = wrapMenuBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuBar
}

// ChildPackDirection retrieves the current child pack direction of the menubar.
// See gtk_menu_bar_set_child_pack_direction().
//
// The function returns the following values:
//
//   - packDirection: child pack direction.
func (menubar *MenuBar) ChildPackDirection() PackDirection {
	var _arg0 *C.GtkMenuBar      // out
	var _cret C.GtkPackDirection // in

	_arg0 = (*C.GtkMenuBar)(unsafe.Pointer(coreglib.InternObject(menubar).Native()))

	_cret = C.gtk_menu_bar_get_child_pack_direction(_arg0)
	runtime.KeepAlive(menubar)

	var _packDirection PackDirection // out

	_packDirection = PackDirection(_cret)

	return _packDirection
}

// PackDirection retrieves the current pack direction of the menubar. See
// gtk_menu_bar_set_pack_direction().
//
// The function returns the following values:
//
//   - packDirection: pack direction.
func (menubar *MenuBar) PackDirection() PackDirection {
	var _arg0 *C.GtkMenuBar      // out
	var _cret C.GtkPackDirection // in

	_arg0 = (*C.GtkMenuBar)(unsafe.Pointer(coreglib.InternObject(menubar).Native()))

	_cret = C.gtk_menu_bar_get_pack_direction(_arg0)
	runtime.KeepAlive(menubar)

	var _packDirection PackDirection // out

	_packDirection = PackDirection(_cret)

	return _packDirection
}

// SetChildPackDirection sets how widgets should be packed inside the children
// of a menubar.
//
// The function takes the following parameters:
//
//   - childPackDir: new PackDirection.
func (menubar *MenuBar) SetChildPackDirection(childPackDir PackDirection) {
	var _arg0 *C.GtkMenuBar      // out
	var _arg1 C.GtkPackDirection // out

	_arg0 = (*C.GtkMenuBar)(unsafe.Pointer(coreglib.InternObject(menubar).Native()))
	_arg1 = C.GtkPackDirection(childPackDir)

	C.gtk_menu_bar_set_child_pack_direction(_arg0, _arg1)
	runtime.KeepAlive(menubar)
	runtime.KeepAlive(childPackDir)
}

// SetPackDirection sets how items should be packed inside a menubar.
//
// The function takes the following parameters:
//
//   - packDir: new PackDirection.
func (menubar *MenuBar) SetPackDirection(packDir PackDirection) {
	var _arg0 *C.GtkMenuBar      // out
	var _arg1 C.GtkPackDirection // out

	_arg0 = (*C.GtkMenuBar)(unsafe.Pointer(coreglib.InternObject(menubar).Native()))
	_arg1 = C.GtkPackDirection(packDir)

	C.gtk_menu_bar_set_pack_direction(_arg0, _arg1)
	runtime.KeepAlive(menubar)
	runtime.KeepAlive(packDir)
}

// MenuButtonOverrides contains methods that are overridable.
type MenuButtonOverrides struct {
}

func defaultMenuButtonOverrides(v *MenuButton) MenuButtonOverrides {
	return MenuButtonOverrides{}
}

// MenuButton widget is used to display a popup when clicked on. This popup can
// be provided either as a Menu, a Popover or an abstract Model.
//
// The MenuButton widget can hold any valid child widget. That is, it can hold
// almost any other standard Widget. The most commonly used child is Image.
// If no widget is explicitely added to the MenuButton, a Image is automatically
// created, using an arrow image oriented according to MenuButton:direction or
// the generic “open-menu-symbolic” icon if the direction is not set.
//
// The positioning of the popup is determined by the MenuButton:direction
// property of the menu button.
//
// For menus, the Widget:halign and Widget:valign properties of the menu are
// also taken into account. For example, when the direction is GTK_ARROW_DOWN
// and the horizontal alignment is GTK_ALIGN_START, the menu will be positioned
// below the button, with the starting edge (depending on the text direction) of
// the menu aligned with the starting edge of the button. If there is not enough
// space below the button, the menu is popped up above the button instead.
// If the alignment would move part of the menu offscreen, it is “pushed in”.
//
// Direction = Down
//
// - halign = start
//
//	! (down-start.png)
//
// - halign = center
//
//	! (down-center.png)
//
// - halign = end
//
//	! (down-end.png)
//
// Direction = Up
//
// - halign = start
//
//	! (up-start.png)
//
// - halign = center
//
//	! (up-center.png)
//
// - halign = end
//
//	! (up-end.png)
//
// Direction = Left
//
// - valign = start
//
//	! (left-start.png)
//
// - valign = center
//
//	! (left-center.png)
//
// - valign = end
//
//	! (left-end.png)
//
// Direction = Right
//
// - valign = start
//
//	! (right-start.png)
//
// - valign = center
//
//	! (right-center.png)
//
// - valign = end
//
//	! (right-end.png)
//
// # CSS nodes
//
// GtkMenuButton has a single CSS node with name button. To differentiate it
// from a plain Button, it gets the .popup style class.
type MenuButton struct {
	_ [0]func() // equal guard
	ToggleButton
}

var (
	_ Binner            = (*MenuButton)(nil)
	_ coreglib.Objector = (*MenuButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuButton, *MenuButtonClass, MenuButtonOverrides](
		GTypeMenuButton,
		initMenuButtonClass,
		wrapMenuButton,
		defaultMenuButtonOverrides,
	)
}

func initMenuButtonClass(gclass unsafe.Pointer, overrides MenuButtonOverrides, classInitFunc func(*MenuButtonClass)) {
	if classInitFunc != nil {
		class := (*MenuButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuButton(obj *coreglib.Object) *MenuButton {
	return &MenuButton{
		ToggleButton: ToggleButton{
			Button: Button{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Actionable: Actionable{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Activatable: Activatable{
					Object: obj,
				},
			},
		},
	}
}

func marshalMenuButton(p uintptr) (interface{}, error) {
	return wrapMenuButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewMenuButton creates a new MenuButton widget with downwards-pointing arrow
// as the only child. You can replace the child widget with another Widget
// should you wish to.
//
// The function returns the following values:
//
//   - menuButton: newly created MenuButton widget.
func NewMenuButton() *MenuButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_menu_button_new()

	var _menuButton *MenuButton // out

	_menuButton = wrapMenuButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuButton
}

// AlignWidget returns the parent Widget to use to line up with menu.
//
// The function returns the following values:
//
//   - widget (optional) value or NULL.
func (menuButton *MenuButton) AlignWidget() Widgetter {
	var _arg0 *C.GtkMenuButton // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_align_widget(_arg0)
	runtime.KeepAlive(menuButton)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Direction returns the direction the popup will be pointing at when popped up.
//
// The function returns the following values:
//
//   - arrowType: ArrowType value.
func (menuButton *MenuButton) Direction() ArrowType {
	var _arg0 *C.GtkMenuButton // out
	var _cret C.GtkArrowType   // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_direction(_arg0)
	runtime.KeepAlive(menuButton)

	var _arrowType ArrowType // out

	_arrowType = ArrowType(_cret)

	return _arrowType
}

// MenuModel returns the Model used to generate the popup.
//
// The function returns the following values:
//
//   - menuModel (optional) or NULL.
func (menuButton *MenuButton) MenuModel() gio.MenuModeller {
	var _arg0 *C.GtkMenuButton // out
	var _cret *C.GMenuModel    // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_menu_model(_arg0)
	runtime.KeepAlive(menuButton)

	var _menuModel gio.MenuModeller // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gio.MenuModeller)
				return ok
			})
			rv, ok := casted.(gio.MenuModeller)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gio.MenuModeller")
			}
			_menuModel = rv
		}
	}

	return _menuModel
}

// Popover returns the Popover that pops out of the button. If the button is not
// using a Popover, this function returns NULL.
//
// The function returns the following values:
//
//   - popover (optional) or NULL.
func (menuButton *MenuButton) Popover() *Popover {
	var _arg0 *C.GtkMenuButton // out
	var _cret *C.GtkPopover    // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_popover(_arg0)
	runtime.KeepAlive(menuButton)

	var _popover *Popover // out

	if _cret != nil {
		_popover = wrapPopover(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _popover
}

// Popup returns the Menu that pops out of the button. If the button does not
// use a Menu, this function returns NULL.
//
// The function returns the following values:
//
//   - menu (optional) or NULL.
func (menuButton *MenuButton) Popup() *Menu {
	var _arg0 *C.GtkMenuButton // out
	var _cret *C.GtkMenu       // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_popup(_arg0)
	runtime.KeepAlive(menuButton)

	var _menu *Menu // out

	if _cret != nil {
		_menu = wrapMenu(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _menu
}

// UsePopover returns whether a Popover or a Menu will be constructed from the
// menu model.
//
// The function returns the following values:
//
//   - ok: TRUE if using a Popover.
func (menuButton *MenuButton) UsePopover() bool {
	var _arg0 *C.GtkMenuButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))

	_cret = C.gtk_menu_button_get_use_popover(_arg0)
	runtime.KeepAlive(menuButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAlignWidget sets the Widget to use to line the menu with when popped up.
// Note that the align_widget must contain the MenuButton itself.
//
// Setting it to NULL means that the menu will be aligned with the button
// itself.
//
// Note that this property is only used with menus currently, and not for
// popovers.
//
// The function takes the following parameters:
//
//   - alignWidget (optional): Widget.
func (menuButton *MenuButton) SetAlignWidget(alignWidget Widgetter) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	if alignWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(alignWidget).Native()))
	}

	C.gtk_menu_button_set_align_widget(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(alignWidget)
}

// SetDirection sets the direction in which the popup will be popped up, as well
// as changing the arrow’s direction. The child will not be changed to an arrow
// if it was customized.
//
// If the does not fit in the available space in the given direction, GTK+ will
// its best to keep it inside the screen and fully visible.
//
// If you pass GTK_ARROW_NONE for a direction, the popup will behave as if you
// passed GTK_ARROW_DOWN (although you won’t see any arrows).
//
// The function takes the following parameters:
//
//   - direction: ArrowType.
func (menuButton *MenuButton) SetDirection(direction ArrowType) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 C.GtkArrowType   // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	_arg1 = C.GtkArrowType(direction)

	C.gtk_menu_button_set_direction(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(direction)
}

// SetMenuModel sets the Model from which the popup will be constructed,
// or NULL to dissociate any existing menu model and disable the button.
//
// Depending on the value of MenuButton:use-popover, either a Menu
// will be created with gtk_menu_new_from_model(), or a Popover with
// gtk_popover_new_from_model(). In either case, actions will be connected as
// documented for these functions.
//
// If MenuButton:popup or MenuButton:popover are already set, those widgets are
// dissociated from the menu_button, and those properties are set to NULL.
//
// The function takes the following parameters:
//
//   - menuModel (optional) or NULL to unset and disable the button.
func (menuButton *MenuButton) SetMenuModel(menuModel gio.MenuModeller) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 *C.GMenuModel    // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	if menuModel != nil {
		_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(menuModel).Native()))
	}

	C.gtk_menu_button_set_menu_model(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(menuModel)
}

// SetPopover sets the Popover that will be popped up when the menu_button is
// clicked, or NULL to dissociate any existing popover and disable the button.
//
// If MenuButton:menu-model or MenuButton:popup are set, those objects are
// dissociated from the menu_button, and those properties are set to NULL.
//
// The function takes the following parameters:
//
//   - popover (optional) or NULL to unset and disable the button.
func (menuButton *MenuButton) SetPopover(popover Widgetter) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	if popover != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	}

	C.gtk_menu_button_set_popover(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(popover)
}

// SetPopup sets the Menu that will be popped up when the menu_button is
// clicked, or NULL to dissociate any existing menu and disable the button.
//
// If MenuButton:menu-model or MenuButton:popover are set, those objects are
// dissociated from the menu_button, and those properties are set to NULL.
//
// The function takes the following parameters:
//
//   - menu (optional) or NULL to unset and disable the button.
func (menuButton *MenuButton) SetPopup(menu Widgetter) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	if menu != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	}

	C.gtk_menu_button_set_popup(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(menu)
}

// SetUsePopover sets whether to construct a Popover instead of Menu when
// gtk_menu_button_set_menu_model() is called. Note that this property is only
// consulted when a new menu model is set.
//
// The function takes the following parameters:
//
//   - usePopover: TRUE to construct a popover from the menu model.
func (menuButton *MenuButton) SetUsePopover(usePopover bool) {
	var _arg0 *C.GtkMenuButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkMenuButton)(unsafe.Pointer(coreglib.InternObject(menuButton).Native()))
	if usePopover {
		_arg1 = C.TRUE
	}

	C.gtk_menu_button_set_use_popover(_arg0, _arg1)
	runtime.KeepAlive(menuButton)
	runtime.KeepAlive(usePopover)
}

// MenuButtonAccessibleOverrides contains methods that are overridable.
type MenuButtonAccessibleOverrides struct {
}

func defaultMenuButtonAccessibleOverrides(v *MenuButtonAccessible) MenuButtonAccessibleOverrides {
	return MenuButtonAccessibleOverrides{}
}

type MenuButtonAccessible struct {
	_ [0]func() // equal guard
	ToggleButtonAccessible
}

var (
	_ coreglib.Objector = (*MenuButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuButtonAccessible, *MenuButtonAccessibleClass, MenuButtonAccessibleOverrides](
		GTypeMenuButtonAccessible,
		initMenuButtonAccessibleClass,
		wrapMenuButtonAccessible,
		defaultMenuButtonAccessibleOverrides,
	)
}

func initMenuButtonAccessibleClass(gclass unsafe.Pointer, overrides MenuButtonAccessibleOverrides, classInitFunc func(*MenuButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*MenuButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuButtonAccessible(obj *coreglib.Object) *MenuButtonAccessible {
	return &MenuButtonAccessible{
		ToggleButtonAccessible: ToggleButtonAccessible{
			ButtonAccessible: ButtonAccessible{
				ContainerAccessible: ContainerAccessible{
					WidgetAccessible: WidgetAccessible{
						Accessible: Accessible{
							AtkObject: atk.AtkObject{
								Object: obj,
							},
						},
						Component: atk.Component{
							Object: obj,
						},
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				Image: atk.Image{
					Object: obj,
				},
			},
		},
	}
}

func marshalMenuButtonAccessible(p uintptr) (interface{}, error) {
	return wrapMenuButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// MenuItemOverrides contains methods that are overridable.
type MenuItemOverrides struct {
	// Activate emits the MenuItem::activate signal on the given item.
	Activate func()
	// ActivateItem: signal emitted when the item is activated, but also if the
	// menu item has a submenu.
	ActivateItem func()
	// Deselect emits the MenuItem::deselect signal on the given item.
	Deselect func()
	// Label sets text on the menu_item label.
	//
	// The function returns the following values:
	//
	//   - utf8: text in the menu_item label. This is the internal string used
	//     by the label, and must not be modified.
	Label func() string
	// Select emits the MenuItem::select signal on the given item.
	Select func()
	// SetLabel sets text on the menu_item label.
	//
	// The function takes the following parameters:
	//
	//   - label: text you want to set.
	SetLabel func(label string)
	// ToggleSizeAllocate emits the MenuItem::toggle-size-allocate signal on the
	// given item.
	//
	// The function takes the following parameters:
	//
	//   - allocation to use as signal data.
	ToggleSizeAllocate func(allocation int)
}

func defaultMenuItemOverrides(v *MenuItem) MenuItemOverrides {
	return MenuItemOverrides{
		Activate:           v.activate,
		ActivateItem:       v.activateItem,
		Deselect:           v.deselect,
		Label:              v.label,
		Select:             v.sel,
		SetLabel:           v.setLabel,
		ToggleSizeAllocate: v.toggleSizeAllocate,
	}
}

// MenuItem widget and the derived widgets are the only valid children for
// menus. Their function is to correctly handle highlighting, alignment,
// events and submenus.
//
// As a GtkMenuItem derives from Bin it can hold any valid child widget,
// although only a few are really useful.
//
// By default, a GtkMenuItem sets a AccelLabel as its child. GtkMenuItem has
// direct functions to set the label and its mnemonic. For more advanced label
// settings, you can fetch the child widget from the GtkBin.
//
// An example for setting markup and accelerator on a MenuItem:
//
//	menuitem
//	├── <child>
//	╰── [arrow.right]
//
// GtkMenuItem has a single CSS node with name menuitem. If the menuitem has
// a submenu, it gets another CSS node with name arrow, which has the .left or
// .right style class.
type MenuItem struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	Actionable
	Activatable
}

var (
	_ Binner            = (*MenuItem)(nil)
	_ coreglib.Objector = (*MenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuItem, *MenuItemClass, MenuItemOverrides](
		GTypeMenuItem,
		initMenuItemClass,
		wrapMenuItem,
		defaultMenuItemOverrides,
	)
}

func initMenuItemClass(gclass unsafe.Pointer, overrides MenuItemOverrides, classInitFunc func(*MenuItemClass)) {
	pclass := (*C.GtkMenuItemClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeMenuItem))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_activate)
	}

	if overrides.ActivateItem != nil {
		pclass.activate_item = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_activate_item)
	}

	if overrides.Deselect != nil {
		pclass.deselect = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_deselect)
	}

	if overrides.Label != nil {
		pclass.get_label = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_get_label)
	}

	if overrides.Select != nil {
		pclass._select = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_select)
	}

	if overrides.SetLabel != nil {
		pclass.set_label = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_set_label)
	}

	if overrides.ToggleSizeAllocate != nil {
		pclass.toggle_size_allocate = (*[0]byte)(C._gotk4_gtk3_MenuItemClass_toggle_size_allocate)
	}

	if classInitFunc != nil {
		class := (*MenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuItem(obj *coreglib.Object) *MenuItem {
	return &MenuItem{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		Actionable: Actionable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Activatable: Activatable{
			Object: obj,
		},
	}
}

func marshalMenuItem(p uintptr) (interface{}, error) {
	return wrapMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate is emitted when the item is activated.
func (menuItem *MenuItem) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "activate", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectActivate), f)
}

// ConnectActivateItem is emitted when the item is activated, but also if the
// menu item has a submenu. For normal applications, the relevant signal is
// MenuItem::activate.
func (menuItem *MenuItem) ConnectActivateItem(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "activate-item", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectActivateItem), f)
}

func (menuItem *MenuItem) ConnectDeselect(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "deselect", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectDeselect), f)
}

func (menuItem *MenuItem) ConnectSelect(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "select", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectSelect), f)
}

func (menuItem *MenuItem) ConnectToggleSizeAllocate(f func(object int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "toggle-size-allocate", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectToggleSizeAllocate), f)
}

func (menuItem *MenuItem) ConnectToggleSizeRequest(f func(object unsafe.Pointer)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuItem, "toggle-size-request", false, unsafe.Pointer(C._gotk4_gtk3_MenuItem_ConnectToggleSizeRequest), f)
}

// NewMenuItem creates a new MenuItem.
//
// The function returns the following values:
//
//   - menuItem: newly created MenuItem.
func NewMenuItem() *MenuItem {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_menu_item_new()

	var _menuItem *MenuItem // out

	_menuItem = wrapMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuItem
}

// NewMenuItemWithLabel creates a new MenuItem whose child is a Label.
//
// The function takes the following parameters:
//
//   - label: text for the label.
//
// The function returns the following values:
//
//   - menuItem: newly created MenuItem.
func NewMenuItemWithLabel(label string) *MenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_menu_item_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _menuItem *MenuItem // out

	_menuItem = wrapMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuItem
}

// NewMenuItemWithMnemonic creates a new MenuItem containing a label.
//
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the menu item.
//
// The function takes the following parameters:
//
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - menuItem: new MenuItem.
func NewMenuItemWithMnemonic(label string) *MenuItem {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_menu_item_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _menuItem *MenuItem // out

	_menuItem = wrapMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuItem
}

// Activate emits the MenuItem::activate signal on the given item.
func (menuItem *MenuItem) Activate() {
	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C.gtk_menu_item_activate(_arg0)
	runtime.KeepAlive(menuItem)
}

// Deselect emits the MenuItem::deselect signal on the given item.
func (menuItem *MenuItem) Deselect() {
	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C.gtk_menu_item_deselect(_arg0)
	runtime.KeepAlive(menuItem)
}

// AccelPath: retrieve the accelerator path that was previously set on
// menu_item.
//
// See gtk_menu_item_set_accel_path() for details.
//
// The function returns the following values:
//
//   - utf8 (optional): accelerator path corresponding to this menu item’s
//     functionality, or NULL if not set.
func (menuItem *MenuItem) AccelPath() string {
	var _arg0 *C.GtkMenuItem // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_accel_path(_arg0)
	runtime.KeepAlive(menuItem)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Label sets text on the menu_item label.
//
// The function returns the following values:
//
//   - utf8: text in the menu_item label. This is the internal string used by
//     the label, and must not be modified.
func (menuItem *MenuItem) Label() string {
	var _arg0 *C.GtkMenuItem // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_label(_arg0)
	runtime.KeepAlive(menuItem)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// ReserveIndicator returns whether the menu_item reserves space for the submenu
// indicator, regardless if it has a submenu or not.
//
// The function returns the following values:
//
//   - ok: TRUE if menu_item always reserves space for the submenu indicator.
func (menuItem *MenuItem) ReserveIndicator() bool {
	var _arg0 *C.GtkMenuItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_reserve_indicator(_arg0)
	runtime.KeepAlive(menuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RightJustified gets whether the menu item appears justified at the right side
// of the menu bar.
//
// Deprecated: See gtk_menu_item_set_right_justified().
//
// The function returns the following values:
//
//   - ok: TRUE if the menu item will appear at the far right if added to a menu
//     bar.
func (menuItem *MenuItem) RightJustified() bool {
	var _arg0 *C.GtkMenuItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_right_justified(_arg0)
	runtime.KeepAlive(menuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Submenu gets the submenu underneath this menu item, if any. See
// gtk_menu_item_set_submenu().
//
// The function returns the following values:
//
//   - widget (optional): submenu for this menu item, or NULL if none.
func (menuItem *MenuItem) Submenu() Widgetter {
	var _arg0 *C.GtkMenuItem // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_submenu(_arg0)
	runtime.KeepAlive(menuItem)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// UseUnderline checks if an underline in the text indicates the next character
// should be used for the mnemonic accelerator key.
//
// The function returns the following values:
//
//   - ok: TRUE if an embedded underline in the label indicates the mnemonic
//     accelerator key.
func (menuItem *MenuItem) UseUnderline() bool {
	var _arg0 *C.GtkMenuItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C.gtk_menu_item_get_use_underline(_arg0)
	runtime.KeepAlive(menuItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Select emits the MenuItem::select signal on the given item.
func (menuItem *MenuItem) Select() {
	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C.gtk_menu_item_select(_arg0)
	runtime.KeepAlive(menuItem)
}

// SetAccelPath: set the accelerator path on menu_item, through which runtime
// changes of the menu item’s accelerator caused by the user can be identified
// and saved to persistent storage (see gtk_accel_map_save() on this). To set
// up a default accelerator for this menu item, call gtk_accel_map_add_entry()
// with the same accel_path. See also gtk_accel_map_add_entry() on the specifics
// of accelerator paths, and gtk_menu_set_accel_path() for a more convenient
// variant of this function.
//
// This function is basically a convenience wrapper that handles calling
// gtk_widget_set_accel_path() with the appropriate accelerator group for the
// menu item.
//
// Note that you do need to set an accelerator on the parent menu with
// gtk_menu_set_accel_group() for this to work.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath (optional): accelerator path, corresponding to this menu item’s
//     functionality, or NULL to unset the current path.
func (menuItem *MenuItem) SetAccelPath(accelPath string) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if accelPath != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_menu_item_set_accel_path(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(accelPath)
}

// SetLabel sets text on the menu_item label.
//
// The function takes the following parameters:
//
//   - label: text you want to set.
func (menuItem *MenuItem) SetLabel(label string) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_menu_item_set_label(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(label)
}

// SetReserveIndicator sets whether the menu_item should reserve space for the
// submenu indicator, regardless if it actually has a submenu or not.
//
// There should be little need for applications to call this functions.
//
// The function takes the following parameters:
//
//   - reserve: new value.
func (menuItem *MenuItem) SetReserveIndicator(reserve bool) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if reserve {
		_arg1 = C.TRUE
	}

	C.gtk_menu_item_set_reserve_indicator(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(reserve)
}

// SetRightJustified sets whether the menu item appears justified at the right
// side of a menu bar. This was traditionally done for “Help” menu items,
// but is now considered a bad idea. (If the widget layout is reversed for a
// right-to-left language like Hebrew or Arabic, right-justified-menu-items
// appear at the left.)
//
// Deprecated: If you insist on using it, use gtk_widget_set_hexpand() and
// gtk_widget_set_halign().
//
// The function takes the following parameters:
//
//   - rightJustified: if TRUE the menu item will appear at the far right if
//     added to a menu bar.
func (menuItem *MenuItem) SetRightJustified(rightJustified bool) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if rightJustified {
		_arg1 = C.TRUE
	}

	C.gtk_menu_item_set_right_justified(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(rightJustified)
}

// SetSubmenu sets or replaces the menu item’s submenu, or removes it when a
// NULL submenu is passed.
//
// The function takes the following parameters:
//
//   - submenu (optional): submenu, or NULL.
func (menuItem *MenuItem) SetSubmenu(submenu *Menu) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 *C.GtkWidget   // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if submenu != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(submenu).Native()))
	}

	C.gtk_menu_item_set_submenu(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(submenu)
}

// SetUseUnderline: if true, an underline in the text indicates the next
// character should be used for the mnemonic accelerator key.
//
// The function takes the following parameters:
//
//   - setting: TRUE if underlines in the text indicate mnemonics.
func (menuItem *MenuItem) SetUseUnderline(setting bool) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_menu_item_set_use_underline(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(setting)
}

// ToggleSizeAllocate emits the MenuItem::toggle-size-allocate signal on the
// given item.
//
// The function takes the following parameters:
//
//   - allocation to use as signal data.
func (menuItem *MenuItem) ToggleSizeAllocate(allocation int) {
	var _arg0 *C.GtkMenuItem // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	_arg1 = C.gint(allocation)

	C.gtk_menu_item_toggle_size_allocate(_arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(allocation)
}

// Activate emits the MenuItem::activate signal on the given item.
func (menuItem *MenuItem) activate() {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.activate

	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C._gotk4_gtk3_MenuItem_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuItem)
}

// activateItem: signal emitted when the item is activated, but also if the menu
// item has a submenu.
func (menuItem *MenuItem) activateItem() {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.activate_item

	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C._gotk4_gtk3_MenuItem_virtual_activate_item(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuItem)
}

// Deselect emits the MenuItem::deselect signal on the given item.
func (menuItem *MenuItem) deselect() {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.deselect

	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C._gotk4_gtk3_MenuItem_virtual_deselect(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuItem)
}

// Label sets text on the menu_item label.
//
// The function returns the following values:
//
//   - utf8: text in the menu_item label. This is the internal string used by
//     the label, and must not be modified.
func (menuItem *MenuItem) label() string {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.get_label

	var _arg0 *C.GtkMenuItem // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	_cret = C._gotk4_gtk3_MenuItem_virtual_get_label(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuItem)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Sel emits the MenuItem::select signal on the given item.
func (menuItem *MenuItem) sel() {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass._select

	var _arg0 *C.GtkMenuItem // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C._gotk4_gtk3_MenuItem_virtual_select(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuItem)
}

// setLabel sets text on the menu_item label.
//
// The function takes the following parameters:
//
//   - label: text you want to set.
func (menuItem *MenuItem) setLabel(label string) {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.set_label

	var _arg0 *C.GtkMenuItem // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_MenuItem_virtual_set_label(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(label)
}

// toggleSizeAllocate emits the MenuItem::toggle-size-allocate signal on the
// given item.
//
// The function takes the following parameters:
//
//   - allocation to use as signal data.
func (menuItem *MenuItem) toggleSizeAllocate(allocation int) {
	gclass := (*C.GtkMenuItemClass)(coreglib.PeekParentClass(menuItem))
	fnarg := gclass.toggle_size_allocate

	var _arg0 *C.GtkMenuItem // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkMenuItem)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	_arg1 = C.gint(allocation)

	C._gotk4_gtk3_MenuItem_virtual_toggle_size_allocate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(allocation)
}

// MenuItemAccessibleOverrides contains methods that are overridable.
type MenuItemAccessibleOverrides struct {
}

func defaultMenuItemAccessibleOverrides(v *MenuItemAccessible) MenuItemAccessibleOverrides {
	return MenuItemAccessibleOverrides{}
}

type MenuItemAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	*coreglib.Object
	atk.Action
	atk.Selection
}

var (
	_ coreglib.Objector = (*MenuItemAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuItemAccessible, *MenuItemAccessibleClass, MenuItemAccessibleOverrides](
		GTypeMenuItemAccessible,
		initMenuItemAccessibleClass,
		wrapMenuItemAccessible,
		defaultMenuItemAccessibleOverrides,
	)
}

func initMenuItemAccessibleClass(gclass unsafe.Pointer, overrides MenuItemAccessibleOverrides, classInitFunc func(*MenuItemAccessibleClass)) {
	if classInitFunc != nil {
		class := (*MenuItemAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuItemAccessible(obj *coreglib.Object) *MenuItemAccessible {
	return &MenuItemAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Object: obj,
		Action: atk.Action{
			Object: obj,
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalMenuItemAccessible(p uintptr) (interface{}, error) {
	return wrapMenuItemAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// MenuShellOverrides contains methods that are overridable.
type MenuShellOverrides struct {
	ActivateCurrent func(forceHide bool)
	// Cancel cancels the selection within the menu shell.
	Cancel func()
	// Deactivate deactivates the menu shell.
	//
	// Typically this results in the menu shell being erased from the screen.
	Deactivate func()
	PopupDelay func() int
	// Insert adds a new MenuItem to the menu shell’s item list at the position
	// indicated by position.
	//
	// The function takes the following parameters:
	//
	//   - child to add.
	//   - position in the item list where child is added. Positions are
	//     numbered from 0 to n-1.
	Insert       func(child Widgetter, position int)
	MoveCurrent  func(direction MenuDirectionType)
	MoveSelected func(distance int) bool
	// SelectItem selects the menu item from the menu shell.
	//
	// The function takes the following parameters:
	//
	//   - menuItem to select.
	SelectItem    func(menuItem Widgetter)
	SelectionDone func()
}

func defaultMenuShellOverrides(v *MenuShell) MenuShellOverrides {
	return MenuShellOverrides{
		ActivateCurrent: v.activateCurrent,
		Cancel:          v.cancel,
		Deactivate:      v.deactivate,
		PopupDelay:      v.popupDelay,
		Insert:          v.insert,
		MoveCurrent:     v.moveCurrent,
		MoveSelected:    v.moveSelected,
		SelectItem:      v.selectItem,
		SelectionDone:   v.selectionDone,
	}
}

// MenuShell is the abstract base class used to derive the Menu and MenuBar
// subclasses.
//
// A MenuShell is a container of MenuItem objects arranged in a list which can
// be navigated, selected, and activated by the user to perform application
// functions. A MenuItem can have a submenu associated with it, allowing for
// nested hierarchical menus.
//
// # Terminology
//
// A menu item can be “selected”, this means that it is displayed in the
// prelight state, and if it has a submenu, that submenu will be popped up.
//
// A menu is “active” when it is visible onscreen and the user is selecting from
// it. A menubar is not active until the user clicks on one of its menuitems.
// When a menu is active, passing the mouse over a submenu will pop it up.
//
// There is also is a concept of the current menu and a current menu item.
// The current menu item is the selected menu item that is furthest down in the
// hierarchy. (Every active menu shell does not necessarily contain a selected
// menu item, but if it does, then the parent menu shell must also contain a
// selected menu item.) The current menu is the menu that contains the current
// menu item. It will always have a GTK grab and receive all key presses.
type MenuShell struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*MenuShell)(nil)
)

// MenuSheller describes types inherited from class MenuShell.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type MenuSheller interface {
	coreglib.Objector
	baseMenuShell() *MenuShell
}

var _ MenuSheller = (*MenuShell)(nil)

func init() {
	coreglib.RegisterClassInfo[*MenuShell, *MenuShellClass, MenuShellOverrides](
		GTypeMenuShell,
		initMenuShellClass,
		wrapMenuShell,
		defaultMenuShellOverrides,
	)
}

func initMenuShellClass(gclass unsafe.Pointer, overrides MenuShellOverrides, classInitFunc func(*MenuShellClass)) {
	pclass := (*C.GtkMenuShellClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeMenuShell))))

	if overrides.ActivateCurrent != nil {
		pclass.activate_current = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_activate_current)
	}

	if overrides.Cancel != nil {
		pclass.cancel = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_cancel)
	}

	if overrides.Deactivate != nil {
		pclass.deactivate = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_deactivate)
	}

	if overrides.PopupDelay != nil {
		pclass.get_popup_delay = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_get_popup_delay)
	}

	if overrides.Insert != nil {
		pclass.insert = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_insert)
	}

	if overrides.MoveCurrent != nil {
		pclass.move_current = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_move_current)
	}

	if overrides.MoveSelected != nil {
		pclass.move_selected = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_move_selected)
	}

	if overrides.SelectItem != nil {
		pclass.select_item = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_select_item)
	}

	if overrides.SelectionDone != nil {
		pclass.selection_done = (*[0]byte)(C._gotk4_gtk3_MenuShellClass_selection_done)
	}

	if classInitFunc != nil {
		class := (*MenuShellClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuShell(obj *coreglib.Object) *MenuShell {
	return &MenuShell{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalMenuShell(p uintptr) (interface{}, error) {
	return wrapMenuShell(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (menuShell *MenuShell) baseMenuShell() *MenuShell {
	return menuShell
}

// BaseMenuShell returns the underlying base object.
func BaseMenuShell(obj MenuSheller) *MenuShell {
	return obj.baseMenuShell()
}

// ConnectActivateCurrent: action signal that activates the current menu item
// within the menu shell.
func (menuShell *MenuShell) ConnectActivateCurrent(f func(forceHide bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "activate-current", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectActivateCurrent), f)
}

// ConnectCancel: action signal which cancels the selection within the menu
// shell. Causes the MenuShell::selection-done signal to be emitted.
func (menuShell *MenuShell) ConnectCancel(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "cancel", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectCancel), f)
}

// ConnectCycleFocus: keybinding signal which moves the focus in the given
// direction.
func (menuShell *MenuShell) ConnectCycleFocus(f func(direction DirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "cycle-focus", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectCycleFocus), f)
}

// ConnectDeactivate: this signal is emitted when a menu shell is deactivated.
func (menuShell *MenuShell) ConnectDeactivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "deactivate", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectDeactivate), f)
}

// ConnectInsert signal is emitted when a new MenuItem is added to a MenuShell.
// A separate signal is used instead of GtkContainer::add because of the need
// for an additional position parameter.
//
// The inverse of this signal is the GtkContainer::removed signal.
func (menuShell *MenuShell) ConnectInsert(f func(child Widgetter, position int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "insert", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectInsert), f)
}

// ConnectMoveCurrent: keybinding signal which moves the current menu item in
// the direction specified by direction.
func (menuShell *MenuShell) ConnectMoveCurrent(f func(direction MenuDirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "move-current", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectMoveCurrent), f)
}

// ConnectMoveSelected signal is emitted to move the selection to another item.
func (menuShell *MenuShell) ConnectMoveSelected(f func(distance int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "move-selected", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectMoveSelected), f)
}

// ConnectSelectionDone: this signal is emitted when a selection has been
// completed within a menu shell.
func (menuShell *MenuShell) ConnectSelectionDone(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(menuShell, "selection-done", false, unsafe.Pointer(C._gotk4_gtk3_MenuShell_ConnectSelectionDone), f)
}

// ActivateItem activates the menu item within the menu shell.
//
// The function takes the following parameters:
//
//   - menuItem to activate.
//   - forceDeactivate: if TRUE, force the deactivation of the menu shell after
//     the menu item is activated.
func (menuShell *MenuShell) ActivateItem(menuItem Widgetter, forceDeactivate bool) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	if forceDeactivate {
		_arg2 = C.TRUE
	}

	C.gtk_menu_shell_activate_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(menuItem)
	runtime.KeepAlive(forceDeactivate)
}

// Append adds a new MenuItem to the end of the menu shell's item list.
//
// The function takes the following parameters:
//
//   - child to add.
func (menuShell *MenuShell) Append(child *MenuItem) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_menu_shell_append(_arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(child)
}

// BindModel establishes a binding between a MenuShell and a Model.
//
// The contents of shell are removed and then refilled with menu items according
// to model. When model changes, shell is updated. Calling this function twice
// on shell with different model will cause the first binding to be replaced
// with a binding to the new model. If model is NULL then any previous binding
// is undone and all children are removed.
//
// with_separators determines if toplevel items (eg: sections) have separators
// inserted between them. This is typically desired for menus but doesn’t make
// sense for menubars.
//
// If action_namespace is non-NULL then the effect is as if all actions
// mentioned in the model have their names prefixed with the namespace, plus a
// dot. For example, if the action “quit” is mentioned and action_namespace is
// “app” then the effective action name is “app.quit”.
//
// This function uses Actionable to define the action name and target values on
// the created menu items. If you want to use an action group other than “app”
// and “win”, or if you want to use a MenuShell outside of a ApplicationWindow,
// then you will need to attach your own action group to the widget hierarchy
// using gtk_widget_insert_action_group(). As an example, if you created a group
// with a “quit” action and inserted it with the name “mygroup” then you would
// use the action name “mygroup.quit” in your Model.
//
// For most cases you are probably better off using gtk_menu_new_from_model()
// or gtk_menu_bar_new_from_model() or just directly passing the Model to
// gtk_application_set_app_menu() or gtk_application_set_menubar().
//
// The function takes the following parameters:
//
//   - model (optional) to bind to or NULL to remove binding.
//   - actionNamespace (optional): namespace for actions in model.
//   - withSeparators: TRUE if toplevel items in shell should have separators
//     between them.
func (menuShell *MenuShell) BindModel(model gio.MenuModeller, actionNamespace string, withSeparators bool) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GMenuModel   // out
	var _arg2 *C.gchar        // out
	var _arg3 C.gboolean      // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	if model != nil {
		_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}
	if actionNamespace != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(actionNamespace)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if withSeparators {
		_arg3 = C.TRUE
	}

	C.gtk_menu_shell_bind_model(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(model)
	runtime.KeepAlive(actionNamespace)
	runtime.KeepAlive(withSeparators)
}

// Cancel cancels the selection within the menu shell.
func (menuShell *MenuShell) Cancel() {
	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C.gtk_menu_shell_cancel(_arg0)
	runtime.KeepAlive(menuShell)
}

// Deactivate deactivates the menu shell.
//
// Typically this results in the menu shell being erased from the screen.
func (menuShell *MenuShell) Deactivate() {
	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C.gtk_menu_shell_deactivate(_arg0)
	runtime.KeepAlive(menuShell)
}

// Deselect deselects the currently selected item from the menu shell, if any.
func (menuShell *MenuShell) Deselect() {
	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C.gtk_menu_shell_deselect(_arg0)
	runtime.KeepAlive(menuShell)
}

// ParentShell gets the parent menu shell.
//
// The parent menu shell of a submenu is the Menu or MenuBar from which it was
// opened up.
//
// The function returns the following values:
//
//   - widget: parent MenuShell.
func (menuShell *MenuShell) ParentShell() Widgetter {
	var _arg0 *C.GtkMenuShell // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	_cret = C.gtk_menu_shell_get_parent_shell(_arg0)
	runtime.KeepAlive(menuShell)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SelectedItem gets the currently selected item.
//
// The function returns the following values:
//
//   - widget: currently selected item.
func (menuShell *MenuShell) SelectedItem() Widgetter {
	var _arg0 *C.GtkMenuShell // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	_cret = C.gtk_menu_shell_get_selected_item(_arg0)
	runtime.KeepAlive(menuShell)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// TakeFocus returns TRUE if the menu shell will take the keyboard focus on
// popup.
//
// The function returns the following values:
//
//   - ok: TRUE if the menu shell will take the keyboard focus on popup.
func (menuShell *MenuShell) TakeFocus() bool {
	var _arg0 *C.GtkMenuShell // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	_cret = C.gtk_menu_shell_get_take_focus(_arg0)
	runtime.KeepAlive(menuShell)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Insert adds a new MenuItem to the menu shell’s item list at the position
// indicated by position.
//
// The function takes the following parameters:
//
//   - child to add.
//   - position in the item list where child is added. Positions are numbered
//     from 0 to n-1.
func (menuShell *MenuShell) Insert(child Widgetter, position int) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gint          // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C.gtk_menu_shell_insert(_arg0, _arg1, _arg2)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

// Prepend adds a new MenuItem to the beginning of the menu shell's item list.
//
// The function takes the following parameters:
//
//   - child to add.
func (menuShell *MenuShell) Prepend(child Widgetter) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_menu_shell_prepend(_arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(child)
}

// SelectFirst: select the first visible or selectable child of the menu shell;
// don’t select tearoff items unless the only item is a tearoff item.
//
// The function takes the following parameters:
//
//   - searchSensitive: if TRUE, search for the first selectable menu item,
//     otherwise select nothing if the first item isn’t sensitive. This should
//     be FALSE if the menu is being popped up initially.
func (menuShell *MenuShell) SelectFirst(searchSensitive bool) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	if searchSensitive {
		_arg1 = C.TRUE
	}

	C.gtk_menu_shell_select_first(_arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(searchSensitive)
}

// SelectItem selects the menu item from the menu shell.
//
// The function takes the following parameters:
//
//   - menuItem to select.
func (menuShell *MenuShell) SelectItem(menuItem Widgetter) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C.gtk_menu_shell_select_item(_arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(menuItem)
}

// SetTakeFocus: if take_focus is TRUE (the default) the menu shell will take
// the keyboard focus so that it will receive all keyboard events which is
// needed to enable keyboard navigation in menus.
//
// Setting take_focus to FALSE is useful only for special applications like
// virtual keyboard implementations which should not take keyboard focus.
//
// The take_focus state of a menu or menu bar is automatically propagated
// to submenus whenever a submenu is popped up, so you don’t have to worry
// about recursively setting it for your entire menu hierarchy. Only when
// programmatically picking a submenu and popping it up manually, the take_focus
// property of the submenu needs to be set explicitly.
//
// Note that setting it to FALSE has side-effects:
//
// If the focus is in some other app, it keeps the focus and keynav in the menu
// doesn’t work. Consequently, keynav on the menu will only work if the focus is
// on some toplevel owned by the onscreen keyboard.
//
// To avoid confusing the user, menus with take_focus set to FALSE should not
// display mnemonics or accelerators, since it cannot be guaranteed that they
// will work.
//
// See also gdk_keyboard_grab().
//
// The function takes the following parameters:
//
//   - takeFocus: TRUE if the menu shell should take the keyboard focus on
//     popup.
func (menuShell *MenuShell) SetTakeFocus(takeFocus bool) {
	var _arg0 *C.GtkMenuShell // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	if takeFocus {
		_arg1 = C.TRUE
	}

	C.gtk_menu_shell_set_take_focus(_arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(takeFocus)
}

func (menuShell *MenuShell) activateCurrent(forceHide bool) {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.activate_current

	var _arg0 *C.GtkMenuShell // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	if forceHide {
		_arg1 = C.TRUE
	}

	C._gotk4_gtk3_MenuShell_virtual_activate_current(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(forceHide)
}

// Cancel cancels the selection within the menu shell.
func (menuShell *MenuShell) cancel() {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.cancel

	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C._gotk4_gtk3_MenuShell_virtual_cancel(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuShell)
}

// Deactivate deactivates the menu shell.
//
// Typically this results in the menu shell being erased from the screen.
func (menuShell *MenuShell) deactivate() {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.deactivate

	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C._gotk4_gtk3_MenuShell_virtual_deactivate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuShell)
}

func (menuShell *MenuShell) popupDelay() int {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.get_popup_delay

	var _arg0 *C.GtkMenuShell // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	_cret = C._gotk4_gtk3_MenuShell_virtual_get_popup_delay(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuShell)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Insert adds a new MenuItem to the menu shell’s item list at the position
// indicated by position.
//
// The function takes the following parameters:
//
//   - child to add.
//   - position in the item list where child is added. Positions are numbered
//     from 0 to n-1.
func (menuShell *MenuShell) insert(child Widgetter, position int) {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.insert

	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out
	var _arg2 C.gint          // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C._gotk4_gtk3_MenuShell_virtual_insert(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

func (menuShell *MenuShell) moveCurrent(direction MenuDirectionType) {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.move_current

	var _arg0 *C.GtkMenuShell        // out
	var _arg1 C.GtkMenuDirectionType // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = C.GtkMenuDirectionType(direction)

	C._gotk4_gtk3_MenuShell_virtual_move_current(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(direction)
}

func (menuShell *MenuShell) moveSelected(distance int) bool {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.move_selected

	var _arg0 *C.GtkMenuShell // out
	var _arg1 C.gint          // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = C.gint(distance)

	_cret = C._gotk4_gtk3_MenuShell_virtual_move_selected(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(distance)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// selectItem selects the menu item from the menu shell.
//
// The function takes the following parameters:
//
//   - menuItem to select.
func (menuShell *MenuShell) selectItem(menuItem Widgetter) {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.select_item

	var _arg0 *C.GtkMenuShell // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))

	C._gotk4_gtk3_MenuShell_virtual_select_item(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(menuShell)
	runtime.KeepAlive(menuItem)
}

func (menuShell *MenuShell) selectionDone() {
	gclass := (*C.GtkMenuShellClass)(coreglib.PeekParentClass(menuShell))
	fnarg := gclass.selection_done

	var _arg0 *C.GtkMenuShell // out

	_arg0 = (*C.GtkMenuShell)(unsafe.Pointer(coreglib.InternObject(menuShell).Native()))

	C._gotk4_gtk3_MenuShell_virtual_selection_done(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(menuShell)
}

// MenuShellAccessibleOverrides contains methods that are overridable.
type MenuShellAccessibleOverrides struct {
}

func defaultMenuShellAccessibleOverrides(v *MenuShellAccessible) MenuShellAccessibleOverrides {
	return MenuShellAccessibleOverrides{}
}

type MenuShellAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Selection
}

var (
	_ coreglib.Objector = (*MenuShellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuShellAccessible, *MenuShellAccessibleClass, MenuShellAccessibleOverrides](
		GTypeMenuShellAccessible,
		initMenuShellAccessibleClass,
		wrapMenuShellAccessible,
		defaultMenuShellAccessibleOverrides,
	)
}

func initMenuShellAccessibleClass(gclass unsafe.Pointer, overrides MenuShellAccessibleOverrides, classInitFunc func(*MenuShellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*MenuShellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuShellAccessible(obj *coreglib.Object) *MenuShellAccessible {
	return &MenuShellAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalMenuShellAccessible(p uintptr) (interface{}, error) {
	return wrapMenuShellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// MenuToolButtonOverrides contains methods that are overridable.
type MenuToolButtonOverrides struct {
	// ShowMenu: signal emitted before the menu is shown.
	ShowMenu func()
}

func defaultMenuToolButtonOverrides(v *MenuToolButton) MenuToolButtonOverrides {
	return MenuToolButtonOverrides{
		ShowMenu: v.showMenu,
	}
}

// MenuToolButton is a ToolItem that contains a button and a small additional
// button with an arrow. When clicked, the arrow button pops up a dropdown menu.
//
// Use gtk_menu_tool_button_new() to create a new MenuToolButton.
//
// # GtkMenuToolButton as GtkBuildable
//
// The GtkMenuToolButton implementation of the GtkBuildable interface supports
// adding a menu by specifying “menu” as the “type” attribute of a <child>
// element.
//
// An example for a UI definition fragment with menus:
//
//	<object class="GtkMenuToolButton">
//	  <child type="menu">
//	    <object class="GtkMenu"/>
//	  </child>
//	</object>.
type MenuToolButton struct {
	_ [0]func() // equal guard
	ToolButton
}

var (
	_ coreglib.Objector = (*MenuToolButton)(nil)
	_ Binner            = (*MenuToolButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MenuToolButton, *MenuToolButtonClass, MenuToolButtonOverrides](
		GTypeMenuToolButton,
		initMenuToolButtonClass,
		wrapMenuToolButton,
		defaultMenuToolButtonOverrides,
	)
}

func initMenuToolButtonClass(gclass unsafe.Pointer, overrides MenuToolButtonOverrides, classInitFunc func(*MenuToolButtonClass)) {
	pclass := (*C.GtkMenuToolButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeMenuToolButton))))

	if overrides.ShowMenu != nil {
		pclass.show_menu = (*[0]byte)(C._gotk4_gtk3_MenuToolButtonClass_show_menu)
	}

	if classInitFunc != nil {
		class := (*MenuToolButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMenuToolButton(obj *coreglib.Object) *MenuToolButton {
	return &MenuToolButton{
		ToolButton: ToolButton{
			ToolItem: ToolItem{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Activatable: Activatable{
					Object: obj,
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalMenuToolButton(p uintptr) (interface{}, error) {
	return wrapMenuToolButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectShowMenu signal is emitted before the menu is shown.
//
// It can be used to populate the menu on demand, using
// gtk_menu_tool_button_set_menu().
//
// Note that even if you populate the menu dynamically in this way, you must
// set an empty menu on the MenuToolButton beforehand, since the arrow is made
// insensitive if the menu is not set.
func (button *MenuToolButton) ConnectShowMenu(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "show-menu", false, unsafe.Pointer(C._gotk4_gtk3_MenuToolButton_ConnectShowMenu), f)
}

// NewMenuToolButton creates a new MenuToolButton using icon_widget as icon and
// label as label.
//
// The function takes the following parameters:
//
//   - iconWidget (optional): widget that will be used as icon widget, or NULL.
//   - label (optional): string that will be used as label, or NULL.
//
// The function returns the following values:
//
//   - menuToolButton: new MenuToolButton.
func NewMenuToolButton(iconWidget Widgetter, label string) *MenuToolButton {
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	if iconWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(iconWidget).Native()))
	}
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_menu_tool_button_new(_arg1, _arg2)
	runtime.KeepAlive(iconWidget)
	runtime.KeepAlive(label)

	var _menuToolButton *MenuToolButton // out

	_menuToolButton = wrapMenuToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuToolButton
}

// NewMenuToolButtonFromStock creates a new MenuToolButton. The new
// MenuToolButton will contain an icon and label from the stock item indicated
// by stock_id.
//
// Deprecated: Use gtk_menu_tool_button_new() instead.
//
// The function takes the following parameters:
//
//   - stockId: name of a stock item.
//
// The function returns the following values:
//
//   - menuToolButton: new MenuToolButton.
func NewMenuToolButtonFromStock(stockId string) *MenuToolButton {
	var _arg1 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_menu_tool_button_new_from_stock(_arg1)
	runtime.KeepAlive(stockId)

	var _menuToolButton *MenuToolButton // out

	_menuToolButton = wrapMenuToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _menuToolButton
}

// Menu gets the Menu associated with MenuToolButton.
//
// The function returns the following values:
//
//   - widget associated with MenuToolButton.
func (button *MenuToolButton) Menu() Widgetter {
	var _arg0 *C.GtkMenuToolButton // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkMenuToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_menu_tool_button_get_menu(_arg0)
	runtime.KeepAlive(button)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetArrowTooltipMarkup sets the tooltip markup text to be used as tooltip for
// the arrow button which pops up the menu. See gtk_tool_item_set_tooltip_text()
// for setting a tooltip on the whole MenuToolButton.
//
// The function takes the following parameters:
//
//   - markup text to be used as tooltip text for button’s arrow button.
func (button *MenuToolButton) SetArrowTooltipMarkup(markup string) {
	var _arg0 *C.GtkMenuToolButton // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkMenuToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_menu_tool_button_set_arrow_tooltip_markup(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(markup)
}

// SetArrowTooltipText sets the tooltip text to be used as tooltip for the
// arrow button which pops up the menu. See gtk_tool_item_set_tooltip_text() for
// setting a tooltip on the whole MenuToolButton.
//
// The function takes the following parameters:
//
//   - text to be used as tooltip text for button’s arrow button.
func (button *MenuToolButton) SetArrowTooltipText(text string) {
	var _arg0 *C.GtkMenuToolButton // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkMenuToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_menu_tool_button_set_arrow_tooltip_text(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(text)
}

// SetMenu sets the Menu that is popped up when the user clicks on the arrow.
// If menu is NULL, the arrow button becomes insensitive.
//
// The function takes the following parameters:
//
//   - menu associated with MenuToolButton.
func (button *MenuToolButton) SetMenu(menu Widgetter) {
	var _arg0 *C.GtkMenuToolButton // out
	var _arg1 *C.GtkWidget         // out

	_arg0 = (*C.GtkMenuToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	C.gtk_menu_tool_button_set_menu(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(menu)
}

// showMenu: signal emitted before the menu is shown.
func (button *MenuToolButton) showMenu() {
	gclass := (*C.GtkMenuToolButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.show_menu

	var _arg0 *C.GtkMenuToolButton // out

	_arg0 = (*C.GtkMenuToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_MenuToolButton_virtual_show_menu(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// MessageDialogOverrides contains methods that are overridable.
type MessageDialogOverrides struct {
}

func defaultMessageDialogOverrides(v *MessageDialog) MessageDialogOverrides {
	return MessageDialogOverrides{}
}

// MessageDialog presents a dialog with some message text. It’s simply a
// convenience widget; you could construct the equivalent of MessageDialog from
// Dialog without too much effort, but MessageDialog saves typing.
//
// One difference from Dialog is that MessageDialog sets the
// Window:skip-taskbar-hint property to TRUE, so that the dialog is hidden from
// the taskbar by default.
//
// The easiest way to do a modal message dialog is to use gtk_dialog_run(),
// though you can also pass in the GTK_DIALOG_MODAL flag, gtk_dialog_run()
// automatically makes the dialog modal and waits for the user to respond to it.
// gtk_dialog_run() returns when any dialog button is clicked.
//
// An example for using a modal dialog:
//
//	GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
//	dialog = gtk_message_dialog_new (parent_window,
//	                                 flags,
//	                                 GTK_MESSAGE_ERROR,
//	                                 GTK_BUTTONS_CLOSE,
//	                                 "Error reading “s”: s",
//	                                 filename,
//	                                 g_strerror (errno));
//
//	// Destroy the dialog when the user responds to it
//	// (e.g. clicks a button)
//
//	g_signal_connect_swapped (dialog, "response",
//	                          G_CALLBACK (gtk_widget_destroy),
//	                          dialog);
//
// # GtkMessageDialog as GtkBuildable
//
// The GtkMessageDialog implementation of the GtkBuildable interface exposes the
// message area as an internal child with the name “message_area”.
type MessageDialog struct {
	_ [0]func() // equal guard
	Dialog
}

var (
	_ Binner = (*MessageDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MessageDialog, *MessageDialogClass, MessageDialogOverrides](
		GTypeMessageDialog,
		initMessageDialogClass,
		wrapMessageDialog,
		defaultMessageDialogOverrides,
	)
}

func initMessageDialogClass(gclass unsafe.Pointer, overrides MessageDialogOverrides, classInitFunc func(*MessageDialogClass)) {
	if classInitFunc != nil {
		class := (*MessageDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMessageDialog(obj *coreglib.Object) *MessageDialog {
	return &MessageDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
	}
}

func marshalMessageDialog(p uintptr) (interface{}, error) {
	return wrapMessageDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// Image gets the dialog’s image.
//
// Deprecated: Use Dialog for dialogs with images.
//
// The function returns the following values:
//
//   - widget dialog’s image.
func (dialog *MessageDialog) Image() Widgetter {
	var _arg0 *C.GtkMessageDialog // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkMessageDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))

	_cret = C.gtk_message_dialog_get_image(_arg0)
	runtime.KeepAlive(dialog)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// MessageArea returns the message area of the dialog. This is the box where
// the dialog’s primary and secondary labels are packed. You can add your
// own extra content to that box and it will appear below those labels. See
// gtk_dialog_get_content_area() for the corresponding function in the parent
// Dialog.
//
// The function returns the following values:
//
//   - widget corresponding to the “message area” in the message_dialog.
func (messageDialog *MessageDialog) MessageArea() Widgetter {
	var _arg0 *C.GtkMessageDialog // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkMessageDialog)(unsafe.Pointer(coreglib.InternObject(messageDialog).Native()))

	_cret = C.gtk_message_dialog_get_message_area(_arg0)
	runtime.KeepAlive(messageDialog)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetImage sets the dialog’s image to image.
//
// Deprecated: Use Dialog to create dialogs with images.
//
// The function takes the following parameters:
//
//   - image: image.
func (dialog *MessageDialog) SetImage(image Widgetter) {
	var _arg0 *C.GtkMessageDialog // out
	var _arg1 *C.GtkWidget        // out

	_arg0 = (*C.GtkMessageDialog)(unsafe.Pointer(coreglib.InternObject(dialog).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(image).Native()))

	C.gtk_message_dialog_set_image(_arg0, _arg1)
	runtime.KeepAlive(dialog)
	runtime.KeepAlive(image)
}

// SetMarkup sets the text of the message dialog to be str, which is marked up
// with the [Pango text markup language][PangoMarkupFormat].
//
// The function takes the following parameters:
//
//   - str: markup string (see [Pango markup format][PangoMarkupFormat]).
func (messageDialog *MessageDialog) SetMarkup(str string) {
	var _arg0 *C.GtkMessageDialog // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkMessageDialog)(unsafe.Pointer(coreglib.InternObject(messageDialog).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_message_dialog_set_markup(_arg0, _arg1)
	runtime.KeepAlive(messageDialog)
	runtime.KeepAlive(str)
}

// MiscOverrides contains methods that are overridable.
type MiscOverrides struct {
}

func defaultMiscOverrides(v *Misc) MiscOverrides {
	return MiscOverrides{}
}

// Misc widget is an abstract widget which is not useful itself, but is used to
// derive subclasses which have alignment and padding attributes.
//
// The horizontal and vertical padding attributes allows extra space to be added
// around the widget.
//
// The horizontal and vertical alignment attributes enable the widget to be
// positioned within its allocated area. Note that if the widget is added to a
// container in such a way that it expands automatically to fill its allocated
// area, the alignment settings will not alter the widget's position.
//
// Note that the desired effect can in most cases be achieved by using the
// Widget:halign, Widget:valign and Widget:margin properties on the child
// widget, so GtkMisc should not be used in new code. To reflect this fact,
// all Misc API has been deprecated.
type Misc struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Misc)(nil)
)

// Miscer describes types inherited from class Misc.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Miscer interface {
	coreglib.Objector
	baseMisc() *Misc
}

var _ Miscer = (*Misc)(nil)

func init() {
	coreglib.RegisterClassInfo[*Misc, *MiscClass, MiscOverrides](
		GTypeMisc,
		initMiscClass,
		wrapMisc,
		defaultMiscOverrides,
	)
}

func initMiscClass(gclass unsafe.Pointer, overrides MiscOverrides, classInitFunc func(*MiscClass)) {
	if classInitFunc != nil {
		class := (*MiscClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMisc(obj *coreglib.Object) *Misc {
	return &Misc{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalMisc(p uintptr) (interface{}, error) {
	return wrapMisc(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (misc *Misc) baseMisc() *Misc {
	return misc
}

// BaseMisc returns the underlying base object.
func BaseMisc(obj Miscer) *Misc {
	return obj.baseMisc()
}

// Alignment gets the X and Y alignment of the widget within its allocation.
// See gtk_misc_set_alignment().
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function returns the following values:
//
//   - xalign (optional): location to store X alignment of misc, or NULL.
//   - yalign (optional): location to store Y alignment of misc, or NULL.
func (misc *Misc) Alignment() (xalign, yalign float32) {
	var _arg0 *C.GtkMisc // out
	var _arg1 C.gfloat   // in
	var _arg2 C.gfloat   // in

	_arg0 = (*C.GtkMisc)(unsafe.Pointer(coreglib.InternObject(misc).Native()))

	C.gtk_misc_get_alignment(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(misc)

	var _xalign float32 // out
	var _yalign float32 // out

	_xalign = float32(_arg1)
	_yalign = float32(_arg2)

	return _xalign, _yalign
}

// Padding gets the padding in the X and Y directions of the widget. See
// gtk_misc_set_padding().
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function returns the following values:
//
//   - xpad (optional): location to store padding in the X direction, or NULL.
//   - ypad (optional): location to store padding in the Y direction, or NULL.
func (misc *Misc) Padding() (xpad, ypad int) {
	var _arg0 *C.GtkMisc // out
	var _arg1 C.gint     // in
	var _arg2 C.gint     // in

	_arg0 = (*C.GtkMisc)(unsafe.Pointer(coreglib.InternObject(misc).Native()))

	C.gtk_misc_get_padding(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(misc)

	var _xpad int // out
	var _ypad int // out

	_xpad = int(_arg1)
	_ypad = int(_arg2)

	return _xpad, _ypad
}

// SetAlignment sets the alignment of the widget.
//
// Deprecated: Use Widget's alignment (Widget:halign and Widget:valign) and
// margin properties or Label's Label:xalign and Label:yalign properties.
//
// The function takes the following parameters:
//
//   - xalign: horizontal alignment, from 0 (left) to 1 (right).
//   - yalign: vertical alignment, from 0 (top) to 1 (bottom).
func (misc *Misc) SetAlignment(xalign, yalign float32) {
	var _arg0 *C.GtkMisc // out
	var _arg1 C.gfloat   // out
	var _arg2 C.gfloat   // out

	_arg0 = (*C.GtkMisc)(unsafe.Pointer(coreglib.InternObject(misc).Native()))
	_arg1 = C.gfloat(xalign)
	_arg2 = C.gfloat(yalign)

	C.gtk_misc_set_alignment(_arg0, _arg1, _arg2)
	runtime.KeepAlive(misc)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
}

// SetPadding sets the amount of space to add around the widget.
//
// Deprecated: Use Widget alignment and margin properties.
//
// The function takes the following parameters:
//
//   - xpad: amount of space to add on the left and right of the widget,
//     in pixels.
//   - ypad: amount of space to add on the top and bottom of the widget,
//     in pixels.
func (misc *Misc) SetPadding(xpad, ypad int) {
	var _arg0 *C.GtkMisc // out
	var _arg1 C.gint     // out
	var _arg2 C.gint     // out

	_arg0 = (*C.GtkMisc)(unsafe.Pointer(coreglib.InternObject(misc).Native()))
	_arg1 = C.gint(xpad)
	_arg2 = C.gint(ypad)

	C.gtk_misc_set_padding(_arg0, _arg1, _arg2)
	runtime.KeepAlive(misc)
	runtime.KeepAlive(xpad)
	runtime.KeepAlive(ypad)
}

// ModelButton is a button class that can use a #GAction as its model.
// In contrast to ToggleButton or RadioButton, which can also be backed by a
// #GAction via the Actionable:action-name property, GtkModelButton will adapt
// its appearance according to the kind of action it is backed by, and appear
// either as a plain, check or radio button.
//
// Model buttons are used when popovers from a menu model with
// gtk_popover_new_from_model(); they can also be used manually in a
// PopoverMenu.
//
// When the action is specified via the Actionable:action-name and
// Actionable:action-target properties, the role of the button (i.e. whether
// it is a plain, check or radio button) is determined by the type of the
// action and doesn't have to be explicitly specified with the ModelButton:role
// property.
//
// The content of the button is specified by the ModelButton:text and
// ModelButton:icon properties.
//
// The appearance of model buttons can be influenced with the
// ModelButton:centered and ModelButton:iconic properties.
//
// Model buttons have built-in support for submenus in PopoverMenu.
// To make a GtkModelButton that opens a submenu when activated, set the
// ModelButton:menu-name property. To make a button that goes back to the parent
// menu, you should set the ModelButton:inverted property to place the submenu
// indicator at the opposite side.
//
// Example
//
//	<object class="GtkPopoverMenu">
//	  <child>
//	    <object class="GtkBox">
//	      <property name="visible">True</property>
//	      <property name="margin">10</property>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">view.cut</property>
//	          <property name="text" translatable="yes">Cut</property>
//	        </object>
//	      </child>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">view.copy</property>
//	          <property name="text" translatable="yes">Copy</property>
//	        </object>
//	      </child>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">view.paste</property>
//	          <property name="text" translatable="yes">Paste</property>
//	        </object>
//	      </child>
//	    </object>
//	  </child>
//	</object>
//
// CSS nodes
//
//	button.model
//	├── <child>
//	╰── check
//
// Iconic model buttons (see ModelButton:iconic) change the name of their main
// node to button and add a .model style class to it. The indicator subnode is
// invisible in this case.
type ModelButton struct {
	_ [0]func() // equal guard
	Button
}

var (
	_ Binner            = (*ModelButton)(nil)
	_ coreglib.Objector = (*ModelButton)(nil)
)

func wrapModelButton(obj *coreglib.Object) *ModelButton {
	return &ModelButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalModelButton(p uintptr) (interface{}, error) {
	return wrapModelButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewModelButton creates a new GtkModelButton.
//
// The function returns the following values:
//
//   - modelButton: newly created ModelButton widget.
func NewModelButton() *ModelButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_model_button_new()

	var _modelButton *ModelButton // out

	_modelButton = wrapModelButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _modelButton
}

// MountOperationOverrides contains methods that are overridable.
type MountOperationOverrides struct {
}

func defaultMountOperationOverrides(v *MountOperation) MountOperationOverrides {
	return MountOperationOverrides{}
}

// MountOperation: this should not be accessed directly. Use the accessor
// functions below.
type MountOperation struct {
	_ [0]func() // equal guard
	gio.MountOperation
}

var (
	_ coreglib.Objector = (*MountOperation)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*MountOperation, *MountOperationClass, MountOperationOverrides](
		GTypeMountOperation,
		initMountOperationClass,
		wrapMountOperation,
		defaultMountOperationOverrides,
	)
}

func initMountOperationClass(gclass unsafe.Pointer, overrides MountOperationOverrides, classInitFunc func(*MountOperationClass)) {
	if classInitFunc != nil {
		class := (*MountOperationClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapMountOperation(obj *coreglib.Object) *MountOperation {
	return &MountOperation{
		MountOperation: gio.MountOperation{
			Object: obj,
		},
	}
}

func marshalMountOperation(p uintptr) (interface{}, error) {
	return wrapMountOperation(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewMountOperation creates a new MountOperation.
//
// The function takes the following parameters:
//
//   - parent (optional): transient parent of the window, or NULL.
//
// The function returns the following values:
//
//   - mountOperation: new MountOperation.
func NewMountOperation(parent *Window) *MountOperation {
	var _arg1 *C.GtkWindow       // out
	var _cret *C.GMountOperation // in

	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	_cret = C.gtk_mount_operation_new(_arg1)
	runtime.KeepAlive(parent)

	var _mountOperation *MountOperation // out

	_mountOperation = wrapMountOperation(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _mountOperation
}

// Parent gets the transient parent used by the MountOperation.
//
// The function returns the following values:
//
//   - window: transient parent for windows shown by op.
func (op *MountOperation) Parent() *Window {
	var _arg0 *C.GtkMountOperation // out
	var _cret *C.GtkWindow         // in

	_arg0 = (*C.GtkMountOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_mount_operation_get_parent(_arg0)
	runtime.KeepAlive(op)

	var _window *Window // out

	_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _window
}

// Screen gets the screen on which windows of the MountOperation will be shown.
//
// The function returns the following values:
//
//   - screen on which windows of op are shown.
func (op *MountOperation) Screen() *gdk.Screen {
	var _arg0 *C.GtkMountOperation // out
	var _cret *C.GdkScreen         // in

	_arg0 = (*C.GtkMountOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_mount_operation_get_screen(_arg0)
	runtime.KeepAlive(op)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// IsShowing returns whether the MountOperation is currently displaying a
// window.
//
// The function returns the following values:
//
//   - ok: TRUE if op is currently displaying a window.
func (op *MountOperation) IsShowing() bool {
	var _arg0 *C.GtkMountOperation // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkMountOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_mount_operation_is_showing(_arg0)
	runtime.KeepAlive(op)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetParent sets the transient parent for windows shown by the MountOperation.
//
// The function takes the following parameters:
//
//   - parent (optional): transient parent of the window, or NULL.
func (op *MountOperation) SetParent(parent *Window) {
	var _arg0 *C.GtkMountOperation // out
	var _arg1 *C.GtkWindow         // out

	_arg0 = (*C.GtkMountOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	C.gtk_mount_operation_set_parent(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(parent)
}

// SetScreen sets the screen to show windows of the MountOperation on.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (op *MountOperation) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkMountOperation // out
	var _arg1 *C.GdkScreen         // out

	_arg0 = (*C.GtkMountOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_mount_operation_set_screen(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(screen)
}

// NativeDialogOverrides contains methods that are overridable.
type NativeDialogOverrides struct {
	// Hide hides the dialog if it is visilbe, aborting any interaction.
	// Once this is called the NativeDialog::response signal will not be emitted
	// until after the next call to gtk_native_dialog_show().
	//
	// If the dialog is not visible this does nothing.
	Hide     func()
	Response func(responseId int)
	// Show shows the dialog on the display, allowing the user to interact
	// with it. When the user accepts the state of the dialog the dialog will
	// be automatically hidden and the NativeDialog::response signal will be
	// emitted.
	//
	// Multiple calls while the dialog is visible will be ignored.
	Show func()
}

func defaultNativeDialogOverrides(v *NativeDialog) NativeDialogOverrides {
	return NativeDialogOverrides{
		Hide:     v.hide,
		Response: v.response,
		Show:     v.show,
	}
}

// NativeDialog: native dialogs are platform dialogs that don't use Dialog
// or Window. They are used in order to integrate better with a platform,
// by looking the same as other native applications and supporting platform
// specific features.
//
// The Dialog functions cannot be used on such objects, but we need a similar
// API in order to drive them. The NativeDialog object is an API that allows you
// to do this. It allows you to set various common properties on the dialog,
// as well as show and hide it and get a NativeDialog::response signal when the
// user finished with the dialog.
//
// There is also a gtk_native_dialog_run() helper that makes it easy to run
// any native dialog in a modal way with a recursive mainloop, similar to
// gtk_dialog_run().
type NativeDialog struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*NativeDialog)(nil)
)

// NativeDialogger describes types inherited from class NativeDialog.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type NativeDialogger interface {
	coreglib.Objector
	baseNativeDialog() *NativeDialog
}

var _ NativeDialogger = (*NativeDialog)(nil)

func init() {
	coreglib.RegisterClassInfo[*NativeDialog, *NativeDialogClass, NativeDialogOverrides](
		GTypeNativeDialog,
		initNativeDialogClass,
		wrapNativeDialog,
		defaultNativeDialogOverrides,
	)
}

func initNativeDialogClass(gclass unsafe.Pointer, overrides NativeDialogOverrides, classInitFunc func(*NativeDialogClass)) {
	pclass := (*C.GtkNativeDialogClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeNativeDialog))))

	if overrides.Hide != nil {
		pclass.hide = (*[0]byte)(C._gotk4_gtk3_NativeDialogClass_hide)
	}

	if overrides.Response != nil {
		pclass.response = (*[0]byte)(C._gotk4_gtk3_NativeDialogClass_response)
	}

	if overrides.Show != nil {
		pclass.show = (*[0]byte)(C._gotk4_gtk3_NativeDialogClass_show)
	}

	if classInitFunc != nil {
		class := (*NativeDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapNativeDialog(obj *coreglib.Object) *NativeDialog {
	return &NativeDialog{
		Object: obj,
	}
}

func marshalNativeDialog(p uintptr) (interface{}, error) {
	return wrapNativeDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (self *NativeDialog) baseNativeDialog() *NativeDialog {
	return self
}

// BaseNativeDialog returns the underlying base object.
func BaseNativeDialog(obj NativeDialogger) *NativeDialog {
	return obj.baseNativeDialog()
}

// ConnectResponse is emitted when the user responds to the dialog.
//
// When this is called the dialog has been hidden.
//
// If you call gtk_native_dialog_hide() before the user responds to the dialog
// this signal will not be emitted.
func (self *NativeDialog) ConnectResponse(f func(responseId int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(self, "response", false, unsafe.Pointer(C._gotk4_gtk3_NativeDialog_ConnectResponse), f)
}

// Destroy destroys a dialog.
//
// When a dialog is destroyed, it will break any references it holds to other
// objects. If it is visible it will be hidden and any underlying window system
// resources will be destroyed.
//
// Note that this does not release any reference to the object (as opposed to
// destroying a GtkWindow) because there is no reference from the windowing
// system to the NativeDialog.
func (self *NativeDialog) Destroy() {
	var _arg0 *C.GtkNativeDialog // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C.gtk_native_dialog_destroy(_arg0)
	runtime.KeepAlive(self)
}

// Modal returns whether the dialog is modal. See gtk_native_dialog_set_modal().
//
// The function returns the following values:
//
//   - ok: TRUE if the dialog is set to be modal.
func (self *NativeDialog) Modal() bool {
	var _arg0 *C.GtkNativeDialog // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_native_dialog_get_modal(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Title gets the title of the NativeDialog.
//
// The function returns the following values:
//
//   - utf8 (optional): title of the dialog, or NULL if none has been set
//     explicitly. The returned string is owned by the widget and must not be
//     modified or freed.
func (self *NativeDialog) Title() string {
	var _arg0 *C.GtkNativeDialog // out
	var _cret *C.char            // in

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_native_dialog_get_title(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// TransientFor fetches the transient parent for this window. See
// gtk_native_dialog_set_transient_for().
//
// The function returns the following values:
//
//   - window (optional): transient parent for this window, or NULL if no
//     transient parent has been set.
func (self *NativeDialog) TransientFor() *Window {
	var _arg0 *C.GtkNativeDialog // out
	var _cret *C.GtkWindow       // in

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_native_dialog_get_transient_for(_arg0)
	runtime.KeepAlive(self)

	var _window *Window // out

	if _cret != nil {
		_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _window
}

// Visible determines whether the dialog is visible.
//
// The function returns the following values:
//
//   - ok: TRUE if the dialog is visible.
func (self *NativeDialog) Visible() bool {
	var _arg0 *C.GtkNativeDialog // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_native_dialog_get_visible(_arg0)
	runtime.KeepAlive(self)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Hide hides the dialog if it is visilbe, aborting any interaction. Once this
// is called the NativeDialog::response signal will not be emitted until after
// the next call to gtk_native_dialog_show().
//
// If the dialog is not visible this does nothing.
func (self *NativeDialog) Hide() {
	var _arg0 *C.GtkNativeDialog // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C.gtk_native_dialog_hide(_arg0)
	runtime.KeepAlive(self)
}

// Run blocks in a recursive main loop until self emits the
// NativeDialog::response signal. It then returns the response ID from the
// ::response signal emission.
//
// Before entering the recursive main loop, gtk_native_dialog_run() calls
// gtk_native_dialog_show() on the dialog for you.
//
// After gtk_native_dialog_run() returns, then dialog will be hidden.
//
// Typical usage of this function might be:
//
//	gint result = gtk_native_dialog_run (GTK_NATIVE_DIALOG (dialog));
//	switch (result)
//	  {
//	    case GTK_RESPONSE_ACCEPT:
//	       do_application_specific_something ();
//	       break;
//	    default:
//	       do_nothing_since_dialog_was_cancelled ();
//	       break;
//	  }
//	g_object_unref (dialog);
//
// Note that even though the recursive main loop gives the effect of a modal
// dialog (it prevents the user from interacting with other windows in the same
// window group while the dialog is run), callbacks such as timeouts, IO channel
// watches, DND drops, etc, will be triggered during a gtk_native_dialog_run()
// call.
//
// The function returns the following values:
//
//   - gint: response ID.
func (self *NativeDialog) Run() int {
	var _arg0 *C.GtkNativeDialog // out
	var _cret C.gint             // in

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_native_dialog_run(_arg0)
	runtime.KeepAlive(self)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SetModal sets a dialog modal or non-modal. Modal dialogs prevent interaction
// with other windows in the same application. To keep modal dialogs on top of
// main application windows, use gtk_native_dialog_set_transient_for() to make
// the dialog transient for the parent; most [window managers][gtk-X11-arch]
// will then disallow lowering the dialog below the parent.
//
// The function takes the following parameters:
//
//   - modal: whether the window is modal.
func (self *NativeDialog) SetModal(modal bool) {
	var _arg0 *C.GtkNativeDialog // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if modal {
		_arg1 = C.TRUE
	}

	C.gtk_native_dialog_set_modal(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(modal)
}

// SetTitle sets the title of the NativeDialog.
//
// The function takes the following parameters:
//
//   - title of the dialog.
func (self *NativeDialog) SetTitle(title string) {
	var _arg0 *C.GtkNativeDialog // out
	var _arg1 *C.char            // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_native_dialog_set_title(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(title)
}

// SetTransientFor: dialog windows should be set transient for the
// main application window they were spawned from. This allows [window
// managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window,
// or center the dialog over the main window.
//
// Passing NULL for parent unsets the current transient window.
//
// The function takes the following parameters:
//
//   - parent (optional) window, or NULL.
func (self *NativeDialog) SetTransientFor(parent *Window) {
	var _arg0 *C.GtkNativeDialog // out
	var _arg1 *C.GtkWindow       // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	C.gtk_native_dialog_set_transient_for(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(parent)
}

// Show shows the dialog on the display, allowing the user to interact with it.
// When the user accepts the state of the dialog the dialog will be
// automatically hidden and the NativeDialog::response signal will be emitted.
//
// Multiple calls while the dialog is visible will be ignored.
func (self *NativeDialog) Show() {
	var _arg0 *C.GtkNativeDialog // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C.gtk_native_dialog_show(_arg0)
	runtime.KeepAlive(self)
}

// Hide hides the dialog if it is visilbe, aborting any interaction. Once this
// is called the NativeDialog::response signal will not be emitted until after
// the next call to gtk_native_dialog_show().
//
// If the dialog is not visible this does nothing.
func (self *NativeDialog) hide() {
	gclass := (*C.GtkNativeDialogClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.hide

	var _arg0 *C.GtkNativeDialog // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C._gotk4_gtk3_NativeDialog_virtual_hide(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(self)
}

func (self *NativeDialog) response(responseId int) {
	gclass := (*C.GtkNativeDialogClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.response

	var _arg0 *C.GtkNativeDialog // out
	var _arg1 C.gint             // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.gint(responseId)

	C._gotk4_gtk3_NativeDialog_virtual_response(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(responseId)
}

// Show shows the dialog on the display, allowing the user to interact with it.
// When the user accepts the state of the dialog the dialog will be
// automatically hidden and the NativeDialog::response signal will be emitted.
//
// Multiple calls while the dialog is visible will be ignored.
func (self *NativeDialog) show() {
	gclass := (*C.GtkNativeDialogClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.show

	var _arg0 *C.GtkNativeDialog // out

	_arg0 = (*C.GtkNativeDialog)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C._gotk4_gtk3_NativeDialog_virtual_show(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(self)
}

// NotebookOverrides contains methods that are overridable.
type NotebookOverrides struct {
	ChangeCurrentPage func(offset int) bool
	FocusTab          func(typ NotebookTab) bool
	// The function takes the following parameters:
	//
	//   - child
	//   - tabLabel
	//   - menuLabel
	//   - position
	InsertPage   func(child, tabLabel, menuLabel Widgetter, position int) int
	MoveFocusOut func(direction DirectionType)
	// The function takes the following parameters:
	//
	//   - child
	//   - pageNum
	PageAdded func(child Widgetter, pageNum uint)
	// The function takes the following parameters:
	//
	//   - child
	//   - pageNum
	PageRemoved func(child Widgetter, pageNum uint)
	// The function takes the following parameters:
	//
	//   - child
	//   - pageNum
	PageReordered func(child Widgetter, pageNum uint)
	// The function takes the following parameters:
	//
	//   - direction
	//   - moveToLast
	ReorderTab func(direction DirectionType, moveToLast bool) bool
	SelectPage func(moveFocus bool) bool
	// The function takes the following parameters:
	//
	//   - page
	//   - pageNum
	SwitchPage func(page Widgetter, pageNum uint)
}

func defaultNotebookOverrides(v *Notebook) NotebookOverrides {
	return NotebookOverrides{
		ChangeCurrentPage: v.changeCurrentPage,
		FocusTab:          v.focusTab,
		InsertPage:        v.insertPage,
		MoveFocusOut:      v.moveFocusOut,
		PageAdded:         v.pageAdded,
		PageRemoved:       v.pageRemoved,
		PageReordered:     v.pageReordered,
		ReorderTab:        v.reorderTab,
		SelectPage:        v.selectPage,
		SwitchPage:        v.switchPage,
	}
}

// Notebook widget is a Container whose children are pages that can be switched
// between using tab labels along one edge.
//
// There are many configuration options for GtkNotebook. Among other things, you
// can choose on which edge the tabs appear (see gtk_notebook_set_tab_pos()),
// whether, if there are too many tabs to fit the notebook should be made
// bigger or scrolling arrows added (see gtk_notebook_set_scrollable()),
// and whether there will be a popup menu allowing the users to switch pages.
// (see gtk_notebook_popup_enable(), gtk_notebook_popup_disable())
//
// # GtkNotebook as GtkBuildable
//
// The GtkNotebook implementation of the Buildable interface supports placing
// children into tabs by specifying “tab” as the “type” attribute of a <child>
// element. Note that the content of the tab must be created before the tab can
// be filled. A tab child can be specified without specifying a <child> type
// attribute.
//
// To add a child widget in the notebooks action area, specify "action-start" or
// “action-end” as the “type” attribute of the <child> element.
//
// An example of a UI definition fragment with GtkNotebook:
//
//	notebook
//	├── header.top
//	│   ├── [<action widget>]
//	│   ├── tabs
//	│   │   ├── [arrow]
//	│   │   ├── tab
//	│   │   │   ╰── <tab label>
//	┊   ┊   ┊
//	│   │   ├── tab[.reorderable-page]
//	│   │   │   ╰── <tab label>
//	│   │   ╰── [arrow]
//	│   ╰── [<action widget>]
//	│
//	╰── stack
//	    ├── <child>
//	    ┊
//	    ╰── <child>
//
// GtkNotebook has a main CSS node with name notebook, a subnode with name
// header and below that a subnode with name tabs which contains one subnode per
// tab with name tab.
//
// If action widgets are present, their CSS nodes are placed next to the tabs
// node. If the notebook is scrollable, CSS nodes with name arrow are placed as
// first and last child of the tabs node.
//
// The main node gets the .frame style class when the notebook has a border (see
// gtk_notebook_set_show_border()).
//
// The header node gets one of the style class .top, .bottom, .left or .right,
// depending on where the tabs are placed. For reorderable pages, the tab node
// gets the .reorderable-page class.
//
// A tab node gets the .dnd style class while it is moved with drag-and-drop.
//
// The nodes are always arranged from left-to-right, regarldess of text
// direction.
type Notebook struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Notebook)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Notebook, *NotebookClass, NotebookOverrides](
		GTypeNotebook,
		initNotebookClass,
		wrapNotebook,
		defaultNotebookOverrides,
	)
}

func initNotebookClass(gclass unsafe.Pointer, overrides NotebookOverrides, classInitFunc func(*NotebookClass)) {
	pclass := (*C.GtkNotebookClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeNotebook))))

	if overrides.ChangeCurrentPage != nil {
		pclass.change_current_page = (*[0]byte)(C._gotk4_gtk3_NotebookClass_change_current_page)
	}

	if overrides.FocusTab != nil {
		pclass.focus_tab = (*[0]byte)(C._gotk4_gtk3_NotebookClass_focus_tab)
	}

	if overrides.InsertPage != nil {
		pclass.insert_page = (*[0]byte)(C._gotk4_gtk3_NotebookClass_insert_page)
	}

	if overrides.MoveFocusOut != nil {
		pclass.move_focus_out = (*[0]byte)(C._gotk4_gtk3_NotebookClass_move_focus_out)
	}

	if overrides.PageAdded != nil {
		pclass.page_added = (*[0]byte)(C._gotk4_gtk3_NotebookClass_page_added)
	}

	if overrides.PageRemoved != nil {
		pclass.page_removed = (*[0]byte)(C._gotk4_gtk3_NotebookClass_page_removed)
	}

	if overrides.PageReordered != nil {
		pclass.page_reordered = (*[0]byte)(C._gotk4_gtk3_NotebookClass_page_reordered)
	}

	if overrides.ReorderTab != nil {
		pclass.reorder_tab = (*[0]byte)(C._gotk4_gtk3_NotebookClass_reorder_tab)
	}

	if overrides.SelectPage != nil {
		pclass.select_page = (*[0]byte)(C._gotk4_gtk3_NotebookClass_select_page)
	}

	if overrides.SwitchPage != nil {
		pclass.switch_page = (*[0]byte)(C._gotk4_gtk3_NotebookClass_switch_page)
	}

	if classInitFunc != nil {
		class := (*NotebookClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapNotebook(obj *coreglib.Object) *Notebook {
	return &Notebook{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalNotebook(p uintptr) (interface{}, error) {
	return wrapNotebook(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (notebook *Notebook) ConnectChangeCurrentPage(f func(object int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "change-current-page", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectChangeCurrentPage), f)
}

// ConnectCreateWindow signal is emitted when a detachable tab is dropped on the
// root window.
//
// A handler for this signal can create a window containing a notebook where
// the tab will be attached. It is also responsible for moving/resizing
// the window and adding the necessary properties to the notebook (e.g.
// the Notebook:group-name ).
func (notebook *Notebook) ConnectCreateWindow(f func(page Widgetter, x, y int) (notebook *Notebook)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "create-window", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectCreateWindow), f)
}

func (notebook *Notebook) ConnectFocusTab(f func(object NotebookTab) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "focus-tab", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectFocusTab), f)
}

func (notebook *Notebook) ConnectMoveFocusOut(f func(object DirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "move-focus-out", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectMoveFocusOut), f)
}

// ConnectPageAdded signal is emitted in the notebook right after a page is
// added to the notebook.
func (notebook *Notebook) ConnectPageAdded(f func(child Widgetter, pageNum uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "page-added", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectPageAdded), f)
}

// ConnectPageRemoved signal is emitted in the notebook right after a page is
// removed from the notebook.
func (notebook *Notebook) ConnectPageRemoved(f func(child Widgetter, pageNum uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "page-removed", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectPageRemoved), f)
}

// ConnectPageReordered signal is emitted in the notebook right after a page has
// been reordered.
func (notebook *Notebook) ConnectPageReordered(f func(child Widgetter, pageNum uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "page-reordered", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectPageReordered), f)
}

func (notebook *Notebook) ConnectReorderTab(f func(object DirectionType, p0 bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "reorder-tab", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectReorderTab), f)
}

func (notebook *Notebook) ConnectSelectPage(f func(object bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "select-page", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectSelectPage), f)
}

// ConnectSwitchPage is emitted when the user or a function changes the current
// page.
func (notebook *Notebook) ConnectSwitchPage(f func(page Widgetter, pageNum uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(notebook, "switch-page", false, unsafe.Pointer(C._gotk4_gtk3_Notebook_ConnectSwitchPage), f)
}

// NewNotebook creates a new Notebook widget with no pages.
//
// The function returns the following values:
//
//   - notebook: newly created Notebook.
func NewNotebook() *Notebook {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_notebook_new()

	var _notebook *Notebook // out

	_notebook = wrapNotebook(coreglib.Take(unsafe.Pointer(_cret)))

	return _notebook
}

// AppendPage appends a page to notebook.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the appended page in the notebook,
//     or -1 if function fails.
func (notebook *Notebook) AppendPage(child, tabLabel Widgetter) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}

	_cret = C.gtk_notebook_append_page(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// AppendPageMenu appends a page to notebook, specifying the widget to use as
// the label in the popup menu.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//   - menuLabel (optional): widget to use as a label for the page-switch menu,
//     if that is enabled. If NULL, and tab_label is a Label or NULL, then the
//     menu label will be a newly created label with the same text as tab_label;
//     if tab_label is not a Label, menu_label must be specified if the
//     page-switch menu is to be used.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the appended page in the notebook,
//     or -1 if function fails.
func (notebook *Notebook) AppendPageMenu(child, tabLabel, menuLabel Widgetter) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _arg3 *C.GtkWidget   // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}
	if menuLabel != nil {
		_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuLabel).Native()))
	}

	_cret = C.gtk_notebook_append_page_menu(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
	runtime.KeepAlive(menuLabel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// DetachTab removes the child from the notebook.
//
// This function is very similar to gtk_container_remove(), but additionally
// informs the notebook that the removal is happening as part of a tab DND
// operation, which should not be cancelled.
//
// The function takes the following parameters:
//
//   - child: child.
func (notebook *Notebook) DetachTab(child Widgetter) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_notebook_detach_tab(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
}

// ActionWidget gets one of the action widgets. See
// gtk_notebook_set_action_widget().
//
// The function takes the following parameters:
//
//   - packType: pack type of the action widget to receive.
//
// The function returns the following values:
//
//   - widget (optional): action widget with the given pack_type or NULL when
//     this action widget has not been set.
func (notebook *Notebook) ActionWidget(packType PackType) Widgetter {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.GtkPackType  // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.GtkPackType(packType)

	_cret = C.gtk_notebook_get_action_widget(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(packType)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// CurrentPage returns the page number of the current page.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the current page in the notebook.
//     If the notebook has no pages, then -1 will be returned.
func (notebook *Notebook) CurrentPage() int {
	var _arg0 *C.GtkNotebook // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_current_page(_arg0)
	runtime.KeepAlive(notebook)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// GroupName gets the current group name for notebook.
//
// The function returns the following values:
//
//   - utf8 (optional): group name, or NULL if none is set.
func (notebook *Notebook) GroupName() string {
	var _arg0 *C.GtkNotebook // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_group_name(_arg0)
	runtime.KeepAlive(notebook)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// MenuLabel retrieves the menu label widget of the page containing child.
//
// The function takes the following parameters:
//
//   - child: widget contained in a page of notebook.
//
// The function returns the following values:
//
//   - widget (optional): menu label, or NULL if the notebook page does not have
//     a menu label other than the default (the tab label).
func (notebook *Notebook) MenuLabel(child Widgetter) Widgetter {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_menu_label(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// MenuLabelText retrieves the text of the menu label for the page containing
// child.
//
// The function takes the following parameters:
//
//   - child widget of a page of the notebook.
//
// The function returns the following values:
//
//   - utf8 (optional): text of the tab label, or NULL if the widget does not
//     have a menu label other than the default menu label, or the menu label
//     widget is not a Label. The string is owned by the widget and must not be
//     freed.
func (notebook *Notebook) MenuLabelText(child Widgetter) string {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_menu_label_text(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// NPages gets the number of pages in a notebook.
//
// The function returns the following values:
//
//   - gint: number of pages in the notebook.
func (notebook *Notebook) NPages() int {
	var _arg0 *C.GtkNotebook // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_n_pages(_arg0)
	runtime.KeepAlive(notebook)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NthPage returns the child widget contained in page number page_num.
//
// The function takes the following parameters:
//
//   - pageNum: index of a page in the notebook, or -1 to get the last page.
//
// The function returns the following values:
//
//   - widget (optional): child widget, or NULL if page_num is out of bounds.
func (notebook *Notebook) NthPage(pageNum int) Widgetter {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gint         // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.gint(pageNum)

	_cret = C.gtk_notebook_get_nth_page(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(pageNum)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Scrollable returns whether the tab label area has arrows for scrolling.
// See gtk_notebook_set_scrollable().
//
// The function returns the following values:
//
//   - ok: TRUE if arrows for scrolling are present.
func (notebook *Notebook) Scrollable() bool {
	var _arg0 *C.GtkNotebook // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_scrollable(_arg0)
	runtime.KeepAlive(notebook)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowBorder returns whether a bevel will be drawn around the notebook pages.
// See gtk_notebook_set_show_border().
//
// The function returns the following values:
//
//   - ok: TRUE if the bevel is drawn.
func (notebook *Notebook) ShowBorder() bool {
	var _arg0 *C.GtkNotebook // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_show_border(_arg0)
	runtime.KeepAlive(notebook)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowTabs returns whether the tabs of the notebook are shown. See
// gtk_notebook_set_show_tabs().
//
// The function returns the following values:
//
//   - ok: TRUE if the tabs are shown.
func (notebook *Notebook) ShowTabs() bool {
	var _arg0 *C.GtkNotebook // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_show_tabs(_arg0)
	runtime.KeepAlive(notebook)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TabDetachable returns whether the tab contents can be detached from notebook.
//
// The function takes the following parameters:
//
//   - child Widget.
//
// The function returns the following values:
//
//   - ok: TRUE if the tab is detachable.
func (notebook *Notebook) TabDetachable(child Widgetter) bool {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_tab_detachable(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TabHborder returns the horizontal width of a tab border.
//
// Deprecated: this function returns zero.
//
// The function returns the following values:
//
//   - guint16: horizontal width of a tab border.
func (notebook *Notebook) TabHborder() uint16 {
	var _arg0 *C.GtkNotebook // out
	var _cret C.guint16      // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_tab_hborder(_arg0)
	runtime.KeepAlive(notebook)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// TabLabel returns the tab label widget for the page child. NULL is returned
// if child is not in notebook or if no tab label has specifically been set for
// child.
//
// The function takes the following parameters:
//
//   - child: page.
//
// The function returns the following values:
//
//   - widget (optional): tab label.
func (notebook *Notebook) TabLabel(child Widgetter) Widgetter {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_tab_label(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// TabLabelText retrieves the text of the tab label for the page containing
// child.
//
// The function takes the following parameters:
//
//   - child: widget contained in a page of notebook.
//
// The function returns the following values:
//
//   - utf8 (optional): text of the tab label, or NULL if the tab label widget
//     is not a Label. The string is owned by the widget and must not be freed.
func (notebook *Notebook) TabLabelText(child Widgetter) string {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_tab_label_text(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// TabPos gets the edge at which the tabs for switching pages in the notebook
// are drawn.
//
// The function returns the following values:
//
//   - positionType: edge at which the tabs are drawn.
func (notebook *Notebook) TabPos() PositionType {
	var _arg0 *C.GtkNotebook    // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_tab_pos(_arg0)
	runtime.KeepAlive(notebook)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// TabReorderable gets whether the tab can be reordered via drag and drop or
// not.
//
// The function takes the following parameters:
//
//   - child Widget.
//
// The function returns the following values:
//
//   - ok: TRUE if the tab is reorderable.
func (notebook *Notebook) TabReorderable(child Widgetter) bool {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_get_tab_reorderable(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TabVborder returns the vertical width of a tab border.
//
// Deprecated: this function returns zero.
//
// The function returns the following values:
//
//   - guint16: vertical width of a tab border.
func (notebook *Notebook) TabVborder() uint16 {
	var _arg0 *C.GtkNotebook // out
	var _cret C.guint16      // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	_cret = C.gtk_notebook_get_tab_vborder(_arg0)
	runtime.KeepAlive(notebook)

	var _guint16 uint16 // out

	_guint16 = uint16(_cret)

	return _guint16
}

// InsertPage: insert a page into notebook at the given position.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//   - position: index (starting at 0) at which to insert the page, or -1 to
//     append the page after all other pages.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the inserted page in the notebook,
//     or -1 if function fails.
func (notebook *Notebook) InsertPage(child, tabLabel Widgetter, position int) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _arg3 C.gint         // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}
	_arg3 = C.gint(position)

	_cret = C.gtk_notebook_insert_page(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
	runtime.KeepAlive(position)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// InsertPageMenu: insert a page into notebook at the given position, specifying
// the widget to use as the label in the popup menu.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//   - menuLabel (optional): widget to use as a label for the page-switch menu,
//     if that is enabled. If NULL, and tab_label is a Label or NULL, then the
//     menu label will be a newly created label with the same text as tab_label;
//     if tab_label is not a Label, menu_label must be specified if the
//     page-switch menu is to be used.
//   - position: index (starting at 0) at which to insert the page, or -1 to
//     append the page after all other pages.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the inserted page in the notebook.
func (notebook *Notebook) InsertPageMenu(child, tabLabel, menuLabel Widgetter, position int) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 C.gint         // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}
	if menuLabel != nil {
		_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuLabel).Native()))
	}
	_arg4 = C.gint(position)

	_cret = C.gtk_notebook_insert_page_menu(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
	runtime.KeepAlive(menuLabel)
	runtime.KeepAlive(position)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NextPage switches to the next page. Nothing happens if the current page is
// the last page.
func (notebook *Notebook) NextPage() {
	var _arg0 *C.GtkNotebook // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	C.gtk_notebook_next_page(_arg0)
	runtime.KeepAlive(notebook)
}

// PageNum finds the index of the page which contains the given child widget.
//
// The function takes the following parameters:
//
//   - child: Widget.
//
// The function returns the following values:
//
//   - gint: index of the page containing child, or -1 if child is not in the
//     notebook.
func (notebook *Notebook) PageNum(child Widgetter) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_page_num(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PopupDisable disables the popup menu.
func (notebook *Notebook) PopupDisable() {
	var _arg0 *C.GtkNotebook // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	C.gtk_notebook_popup_disable(_arg0)
	runtime.KeepAlive(notebook)
}

// PopupEnable enables the popup menu: if the user clicks with the right mouse
// button on the tab labels, a menu with all the pages will be popped up.
func (notebook *Notebook) PopupEnable() {
	var _arg0 *C.GtkNotebook // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	C.gtk_notebook_popup_enable(_arg0)
	runtime.KeepAlive(notebook)
}

// PrependPage prepends a page to notebook.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the prepended page in the notebook,
//     or -1 if function fails.
func (notebook *Notebook) PrependPage(child, tabLabel Widgetter) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}

	_cret = C.gtk_notebook_prepend_page(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PrependPageMenu prepends a page to notebook, specifying the widget to use as
// the label in the popup menu.
//
// The function takes the following parameters:
//
//   - child to use as the contents of the page.
//   - tabLabel (optional) to be used as the label for the page, or NULL to use
//     the default label, “page N”.
//   - menuLabel (optional): widget to use as a label for the page-switch menu,
//     if that is enabled. If NULL, and tab_label is a Label or NULL, then the
//     menu label will be a newly created label with the same text as tab_label;
//     if tab_label is not a Label, menu_label must be specified if the
//     page-switch menu is to be used.
//
// The function returns the following values:
//
//   - gint: index (starting from 0) of the prepended page in the notebook,
//     or -1 if function fails.
func (notebook *Notebook) PrependPageMenu(child, tabLabel, menuLabel Widgetter) int {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _arg3 *C.GtkWidget   // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}
	if menuLabel != nil {
		_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuLabel).Native()))
	}

	_cret = C.gtk_notebook_prepend_page_menu(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
	runtime.KeepAlive(menuLabel)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PrevPage switches to the previous page. Nothing happens if the current page
// is the first page.
func (notebook *Notebook) PrevPage() {
	var _arg0 *C.GtkNotebook // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))

	C.gtk_notebook_prev_page(_arg0)
	runtime.KeepAlive(notebook)
}

// RemovePage removes a page from the notebook given its index in the notebook.
//
// The function takes the following parameters:
//
//   - pageNum: index of a notebook page, starting from 0. If -1, the last page
//     will be removed.
func (notebook *Notebook) RemovePage(pageNum int) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.gint(pageNum)

	C.gtk_notebook_remove_page(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(pageNum)
}

// ReorderChild reorders the page containing child, so that it appears in
// position position. If position is greater than or equal to the number of
// children in the list or negative, child will be moved to the end of the list.
//
// The function takes the following parameters:
//
//   - child to move.
//   - position: new position, or -1 to move to the end.
func (notebook *Notebook) ReorderChild(child Widgetter, position int) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(position)

	C.gtk_notebook_reorder_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(position)
}

// SetActionWidget sets widget as one of the action widgets. Depending on the
// pack type the widget will be placed before or after the tabs. You can use a
// Box if you need to pack more than one widget on the same side.
//
// Note that action widgets are “internal” children of the notebook and thus not
// included in the list returned from gtk_container_foreach().
//
// The function takes the following parameters:
//
//   - widget: Widget.
//   - packType: pack type of the action widget.
func (notebook *Notebook) SetActionWidget(widget Widgetter, packType PackType) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.GtkPackType  // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkPackType(packType)

	C.gtk_notebook_set_action_widget(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(packType)
}

// SetCurrentPage switches to the page number page_num.
//
// Note that due to historical reasons, GtkNotebook refuses to switch to a page
// unless the child widget is visible. Therefore, it is recommended to show
// child widgets before adding them to a notebook.
//
// The function takes the following parameters:
//
//   - pageNum: index of the page to switch to, starting from 0. If negative,
//     the last page will be used. If greater than the number of pages in the
//     notebook, nothing will be done.
func (notebook *Notebook) SetCurrentPage(pageNum int) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.gint(pageNum)

	C.gtk_notebook_set_current_page(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(pageNum)
}

// SetGroupName sets a group name for notebook.
//
// Notebooks with the same name will be able to exchange tabs via drag and drop.
// A notebook with a NULL group name will not be able to exchange tabs with any
// other notebook.
//
// The function takes the following parameters:
//
//   - groupName (optional): name of the notebook group, or NULL to unset it.
func (notebook *Notebook) SetGroupName(groupName string) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	if groupName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_notebook_set_group_name(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(groupName)
}

// SetMenuLabel changes the menu label for the page containing child.
//
// The function takes the following parameters:
//
//   - child widget.
//   - menuLabel (optional): menu label, or NULL for default.
func (notebook *Notebook) SetMenuLabel(child, menuLabel Widgetter) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if menuLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuLabel).Native()))
	}

	C.gtk_notebook_set_menu_label(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(menuLabel)
}

// SetMenuLabelText creates a new label and sets it as the menu label of child.
//
// The function takes the following parameters:
//
//   - child widget.
//   - menuText: label text.
func (notebook *Notebook) SetMenuLabelText(child Widgetter, menuText string) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.gchar       // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(menuText)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_notebook_set_menu_label_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(menuText)
}

// SetScrollable sets whether the tab label area will have arrows for scrolling
// if there are too many tabs to fit in the area.
//
// The function takes the following parameters:
//
//   - scrollable: TRUE if scroll arrows should be added.
func (notebook *Notebook) SetScrollable(scrollable bool) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	if scrollable {
		_arg1 = C.TRUE
	}

	C.gtk_notebook_set_scrollable(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(scrollable)
}

// SetShowBorder sets whether a bevel will be drawn around the notebook
// pages. This only has a visual effect when the tabs are not shown. See
// gtk_notebook_set_show_tabs().
//
// The function takes the following parameters:
//
//   - showBorder: TRUE if a bevel should be drawn around the notebook.
func (notebook *Notebook) SetShowBorder(showBorder bool) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	if showBorder {
		_arg1 = C.TRUE
	}

	C.gtk_notebook_set_show_border(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(showBorder)
}

// SetShowTabs sets whether to show the tabs for the notebook or not.
//
// The function takes the following parameters:
//
//   - showTabs: TRUE if the tabs should be shown.
func (notebook *Notebook) SetShowTabs(showTabs bool) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	if showTabs {
		_arg1 = C.TRUE
	}

	C.gtk_notebook_set_show_tabs(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(showTabs)
}

// SetTabDetachable sets whether the tab can be detached from notebook to
// another notebook or widget.
//
// Note that 2 notebooks must share a common group identificator (see
// gtk_notebook_set_group_name()) to allow automatic tabs interchange between
// them.
//
// If you want a widget to interact with a notebook through DnD (i.e.:
// accept dragged tabs from it) it must be set as a drop destination and accept
// the target “GTK_NOTEBOOK_TAB”. The notebook will fill the selection with a
// GtkWidget** pointing to the child widget that corresponds to the dropped tab.
//
// Note that you should use gtk_notebook_detach_tab() instead of
// gtk_container_remove() if you want to remove the tab from the source notebook
// as part of accepting a drop. Otherwise, the source notebook will think that
// the dragged tab was removed from underneath the ongoing drag operation,
// and will initiate a drag cancel animation.
//
//	static void
//	on_drag_data_received (GtkWidget        *widget,
//	                       GdkDragContext   *context,
//	                       gint              x,
//	                       gint              y,
//	                       GtkSelectionData *data,
//	                       guint             info,
//	                       guint             time,
//	                       gpointer          user_data)
//	{
//	  GtkWidget *notebook;
//	  GtkWidget **child;
//
//	  notebook = gtk_drag_get_source_widget (context);
//	  child = (void*) gtk_selection_data_get_data (data);
//
//	  // process_widget (*child);
//
//	  gtk_notebook_detach_tab (GTK_NOTEBOOK (notebook), *child);
//	}
//
// If you want a notebook to accept drags from other widgets, you will have to
// set your own DnD code to do it.
//
// The function takes the following parameters:
//
//   - child Widget.
//   - detachable: whether the tab is detachable or not.
func (notebook *Notebook) SetTabDetachable(child Widgetter, detachable bool) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.gboolean     // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if detachable {
		_arg2 = C.TRUE
	}

	C.gtk_notebook_set_tab_detachable(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(detachable)
}

// SetTabLabel changes the tab label for child. If NULL is specified for
// tab_label, then the page will have the label “page N”.
//
// The function takes the following parameters:
//
//   - child: page.
//   - tabLabel (optional): tab label widget to use, or NULL for default tab
//     label.
func (notebook *Notebook) SetTabLabel(child, tabLabel Widgetter) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if tabLabel != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	}

	C.gtk_notebook_set_tab_label(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
}

// SetTabLabelText creates a new label and sets it as the tab label for the page
// containing child.
//
// The function takes the following parameters:
//
//   - child: page.
//   - tabText: label text.
func (notebook *Notebook) SetTabLabelText(child Widgetter, tabText string) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.gchar       // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(tabText)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_notebook_set_tab_label_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabText)
}

// SetTabPos sets the edge at which the tabs for switching pages in the notebook
// are drawn.
//
// The function takes the following parameters:
//
//   - pos: edge to draw the tabs at.
func (notebook *Notebook) SetTabPos(pos PositionType) {
	var _arg0 *C.GtkNotebook    // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.GtkPositionType(pos)

	C.gtk_notebook_set_tab_pos(_arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(pos)
}

// SetTabReorderable sets whether the notebook tab can be reordered via drag and
// drop or not.
//
// The function takes the following parameters:
//
//   - child Widget.
//   - reorderable: whether the tab is reorderable or not.
func (notebook *Notebook) SetTabReorderable(child Widgetter, reorderable bool) {
	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.gboolean     // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if reorderable {
		_arg2 = C.TRUE
	}

	C.gtk_notebook_set_tab_reorderable(_arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(reorderable)
}

func (notebook *Notebook) changeCurrentPage(offset int) bool {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.change_current_page

	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.gint(offset)

	_cret = C._gotk4_gtk3_Notebook_virtual_change_current_page(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(offset)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (notebook *Notebook) focusTab(typ NotebookTab) bool {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.focus_tab

	var _arg0 *C.GtkNotebook   // out
	var _arg1 C.GtkNotebookTab // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.GtkNotebookTab(typ)

	_cret = C._gotk4_gtk3_Notebook_virtual_focus_tab(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(typ)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - child
//   - tabLabel
//   - menuLabel
//   - position
func (notebook *Notebook) insertPage(child, tabLabel, menuLabel Widgetter, position int) int {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.insert_page

	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.GtkWidget   // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 C.gint         // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(tabLabel).Native()))
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuLabel).Native()))
	_arg4 = C.gint(position)

	_cret = C._gotk4_gtk3_Notebook_virtual_insert_page(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(tabLabel)
	runtime.KeepAlive(menuLabel)
	runtime.KeepAlive(position)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

func (notebook *Notebook) moveFocusOut(direction DirectionType) {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.move_focus_out

	var _arg0 *C.GtkNotebook     // out
	var _arg1 C.GtkDirectionType // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.GtkDirectionType(direction)

	C._gotk4_gtk3_Notebook_virtual_move_focus_out(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(direction)
}

// The function takes the following parameters:
//
//   - child
//   - pageNum
func (notebook *Notebook) pageAdded(child Widgetter, pageNum uint) {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.page_added

	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.guint        // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.guint(pageNum)

	C._gotk4_gtk3_Notebook_virtual_page_added(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(pageNum)
}

// The function takes the following parameters:
//
//   - child
//   - pageNum
func (notebook *Notebook) pageRemoved(child Widgetter, pageNum uint) {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.page_removed

	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.guint        // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.guint(pageNum)

	C._gotk4_gtk3_Notebook_virtual_page_removed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(pageNum)
}

// The function takes the following parameters:
//
//   - child
//   - pageNum
func (notebook *Notebook) pageReordered(child Widgetter, pageNum uint) {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.page_reordered

	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.guint        // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.guint(pageNum)

	C._gotk4_gtk3_Notebook_virtual_page_reordered(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)
	runtime.KeepAlive(pageNum)
}

// The function takes the following parameters:
//
//   - direction
//   - moveToLast
func (notebook *Notebook) reorderTab(direction DirectionType, moveToLast bool) bool {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.reorder_tab

	var _arg0 *C.GtkNotebook     // out
	var _arg1 C.GtkDirectionType // out
	var _arg2 C.gboolean         // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = C.GtkDirectionType(direction)
	if moveToLast {
		_arg2 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Notebook_virtual_reorder_tab(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(moveToLast)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (notebook *Notebook) selectPage(moveFocus bool) bool {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.select_page

	var _arg0 *C.GtkNotebook // out
	var _arg1 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	if moveFocus {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Notebook_virtual_select_page(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(moveFocus)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - page
//   - pageNum
func (notebook *Notebook) switchPage(page Widgetter, pageNum uint) {
	gclass := (*C.GtkNotebookClass)(coreglib.PeekParentClass(notebook))
	fnarg := gclass.switch_page

	var _arg0 *C.GtkNotebook // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.guint        // out

	_arg0 = (*C.GtkNotebook)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(page).Native()))
	_arg2 = C.guint(pageNum)

	C._gotk4_gtk3_Notebook_virtual_switch_page(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(page)
	runtime.KeepAlive(pageNum)
}

// NotebookAccessibleOverrides contains methods that are overridable.
type NotebookAccessibleOverrides struct {
}

func defaultNotebookAccessibleOverrides(v *NotebookAccessible) NotebookAccessibleOverrides {
	return NotebookAccessibleOverrides{}
}

type NotebookAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Selection
}

var (
	_ coreglib.Objector = (*NotebookAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*NotebookAccessible, *NotebookAccessibleClass, NotebookAccessibleOverrides](
		GTypeNotebookAccessible,
		initNotebookAccessibleClass,
		wrapNotebookAccessible,
		defaultNotebookAccessibleOverrides,
	)
}

func initNotebookAccessibleClass(gclass unsafe.Pointer, overrides NotebookAccessibleOverrides, classInitFunc func(*NotebookAccessibleClass)) {
	if classInitFunc != nil {
		class := (*NotebookAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapNotebookAccessible(obj *coreglib.Object) *NotebookAccessible {
	return &NotebookAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Selection: atk.Selection{
			Object: obj,
		},
	}
}

func marshalNotebookAccessible(p uintptr) (interface{}, error) {
	return wrapNotebookAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NotebookPageAccessibleOverrides contains methods that are overridable.
type NotebookPageAccessibleOverrides struct {
}

func defaultNotebookPageAccessibleOverrides(v *NotebookPageAccessible) NotebookPageAccessibleOverrides {
	return NotebookPageAccessibleOverrides{}
}

type NotebookPageAccessible struct {
	_ [0]func() // equal guard
	atk.AtkObject

	*coreglib.Object
	atk.Component
}

var (
	_ coreglib.Objector = (*NotebookPageAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*NotebookPageAccessible, *NotebookPageAccessibleClass, NotebookPageAccessibleOverrides](
		GTypeNotebookPageAccessible,
		initNotebookPageAccessibleClass,
		wrapNotebookPageAccessible,
		defaultNotebookPageAccessibleOverrides,
	)
}

func initNotebookPageAccessibleClass(gclass unsafe.Pointer, overrides NotebookPageAccessibleOverrides, classInitFunc func(*NotebookPageAccessibleClass)) {
	if classInitFunc != nil {
		class := (*NotebookPageAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapNotebookPageAccessible(obj *coreglib.Object) *NotebookPageAccessible {
	return &NotebookPageAccessible{
		AtkObject: atk.AtkObject{
			Object: obj,
		},
		Object: obj,
		Component: atk.Component{
			Object: obj,
		},
	}
}

func marshalNotebookPageAccessible(p uintptr) (interface{}, error) {
	return wrapNotebookPageAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// The function takes the following parameters:
//
//   - notebook
//   - child
func NewNotebookPageAccessible(notebook *NotebookAccessible, child Widgetter) *NotebookPageAccessible {
	var _arg1 *C.GtkNotebookAccessible // out
	var _arg2 *C.GtkWidget             // out
	var _cret *C.AtkObject             // in

	_arg1 = (*C.GtkNotebookAccessible)(unsafe.Pointer(coreglib.InternObject(notebook).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	_cret = C.gtk_notebook_page_accessible_new(_arg1, _arg2)
	runtime.KeepAlive(notebook)
	runtime.KeepAlive(child)

	var _notebookPageAccessible *NotebookPageAccessible // out

	_notebookPageAccessible = wrapNotebookPageAccessible(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _notebookPageAccessible
}

func (page *NotebookPageAccessible) Invalidate() {
	var _arg0 *C.GtkNotebookPageAccessible // out

	_arg0 = (*C.GtkNotebookPageAccessible)(unsafe.Pointer(coreglib.InternObject(page).Native()))

	C.gtk_notebook_page_accessible_invalidate(_arg0)
	runtime.KeepAlive(page)
}

// NumerableIconOverrides contains methods that are overridable.
type NumerableIconOverrides struct {
}

func defaultNumerableIconOverrides(v *NumerableIcon) NumerableIconOverrides {
	return NumerableIconOverrides{}
}

// NumerableIcon is a subclass of Icon that can show a number or short string as
// an emblem. The number can be overlayed on top of another emblem, if desired.
//
// It supports theming by taking font and color information from a provided
// StyleContext; see gtk_numerable_icon_set_style_context().
//
// Typical numerable icons: ! (numerableicon.png) ! (numerableicon2.png).
type NumerableIcon struct {
	_ [0]func() // equal guard
	gio.EmblemedIcon
}

var (
	_ coreglib.Objector = (*NumerableIcon)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*NumerableIcon, *NumerableIconClass, NumerableIconOverrides](
		GTypeNumerableIcon,
		initNumerableIconClass,
		wrapNumerableIcon,
		defaultNumerableIconOverrides,
	)
}

func initNumerableIconClass(gclass unsafe.Pointer, overrides NumerableIconOverrides, classInitFunc func(*NumerableIconClass)) {
	if classInitFunc != nil {
		class := (*NumerableIconClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapNumerableIcon(obj *coreglib.Object) *NumerableIcon {
	return &NumerableIcon{
		EmblemedIcon: gio.EmblemedIcon{
			Object: obj,
			Icon: gio.Icon{
				Object: obj,
			},
		},
	}
}

func marshalNumerableIcon(p uintptr) (interface{}, error) {
	return wrapNumerableIcon(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// BackgroundGIcon returns the #GIcon that was set as the base background image,
// or NULL if there’s none. The caller of this function does not own a reference
// to the returned #GIcon.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - icon (optional) or NULL.
func (self *NumerableIcon) BackgroundGIcon() *gio.Icon {
	var _arg0 *C.GtkNumerableIcon // out
	var _cret *C.GIcon            // in

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_numerable_icon_get_background_gicon(_arg0)
	runtime.KeepAlive(self)

	var _icon *gio.Icon // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_icon = &gio.Icon{
				Object: obj,
			}
		}
	}

	return _icon
}

// BackgroundIconName returns the icon name used as the base background image,
// or NULL if there’s none.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - utf8 (optional): icon name, or NULL.
func (self *NumerableIcon) BackgroundIconName() string {
	var _arg0 *C.GtkNumerableIcon // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_numerable_icon_get_background_icon_name(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Count returns the value currently displayed by self.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - gint: currently displayed value.
func (self *NumerableIcon) Count() int {
	var _arg0 *C.GtkNumerableIcon // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_numerable_icon_get_count(_arg0)
	runtime.KeepAlive(self)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Label returns the currently displayed label of the icon, or NULL.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - utf8 (optional): currently displayed label.
func (self *NumerableIcon) Label() string {
	var _arg0 *C.GtkNumerableIcon // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_numerable_icon_get_label(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// StyleContext returns the StyleContext used by the icon for theming, or NULL
// if there’s none.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - styleContext (optional) or NULL. This object is internal to GTK+ and
//     should not be unreffed. Use g_object_ref() if you want to keep it around.
func (self *NumerableIcon) StyleContext() *StyleContext {
	var _arg0 *C.GtkNumerableIcon // out
	var _cret *C.GtkStyleContext  // in

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_numerable_icon_get_style_context(_arg0)
	runtime.KeepAlive(self)

	var _styleContext *StyleContext // out

	if _cret != nil {
		_styleContext = wrapStyleContext(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _styleContext
}

// SetBackgroundGIcon updates the icon to use icon as the base background image.
// If icon is NULL, self will go back using style information or default theming
// for its background image.
//
// If this method is called and an icon name was already set as
// background for the icon, icon will be used, i.e. the last method
// called between gtk_numerable_icon_set_background_gicon() and
// gtk_numerable_icon_set_background_icon_name() has always priority.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - icon (optional) or NULL.
func (self *NumerableIcon) SetBackgroundGIcon(icon gio.Iconner) {
	var _arg0 *C.GtkNumerableIcon // out
	var _arg1 *C.GIcon            // out

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if icon != nil {
		_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	}

	C.gtk_numerable_icon_set_background_gicon(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(icon)
}

// SetBackgroundIconName updates the icon to use the icon named icon_name from
// the current icon theme as the base background image. If icon_name is NULL,
// self will go back using style information or default theming for its
// background image.
//
// If this method is called and a #GIcon was already set as background
// for the icon, icon_name will be used, i.e. the last method
// called between gtk_numerable_icon_set_background_icon_name() and
// gtk_numerable_icon_set_background_gicon() has always priority.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name, or NULL.
func (self *NumerableIcon) SetBackgroundIconName(iconName string) {
	var _arg0 *C.GtkNumerableIcon // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_numerable_icon_set_background_icon_name(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(iconName)
}

// SetCount sets the currently displayed value of self to count.
//
// The numeric value is always clamped to make it two digits, i.e. between -99
// and 99. Setting a count of zero removes the emblem. If this method is called,
// and a label was already set on the icon, it will automatically be reset
// to NULL before rendering the number, i.e. the last method called between
// gtk_numerable_icon_set_count() and gtk_numerable_icon_set_label() has always
// priority.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - count: number between -99 and 99.
func (self *NumerableIcon) SetCount(count int) {
	var _arg0 *C.GtkNumerableIcon // out
	var _arg1 C.gint              // out

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = C.gint(count)

	C.gtk_numerable_icon_set_count(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(count)
}

// SetLabel sets the currently displayed value of self to the string in label.
// Setting an empty label removes the emblem.
//
// Note that this is meant for displaying short labels, such as roman numbers,
// or single letters. For roman numbers, consider using the Unicode characters
// U+2160 - U+217F. Strings longer than two characters will likely not be
// rendered very well.
//
// If this method is called, and a number was already set on the icon,
// it will automatically be reset to zero before rendering the label,
// i.e. the last method called between gtk_numerable_icon_set_label() and
// gtk_numerable_icon_set_count() has always priority.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - label (optional): short label, or NULL.
func (self *NumerableIcon) SetLabel(label string) {
	var _arg0 *C.GtkNumerableIcon // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_numerable_icon_set_label(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(label)
}

// SetStyleContext updates the icon to fetch theme information from the given
// StyleContext.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - style: StyleContext.
func (self *NumerableIcon) SetStyleContext(style *StyleContext) {
	var _arg0 *C.GtkNumerableIcon // out
	var _arg1 *C.GtkStyleContext  // out

	_arg0 = (*C.GtkNumerableIcon)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	C.gtk_numerable_icon_set_style_context(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(style)
}

// NewNumerableIcon creates a new unthemed NumerableIcon.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - baseIcon to overlay on.
//
// The function returns the following values:
//
//   - icon: new #GIcon.
func NewNumerableIcon(baseIcon gio.Iconner) *gio.Icon {
	var _arg1 *C.GIcon // out
	var _cret *C.GIcon // in

	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(baseIcon).Native()))

	_cret = C.gtk_numerable_icon_new(_arg1)
	runtime.KeepAlive(baseIcon)

	var _icon *gio.Icon // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_icon = &gio.Icon{
			Object: obj,
		}
	}

	return _icon
}

// NewNumerableIconWithStyleContext creates a new NumerableIcon which will
// themed according to the passed StyleContext. This is a convenience
// constructor that calls gtk_numerable_icon_set_style_context() internally.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - baseIcon to overlay on.
//   - context: StyleContext.
//
// The function returns the following values:
//
//   - icon: new #GIcon.
func NewNumerableIconWithStyleContext(baseIcon gio.Iconner, context *StyleContext) *gio.Icon {
	var _arg1 *C.GIcon           // out
	var _arg2 *C.GtkStyleContext // out
	var _cret *C.GIcon           // in

	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(baseIcon).Native()))
	_arg2 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_numerable_icon_new_with_style_context(_arg1, _arg2)
	runtime.KeepAlive(baseIcon)
	runtime.KeepAlive(context)

	var _icon *gio.Icon // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_icon = &gio.Icon{
			Object: obj,
		}
	}

	return _icon
}

// OffscreenWindowOverrides contains methods that are overridable.
type OffscreenWindowOverrides struct {
}

func defaultOffscreenWindowOverrides(v *OffscreenWindow) OffscreenWindowOverrides {
	return OffscreenWindowOverrides{}
}

// OffscreenWindow is strictly intended to be used for obtaining snapshots of
// widgets that are not part of a normal widget hierarchy. Since OffscreenWindow
// is a toplevel widget you cannot obtain snapshots of a full window with it
// since you cannot pack a toplevel widget in another toplevel.
//
// The idea is to take a widget and manually set the state of it, add it to a
// GtkOffscreenWindow and then retrieve the snapshot as a #cairo_surface_t or
// Pixbuf.
//
// GtkOffscreenWindow derives from Window only as an implementation detail.
// Applications should not use any API specific to Window to operate on this
// object. It should be treated as a Bin that has no parent widget.
//
// When contained offscreen widgets are redrawn, GtkOffscreenWindow will emit a
// Widget::damage-event signal.
type OffscreenWindow struct {
	_ [0]func() // equal guard
	Window
}

var (
	_ Binner = (*OffscreenWindow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*OffscreenWindow, *OffscreenWindowClass, OffscreenWindowOverrides](
		GTypeOffscreenWindow,
		initOffscreenWindowClass,
		wrapOffscreenWindow,
		defaultOffscreenWindowOverrides,
	)
}

func initOffscreenWindowClass(gclass unsafe.Pointer, overrides OffscreenWindowOverrides, classInitFunc func(*OffscreenWindowClass)) {
	if classInitFunc != nil {
		class := (*OffscreenWindowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapOffscreenWindow(obj *coreglib.Object) *OffscreenWindow {
	return &OffscreenWindow{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalOffscreenWindow(p uintptr) (interface{}, error) {
	return wrapOffscreenWindow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewOffscreenWindow creates a toplevel container widget that is used to
// retrieve snapshots of widgets without showing them on the screen.
//
// The function returns the following values:
//
//   - offscreenWindow: pointer to a Widget.
func NewOffscreenWindow() *OffscreenWindow {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_offscreen_window_new()

	var _offscreenWindow *OffscreenWindow // out

	_offscreenWindow = wrapOffscreenWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _offscreenWindow
}

// Pixbuf retrieves a snapshot of the contained widget in the form of a Pixbuf.
// This is a new pixbuf with a reference count of 1, and the application should
// unreference it once it is no longer needed.
//
// The function returns the following values:
//
//   - pixbuf (optional) pointer, or NULL.
func (offscreen *OffscreenWindow) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkOffscreenWindow // out
	var _cret *C.GdkPixbuf          // in

	_arg0 = (*C.GtkOffscreenWindow)(unsafe.Pointer(coreglib.InternObject(offscreen).Native()))

	_cret = C.gtk_offscreen_window_get_pixbuf(_arg0)
	runtime.KeepAlive(offscreen)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// Surface retrieves a snapshot of the contained widget in the form of a
// #cairo_surface_t. If you need to keep this around over window resizes then
// you should add a reference to it.
//
// The function returns the following values:
//
//   - surface (optional) pointer to the offscreen surface, or NULL.
func (offscreen *OffscreenWindow) Surface() *cairo.Surface {
	var _arg0 *C.GtkOffscreenWindow // out
	var _cret *C.cairo_surface_t    // in

	_arg0 = (*C.GtkOffscreenWindow)(unsafe.Pointer(coreglib.InternObject(offscreen).Native()))

	_cret = C.gtk_offscreen_window_get_surface(_arg0)
	runtime.KeepAlive(offscreen)

	var _surface *cairo.Surface // out

	if _cret != nil {
		_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
		C.cairo_surface_reference(_cret)
		runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
			C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
		})
	}

	return _surface
}

// OverlayOverrides contains methods that are overridable.
type OverlayOverrides struct {
	// ChildPosition: signal emitted to determine the position and size of any
	// overlay child widgets.
	//
	// The function takes the following parameters:
	//
	//   - widget
	//   - allocation
	ChildPosition func(widget Widgetter, allocation *Allocation) bool
}

func defaultOverlayOverrides(v *Overlay) OverlayOverrides {
	return OverlayOverrides{
		ChildPosition: v.childPosition,
	}
}

// Overlay is a container which contains a single main child, on top of which
// it can place “overlay” widgets. The position of each overlay widget is
// determined by its Widget:halign and Widget:valign properties. E.g. a widget
// with both alignments set to GTK_ALIGN_START will be placed at the top left
// corner of the GtkOverlay container, whereas an overlay with halign set to
// GTK_ALIGN_CENTER and valign set to GTK_ALIGN_END will be placed a the bottom
// edge of the GtkOverlay, horizontally centered. The position can be adjusted
// by setting the margin properties of the child to non-zero values.
//
// More complicated placement of overlays is possible by connecting to the
// Overlay::get-child-position signal.
//
// An overlay’s minimum and natural sizes are those of its main child. The sizes
// of overlay children are not considered when measuring these preferred sizes.
//
// # GtkOverlay as GtkBuildable
//
// The GtkOverlay implementation of the GtkBuildable interface supports placing
// a child as an overlay by specifying “overlay” as the “type” attribute of a
// <child> element.
//
// # CSS nodes
//
// GtkOverlay has a single CSS node with the name “overlay”. Overlay children
// whose alignments cause them to be positioned at an edge get the style classes
// “.left”, “.right”, “.top”, and/or “.bottom” according to their position.
type Overlay struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Overlay)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Overlay, *OverlayClass, OverlayOverrides](
		GTypeOverlay,
		initOverlayClass,
		wrapOverlay,
		defaultOverlayOverrides,
	)
}

func initOverlayClass(gclass unsafe.Pointer, overrides OverlayOverrides, classInitFunc func(*OverlayClass)) {
	pclass := (*C.GtkOverlayClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeOverlay))))

	if overrides.ChildPosition != nil {
		pclass.get_child_position = (*[0]byte)(C._gotk4_gtk3_OverlayClass_get_child_position)
	}

	if classInitFunc != nil {
		class := (*OverlayClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapOverlay(obj *coreglib.Object) *Overlay {
	return &Overlay{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalOverlay(p uintptr) (interface{}, error) {
	return wrapOverlay(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectGetChildPosition signal is emitted to determine the position and
// size of any overlay child widgets. A handler for this signal should fill
// allocation with the desired position and size for widget, relative to the
// 'main' child of overlay.
//
// The default handler for this signal uses the widget's halign and valign
// properties to determine the position and gives the widget its natural size
// (except that an alignment of GTK_ALIGN_FILL will cause the overlay to be
// full-width/height). If the main child is a ScrolledWindow, the overlays are
// placed relative to its contents.
func (overlay *Overlay) ConnectGetChildPosition(f func(widget Widgetter) (allocation *gdk.Rectangle, ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(overlay, "get-child-position", false, unsafe.Pointer(C._gotk4_gtk3_Overlay_ConnectGetChildPosition), f)
}

// NewOverlay creates a new Overlay.
//
// The function returns the following values:
//
//   - overlay: new Overlay object.
func NewOverlay() *Overlay {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_overlay_new()

	var _overlay *Overlay // out

	_overlay = wrapOverlay(coreglib.Take(unsafe.Pointer(_cret)))

	return _overlay
}

// AddOverlay adds widget to overlay.
//
// The widget will be stacked on top of the main widget added with
// gtk_container_add().
//
// The position at which widget is placed is determined from its Widget:halign
// and Widget:valign properties.
//
// The function takes the following parameters:
//
//   - widget to be added to the container.
func (overlay *Overlay) AddOverlay(widget Widgetter) {
	var _arg0 *C.GtkOverlay // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkOverlay)(unsafe.Pointer(coreglib.InternObject(overlay).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_overlay_add_overlay(_arg0, _arg1)
	runtime.KeepAlive(overlay)
	runtime.KeepAlive(widget)
}

// OverlayPassThrough: convenience function to get the value of the
// Overlay:pass-through child property for widget.
//
// The function takes the following parameters:
//
//   - widget: overlay child of Overlay.
//
// The function returns the following values:
//
//   - ok: whether the widget is a pass through child.
func (overlay *Overlay) OverlayPassThrough(widget Widgetter) bool {
	var _arg0 *C.GtkOverlay // out
	var _arg1 *C.GtkWidget  // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkOverlay)(unsafe.Pointer(coreglib.InternObject(overlay).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_overlay_get_overlay_pass_through(_arg0, _arg1)
	runtime.KeepAlive(overlay)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ReorderOverlay moves child to a new index in the list of overlay children.
// The list contains overlays in the order that these were added to overlay by
// default. See also Overlay:index.
//
// A widget’s index in the overlay children list determines which order the
// children are drawn if they overlap. The first child is drawn at the bottom.
// It also affects the default focus chain order.
//
// The function takes the following parameters:
//
//   - child: overlaid Widget to move.
//   - index_: new index for child in the list of overlay children of overlay,
//     starting from 0. If negative, indicates the end of the list.
func (overlay *Overlay) ReorderOverlay(child Widgetter, index_ int) {
	var _arg0 *C.GtkOverlay // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.int         // out

	_arg0 = (*C.GtkOverlay)(unsafe.Pointer(coreglib.InternObject(overlay).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.int(index_)

	C.gtk_overlay_reorder_overlay(_arg0, _arg1, _arg2)
	runtime.KeepAlive(overlay)
	runtime.KeepAlive(child)
	runtime.KeepAlive(index_)
}

// SetOverlayPassThrough: convenience function to set the value of the
// Overlay:pass-through child property for widget.
//
// The function takes the following parameters:
//
//   - widget: overlay child of Overlay.
//   - passThrough: whether the child should pass the input through.
func (overlay *Overlay) SetOverlayPassThrough(widget Widgetter, passThrough bool) {
	var _arg0 *C.GtkOverlay // out
	var _arg1 *C.GtkWidget  // out
	var _arg2 C.gboolean    // out

	_arg0 = (*C.GtkOverlay)(unsafe.Pointer(coreglib.InternObject(overlay).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if passThrough {
		_arg2 = C.TRUE
	}

	C.gtk_overlay_set_overlay_pass_through(_arg0, _arg1, _arg2)
	runtime.KeepAlive(overlay)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(passThrough)
}

// childPosition: signal emitted to determine the position and size of any
// overlay child widgets.
//
// The function takes the following parameters:
//
//   - widget
//   - allocation
func (overlay *Overlay) childPosition(widget Widgetter, allocation *Allocation) bool {
	gclass := (*C.GtkOverlayClass)(coreglib.PeekParentClass(overlay))
	fnarg := gclass.get_child_position

	var _arg0 *C.GtkOverlay    // out
	var _arg1 *C.GtkWidget     // out
	var _arg2 *C.GtkAllocation // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkOverlay)(unsafe.Pointer(coreglib.InternObject(overlay).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	_cret = C._gotk4_gtk3_Overlay_virtual_get_child_position(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(overlay)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(allocation)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PadController is an event controller for the pads found in drawing tablets
// (The collection of buttons and tactile sensors often found around the
// stylus-sensitive area).
//
// These buttons and sensors have no implicit meaning, and by default they
// perform no action, this event controller is provided to map those to #GAction
// objects, thus letting the application give those a more semantic meaning.
//
// Buttons and sensors are not constrained to triggering a single action,
// some GDK_SOURCE_TABLET_PAD devices feature multiple "modes", all these
// input elements have one current mode, which may determine the final action
// being triggered. Pad devices often divide buttons and sensors into groups,
// all elements in a group share the same current mode, but different
// groups may have different modes. See gdk_device_pad_get_n_groups() and
// gdk_device_pad_get_group_n_modes().
//
// Each of the actions that a given button/strip/ring performs for a given mode
// is defined by PadActionEntry, it contains an action name that will be looked
// up in the given Group and activated whenever the specified input element and
// mode are triggered.
//
// A simple example of PadController usage, assigning button 1 in all modes and
// pad devices to an "invert-selection" action:
//
//	GtkPadActionEntry *pad_actions[] = {
//	  { GTK_PAD_ACTION_BUTTON, 1, -1, "Invert selection", "pad-actions.invert-selection" },
//	  …
//	};
//
//	…
//	action_group = g_simple_action_group_new ();
//	action = g_simple_action_new ("pad-actions.invert-selection", NULL);
//	g_signal_connect (action, "activate", on_invert_selection_activated, NULL);
//	g_action_map_add_action (G_ACTION_MAP (action_group), action);
//	…
//	pad_controller = gtk_pad_controller_new (window, action_group, NULL);
//
// The actions belonging to rings/strips will be activated with a parameter
// of type G_VARIANT_TYPE_DOUBLE bearing the value of the given axis, it is
// required that those are made stateful and accepting this Type.
type PadController struct {
	_ [0]func() // equal guard
	EventController
}

var (
	_ EventControllerer = (*PadController)(nil)
)

func wrapPadController(obj *coreglib.Object) *PadController {
	return &PadController{
		EventController: EventController{
			Object: obj,
		},
	}
}

func marshalPadController(p uintptr) (interface{}, error) {
	return wrapPadController(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewPadController creates a new PadController that will associate events from
// pad to actions. A NULL pad may be provided so the controller manages all pad
// devices generically, it is discouraged to mix PadController objects with
// NULL and non-NULL pad argument on the same window, as execution order is not
// guaranteed.
//
// The PadController is created with no mapped actions. In order to map
// pad events to actions, use gtk_pad_controller_set_action_entries() or
// gtk_pad_controller_set_action().
//
// The function takes the following parameters:
//
//   - window: Window.
//   - group to trigger actions from.
//   - pad (optional): GDK_SOURCE_TABLET_PAD device, or NULL to handle all pads.
//
// The function returns the following values:
//
//   - padController: newly created PadController.
func NewPadController(window *Window, group gio.ActionGrouper, pad gdk.Devicer) *PadController {
	var _arg1 *C.GtkWindow        // out
	var _arg2 *C.GActionGroup     // out
	var _arg3 *C.GdkDevice        // out
	var _cret *C.GtkPadController // in

	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg2 = (*C.GActionGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	if pad != nil {
		_arg3 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(pad).Native()))
	}

	_cret = C.gtk_pad_controller_new(_arg1, _arg2, _arg3)
	runtime.KeepAlive(window)
	runtime.KeepAlive(group)
	runtime.KeepAlive(pad)

	var _padController *PadController // out

	_padController = wrapPadController(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _padController
}

// SetAction adds an individual action to controller. This action will only be
// activated if the given button/ring/strip number in index is interacted while
// the current mode is mode. -1 may be used for simple cases, so the action is
// triggered on all modes.
//
// The given label should be considered user-visible, so internationalization
// rules apply. Some windowing systems may be able to use those for user
// feedback.
//
// The function takes the following parameters:
//
//   - typ: type of pad feature that will trigger this action.
//   - index: 0-indexed button/ring/strip number that will trigger this action.
//   - mode that will trigger this action, or -1 for all modes.
//   - label: human readable description of this action, this string should be
//     deemed user-visible.
//   - actionName: action name that will be activated in the Group.
func (controller *PadController) SetAction(typ PadActionType, index, mode int, label, actionName string) {
	var _arg0 *C.GtkPadController // out
	var _arg1 C.GtkPadActionType  // out
	var _arg2 C.gint              // out
	var _arg3 C.gint              // out
	var _arg4 *C.gchar            // out
	var _arg5 *C.gchar            // out

	_arg0 = (*C.GtkPadController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg1 = C.GtkPadActionType(typ)
	_arg2 = C.gint(index)
	_arg3 = C.gint(mode)
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(actionName)))
	defer C.free(unsafe.Pointer(_arg5))

	C.gtk_pad_controller_set_action(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(index)
	runtime.KeepAlive(mode)
	runtime.KeepAlive(label)
	runtime.KeepAlive(actionName)
}

// SetActionEntries: this is a convenience function to add a
// group of action entries on controller. See PadActionEntry and
// gtk_pad_controller_set_action().
//
// The function takes the following parameters:
//
//   - entries: action entries to set on controller.
func (controller *PadController) SetActionEntries(entries []PadActionEntry) {
	var _arg0 *C.GtkPadController  // out
	var _arg1 *C.GtkPadActionEntry // out
	var _arg2 C.gint

	_arg0 = (*C.GtkPadController)(unsafe.Pointer(coreglib.InternObject(controller).Native()))
	_arg2 = (C.gint)(len(entries))
	_arg1 = (*C.GtkPadActionEntry)(C.calloc(C.size_t(len(entries)), C.size_t(C.sizeof_GtkPadActionEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkPadActionEntry)(_arg1), len(entries))
		for i := range entries {
			out[i] = *(*C.GtkPadActionEntry)(gextras.StructNative(unsafe.Pointer((&entries[i]))))
		}
	}

	C.gtk_pad_controller_set_action_entries(_arg0, _arg1, _arg2)
	runtime.KeepAlive(controller)
	runtime.KeepAlive(entries)
}

// PageSetup object stores the page size, orientation and margins. The idea
// is that you can get one of these from the page setup dialog and then pass
// it to the PrintOperation when printing. The benefit of splitting this out
// of the PrintSettings is that these affect the actual layout of the page,
// and thus need to be set long before user prints.
//
// # Margins
//
// The margins specified in this object are the “print margins”, i.e.
// the parts of the page that the printer cannot print on. These are different
// from the layout margins that a word processor uses; they are typically used
// to determine the minimal size for the layout margins.
//
// To obtain a PageSetup use gtk_page_setup_new() to get the defaults, or use
// gtk_print_run_page_setup_dialog() to show the page setup dialog and receive
// the resulting page setup.
//
// A page setup dialog
//
//	static GtkPrintSettings *settings = NULL;
//	static GtkPageSetup *page_setup = NULL;
//
//	static void
//	do_page_setup (void)
//	{
//	  GtkPageSetup *new_page_setup;
//
//	  if (settings == NULL)
//	    settings = gtk_print_settings_new ();
//
//	  new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
//	                                                    page_setup, settings);
//
//	  if (page_setup)
//	    g_object_unref (page_setup);
//
//	  page_setup = new_page_setup;
//	}
//
// Printing support was added in GTK+ 2.10.
type PageSetup struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*PageSetup)(nil)
)

func wrapPageSetup(obj *coreglib.Object) *PageSetup {
	return &PageSetup{
		Object: obj,
	}
}

func marshalPageSetup(p uintptr) (interface{}, error) {
	return wrapPageSetup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewPageSetup creates a new PageSetup.
//
// The function returns the following values:
//
//   - pageSetup: new PageSetup.
func NewPageSetup() *PageSetup {
	var _cret *C.GtkPageSetup // in

	_cret = C.gtk_page_setup_new()

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _pageSetup
}

// NewPageSetupFromFile reads the page setup from the file file_name. Returns
// a new PageSetup object with the restored page setup, or NULL if an error
// occurred. See gtk_page_setup_to_file().
//
// The function takes the following parameters:
//
//   - fileName: filename to read the page setup from.
//
// The function returns the following values:
//
//   - pageSetup: restored PageSetup.
func NewPageSetupFromFile(fileName string) (*PageSetup, error) {
	var _arg1 *C.gchar        // out
	var _cret *C.GtkPageSetup // in
	var _cerr *C.GError       // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_page_setup_new_from_file(_arg1, &_cerr)
	runtime.KeepAlive(fileName)

	var _pageSetup *PageSetup // out
	var _goerr error          // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pageSetup, _goerr
}

// NewPageSetupFromGVariant: desrialize a page setup from an a{sv} variant in
// the format produced by gtk_page_setup_to_gvariant().
//
// The function takes the following parameters:
//
//   - variant: a{sv} #GVariant.
//
// The function returns the following values:
//
//   - pageSetup: new PageSetup object.
func NewPageSetupFromGVariant(variant *glib.Variant) *PageSetup {
	var _arg1 *C.GVariant     // out
	var _cret *C.GtkPageSetup // in

	_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(variant)))

	_cret = C.gtk_page_setup_new_from_gvariant(_arg1)
	runtime.KeepAlive(variant)

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _pageSetup
}

// NewPageSetupFromKeyFile reads the page setup from the group group_name in
// the key file key_file. Returns a new PageSetup object with the restored page
// setup, or NULL if an error occurred.
//
// The function takes the following parameters:
//
//   - keyFile to retrieve the page_setup from.
//   - groupName (optional): name of the group in the key_file to read, or NULL
//     to use the default name “Page Setup”.
//
// The function returns the following values:
//
//   - pageSetup: restored PageSetup.
func NewPageSetupFromKeyFile(keyFile *glib.KeyFile, groupName string) (*PageSetup, error) {
	var _arg1 *C.GKeyFile     // out
	var _arg2 *C.gchar        // out
	var _cret *C.GtkPageSetup // in
	var _cerr *C.GError       // in

	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_page_setup_new_from_key_file(_arg1, _arg2, &_cerr)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)

	var _pageSetup *PageSetup // out
	var _goerr error          // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _pageSetup, _goerr
}

// Copy copies a PageSetup.
//
// The function returns the following values:
//
//   - pageSetup: copy of other.
func (other *PageSetup) Copy() *PageSetup {
	var _arg0 *C.GtkPageSetup // out
	var _cret *C.GtkPageSetup // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(other).Native()))

	_cret = C.gtk_page_setup_copy(_arg0)
	runtime.KeepAlive(other)

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _pageSetup
}

// BottomMargin gets the bottom margin in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: bottom margin.
func (setup *PageSetup) BottomMargin(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_bottom_margin(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// LeftMargin gets the left margin in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: left margin.
func (setup *PageSetup) LeftMargin(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_left_margin(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Orientation gets the page orientation of the PageSetup.
//
// The function returns the following values:
//
//   - pageOrientation: page orientation.
func (setup *PageSetup) Orientation() PageOrientation {
	var _arg0 *C.GtkPageSetup      // out
	var _cret C.GtkPageOrientation // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))

	_cret = C.gtk_page_setup_get_orientation(_arg0)
	runtime.KeepAlive(setup)

	var _pageOrientation PageOrientation // out

	_pageOrientation = PageOrientation(_cret)

	return _pageOrientation
}

// PageHeight returns the page height in units of unit.
//
// Note that this function takes orientation and margins into consideration.
// See gtk_page_setup_get_paper_height().
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: page height.
func (setup *PageSetup) PageHeight(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_page_height(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PageWidth returns the page width in units of unit.
//
// Note that this function takes orientation and margins into consideration.
// See gtk_page_setup_get_paper_width().
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: page width.
func (setup *PageSetup) PageWidth(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_page_width(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PaperHeight returns the paper height in units of unit.
//
// Note that this function takes orientation, but not margins into
// consideration. See gtk_page_setup_get_page_height().
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: paper height.
func (setup *PageSetup) PaperHeight(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_paper_height(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PaperSize gets the paper size of the PageSetup.
//
// The function returns the following values:
//
//   - paperSize: paper size.
func (setup *PageSetup) PaperSize() *PaperSize {
	var _arg0 *C.GtkPageSetup // out
	var _cret *C.GtkPaperSize // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))

	_cret = C.gtk_page_setup_get_paper_size(_arg0)
	runtime.KeepAlive(setup)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _paperSize
}

// PaperWidth returns the paper width in units of unit.
//
// Note that this function takes orientation, but not margins into
// consideration. See gtk_page_setup_get_page_width().
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: paper width.
func (setup *PageSetup) PaperWidth(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_paper_width(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// RightMargin gets the right margin in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: right margin.
func (setup *PageSetup) RightMargin(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_right_margin(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// TopMargin gets the top margin in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: top margin.
func (setup *PageSetup) TopMargin(unit Unit) float64 {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_page_setup_get_top_margin(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// LoadFile reads the page setup from the file file_name. See
// gtk_page_setup_to_file().
//
// The function takes the following parameters:
//
//   - fileName: filename to read the page setup from.
func (setup *PageSetup) LoadFile(fileName string) error {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.char         // out
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_page_setup_load_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(fileName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// LoadKeyFile reads the page setup from the group group_name in the key file
// key_file.
//
// The function takes the following parameters:
//
//   - keyFile to retrieve the page_setup from.
//   - groupName (optional): name of the group in the key_file to read, or NULL
//     to use the default name “Page Setup”.
func (setup *PageSetup) LoadKeyFile(keyFile *glib.KeyFile, groupName string) error {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.GKeyFile     // out
	var _arg2 *C.gchar        // out
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_page_setup_load_key_file(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetBottomMargin sets the bottom margin of the PageSetup.
//
// The function takes the following parameters:
//
//   - margin: new bottom margin in units of unit.
//   - unit units for margin.
func (setup *PageSetup) SetBottomMargin(margin float64, unit Unit) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.gdouble       // out
	var _arg2 C.GtkUnit       // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.gdouble(margin)
	_arg2 = C.GtkUnit(unit)

	C.gtk_page_setup_set_bottom_margin(_arg0, _arg1, _arg2)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(margin)
	runtime.KeepAlive(unit)
}

// SetLeftMargin sets the left margin of the PageSetup.
//
// The function takes the following parameters:
//
//   - margin: new left margin in units of unit.
//   - unit units for margin.
func (setup *PageSetup) SetLeftMargin(margin float64, unit Unit) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.gdouble       // out
	var _arg2 C.GtkUnit       // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.gdouble(margin)
	_arg2 = C.GtkUnit(unit)

	C.gtk_page_setup_set_left_margin(_arg0, _arg1, _arg2)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(margin)
	runtime.KeepAlive(unit)
}

// SetOrientation sets the page orientation of the PageSetup.
//
// The function takes the following parameters:
//
//   - orientation: PageOrientation value.
func (setup *PageSetup) SetOrientation(orientation PageOrientation) {
	var _arg0 *C.GtkPageSetup      // out
	var _arg1 C.GtkPageOrientation // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.GtkPageOrientation(orientation)

	C.gtk_page_setup_set_orientation(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(orientation)
}

// SetPaperSize sets the paper size of the PageSetup without changing the
// margins. See gtk_page_setup_set_paper_size_and_default_margins().
//
// The function takes the following parameters:
//
//   - size: PaperSize.
func (setup *PageSetup) SetPaperSize(size *PaperSize) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.GtkPaperSize // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	C.gtk_page_setup_set_paper_size(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(size)
}

// SetPaperSizeAndDefaultMargins sets the paper size of the PageSetup and
// modifies the margins according to the new paper size.
//
// The function takes the following parameters:
//
//   - size: PaperSize.
func (setup *PageSetup) SetPaperSizeAndDefaultMargins(size *PaperSize) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.GtkPaperSize // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	C.gtk_page_setup_set_paper_size_and_default_margins(_arg0, _arg1)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(size)
}

// SetRightMargin sets the right margin of the PageSetup.
//
// The function takes the following parameters:
//
//   - margin: new right margin in units of unit.
//   - unit units for margin.
func (setup *PageSetup) SetRightMargin(margin float64, unit Unit) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.gdouble       // out
	var _arg2 C.GtkUnit       // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.gdouble(margin)
	_arg2 = C.GtkUnit(unit)

	C.gtk_page_setup_set_right_margin(_arg0, _arg1, _arg2)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(margin)
	runtime.KeepAlive(unit)
}

// SetTopMargin sets the top margin of the PageSetup.
//
// The function takes the following parameters:
//
//   - margin: new top margin in units of unit.
//   - unit units for margin.
func (setup *PageSetup) SetTopMargin(margin float64, unit Unit) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 C.gdouble       // out
	var _arg2 C.GtkUnit       // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = C.gdouble(margin)
	_arg2 = C.GtkUnit(unit)

	C.gtk_page_setup_set_top_margin(_arg0, _arg1, _arg2)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(margin)
	runtime.KeepAlive(unit)
}

// ToFile: this function saves the information from setup to file_name.
//
// The function takes the following parameters:
//
//   - fileName: file to save to.
func (setup *PageSetup) ToFile(fileName string) error {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.char         // out
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_page_setup_to_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(fileName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// ToGVariant: serialize page setup to an a{sv} variant.
//
// The function returns the following values:
//
//   - variant: new, floating, #GVariant.
func (setup *PageSetup) ToGVariant() *glib.Variant {
	var _arg0 *C.GtkPageSetup // out
	var _cret *C.GVariant     // in

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))

	_cret = C.gtk_page_setup_to_gvariant(_arg0)
	runtime.KeepAlive(setup)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// ToKeyFile: this function adds the page setup from setup to key_file.
//
// The function takes the following parameters:
//
//   - keyFile to save the page setup to.
//   - groupName (optional): group to add the settings to in key_file, or NULL
//     to use the default name “Page Setup”.
func (setup *PageSetup) ToKeyFile(keyFile *glib.KeyFile, groupName string) {
	var _arg0 *C.GtkPageSetup // out
	var _arg1 *C.GKeyFile     // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_page_setup_to_key_file(_arg0, _arg1, _arg2)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)
}

// PanedOverrides contains methods that are overridable.
type PanedOverrides struct {
	AcceptPosition    func() bool
	CancelPosition    func() bool
	CycleChildFocus   func(reverse bool) bool
	CycleHandleFocus  func(reverse bool) bool
	MoveHandle        func(scroll ScrollType) bool
	ToggleHandleFocus func() bool
}

func defaultPanedOverrides(v *Paned) PanedOverrides {
	return PanedOverrides{
		AcceptPosition:    v.acceptPosition,
		CancelPosition:    v.cancelPosition,
		CycleChildFocus:   v.cycleChildFocus,
		CycleHandleFocus:  v.cycleHandleFocus,
		MoveHandle:        v.moveHandle,
		ToggleHandleFocus: v.toggleHandleFocus,
	}
}

// Paned has two panes, arranged either horizontally or vertically. The division
// between the two panes is adjustable by the user by dragging a handle.
//
// Child widgets are added to the panes of the widget with gtk_paned_pack1() and
// gtk_paned_pack2(). The division between the two children is set by default
// from the size requests of the children, but it can be adjusted by the user.
//
// A paned widget draws a separator between the two child widgets and a small
// handle that the user can drag to adjust the division. It does not draw any
// relief around the children or around the separator. (The space in which the
// separator is called the gutter.) Often, it is useful to put each child inside
// a Frame with the shadow type set to GTK_SHADOW_IN so that the gutter appears
// as a ridge. No separator is drawn if one of the children is missing.
//
// Each child has two options that can be set, resize and shrink. If resize
// is true, then when the Paned is resized, that child will expand or shrink
// along with the paned widget. If shrink is true, then that child can be made
// smaller than its requisition by the user. Setting shrink to FALSE allows the
// application to set a minimum size. If resize is false for both children,
// then this is treated as if resize is true for both children.
//
// The application can set the position of the slider as if it were set by the
// user, by calling gtk_paned_set_position().
//
// CSS nodes
//
//	GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
//	GtkWidget *frame1 = gtk_frame_new (NULL);
//	GtkWidget *frame2 = gtk_frame_new (NULL);
//	gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
//	gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
//
//	gtk_widget_set_size_request (hpaned, 200, -1);
//
//	gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
//	gtk_widget_set_size_request (frame1, 50, -1);
//
//	gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
//	gtk_widget_set_size_request (frame2, 50, -1);.
type Paned struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Orientable
}

var (
	_ Containerer       = (*Paned)(nil)
	_ coreglib.Objector = (*Paned)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Paned, *PanedClass, PanedOverrides](
		GTypePaned,
		initPanedClass,
		wrapPaned,
		defaultPanedOverrides,
	)
}

func initPanedClass(gclass unsafe.Pointer, overrides PanedOverrides, classInitFunc func(*PanedClass)) {
	pclass := (*C.GtkPanedClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypePaned))))

	if overrides.AcceptPosition != nil {
		pclass.accept_position = (*[0]byte)(C._gotk4_gtk3_PanedClass_accept_position)
	}

	if overrides.CancelPosition != nil {
		pclass.cancel_position = (*[0]byte)(C._gotk4_gtk3_PanedClass_cancel_position)
	}

	if overrides.CycleChildFocus != nil {
		pclass.cycle_child_focus = (*[0]byte)(C._gotk4_gtk3_PanedClass_cycle_child_focus)
	}

	if overrides.CycleHandleFocus != nil {
		pclass.cycle_handle_focus = (*[0]byte)(C._gotk4_gtk3_PanedClass_cycle_handle_focus)
	}

	if overrides.MoveHandle != nil {
		pclass.move_handle = (*[0]byte)(C._gotk4_gtk3_PanedClass_move_handle)
	}

	if overrides.ToggleHandleFocus != nil {
		pclass.toggle_handle_focus = (*[0]byte)(C._gotk4_gtk3_PanedClass_toggle_handle_focus)
	}

	if classInitFunc != nil {
		class := (*PanedClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPaned(obj *coreglib.Object) *Paned {
	return &Paned{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalPaned(p uintptr) (interface{}, error) {
	return wrapPaned(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectAcceptPosition signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to accept the current position of the handle when moving it
// using key bindings.
//
// The default binding for this signal is Return or Space.
func (paned *Paned) ConnectAcceptPosition(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "accept-position", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectAcceptPosition), f)
}

// ConnectCancelPosition signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to cancel moving the position of the handle using key bindings.
// The position of the handle will be reset to the value prior to moving it.
//
// The default binding for this signal is Escape.
func (paned *Paned) ConnectCancelPosition(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "cancel-position", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectCancelPosition), f)
}

// ConnectCycleChildFocus signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted to cycle the focus between the children of the paned.
//
// The default binding is f6.
func (paned *Paned) ConnectCycleChildFocus(f func(reversed bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "cycle-child-focus", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectCycleChildFocus), f)
}

// ConnectCycleHandleFocus signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted to cycle whether the paned should grab focus to allow the
// user to change position of the handle by using key bindings.
//
// The default binding for this signal is f8.
func (paned *Paned) ConnectCycleHandleFocus(f func(reversed bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "cycle-handle-focus", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectCycleHandleFocus), f)
}

// ConnectMoveHandle signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to move the handle when the user is using key bindings to move
// it.
func (paned *Paned) ConnectMoveHandle(f func(scrollType ScrollType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "move-handle", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectMoveHandle), f)
}

// ConnectToggleHandleFocus is a [keybinding signal][GtkBindingSignal] which
// gets emitted to accept the current position of the handle and then move focus
// to the next widget in the focus chain.
//
// The default binding is Tab.
func (paned *Paned) ConnectToggleHandleFocus(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(paned, "toggle-handle-focus", false, unsafe.Pointer(C._gotk4_gtk3_Paned_ConnectToggleHandleFocus), f)
}

// NewPaned creates a new Paned widget.
//
// The function takes the following parameters:
//
//   - orientation paned’s orientation.
//
// The function returns the following values:
//
//   - paned: new Paned.
func NewPaned(orientation Orientation) *Paned {
	var _arg1 C.GtkOrientation // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)

	_cret = C.gtk_paned_new(_arg1)
	runtime.KeepAlive(orientation)

	var _paned *Paned // out

	_paned = wrapPaned(coreglib.Take(unsafe.Pointer(_cret)))

	return _paned
}

// Add1 adds a child to the top or left pane with default parameters. This is
// equivalent to gtk_paned_pack1 (paned, child, FALSE, TRUE).
//
// The function takes the following parameters:
//
//   - child to add.
func (paned *Paned) Add1(child Widgetter) {
	var _arg0 *C.GtkPaned  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_paned_add1(_arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(child)
}

// Add2 adds a child to the bottom or right pane with default parameters.
// This is equivalent to gtk_paned_pack2 (paned, child, TRUE, TRUE).
//
// The function takes the following parameters:
//
//   - child to add.
func (paned *Paned) Add2(child Widgetter) {
	var _arg0 *C.GtkPaned  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_paned_add2(_arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(child)
}

// Child1 obtains the first child of the paned widget.
//
// The function returns the following values:
//
//   - widget (optional): first child, or NULL if it is not set.
func (paned *Paned) Child1() Widgetter {
	var _arg0 *C.GtkPaned  // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C.gtk_paned_get_child1(_arg0)
	runtime.KeepAlive(paned)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Child2 obtains the second child of the paned widget.
//
// The function returns the following values:
//
//   - widget (optional): second child, or NULL if it is not set.
func (paned *Paned) Child2() Widgetter {
	var _arg0 *C.GtkPaned  // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C.gtk_paned_get_child2(_arg0)
	runtime.KeepAlive(paned)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// HandleWindow returns the Window of the handle. This function is useful
// when handling button or motion events because it enables the callback to
// distinguish between the window of the paned, a child and the handle.
//
// The function returns the following values:
//
//   - window paned’s handle window.
func (paned *Paned) HandleWindow() gdk.Windower {
	var _arg0 *C.GtkPaned  // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C.gtk_paned_get_handle_window(_arg0)
	runtime.KeepAlive(paned)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// Position obtains the position of the divider between the two panes.
//
// The function returns the following values:
//
//   - gint: position of the divider.
func (paned *Paned) Position() int {
	var _arg0 *C.GtkPaned // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C.gtk_paned_get_position(_arg0)
	runtime.KeepAlive(paned)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// WideHandle gets the Paned:wide-handle property.
//
// The function returns the following values:
//
//   - ok: TRUE if the paned should have a wide handle.
func (paned *Paned) WideHandle() bool {
	var _arg0 *C.GtkPaned // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C.gtk_paned_get_wide_handle(_arg0)
	runtime.KeepAlive(paned)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Pack1 adds a child to the top or left pane.
//
// The function takes the following parameters:
//
//   - child to add.
//   - resize: should this child expand when the paned widget is resized.
//   - shrink: can this child be made smaller than its requisition.
func (paned *Paned) Pack1(child Widgetter, resize, shrink bool) {
	var _arg0 *C.GtkPaned  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gboolean   // out
	var _arg3 C.gboolean   // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if resize {
		_arg2 = C.TRUE
	}
	if shrink {
		_arg3 = C.TRUE
	}

	C.gtk_paned_pack1(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(child)
	runtime.KeepAlive(resize)
	runtime.KeepAlive(shrink)
}

// Pack2 adds a child to the bottom or right pane.
//
// The function takes the following parameters:
//
//   - child to add.
//   - resize: should this child expand when the paned widget is resized.
//   - shrink: can this child be made smaller than its requisition.
func (paned *Paned) Pack2(child Widgetter, resize, shrink bool) {
	var _arg0 *C.GtkPaned  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gboolean   // out
	var _arg3 C.gboolean   // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	if resize {
		_arg2 = C.TRUE
	}
	if shrink {
		_arg3 = C.TRUE
	}

	C.gtk_paned_pack2(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(child)
	runtime.KeepAlive(resize)
	runtime.KeepAlive(shrink)
}

// SetPosition sets the position of the divider between the two panes.
//
// The function takes the following parameters:
//
//   - position: pixel position of divider, a negative value means that the
//     position is unset.
func (paned *Paned) SetPosition(position int) {
	var _arg0 *C.GtkPaned // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = C.gint(position)

	C.gtk_paned_set_position(_arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(position)
}

// SetWideHandle sets the Paned:wide-handle property.
//
// The function takes the following parameters:
//
//   - wide: new value for the Paned:wide-handle property.
func (paned *Paned) SetWideHandle(wide bool) {
	var _arg0 *C.GtkPaned // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	if wide {
		_arg1 = C.TRUE
	}

	C.gtk_paned_set_wide_handle(_arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(wide)
}

func (paned *Paned) acceptPosition() bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.accept_position

	var _arg0 *C.GtkPaned // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C._gotk4_gtk3_Paned_virtual_accept_position(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(paned)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (paned *Paned) cancelPosition() bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.cancel_position

	var _arg0 *C.GtkPaned // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C._gotk4_gtk3_Paned_virtual_cancel_position(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(paned)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (paned *Paned) cycleChildFocus(reverse bool) bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.cycle_child_focus

	var _arg0 *C.GtkPaned // out
	var _arg1 C.gboolean  // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	if reverse {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Paned_virtual_cycle_child_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(reverse)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (paned *Paned) cycleHandleFocus(reverse bool) bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.cycle_handle_focus

	var _arg0 *C.GtkPaned // out
	var _arg1 C.gboolean  // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	if reverse {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Paned_virtual_cycle_handle_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(reverse)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (paned *Paned) moveHandle(scroll ScrollType) bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.move_handle

	var _arg0 *C.GtkPaned     // out
	var _arg1 C.GtkScrollType // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))
	_arg1 = C.GtkScrollType(scroll)

	_cret = C._gotk4_gtk3_Paned_virtual_move_handle(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(paned)
	runtime.KeepAlive(scroll)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (paned *Paned) toggleHandleFocus() bool {
	gclass := (*C.GtkPanedClass)(coreglib.PeekParentClass(paned))
	fnarg := gclass.toggle_handle_focus

	var _arg0 *C.GtkPaned // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkPaned)(unsafe.Pointer(coreglib.InternObject(paned).Native()))

	_cret = C._gotk4_gtk3_Paned_virtual_toggle_handle_focus(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(paned)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PanedAccessibleOverrides contains methods that are overridable.
type PanedAccessibleOverrides struct {
}

func defaultPanedAccessibleOverrides(v *PanedAccessible) PanedAccessibleOverrides {
	return PanedAccessibleOverrides{}
}

type PanedAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Value
}

var (
	_ coreglib.Objector = (*PanedAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*PanedAccessible, *PanedAccessibleClass, PanedAccessibleOverrides](
		GTypePanedAccessible,
		initPanedAccessibleClass,
		wrapPanedAccessible,
		defaultPanedAccessibleOverrides,
	)
}

func initPanedAccessibleClass(gclass unsafe.Pointer, overrides PanedAccessibleOverrides, classInitFunc func(*PanedAccessibleClass)) {
	if classInitFunc != nil {
		class := (*PanedAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPanedAccessible(obj *coreglib.Object) *PanedAccessible {
	return &PanedAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalPanedAccessible(p uintptr) (interface{}, error) {
	return wrapPanedAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// PlacesSidebar is a widget that displays a list of frequently-used places in
// the file system: the user’s home directory, the user’s bookmarks, and volumes
// and drives. This widget is used as a sidebar in FileChooser and may be used
// by file managers and similar programs.
//
// The places sidebar displays drives and volumes, and will automatically mount
// or unmount them when the user selects them.
//
// Applications can hook to various signals in the places sidebar to customize
// its behavior. For example, they can add extra commands to the context menu of
// the sidebar.
//
// While bookmarks are completely in control of the user, the places sidebar
// also allows individual applications to provide extra shortcut folders
// that are unique to each application. For example, a Paint program may
// want to add a shortcut for a Clipart folder. You can do this with
// gtk_places_sidebar_add_shortcut().
//
// To make use of the places sidebar, an application at least needs to connect
// to the PlacesSidebar::open-location signal. This is emitted when the user
// selects in the sidebar a location to open. The application should also call
// gtk_places_sidebar_set_location() when it changes the currently-viewed
// location.
//
// # CSS nodes
//
// GtkPlacesSidebar uses a single CSS node with name placessidebar and style
// class .sidebar.
//
// Among the children of the places sidebar, the following style classes can be
// used:
//
// - .sidebar-new-bookmark-row for the 'Add new bookmark' row
//
// - .sidebar-placeholder-row for a row that is a placeholder
//
// - .has-open-popup when a popup is open for a row.
type PlacesSidebar struct {
	_ [0]func() // equal guard
	ScrolledWindow
}

var (
	_ Binner = (*PlacesSidebar)(nil)
)

func wrapPlacesSidebar(obj *coreglib.Object) *PlacesSidebar {
	return &PlacesSidebar{
		ScrolledWindow: ScrolledWindow{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalPlacesSidebar(p uintptr) (interface{}, error) {
	return wrapPlacesSidebar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectDragActionAsk places sidebar emits this signal when it needs to ask
// the application to pop up a menu to ask the user for which drag action to
// perform.
func (sidebar *PlacesSidebar) ConnectDragActionAsk(f func(actions int) (gint int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "drag-action-ask", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectDragActionAsk), f)
}

// ConnectMount places sidebar emits this signal when it starts a new operation
// because the user clicked on some location that needs mounting. In this
// way the application using the PlacesSidebar can track the progress of the
// operation and, for example, show a notification.
func (sidebar *PlacesSidebar) ConnectMount(f func(mountOperation *gio.MountOperation)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "mount", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectMount), f)
}

// ConnectOpenLocation places sidebar emits this signal when the user selects a
// location in it. The calling application should display the contents of that
// location; for example, a file manager should show a list of files in the
// specified location.
func (sidebar *PlacesSidebar) ConnectOpenLocation(f func(location gio.Filer, openFlags PlacesOpenFlags)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "open-location", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectOpenLocation), f)
}

// ConnectPopulatePopup places sidebar emits this signal when the user invokes a
// contextual popup on one of its items. In the signal handler, the application
// may add extra items to the menu as appropriate. For example, a file manager
// may want to add a "Properties" command to the menu.
//
// It is not necessary to store the selected_item for each menu item; during
// their callbacks, the application can use gtk_places_sidebar_get_location() to
// get the file to which the item refers.
//
// The selected_item argument may be NULL in case the selection refers to
// a volume. In this case, selected_volume will be non-NULL. In this case,
// the calling application will have to g_object_ref() the selected_volume and
// keep it around to use it in the callback.
//
// The container and all its contents are destroyed after the user dismisses the
// popup. The popup is re-created (and thus, this signal is emitted) every time
// the user activates the contextual menu.
//
// Before 3.18, the container always was a Menu, and you were expected to
// add your items as MenuItems. Since 3.18, the popup may be implemented as
// a Popover, in which case container will be something else, e.g. a Box,
// to which you may add ModelButtons or other widgets, such as Entries,
// SpinButtons, etc. If your application can deal with this situation,
// you can set PlacesSidebar::populate-all to TRUE to request that this signal
// is emitted for populating popovers as well.
func (sidebar *PlacesSidebar) ConnectPopulatePopup(f func(container Widgetter, selectedItem gio.Filer, selectedVolume gio.Volumer)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "populate-popup", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectPopulatePopup), f)
}

// ConnectShowConnectToServer places sidebar emits this signal when it needs
// the calling application to present an way to connect directly to a network
// server. For example, the application may bring up a dialog box asking for a
// URL like "sftp://ftp.example.com". It is up to the application to create the
// corresponding mount by using, for example, g_file_mount_enclosing_volume().
func (sidebar *PlacesSidebar) ConnectShowConnectToServer(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-connect-to-server", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowConnectToServer), f)
}

// ConnectShowEnterLocation places sidebar emits this signal when it needs
// the calling application to present an way to directly enter a location.
// For example, the application may bring up a dialog box asking for a URL like
// "http://http.example.com".
func (sidebar *PlacesSidebar) ConnectShowEnterLocation(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-enter-location", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowEnterLocation), f)
}

// ConnectShowErrorMessage places sidebar emits this signal when it needs the
// calling application to present an error message. Most of these messages refer
// to mounting or unmounting media, for example, when a drive cannot be started
// for some reason.
func (sidebar *PlacesSidebar) ConnectShowErrorMessage(f func(primary, secondary string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-error-message", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowErrorMessage), f)
}

// ConnectShowOtherLocations places sidebar emits this signal when it needs
// the calling application to present a way to show other locations e.g.
// drives and network access points. For example, the application may bring up a
// page showing persistent volumes and discovered network addresses.
func (sidebar *PlacesSidebar) ConnectShowOtherLocations(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-other-locations", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowOtherLocations), f)
}

// ConnectShowOtherLocationsWithFlags places sidebar emits this signal when it
// needs the calling application to present a way to show other locations e.g.
// drives and network access points. For example, the application may bring up a
// page showing persistent volumes and discovered network addresses.
func (sidebar *PlacesSidebar) ConnectShowOtherLocationsWithFlags(f func(openFlags PlacesOpenFlags)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-other-locations-with-flags", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowOtherLocationsWithFlags), f)
}

// ConnectShowStarredLocation places sidebar emits this signal when it needs
// the calling application to present a way to show the starred files. In GNOME,
// starred files are implemented by setting the nao:predefined-tag-favorite tag
// in the tracker database.
func (sidebar *PlacesSidebar) ConnectShowStarredLocation(f func(openFlags PlacesOpenFlags)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "show-starred-location", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectShowStarredLocation), f)
}

// ConnectUnmount places sidebar emits this signal when it starts a new
// operation because the user for example ejected some drive or unmounted a
// mount. In this way the application using the PlacesSidebar can track the
// progress of the operation and, for example, show a notification.
func (sidebar *PlacesSidebar) ConnectUnmount(f func(mountOperation *gio.MountOperation)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sidebar, "unmount", false, unsafe.Pointer(C._gotk4_gtk3_PlacesSidebar_ConnectUnmount), f)
}

// NewPlacesSidebar creates a new PlacesSidebar widget.
//
// The application should connect to at least the PlacesSidebar::open-location
// signal to be notified when the user makes a selection in the sidebar.
//
// The function returns the following values:
//
//   - placesSidebar: newly created PlacesSidebar.
func NewPlacesSidebar() *PlacesSidebar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_places_sidebar_new()

	var _placesSidebar *PlacesSidebar // out

	_placesSidebar = wrapPlacesSidebar(coreglib.Take(unsafe.Pointer(_cret)))

	return _placesSidebar
}

// AddShortcut applications may want to present some folders in the places
// sidebar if they could be immediately useful to users. For example, a drawing
// program could add a “/usr/share/clipart” location when the sidebar is being
// used in an “Insert Clipart” dialog box.
//
// This function adds the specified location to a special place for immutable
// shortcuts. The shortcuts are application-specific; they are not shared
// across applications, and they are not persistent. If this function is called
// multiple times with different locations, then they are added to the sidebar’s
// list in the same order as the function is called.
//
// The function takes the following parameters:
//
//   - location to add as an application-specific shortcut.
func (sidebar *PlacesSidebar) AddShortcut(location gio.Filer) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 *C.GFile            // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(location).Native()))

	C.gtk_places_sidebar_add_shortcut(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(location)
}

// LocalOnly returns the value previously set with
// gtk_places_sidebar_set_local_only().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will only show local files.
func (sidebar *PlacesSidebar) LocalOnly() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_local_only(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Location gets the currently selected location in the sidebar.
// This can be NULL when nothing is selected, for example, when
// gtk_places_sidebar_set_location() has been called with a location that is not
// among the sidebar’s list of places to show.
//
// You can use this function to get the selection in the sidebar. Also,
// if you connect to the PlacesSidebar::populate-popup signal, you can use this
// function to get the location that is being referred to during the callbacks
// for your menu items.
//
// The function returns the following values:
//
//   - file (optional) with the selected location, or NULL if nothing is
//     visually selected.
func (sidebar *PlacesSidebar) Location() *gio.File {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret *C.GFile            // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_location(_arg0)
	runtime.KeepAlive(sidebar)

	var _file *gio.File // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_file = &gio.File{
				Object: obj,
			}
		}
	}

	return _file
}

// NthBookmark: this function queries the bookmarks added by the user to the
// places sidebar, and returns one of them. This function is used by FileChooser
// to implement the “Alt-1”, “Alt-2”, etc. shortcuts, which activate the
// cooresponding bookmark.
//
// The function takes the following parameters:
//
//   - n: index of the bookmark to query.
//
// The function returns the following values:
//
//   - file (optional): bookmark specified by the index n, or NULL if no such
//     index exist. Note that the indices start at 0, even though the file
//     chooser starts them with the keyboard shortcut "Alt-1".
func (sidebar *PlacesSidebar) NthBookmark(n int) *gio.File {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gint              // out
	var _cret *C.GFile            // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	_arg1 = C.gint(n)

	_cret = C.gtk_places_sidebar_get_nth_bookmark(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(n)

	var _file *gio.File // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_file = &gio.File{
				Object: obj,
			}
		}
	}

	return _file
}

// OpenFlags gets the open flags.
//
// The function returns the following values:
//
//   - placesOpenFlags of sidebar.
func (sidebar *PlacesSidebar) OpenFlags() PlacesOpenFlags {
	var _arg0 *C.GtkPlacesSidebar  // out
	var _cret C.GtkPlacesOpenFlags // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_open_flags(_arg0)
	runtime.KeepAlive(sidebar)

	var _placesOpenFlags PlacesOpenFlags // out

	_placesOpenFlags = PlacesOpenFlags(_cret)

	return _placesOpenFlags
}

// ShowConnectToServer returns the value previously set with
// gtk_places_sidebar_set_show_connect_to_server()
//
// Deprecated: It is recommended to group this functionality with the drives and
// network location under the new 'Other Location' item.
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display a “Connect to Server” item.
func (sidebar *PlacesSidebar) ShowConnectToServer() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_connect_to_server(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowDesktop returns the value previously set with
// gtk_places_sidebar_set_show_desktop().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display a builtin shortcut to the desktop
//     folder.
func (sidebar *PlacesSidebar) ShowDesktop() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_desktop(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowEnterLocation returns the value previously set with
// gtk_places_sidebar_set_show_enter_location().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display an “Enter Location” item.
func (sidebar *PlacesSidebar) ShowEnterLocation() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_enter_location(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowOtherLocations returns the value previously set with
// gtk_places_sidebar_set_show_other_locations().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display an “Other Locations” item.
func (sidebar *PlacesSidebar) ShowOtherLocations() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_other_locations(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowRecent returns the value previously set with
// gtk_places_sidebar_set_show_recent().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display a builtin shortcut for recent files.
func (sidebar *PlacesSidebar) ShowRecent() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_recent(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowStarredLocation returns the value previously set with
// gtk_places_sidebar_set_show_starred_location().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display a Starred item.
func (sidebar *PlacesSidebar) ShowStarredLocation() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_starred_location(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowTrash returns the value previously set with
// gtk_places_sidebar_set_show_trash().
//
// The function returns the following values:
//
//   - ok: TRUE if the sidebar will display a “Trash” item.
func (sidebar *PlacesSidebar) ShowTrash() bool {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_get_show_trash(_arg0)
	runtime.KeepAlive(sidebar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListShortcuts gets the list of shortcuts.
//
// The function returns the following values:
//
//   - sList: A List of #GFile of the locations that have been added as
//     application-specific shortcuts with gtk_places_sidebar_add_shortcut().
//     To free this list, you can use
//
//     g_slist_free_full (list, (GDestroyNotify) g_object_unref);.
func (sidebar *PlacesSidebar) ListShortcuts() []*gio.File {
	var _arg0 *C.GtkPlacesSidebar // out
	var _cret *C.GSList           // in

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_places_sidebar_list_shortcuts(_arg0)
	runtime.KeepAlive(sidebar)

	var _sList []*gio.File // out

	_sList = make([]*gio.File, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GFile)(v)
		var dst *gio.File // out
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(src))
			dst = &gio.File{
				Object: obj,
			}
		}
		_sList = append(_sList, dst)
	})

	return _sList
}

// RemoveShortcut removes an application-specific shortcut that has been
// previously been inserted with gtk_places_sidebar_add_shortcut(). If the
// location is not a shortcut in the sidebar, then nothing is done.
//
// The function takes the following parameters:
//
//   - location to remove.
func (sidebar *PlacesSidebar) RemoveShortcut(location gio.Filer) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 *C.GFile            // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(location).Native()))

	C.gtk_places_sidebar_remove_shortcut(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(location)
}

// SetDropTargetsVisible: make the GtkPlacesSidebar show drop targets, so it
// can show the available drop targets and a "new bookmark" row. This improves
// the Drag-and-Drop experience of the user and allows applications to show all
// available drop targets at once.
//
// This needs to be called when the application is aware of an ongoing drag
// that might target the sidebar. The drop-targets-visible state will be unset
// automatically if the drag finishes in the GtkPlacesSidebar. You only need to
// unset the state when the drag ends on some other widget on your application.
//
// The function takes the following parameters:
//
//   - visible: whether to show the valid targets or not.
//   - context: drag context used to ask the source about the action that wants
//     to perform, so hints are more accurate.
func (sidebar *PlacesSidebar) SetDropTargetsVisible(visible bool, context *gdk.DragContext) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out
	var _arg2 *C.GdkDragContext   // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if visible {
		_arg1 = C.TRUE
	}
	_arg2 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_places_sidebar_set_drop_targets_visible(_arg0, _arg1, _arg2)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(visible)
	runtime.KeepAlive(context)
}

// SetLocalOnly sets whether the sidebar should only show local files.
//
// The function takes the following parameters:
//
//   - localOnly: whether to show only local files.
func (sidebar *PlacesSidebar) SetLocalOnly(localOnly bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if localOnly {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_local_only(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(localOnly)
}

// SetLocation sets the location that is being shown in the widgets surrounding
// the sidebar, for example, in a folder view in a file manager. In turn,
// the sidebar will highlight that location if it is being shown in the list of
// places, or it will unhighlight everything if the location is not among the
// places in the list.
//
// The function takes the following parameters:
//
//   - location (optional) to select, or NULL for no current path.
func (sidebar *PlacesSidebar) SetLocation(location gio.Filer) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 *C.GFile            // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if location != nil {
		_arg1 = (*C.GFile)(unsafe.Pointer(coreglib.InternObject(location).Native()))
	}

	C.gtk_places_sidebar_set_location(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(location)
}

// SetOpenFlags sets the way in which the calling application can open new
// locations from the places sidebar. For example, some applications only open
// locations “directly” into their main view, while others may support opening
// locations in a new notebook tab or a new window.
//
// This function is used to tell the places sidebar about the ways in which the
// application can open new locations, so that the sidebar can display (or not)
// the “Open in new tab” and “Open in new window” menu items as appropriate.
//
// When the PlacesSidebar::open-location signal is emitted, its
// flags argument will be set to one of the flags that was passed in
// gtk_places_sidebar_set_open_flags().
//
// Passing 0 for flags will cause K_PLACES_OPEN_NORMAL to always be sent to
// callbacks for the “open-location” signal.
//
// The function takes the following parameters:
//
//   - flags: bitmask of modes in which the calling application can open
//     locations.
func (sidebar *PlacesSidebar) SetOpenFlags(flags PlacesOpenFlags) {
	var _arg0 *C.GtkPlacesSidebar  // out
	var _arg1 C.GtkPlacesOpenFlags // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	_arg1 = C.GtkPlacesOpenFlags(flags)

	C.gtk_places_sidebar_set_open_flags(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(flags)
}

// SetShowConnectToServer sets whether the sidebar should show an item for
// connecting to a network server; this is off by default. An application
// may want to turn this on if it implements a way for the user to connect to
// network servers directly.
//
// If you enable this, you should connect to the
// PlacesSidebar::show-connect-to-server signal.
//
// Deprecated: It is recommended to group this functionality with the drives and
// network location under the new 'Other Location' item.
//
// The function takes the following parameters:
//
//   - showConnectToServer: whether to show an item for the Connect to Server
//     command.
func (sidebar *PlacesSidebar) SetShowConnectToServer(showConnectToServer bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showConnectToServer {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_connect_to_server(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showConnectToServer)
}

// SetShowDesktop sets whether the sidebar should show an item for the Desktop
// folder. The default value for this option is determined by the desktop
// environment and the user’s configuration, but this function can be used to
// override it on a per-application basis.
//
// The function takes the following parameters:
//
//   - showDesktop: whether to show an item for the Desktop folder.
func (sidebar *PlacesSidebar) SetShowDesktop(showDesktop bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showDesktop {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_desktop(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showDesktop)
}

// SetShowEnterLocation sets whether the sidebar should show an item for
// entering a location; this is off by default. An application may want to turn
// this on if manually entering URLs is an expected user action.
//
// If you enable this, you should connect to the
// PlacesSidebar::show-enter-location signal.
//
// The function takes the following parameters:
//
//   - showEnterLocation: whether to show an item to enter a location.
func (sidebar *PlacesSidebar) SetShowEnterLocation(showEnterLocation bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showEnterLocation {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_enter_location(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showEnterLocation)
}

// SetShowOtherLocations sets whether the sidebar should show an item for
// the application to show an Other Locations view; this is off by default.
// When set to TRUE, persistent devices such as hard drives are hidden,
// otherwise they are shown in the sidebar. An application may want to turn this
// on if it implements a way for the user to see and interact with drives and
// network servers directly.
//
// If you enable this, you should connect to the
// PlacesSidebar::show-other-locations signal.
//
// The function takes the following parameters:
//
//   - showOtherLocations: whether to show an item for the Other Locations view.
func (sidebar *PlacesSidebar) SetShowOtherLocations(showOtherLocations bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showOtherLocations {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_other_locations(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showOtherLocations)
}

// SetShowRecent sets whether the sidebar should show an item for recent files.
// The default value for this option is determined by the desktop environment,
// but this function can be used to override it on a per-application basis.
//
// The function takes the following parameters:
//
//   - showRecent: whether to show an item for recent files.
func (sidebar *PlacesSidebar) SetShowRecent(showRecent bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showRecent {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_recent(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showRecent)
}

// SetShowStarredLocation: if you enable this, you should connect to the
// PlacesSidebar::show-starred-location signal.
//
// The function takes the following parameters:
//
//   - showStarredLocation: whether to show an item for Starred files.
func (sidebar *PlacesSidebar) SetShowStarredLocation(showStarredLocation bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showStarredLocation {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_starred_location(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showStarredLocation)
}

// SetShowTrash sets whether the sidebar should show an item for the Trash
// location.
//
// The function takes the following parameters:
//
//   - showTrash: whether to show an item for the Trash location.
func (sidebar *PlacesSidebar) SetShowTrash(showTrash bool) {
	var _arg0 *C.GtkPlacesSidebar // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPlacesSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	if showTrash {
		_arg1 = C.TRUE
	}

	C.gtk_places_sidebar_set_show_trash(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(showTrash)
}

// PlugOverrides contains methods that are overridable.
type PlugOverrides struct {
	Embedded func()
}

func defaultPlugOverrides(v *Plug) PlugOverrides {
	return PlugOverrides{
		Embedded: v.embedded,
	}
}

// Plug: together with Socket, Plug provides the ability to embed widgets from
// one process into another process in a fashion that is transparent to the
// user. One process creates a Socket widget and passes the ID of that widget’s
// window to the other process, which then creates a Plug with that window ID.
// Any widgets contained in the Plug then will appear inside the first
// application’s window.
//
// The communication between a Socket and a Plug follows the XEmbed Protocol
// (http://www.freedesktop.org/Standards/xembed-spec). This protocol has also
// been implemented in other toolkits, e.g. Qt, allowing the same level of
// integration when embedding a Qt widget in GTK+ or vice versa.
//
// The Plug and Socket widgets are only available when GTK+ is compiled for
// the X11 platform and GDK_WINDOWING_X11 is defined. They can only be used on
// a X11Display. To use Plug and Socket, you need to include the gtk/gtkx.h
// header.
type Plug struct {
	_ [0]func() // equal guard
	Window
}

var (
	_ Binner = (*Plug)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Plug, *PlugClass, PlugOverrides](
		GTypePlug,
		initPlugClass,
		wrapPlug,
		defaultPlugOverrides,
	)
}

func initPlugClass(gclass unsafe.Pointer, overrides PlugOverrides, classInitFunc func(*PlugClass)) {
	pclass := (*C.GtkPlugClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypePlug))))

	if overrides.Embedded != nil {
		pclass.embedded = (*[0]byte)(C._gotk4_gtk3_PlugClass_embedded)
	}

	if classInitFunc != nil {
		class := (*PlugClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPlug(obj *coreglib.Object) *Plug {
	return &Plug{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalPlug(p uintptr) (interface{}, error) {
	return wrapPlug(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEmbedded gets emitted when the plug becomes embedded in a socket.
func (plug *Plug) ConnectEmbedded(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(plug, "embedded", false, unsafe.Pointer(C._gotk4_gtk3_Plug_ConnectEmbedded), f)
}

// Embedded determines whether the plug is embedded in a socket.
//
// The function returns the following values:
//
//   - ok: TRUE if the plug is embedded in a socket.
func (plug *Plug) Embedded() bool {
	var _arg0 *C.GtkPlug // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkPlug)(unsafe.Pointer(coreglib.InternObject(plug).Native()))

	_cret = C.gtk_plug_get_embedded(_arg0)
	runtime.KeepAlive(plug)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SocketWindow retrieves the socket the plug is embedded in.
//
// The function returns the following values:
//
//   - window (optional) of the socket, or NULL.
func (plug *Plug) SocketWindow() gdk.Windower {
	var _arg0 *C.GtkPlug   // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkPlug)(unsafe.Pointer(coreglib.InternObject(plug).Native()))

	_cret = C.gtk_plug_get_socket_window(_arg0)
	runtime.KeepAlive(plug)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

func (plug *Plug) embedded() {
	gclass := (*C.GtkPlugClass)(coreglib.PeekParentClass(plug))
	fnarg := gclass.embedded

	var _arg0 *C.GtkPlug // out

	_arg0 = (*C.GtkPlug)(unsafe.Pointer(coreglib.InternObject(plug).Native()))

	C._gotk4_gtk3_Plug_virtual_embedded(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(plug)
}

// PlugAccessibleOverrides contains methods that are overridable.
type PlugAccessibleOverrides struct {
}

func defaultPlugAccessibleOverrides(v *PlugAccessible) PlugAccessibleOverrides {
	return PlugAccessibleOverrides{}
}

type PlugAccessible struct {
	_ [0]func() // equal guard
	WindowAccessible
}

var (
	_ coreglib.Objector = (*PlugAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*PlugAccessible, *PlugAccessibleClass, PlugAccessibleOverrides](
		GTypePlugAccessible,
		initPlugAccessibleClass,
		wrapPlugAccessible,
		defaultPlugAccessibleOverrides,
	)
}

func initPlugAccessibleClass(gclass unsafe.Pointer, overrides PlugAccessibleOverrides, classInitFunc func(*PlugAccessibleClass)) {
	if classInitFunc != nil {
		class := (*PlugAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPlugAccessible(obj *coreglib.Object) *PlugAccessible {
	return &PlugAccessible{
		WindowAccessible: WindowAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Window: atk.Window{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
		},
	}
}

func marshalPlugAccessible(p uintptr) (interface{}, error) {
	return wrapPlugAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (plug *PlugAccessible) ID() string {
	var _arg0 *C.GtkPlugAccessible // out
	var _cret *C.gchar             // in

	_arg0 = (*C.GtkPlugAccessible)(unsafe.Pointer(coreglib.InternObject(plug).Native()))

	_cret = C.gtk_plug_accessible_get_id(_arg0)
	runtime.KeepAlive(plug)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// PopoverOverrides contains methods that are overridable.
type PopoverOverrides struct {
	Closed func()
}

func defaultPopoverOverrides(v *Popover) PopoverOverrides {
	return PopoverOverrides{
		Closed: v.closed,
	}
}

// Popover is a bubble-like context window, primarily meant to provide
// context-dependent information or options. Popovers are attached to a widget,
// passed at construction time on gtk_popover_new(), or updated afterwards
// through gtk_popover_set_relative_to(), by default they will point to
// the whole widget area, although this behavior can be changed through
// gtk_popover_set_pointing_to().
//
// The position of a popover relative to the widget it is attached to can also
// be changed through gtk_popover_set_position().
//
// By default, Popover performs a GTK+ 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
// Esc key being pressed). If no such modal behavior is desired on a popover,
// gtk_popover_set_modal() may be called on it to tweak its behavior.
//
// # GtkPopover as menu replacement
//
// GtkPopover is often used to replace menus. To facilitate this, it supports
// being populated from a Model, using gtk_popover_new_from_model(). In addition
// to all the regular menu model features, this function supports rendering
// sections in the model in a more compact form, as a row of icon buttons
// instead of menu items.
//
// To use this rendering, set the ”display-hint” attribute of the section to
// ”horizontal-buttons” and set the icons of your items with the ”verb-icon”
// attribute.
//
//	<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>
//
// # CSS nodes
//
// GtkPopover has a single css node called popover. It always gets the
// .background style class and it gets the .menu style class if it is menu-like
// (e.g. PopoverMenu or created using gtk_popover_new_from_model().
//
// Particular uses of GtkPopover, such as touch selection popups or magnifiers
// in Entry or TextView get style classes like .touch-selection or .magnifier to
// differentiate from plain popovers.
type Popover struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Popover)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Popover, *PopoverClass, PopoverOverrides](
		GTypePopover,
		initPopoverClass,
		wrapPopover,
		defaultPopoverOverrides,
	)
}

func initPopoverClass(gclass unsafe.Pointer, overrides PopoverOverrides, classInitFunc func(*PopoverClass)) {
	pclass := (*C.GtkPopoverClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypePopover))))

	if overrides.Closed != nil {
		pclass.closed = (*[0]byte)(C._gotk4_gtk3_PopoverClass_closed)
	}

	if classInitFunc != nil {
		class := (*PopoverClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPopover(obj *coreglib.Object) *Popover {
	return &Popover{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalPopover(p uintptr) (interface{}, error) {
	return wrapPopover(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectClosed: this signal is emitted when the popover is dismissed either
// through API or user interaction.
func (popover *Popover) ConnectClosed(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(popover, "closed", false, unsafe.Pointer(C._gotk4_gtk3_Popover_ConnectClosed), f)
}

// NewPopover creates a new popover to point to relative_to.
//
// The function takes the following parameters:
//
//   - relativeTo (optional) the popover is related to.
//
// The function returns the following values:
//
//   - popover: new Popover.
func NewPopover(relativeTo Widgetter) *Popover {
	var _arg1 *C.GtkWidget // out
	var _cret *C.GtkWidget // in

	if relativeTo != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(relativeTo).Native()))
	}

	_cret = C.gtk_popover_new(_arg1)
	runtime.KeepAlive(relativeTo)

	var _popover *Popover // out

	_popover = wrapPopover(coreglib.Take(unsafe.Pointer(_cret)))

	return _popover
}

// NewPopoverFromModel creates a Popover and populates it according to model.
// The popover is pointed to the relative_to widget.
//
// The created buttons are connected to actions found in the ApplicationWindow
// to which the popover belongs - typically by means of being attached to a
// widget that is contained within the ApplicationWindows widget hierarchy.
//
// Actions can also be added using gtk_widget_insert_action_group() on the menus
// attach widget or on any of its parent widgets.
//
// The function takes the following parameters:
//
//   - relativeTo (optional) the popover is related to.
//   - model: Model.
//
// The function returns the following values:
//
//   - popover: new Popover.
func NewPopoverFromModel(relativeTo Widgetter, model gio.MenuModeller) *Popover {
	var _arg1 *C.GtkWidget  // out
	var _arg2 *C.GMenuModel // out
	var _cret *C.GtkWidget  // in

	if relativeTo != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(relativeTo).Native()))
	}
	_arg2 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_popover_new_from_model(_arg1, _arg2)
	runtime.KeepAlive(relativeTo)
	runtime.KeepAlive(model)

	var _popover *Popover // out

	_popover = wrapPopover(coreglib.Take(unsafe.Pointer(_cret)))

	return _popover
}

// BindModel establishes a binding between a Popover and a Model.
//
// The contents of popover are removed and then refilled with menu items
// according to model. When model changes, popover is updated. Calling this
// function twice on popover with different model will cause the first binding
// to be replaced with a binding to the new model. If model is NULL then any
// previous binding is undone and all children are removed.
//
// If action_namespace is non-NULL then the effect is as if all actions
// mentioned in the model have their names prefixed with the namespace, plus a
// dot. For example, if the action “quit” is mentioned and action_namespace is
// “app” then the effective action name is “app.quit”.
//
// This function uses Actionable to define the action name and target values on
// the created menu items. If you want to use an action group other than “app”
// and “win”, or if you want to use a MenuShell outside of a ApplicationWindow,
// then you will need to attach your own action group to the widget hierarchy
// using gtk_widget_insert_action_group(). As an example, if you created a group
// with a “quit” action and inserted it with the name “mygroup” then you would
// use the action name “mygroup.quit” in your Model.
//
// The function takes the following parameters:
//
//   - model (optional) to bind to or NULL to remove binding.
//   - actionNamespace (optional): namespace for actions in model.
func (popover *Popover) BindModel(model gio.MenuModeller, actionNamespace string) {
	var _arg0 *C.GtkPopover // out
	var _arg1 *C.GMenuModel // out
	var _arg2 *C.gchar      // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	if model != nil {
		_arg1 = (*C.GMenuModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}
	if actionNamespace != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(actionNamespace)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_popover_bind_model(_arg0, _arg1, _arg2)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(model)
	runtime.KeepAlive(actionNamespace)
}

// ConstrainTo returns the constraint for placing this popover. See
// gtk_popover_set_constrain_to().
//
// The function returns the following values:
//
//   - popoverConstraint: constraint for placing this popover.
func (popover *Popover) ConstrainTo() PopoverConstraint {
	var _arg0 *C.GtkPopover          // out
	var _cret C.GtkPopoverConstraint // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_constrain_to(_arg0)
	runtime.KeepAlive(popover)

	var _popoverConstraint PopoverConstraint // out

	_popoverConstraint = PopoverConstraint(_cret)

	return _popoverConstraint
}

// DefaultWidget gets the widget that should be set as the default while the
// popover is shown.
//
// The function returns the following values:
//
//   - widget (optional): default widget, or NULL if there is none.
func (popover *Popover) DefaultWidget() Widgetter {
	var _arg0 *C.GtkPopover // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_default_widget(_arg0)
	runtime.KeepAlive(popover)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Modal returns whether the popover is modal, see gtk_popover_set_modal to see
// the implications of this.
//
// The function returns the following values:
//
//   - ok if popover is modal.
func (popover *Popover) Modal() bool {
	var _arg0 *C.GtkPopover // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_modal(_arg0)
	runtime.KeepAlive(popover)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PointingTo: 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 attached widget width and height if a widget
// exists, otherwise it will zero-out rect.
//
// The function returns the following values:
//
//   - rect: location to store the rectangle.
//   - ok: TRUE if a rectangle to point to was set.
func (popover *Popover) PointingTo() (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkPopover  // out
	var _arg1 C.GdkRectangle // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_pointing_to(_arg0, &_arg1)
	runtime.KeepAlive(popover)

	var _rect *gdk.Rectangle // out
	var _ok bool             // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _rect, _ok
}

// Position returns the preferred position of popover.
//
// The function returns the following values:
//
//   - positionType: preferred position.
func (popover *Popover) Position() PositionType {
	var _arg0 *C.GtkPopover     // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_position(_arg0)
	runtime.KeepAlive(popover)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// RelativeTo returns the widget popover is currently attached to.
//
// The function returns the following values:
//
//   - widget: Widget.
func (popover *Popover) RelativeTo() Widgetter {
	var _arg0 *C.GtkPopover // out
	var _cret *C.GtkWidget  // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_relative_to(_arg0)
	runtime.KeepAlive(popover)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// TransitionsEnabled returns whether show/hide transitions are enabled on this
// popover.
//
// Deprecated: You can show or hide the popover without transitions using
// gtk_widget_show() and gtk_widget_hide() while gtk_popover_popup() and
// gtk_popover_popdown() will use transitions.
//
// The function returns the following values:
//
//   - ok if the show and hide transitions of the given popover are enabled,
//     LSE otherwise.
func (popover *Popover) TransitionsEnabled() bool {
	var _arg0 *C.GtkPopover // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	_cret = C.gtk_popover_get_transitions_enabled(_arg0)
	runtime.KeepAlive(popover)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Popdown pops popover down.This is different than a gtk_widget_hide() call in
// that it shows the popover with a transition. If you want to hide the popover
// without a transition, use gtk_widget_hide().
func (popover *Popover) Popdown() {
	var _arg0 *C.GtkPopover // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	C.gtk_popover_popdown(_arg0)
	runtime.KeepAlive(popover)
}

// Popup pops popover up. This is different than a gtk_widget_show() call in
// that it shows the popover with a transition. If you want to show the popover
// without a transition, use gtk_widget_show().
func (popover *Popover) Popup() {
	var _arg0 *C.GtkPopover // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	C.gtk_popover_popup(_arg0)
	runtime.KeepAlive(popover)
}

// SetConstrainTo sets a constraint for positioning this popover.
//
// Note that not all platforms support placing popovers freely, and may already
// impose constraints.
//
// The function takes the following parameters:
//
//   - constraint: new constraint.
func (popover *Popover) SetConstrainTo(constraint PopoverConstraint) {
	var _arg0 *C.GtkPopover          // out
	var _arg1 C.GtkPopoverConstraint // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	_arg1 = C.GtkPopoverConstraint(constraint)

	C.gtk_popover_set_constrain_to(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(constraint)
}

// SetDefaultWidget sets the widget that should be set as default widget while
// the popover is shown (see gtk_window_set_default()). Popover remembers the
// previous default widget and reestablishes it when the popover is dismissed.
//
// The function takes the following parameters:
//
//   - widget (optional): new default widget, or NULL.
func (popover *Popover) SetDefaultWidget(widget Widgetter) {
	var _arg0 *C.GtkPopover // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}

	C.gtk_popover_set_default_widget(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(widget)
}

// SetModal sets whether popover is modal, a modal popover will grab all input
// within the toplevel and grab the keyboard focus on it when being displayed.
// Clicking outside the popover area or pressing Esc will dismiss the popover
// and ungrab input.
//
// The function takes the following parameters:
//
//   - modal to make popover claim all input within the toplevel.
func (popover *Popover) SetModal(modal bool) {
	var _arg0 *C.GtkPopover // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	if modal {
		_arg1 = C.TRUE
	}

	C.gtk_popover_set_modal(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(modal)
}

// SetPointingTo sets the rectangle that popover will point to,
// in the coordinate space of the widget popover is attached to, see
// gtk_popover_set_relative_to().
//
// The function takes the following parameters:
//
//   - rect: rectangle to point to.
func (popover *Popover) SetPointingTo(rect *gdk.Rectangle) {
	var _arg0 *C.GtkPopover   // out
	var _arg1 *C.GdkRectangle // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(rect)))

	C.gtk_popover_set_pointing_to(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(rect)
}

// SetPosition 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 Popover may choose to appear on the
// opposite side.
//
// The function takes the following parameters:
//
//   - position: preferred popover position.
func (popover *Popover) SetPosition(position PositionType) {
	var _arg0 *C.GtkPopover     // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	_arg1 = C.GtkPositionType(position)

	C.gtk_popover_set_position(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(position)
}

// SetRelativeTo sets a new widget to be attached to popover. If popover is
// visible, the position will be updated.
//
// Note: the ownership of popovers is always given to their relative_to widget,
// so if relative_to is set to NULL on an attached popover, it will be detached
// from its previous widget, and consequently destroyed unless extra references
// are kept.
//
// The function takes the following parameters:
//
//   - relativeTo (optional): Widget.
func (popover *Popover) SetRelativeTo(relativeTo Widgetter) {
	var _arg0 *C.GtkPopover // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	if relativeTo != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(relativeTo).Native()))
	}

	C.gtk_popover_set_relative_to(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(relativeTo)
}

// SetTransitionsEnabled sets whether show/hide transitions are enabled on this
// popover
//
// Deprecated: You can show or hide the popover without transitions using
// gtk_widget_show() and gtk_widget_hide() while gtk_popover_popup() and
// gtk_popover_popdown() will use transitions.
//
// The function takes the following parameters:
//
//   - transitionsEnabled: whether transitions are enabled.
func (popover *Popover) SetTransitionsEnabled(transitionsEnabled bool) {
	var _arg0 *C.GtkPopover // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	if transitionsEnabled {
		_arg1 = C.TRUE
	}

	C.gtk_popover_set_transitions_enabled(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(transitionsEnabled)
}

func (popover *Popover) closed() {
	gclass := (*C.GtkPopoverClass)(coreglib.PeekParentClass(popover))
	fnarg := gclass.closed

	var _arg0 *C.GtkPopover // out

	_arg0 = (*C.GtkPopover)(unsafe.Pointer(coreglib.InternObject(popover).Native()))

	C._gotk4_gtk3_Popover_virtual_closed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(popover)
}

// PopoverAccessibleOverrides contains methods that are overridable.
type PopoverAccessibleOverrides struct {
}

func defaultPopoverAccessibleOverrides(v *PopoverAccessible) PopoverAccessibleOverrides {
	return PopoverAccessibleOverrides{}
}

type PopoverAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*PopoverAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*PopoverAccessible, *PopoverAccessibleClass, PopoverAccessibleOverrides](
		GTypePopoverAccessible,
		initPopoverAccessibleClass,
		wrapPopoverAccessible,
		defaultPopoverAccessibleOverrides,
	)
}

func initPopoverAccessibleClass(gclass unsafe.Pointer, overrides PopoverAccessibleOverrides, classInitFunc func(*PopoverAccessibleClass)) {
	if classInitFunc != nil {
		class := (*PopoverAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPopoverAccessible(obj *coreglib.Object) *PopoverAccessible {
	return &PopoverAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalPopoverAccessible(p uintptr) (interface{}, error) {
	return wrapPopoverAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// PopoverMenuOverrides contains methods that are overridable.
type PopoverMenuOverrides struct {
}

func defaultPopoverMenuOverrides(v *PopoverMenu) PopoverMenuOverrides {
	return PopoverMenuOverrides{}
}

// PopoverMenu is a subclass of Popover that treats its children like menus and
// allows switching between them. It is meant to be used primarily together with
// ModelButton, but any widget can be used, such as SpinButton or Scale. In this
// respect, GtkPopoverMenu is more flexible than popovers that are created from
// a Model with gtk_popover_new_from_model().
//
// To add a child as a submenu, set the PopoverMenu:submenu child property to
// the name of the submenu. To let the user open this submenu, add a ModelButton
// whose ModelButton:menu-name property is set to the name you've given to the
// submenu.
//
// By convention, the first child of a submenu should be a ModelButton to switch
// back to the parent menu. Such a button should use the ModelButton:inverted
// and ModelButton:centered properties to achieve a title-like appearance and
// place the submenu indicator at the opposite side. To switch back to the main
// menu, use "main" as the menu name.
//
// Example
//
//	<object class="GtkPopoverMenu">
//	  <child>
//	    <object class="GtkBox">
//	      <property name="visible">True</property>
//	      <property name="margin">10</property>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">win.frob</property>
//	          <property name="text" translatable="yes">Frob</property>
//	        </object>
//	      </child>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="menu-name">more</property>
//	          <property name="text" translatable="yes">More</property>
//	        </object>
//	      </child>
//	    </object>
//	  </child>
//	  <child>
//	    <object class="GtkBox">
//	      <property name="visible">True</property>
//	      <property name="margin">10</property>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">win.foo</property>
//	          <property name="text" translatable="yes">Foo</property>
//	        </object>
//	      </child>
//	      <child>
//	        <object class="GtkModelButton">
//	          <property name="visible">True</property>
//	          <property name="action-name">win.bar</property>
//	          <property name="text" translatable="yes">Bar</property>
//	        </object>
//	      </child>
//	    </object>
//	    <packing>
//	      <property name="submenu">more</property>
//	    </packing>
//	  </child>
//	</object>
//
// Just like normal popovers created using gtk_popover_new_from_model,
// PopoverMenu instances have a single css node called "popover" and get the
// .menu style class.
type PopoverMenu struct {
	_ [0]func() // equal guard
	Popover
}

var (
	_ Binner = (*PopoverMenu)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*PopoverMenu, *PopoverMenuClass, PopoverMenuOverrides](
		GTypePopoverMenu,
		initPopoverMenuClass,
		wrapPopoverMenu,
		defaultPopoverMenuOverrides,
	)
}

func initPopoverMenuClass(gclass unsafe.Pointer, overrides PopoverMenuOverrides, classInitFunc func(*PopoverMenuClass)) {
	if classInitFunc != nil {
		class := (*PopoverMenuClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPopoverMenu(obj *coreglib.Object) *PopoverMenu {
	return &PopoverMenu{
		Popover: Popover{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalPopoverMenu(p uintptr) (interface{}, error) {
	return wrapPopoverMenu(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewPopoverMenu creates a new popover menu.
//
// The function returns the following values:
//
//   - popoverMenu: new PopoverMenu.
func NewPopoverMenu() *PopoverMenu {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_popover_menu_new()

	var _popoverMenu *PopoverMenu // out

	_popoverMenu = wrapPopoverMenu(coreglib.Take(unsafe.Pointer(_cret)))

	return _popoverMenu
}

// OpenSubmenu opens a submenu of the popover. The name must be one of the
// names given to the submenus of popover with PopoverMenu:submenu, or "main" to
// switch back to the main menu.
//
// ModelButton will open submenus automatically when the ModelButton:menu-name
// property is set, so this function is only needed when you are using other
// kinds of widgets to initiate menu changes.
//
// The function takes the following parameters:
//
//   - name of the menu to switch to.
func (popover *PopoverMenu) OpenSubmenu(name string) {
	var _arg0 *C.GtkPopoverMenu // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkPopoverMenu)(unsafe.Pointer(coreglib.InternObject(popover).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_popover_menu_open_submenu(_arg0, _arg1)
	runtime.KeepAlive(popover)
	runtime.KeepAlive(name)
}

// PrintContext encapsulates context information that is required when drawing
// pages for printing, such as the cairo context and important parameters like
// page size and resolution. It also lets you easily create Layout and Context
// objects that match the font metrics of the cairo surface.
//
// GtkPrintContext objects gets passed to the PrintOperation::begin-print,
// PrintOperation::end-print, PrintOperation::request-page-setup and
// PrintOperation::draw-page signals on the PrintOperation.
//
// Using GtkPrintContext in a PrintOperation::draw-page callback
//
//	static void
//	draw_page (GtkPrintOperation *operation,
//		   GtkPrintContext   *context,
//		   int                page_nr)
//	{
//	  cairo_t *cr;
//	  PangoLayout *layout;
//	  PangoFontDescription *desc;
//
//	  cr = gtk_print_context_get_cairo_context (context);
//
//	  // Draw a red rectangle, as wide as the paper (inside the margins)
//	  cairo_set_source_rgb (cr, 1.0, 0, 0);
//	  cairo_rectangle (cr, 0, 0, gtk_print_context_get_width (context), 50);
//
//	  cairo_fill (cr);
//
//	  // Draw some lines
//	  cairo_move_to (cr, 20, 10);
//	  cairo_line_to (cr, 40, 20);
//	  cairo_arc (cr, 60, 60, 20, 0, M_PI);
//	  cairo_line_to (cr, 80, 20);
//
//	  cairo_set_source_rgb (cr, 0, 0, 0);
//	  cairo_set_line_width (cr, 5);
//	  cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
//	  cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
//
//	  cairo_stroke (cr);
//
//	  // Draw some text
//	  layout = gtk_print_context_create_pango_layout (context);
//	  pango_layout_set_text (layout, "Hello World! Printing is easy", -1);
//	  desc = pango_font_description_from_string ("sans 28");
//	  pango_layout_set_font_description (layout, desc);
//	  pango_font_description_free (desc);
//
//	  cairo_move_to (cr, 30, 20);
//	  pango_cairo_layout_path (cr, layout);
//
//	  // Font Outline
//	  cairo_set_source_rgb (cr, 0.93, 1.0, 0.47);
//	  cairo_set_line_width (cr, 0.5);
//	  cairo_stroke_preserve (cr);
//
//	  // Font Fill
//	  cairo_set_source_rgb (cr, 0, 0.0, 1.0);
//	  cairo_fill (cr);
//
//	  g_object_unref (layout);
//	}
//
// Printing support was added in GTK+ 2.10.
type PrintContext struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*PrintContext)(nil)
)

func wrapPrintContext(obj *coreglib.Object) *PrintContext {
	return &PrintContext{
		Object: obj,
	}
}

func marshalPrintContext(p uintptr) (interface{}, error) {
	return wrapPrintContext(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// CreatePangoContext creates a new Context that can be used with the
// PrintContext.
//
// The function returns the following values:
//
//   - ret: new Pango context for context.
func (context *PrintContext) CreatePangoContext() *pango.Context {
	var _arg0 *C.GtkPrintContext // out
	var _cret *C.PangoContext    // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_create_pango_context(_arg0)
	runtime.KeepAlive(context)

	var _ret *pango.Context // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_ret = &pango.Context{
			Object: obj,
		}
	}

	return _ret
}

// CreatePangoLayout creates a new Layout that is suitable for use with the
// PrintContext.
//
// The function returns the following values:
//
//   - layout: new Pango layout for context.
func (context *PrintContext) CreatePangoLayout() *pango.Layout {
	var _arg0 *C.GtkPrintContext // out
	var _cret *C.PangoLayout     // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_create_pango_layout(_arg0)
	runtime.KeepAlive(context)

	var _layout *pango.Layout // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_layout = &pango.Layout{
			Object: obj,
		}
	}

	return _layout
}

// CairoContext obtains the cairo context that is associated with the
// PrintContext.
//
// The function returns the following values:
//
//   - ret: cairo context of context.
func (context *PrintContext) CairoContext() *cairo.Context {
	var _arg0 *C.GtkPrintContext // out
	var _cret *C.cairo_t         // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_cairo_context(_arg0)
	runtime.KeepAlive(context)

	var _ret *cairo.Context // out

	_ret = cairo.WrapContext(uintptr(unsafe.Pointer(_cret)))
	C.cairo_reference(_cret)
	runtime.SetFinalizer(_ret, func(v *cairo.Context) {
		C.cairo_destroy((*C.cairo_t)(unsafe.Pointer(v.Native())))
	})

	return _ret
}

// DPIX obtains the horizontal resolution of the PrintContext, in dots per inch.
//
// The function returns the following values:
//
//   - gdouble: horizontal resolution of context.
func (context *PrintContext) DPIX() float64 {
	var _arg0 *C.GtkPrintContext // out
	var _cret C.gdouble          // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_dpi_x(_arg0)
	runtime.KeepAlive(context)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DPIY obtains the vertical resolution of the PrintContext, in dots per inch.
//
// The function returns the following values:
//
//   - gdouble: vertical resolution of context.
func (context *PrintContext) DPIY() float64 {
	var _arg0 *C.GtkPrintContext // out
	var _cret C.gdouble          // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_dpi_y(_arg0)
	runtime.KeepAlive(context)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// HardMargins obtains the hardware printer margins of the PrintContext,
// in units.
//
// The function returns the following values:
//
//   - top hardware printer margin.
//   - bottom hardware printer margin.
//   - left hardware printer margin.
//   - right hardware printer margin.
//   - ok: TRUE if the hard margins were retrieved.
func (context *PrintContext) HardMargins() (top, bottom, left, right float64, ok bool) {
	var _arg0 *C.GtkPrintContext // out
	var _arg1 C.gdouble          // in
	var _arg2 C.gdouble          // in
	var _arg3 C.gdouble          // in
	var _arg4 C.gdouble          // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_hard_margins(_arg0, &_arg1, &_arg2, &_arg3, &_arg4)
	runtime.KeepAlive(context)

	var _top float64    // out
	var _bottom float64 // out
	var _left float64   // out
	var _right float64  // out
	var _ok bool        // out

	_top = float64(_arg1)
	_bottom = float64(_arg2)
	_left = float64(_arg3)
	_right = float64(_arg4)
	if _cret != 0 {
		_ok = true
	}

	return _top, _bottom, _left, _right, _ok
}

// Height obtains the height of the PrintContext, in pixels.
//
// The function returns the following values:
//
//   - gdouble: height of context.
func (context *PrintContext) Height() float64 {
	var _arg0 *C.GtkPrintContext // out
	var _cret C.gdouble          // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_height(_arg0)
	runtime.KeepAlive(context)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PageSetup obtains the PageSetup that determines the page dimensions of the
// PrintContext.
//
// The function returns the following values:
//
//   - pageSetup: page setup of context.
func (context *PrintContext) PageSetup() *PageSetup {
	var _arg0 *C.GtkPrintContext // out
	var _cret *C.GtkPageSetup    // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_page_setup(_arg0)
	runtime.KeepAlive(context)

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.Take(unsafe.Pointer(_cret)))

	return _pageSetup
}

// PangoFontmap returns a FontMap that is suitable for use with the
// PrintContext.
//
// The function returns the following values:
//
//   - fontMap: font map of context.
func (context *PrintContext) PangoFontmap() pango.FontMapper {
	var _arg0 *C.GtkPrintContext // out
	var _cret *C.PangoFontMap    // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_pango_fontmap(_arg0)
	runtime.KeepAlive(context)

	var _fontMap pango.FontMapper // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type pango.FontMapper is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(pango.FontMapper)
			return ok
		})
		rv, ok := casted.(pango.FontMapper)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontMapper")
		}
		_fontMap = rv
	}

	return _fontMap
}

// Width obtains the width of the PrintContext, in pixels.
//
// The function returns the following values:
//
//   - gdouble: width of context.
func (context *PrintContext) Width() float64 {
	var _arg0 *C.GtkPrintContext // out
	var _cret C.gdouble          // in

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_print_context_get_width(_arg0)
	runtime.KeepAlive(context)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// SetCairoContext sets a new cairo context on a print context.
//
// This function is intended to be used when implementing an internal print
// preview, it is not needed for printing, since GTK+ itself creates a suitable
// cairo context in that case.
//
// The function takes the following parameters:
//
//   - cr: cairo context.
//   - dpiX: horizontal resolution to use with cr.
//   - dpiY: vertical resolution to use with cr.
func (context *PrintContext) SetCairoContext(cr *cairo.Context, dpiX, dpiY float64) {
	var _arg0 *C.GtkPrintContext // out
	var _arg1 *C.cairo_t         // out
	var _arg2 C.double           // out
	var _arg3 C.double           // out

	_arg0 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.double(dpiX)
	_arg3 = C.double(dpiY)

	C.gtk_print_context_set_cairo_context(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(dpiX)
	runtime.KeepAlive(dpiY)
}

// PrintOperationOverrides contains methods that are overridable.
type PrintOperationOverrides struct {
	// BeginPrint: signal emitted after the user has finished changing print
	// settings in the dialog, before the actual rendering starts.
	BeginPrint func(context *PrintContext)
	// CustomWidgetApply: signal emitted right before “begin-print” if you added
	// a custom widget in the “create-custom-widget” handler.
	CustomWidgetApply func(widget Widgetter)
	// Done: signal emitted when the print operation run has finished doing
	// everything required for printing.
	Done func(result PrintOperationResult)
	// DrawPage: signal emitted for every page that is printed.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - pageNr
	DrawPage func(context *PrintContext, pageNr int)
	// EndPrint: signal emitted after all pages have been rendered.
	EndPrint func(context *PrintContext)
	// Paginate: signal emitted after the “begin-print” signal, but before the
	// actual rendering starts.
	Paginate func(context *PrintContext) bool
	// Preview: signal emitted when a preview is requested from the native
	// dialog.
	//
	// The function takes the following parameters:
	//
	//   - preview
	//   - context
	//   - parent
	Preview func(preview PrintOperationPreviewer, context *PrintContext, parent *Window) bool
	// RequestPageSetup is emitted once for every page that is printed, to give
	// the application a chance to modify the page setup.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - pageNr
	//   - setup
	RequestPageSetup func(context *PrintContext, pageNr int, setup *PageSetup)
	// StatusChanged is emitted at between the various phases of the print
	// operation.
	StatusChanged func()
	// UpdateCustomWidget is emitted after change of selected printer.
	//
	// The function takes the following parameters:
	//
	//   - widget
	//   - setup
	//   - settings
	UpdateCustomWidget func(widget Widgetter, setup *PageSetup, settings *PrintSettings)
}

func defaultPrintOperationOverrides(v *PrintOperation) PrintOperationOverrides {
	return PrintOperationOverrides{
		BeginPrint:         v.beginPrint,
		CustomWidgetApply:  v.customWidgetApply,
		Done:               v.done,
		DrawPage:           v.drawPage,
		EndPrint:           v.endPrint,
		Paginate:           v.paginate,
		Preview:            v.preview,
		RequestPageSetup:   v.requestPageSetup,
		StatusChanged:      v.statusChanged,
		UpdateCustomWidget: v.updateCustomWidget,
	}
}

// PrintOperation is the high-level, portable printing API. It looks a bit
// different than other GTK+ dialogs such as the FileChooser, since some
// platforms don’t expose enough infrastructure to implement a good print
// dialog. On such platforms, GtkPrintOperation uses the native print dialog.
// On platforms which do not provide a native print dialog, GTK+ uses its own,
// see PrintUnixDialog.
//
// The typical way to use the high-level printing API is to create a
// GtkPrintOperation object with gtk_print_operation_new() when the user
// selects to print. Then you set some properties on it, e.g. the page size,
// any PrintSettings from previous print operations, the number of pages,
// the current page, etc.
//
// Then you start the print operation by calling gtk_print_operation_run().
// It will then show a dialog, let the user select a printer and options.
// When the user finished the dialog various signals will be emitted on the
// PrintOperation, the main one being PrintOperation::draw-page, which you are
// supposed to catch and render the page on the provided PrintContext using
// Cairo.
//
// The high-level printing API
//
//	static GtkPrintSettings *settings = NULL;
//
//	static void
//	do_print (void)
//	{
//	  GtkPrintOperation *print;
//	  GtkPrintOperationResult res;
//
//	  print = gtk_print_operation_new ();
//
//	  if (settings != NULL)
//	    gtk_print_operation_set_print_settings (print, settings);
//
//	  g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
//	  g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
//
//	  res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
//	                                 GTK_WINDOW (main_window), NULL);
//
//	  if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
//	    {
//	      if (settings != NULL)
//	        g_object_unref (settings);
//	      settings = g_object_ref (gtk_print_operation_get_print_settings (print));
//	    }
//
//	  g_object_unref (print);
//	}
//
// By default GtkPrintOperation uses an external application to do print
// preview. To implement a custom print preview, an application must connect to
// the preview signal. The functions gtk_print_operation_preview_render_page(),
// gtk_print_operation_preview_end_preview() and
// gtk_print_operation_preview_is_selected() are useful when implementing a
// print preview.
type PrintOperation struct {
	_ [0]func() // equal guard
	*coreglib.Object

	PrintOperationPreview
}

var (
	_ coreglib.Objector = (*PrintOperation)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*PrintOperation, *PrintOperationClass, PrintOperationOverrides](
		GTypePrintOperation,
		initPrintOperationClass,
		wrapPrintOperation,
		defaultPrintOperationOverrides,
	)
}

func initPrintOperationClass(gclass unsafe.Pointer, overrides PrintOperationOverrides, classInitFunc func(*PrintOperationClass)) {
	pclass := (*C.GtkPrintOperationClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypePrintOperation))))

	if overrides.BeginPrint != nil {
		pclass.begin_print = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_begin_print)
	}

	if overrides.CustomWidgetApply != nil {
		pclass.custom_widget_apply = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_custom_widget_apply)
	}

	if overrides.Done != nil {
		pclass.done = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_done)
	}

	if overrides.DrawPage != nil {
		pclass.draw_page = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_draw_page)
	}

	if overrides.EndPrint != nil {
		pclass.end_print = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_end_print)
	}

	if overrides.Paginate != nil {
		pclass.paginate = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_paginate)
	}

	if overrides.Preview != nil {
		pclass.preview = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_preview)
	}

	if overrides.RequestPageSetup != nil {
		pclass.request_page_setup = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_request_page_setup)
	}

	if overrides.StatusChanged != nil {
		pclass.status_changed = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_status_changed)
	}

	if overrides.UpdateCustomWidget != nil {
		pclass.update_custom_widget = (*[0]byte)(C._gotk4_gtk3_PrintOperationClass_update_custom_widget)
	}

	if classInitFunc != nil {
		class := (*PrintOperationClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapPrintOperation(obj *coreglib.Object) *PrintOperation {
	return &PrintOperation{
		Object: obj,
		PrintOperationPreview: PrintOperationPreview{
			Object: obj,
		},
	}
}

func marshalPrintOperation(p uintptr) (interface{}, error) {
	return wrapPrintOperation(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectBeginPrint is emitted after the user has finished changing print
// settings in the dialog, before the actual rendering starts.
//
// A typical use for ::begin-print is to use the parameters from the
// PrintContext and paginate the document accordingly, and then set the number
// of pages with gtk_print_operation_set_n_pages().
func (op *PrintOperation) ConnectBeginPrint(f func(context *PrintContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "begin-print", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectBeginPrint), f)
}

// ConnectCreateCustomWidget is emitted when displaying the print dialog.
// If you return a widget in a handler for this signal it will be added to a
// custom tab in the print dialog. You typically return a container widget with
// multiple widgets in it.
//
// The print dialog owns the returned widget, and its lifetime is not controlled
// by the application. However, the widget is guaranteed to stay around until
// the PrintOperation::custom-widget-apply signal is emitted on the operation.
// Then you can read out any information you need from the widgets.
func (op *PrintOperation) ConnectCreateCustomWidget(f func() (object *coreglib.Object)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "create-custom-widget", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectCreateCustomWidget), f)
}

// ConnectCustomWidgetApply is emitted right before PrintOperation::begin-print
// if you added a custom widget in the PrintOperation::create-custom-widget
// handler. When you get this signal you should read the information from the
// custom widgets, as the widgets are not guaraneed to be around at a later
// time.
func (op *PrintOperation) ConnectCustomWidgetApply(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "custom-widget-apply", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectCustomWidgetApply), f)
}

// ConnectDone is emitted when the print operation run has finished doing
// everything required for printing.
//
// result gives you information about what happened during the run.
// If result is GTK_PRINT_OPERATION_RESULT_ERROR then you can call
// gtk_print_operation_get_error() for more information.
//
// If you enabled print status tracking then gtk_print_operation_is_finished()
// may still return FALSE after PrintOperation::done was emitted.
func (op *PrintOperation) ConnectDone(f func(result PrintOperationResult)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "done", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectDone), f)
}

// ConnectDrawPage is emitted for every page that is printed. The signal handler
// must render the page_nr's page onto the cairo context obtained from context
// using gtk_print_context_get_cairo_context().
//
//	static void
//	draw_page (GtkPrintOperation *operation,
//	           GtkPrintContext   *context,
//	           gint               page_nr,
//	           gpointer           user_data)
//	{
//	  cairo_t *cr;
//	  PangoLayout *layout;
//	  gdouble width, text_height;
//	  gint layout_height;
//	  PangoFontDescription *desc;
//
//	  cr = gtk_print_context_get_cairo_context (context);
//	  width = gtk_print_context_get_width (context);
//
//	  cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
//
//	  cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
//	  cairo_fill (cr);
//
//	  layout = gtk_print_context_create_pango_layout (context);
//
//	  desc = pango_font_description_from_string ("sans 14");
//	  pango_layout_set_font_description (layout, desc);
//	  pango_font_description_free (desc);
//
//	  pango_layout_set_text (layout, "some text", -1);
//	  pango_layout_set_width (layout, width * PANGO_SCALE);
//	  pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
//
//	  pango_layout_get_size (layout, NULL, &layout_height);
//	  text_height = (gdouble)layout_height / PANGO_SCALE;
//
//	  cairo_move_to (cr, width / 2,  (HEADER_HEIGHT - text_height) / 2);
//	  pango_cairo_show_layout (cr, layout);
//
//	  g_object_unref (layout);
//	}
//
// Use gtk_print_operation_set_use_full_page() and
// gtk_print_operation_set_unit() before starting the print operation to set up
// the transformation of the cairo context according to your needs.
func (op *PrintOperation) ConnectDrawPage(f func(context *PrintContext, pageNr int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "draw-page", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectDrawPage), f)
}

// ConnectEndPrint is emitted after all pages have been rendered. A handler
// for this signal can clean up any resources that have been allocated in the
// PrintOperation::begin-print handler.
func (op *PrintOperation) ConnectEndPrint(f func(context *PrintContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "end-print", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectEndPrint), f)
}

// ConnectPaginate is emitted after the PrintOperation::begin-print signal,
// but before the actual rendering starts. It keeps getting emitted until a
// connected signal handler returns TRUE.
//
// The ::paginate signal is intended to be used for paginating a document
// in small chunks, to avoid blocking the user interface for a long
// time. The signal handler should update the number of pages using
// gtk_print_operation_set_n_pages(), and return TRUE if the document has been
// completely paginated.
//
// If you don't need to do pagination in chunks, you can simply do it all in the
// ::begin-print handler, and set the number of pages from there.
func (op *PrintOperation) ConnectPaginate(f func(context *PrintContext) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "paginate", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectPaginate), f)
}

// ConnectPreview gets emitted when a preview is requested from the native
// dialog.
//
// The default handler for this signal uses an external viewer application to
// preview.
//
// To implement a custom print preview, an application must return TRUE from
// its handler for this signal. In order to use the provided context for the
// preview implementation, it must be given a suitable cairo context with
// gtk_print_context_set_cairo_context().
//
// The custom preview implementation can use
// gtk_print_operation_preview_is_selected() and
// gtk_print_operation_preview_render_page() to find pages which are selected
// for print and render them. The preview must be finished by calling
// gtk_print_operation_preview_end_preview() (typically in response to the user
// clicking a close button).
func (op *PrintOperation) ConnectPreview(f func(preview PrintOperationPreviewer, context *PrintContext, parent *Window) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "preview", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectPreview), f)
}

// ConnectRequestPageSetup is emitted once for every page that is printed,
// to give the application a chance to modify the page setup. Any changes done
// to setup will be in force only for printing this page.
func (op *PrintOperation) ConnectRequestPageSetup(f func(context *PrintContext, pageNr int, setup *PageSetup)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "request-page-setup", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectRequestPageSetup), f)
}

// ConnectStatusChanged is emitted at between the various phases of the print
// operation. See PrintStatus for the phases that are being discriminated.
// Use gtk_print_operation_get_status() to find out the current status.
func (op *PrintOperation) ConnectStatusChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "status-changed", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectStatusChanged), f)
}

// ConnectUpdateCustomWidget is emitted after change of selected printer.
// The actual page setup and print settings are passed to the custom widget,
// which can actualize itself according to this change.
func (op *PrintOperation) ConnectUpdateCustomWidget(f func(widget Widgetter, setup *PageSetup, settings *PrintSettings)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(op, "update-custom-widget", false, unsafe.Pointer(C._gotk4_gtk3_PrintOperation_ConnectUpdateCustomWidget), f)
}

// NewPrintOperation creates a new PrintOperation.
//
// The function returns the following values:
//
//   - printOperation: new PrintOperation.
func NewPrintOperation() *PrintOperation {
	var _cret *C.GtkPrintOperation // in

	_cret = C.gtk_print_operation_new()

	var _printOperation *PrintOperation // out

	_printOperation = wrapPrintOperation(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _printOperation
}

// Cancel cancels a running print operation. This function may be called
// from a PrintOperation::begin-print, PrintOperation::paginate or
// PrintOperation::draw-page signal handler to stop the currently running print
// operation.
func (op *PrintOperation) Cancel() {
	var _arg0 *C.GtkPrintOperation // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	C.gtk_print_operation_cancel(_arg0)
	runtime.KeepAlive(op)
}

// DrawPageFinish: signalize that drawing of particular page is complete.
//
// It is called after completion of page drawing (e.g. drawing in another
// thread). If gtk_print_operation_set_defer_drawing() was called before,
// then this function has to be called by application. In another case it is
// called by the library itself.
func (op *PrintOperation) DrawPageFinish() {
	var _arg0 *C.GtkPrintOperation // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	C.gtk_print_operation_draw_page_finish(_arg0)
	runtime.KeepAlive(op)
}

// DefaultPageSetup returns the default page setup, see
// gtk_print_operation_set_default_page_setup().
//
// The function returns the following values:
//
//   - pageSetup: default page setup.
func (op *PrintOperation) DefaultPageSetup() *PageSetup {
	var _arg0 *C.GtkPrintOperation // out
	var _cret *C.GtkPageSetup      // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_default_page_setup(_arg0)
	runtime.KeepAlive(op)

	var _pageSetup *PageSetup // out

	_pageSetup = wrapPageSetup(coreglib.Take(unsafe.Pointer(_cret)))

	return _pageSetup
}

// EmbedPageSetup gets the value of PrintOperation:embed-page-setup property.
//
// The function returns the following values:
//
//   - ok: whether page setup selection combos are embedded.
func (op *PrintOperation) EmbedPageSetup() bool {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_embed_page_setup(_arg0)
	runtime.KeepAlive(op)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Error: call this when the result of a print operation is
// GTK_PRINT_OPERATION_RESULT_ERROR, either as returned by
// gtk_print_operation_run(), or in the PrintOperation::done signal handler.
// The returned #GError will contain more details on what went wrong.
func (op *PrintOperation) Error() error {
	var _arg0 *C.GtkPrintOperation // out
	var _cerr *C.GError            // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	C.gtk_print_operation_get_error(_arg0, &_cerr)
	runtime.KeepAlive(op)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// HasSelection gets the value of PrintOperation:has-selection property.
//
// The function returns the following values:
//
//   - ok: whether there is a selection.
func (op *PrintOperation) HasSelection() bool {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_has_selection(_arg0)
	runtime.KeepAlive(op)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// NPagesToPrint returns the number of pages that will be printed.
//
// Note that this value is set during print preparation phase
// (GTK_PRINT_STATUS_PREPARING), so this function should never be called
// before the data generation phase (GTK_PRINT_STATUS_GENERATING_DATA).
// You can connect to the PrintOperation::status-changed signal and
// call gtk_print_operation_get_n_pages_to_print() when print status is
// GTK_PRINT_STATUS_GENERATING_DATA. This is typically used to track the
// progress of print operation.
//
// The function returns the following values:
//
//   - gint: number of pages that will be printed.
func (op *PrintOperation) NPagesToPrint() int {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_n_pages_to_print(_arg0)
	runtime.KeepAlive(op)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PrintSettings returns the current print settings.
//
// Note that the return value is NULL until either
// gtk_print_operation_set_print_settings() or gtk_print_operation_run() have
// been called.
//
// The function returns the following values:
//
//   - printSettings: current print settings of op.
func (op *PrintOperation) PrintSettings() *PrintSettings {
	var _arg0 *C.GtkPrintOperation // out
	var _cret *C.GtkPrintSettings  // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_print_settings(_arg0)
	runtime.KeepAlive(op)

	var _printSettings *PrintSettings // out

	_printSettings = wrapPrintSettings(coreglib.Take(unsafe.Pointer(_cret)))

	return _printSettings
}

// Status returns the status of the print operation. Also see
// gtk_print_operation_get_status_string().
//
// The function returns the following values:
//
//   - printStatus status of the print operation.
func (op *PrintOperation) Status() PrintStatus {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.GtkPrintStatus     // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_status(_arg0)
	runtime.KeepAlive(op)

	var _printStatus PrintStatus // out

	_printStatus = PrintStatus(_cret)

	return _printStatus
}

// StatusString returns a string representation of the status of the print
// operation. The string is translated and suitable for displaying the print
// status e.g. in a Statusbar.
//
// Use gtk_print_operation_get_status() to obtain a status value that is
// suitable for programmatic use.
//
// The function returns the following values:
//
//   - utf8: string representation of the status of the print operation.
func (op *PrintOperation) StatusString() string {
	var _arg0 *C.GtkPrintOperation // out
	var _cret *C.gchar             // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_status_string(_arg0)
	runtime.KeepAlive(op)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// SupportSelection gets the value of PrintOperation:support-selection property.
//
// The function returns the following values:
//
//   - ok: whether the application supports print of selection.
func (op *PrintOperation) SupportSelection() bool {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_get_support_selection(_arg0)
	runtime.KeepAlive(op)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsFinished: convenience function to find out if the print operation is
// finished, either successfully (GTK_PRINT_STATUS_FINISHED) or unsuccessfully
// (GTK_PRINT_STATUS_FINISHED_ABORTED).
//
// Note: when you enable print status tracking the print operation can be in a
// non-finished state even after done has been called, as the operation status
// then tracks the print job status on the printer.
//
// The function returns the following values:
//
//   - ok: TRUE, if the print operation is finished.
func (op *PrintOperation) IsFinished() bool {
	var _arg0 *C.GtkPrintOperation // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	_cret = C.gtk_print_operation_is_finished(_arg0)
	runtime.KeepAlive(op)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Run runs the print operation, by first letting the user modify print settings
// in the print dialog, and then print the document.
//
// Normally that this function does not return until the rendering of all pages
// is complete. You can connect to the PrintOperation::status-changed signal
// on op to obtain some information about the progress of the print operation.
// Furthermore, it may use a recursive mainloop to show the print dialog.
//
// If you call gtk_print_operation_set_allow_async() or set the
// PrintOperation:allow-async property the operation will run asynchronously if
// this is supported on the platform. The PrintOperation::done signal will be
// emitted with the result of the operation when the it is done (i.e. when the
// dialog is canceled, or when the print succeeds or fails).
//
//	if (settings != NULL)
//	  gtk_print_operation_set_print_settings (print, settings);
//
//	if (page_setup != NULL)
//	  gtk_print_operation_set_default_page_setup (print, page_setup);
//
//	g_signal_connect (print, "begin-print",
//	                  G_CALLBACK (begin_print), &data);
//	g_signal_connect (print, "draw-page",
//	                  G_CALLBACK (draw_page), &data);
//
//	res = gtk_print_operation_run (print,
//	                               GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
//	                               parent,
//	                               &error);
//
//	if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
//	 {
//	   error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
//	  			                     GTK_DIALOG_DESTROY_WITH_PARENT,
//						     GTK_MESSAGE_ERROR,
//						     GTK_BUTTONS_CLOSE,
//						     "Error printing file:\ns",
//						     error->message);
//	   g_signal_connect (error_dialog, "response",
//	                     G_CALLBACK (gtk_widget_destroy), NULL);
//	   gtk_widget_show (error_dialog);
//	   g_error_free (error);
//	 }
//	else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
//	 {
//	   if (settings != NULL)
//	g_object_unref (settings);
//	   settings = g_object_ref (gtk_print_operation_get_print_settings (print));
//	 }
//
// Note that gtk_print_operation_run() can only be called once on a given
// PrintOperation.
//
// The function takes the following parameters:
//
//   - action to start.
//   - parent (optional): transient parent of the dialog.
//
// The function returns the following values:
//
//   - printOperationResult: result of the print operation. A return value
//     of GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
//     completed successfully. In this case, it is a good idea to obtain the
//     used print settings with gtk_print_operation_get_print_settings()
//     and store them for reuse with the next print operation. A value of
//     GTK_PRINT_OPERATION_RESULT_IN_PROGRESS means the operation is running
//     asynchronously, and will emit the PrintOperation::done signal when done.
func (op *PrintOperation) Run(action PrintOperationAction, parent *Window) (PrintOperationResult, error) {
	var _arg0 *C.GtkPrintOperation      // out
	var _arg1 C.GtkPrintOperationAction // out
	var _arg2 *C.GtkWindow              // out
	var _cret C.GtkPrintOperationResult // in
	var _cerr *C.GError                 // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = C.GtkPrintOperationAction(action)
	if parent != nil {
		_arg2 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	_cret = C.gtk_print_operation_run(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(op)
	runtime.KeepAlive(action)
	runtime.KeepAlive(parent)

	var _printOperationResult PrintOperationResult // out
	var _goerr error                               // out

	_printOperationResult = PrintOperationResult(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _printOperationResult, _goerr
}

// SetAllowAsync sets whether the gtk_print_operation_run() may return before
// the print operation is completed. Note that some platforms may not allow
// asynchronous operation.
//
// The function takes the following parameters:
//
//   - allowAsync: TRUE to allow asynchronous operation.
func (op *PrintOperation) SetAllowAsync(allowAsync bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if allowAsync {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_allow_async(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(allowAsync)
}

// SetCurrentPage sets the current page.
//
// If this is called before gtk_print_operation_run(), the user will be able to
// select to print only the current page.
//
// Note that this only makes sense for pre-paginated documents.
//
// The function takes the following parameters:
//
//   - currentPage: current page, 0-based.
func (op *PrintOperation) SetCurrentPage(currentPage int) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = C.gint(currentPage)

	C.gtk_print_operation_set_current_page(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(currentPage)
}

// SetCustomTabLabel sets the label for the tab holding custom widgets.
//
// The function takes the following parameters:
//
//   - label (optional) to use, or NULL to use the default label.
func (op *PrintOperation) SetCustomTabLabel(label string) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_print_operation_set_custom_tab_label(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(label)
}

// SetDefaultPageSetup makes default_page_setup the default page setup for op.
//
// This page setup will be used by gtk_print_operation_run(),
// but it can be overridden on a per-page basis by connecting to the
// PrintOperation::request-page-setup signal.
//
// The function takes the following parameters:
//
//   - defaultPageSetup (optional) or NULL.
func (op *PrintOperation) SetDefaultPageSetup(defaultPageSetup *PageSetup) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPageSetup      // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if defaultPageSetup != nil {
		_arg1 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(defaultPageSetup).Native()))
	}

	C.gtk_print_operation_set_default_page_setup(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(defaultPageSetup)
}

// SetDeferDrawing sets up the PrintOperation to wait for calling of
// gtk_print_operation_draw_page_finish() from application. It can be used for
// drawing page in another thread.
//
// This function must be called in the callback of “draw-page” signal.
func (op *PrintOperation) SetDeferDrawing() {
	var _arg0 *C.GtkPrintOperation // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))

	C.gtk_print_operation_set_defer_drawing(_arg0)
	runtime.KeepAlive(op)
}

// SetEmbedPageSetup: embed page size combo box and orientation combo box into
// page setup page. Selected page setup is stored as default page setup in
// PrintOperation.
//
// The function takes the following parameters:
//
//   - embed: TRUE to embed page setup selection in the PrintUnixDialog.
func (op *PrintOperation) SetEmbedPageSetup(embed bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if embed {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_embed_page_setup(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(embed)
}

// SetExportFilename sets up the PrintOperation to generate a file instead
// of showing the print dialog. The indended use of this function is for
// implementing “Export to PDF” actions. Currently, PDF is the only supported
// format.
//
// “Print to PDF” support is independent of this and is done by letting the user
// pick the “Print to PDF” item from the list of printers in the print dialog.
//
// The function takes the following parameters:
//
//   - filename for the exported file.
func (op *PrintOperation) SetExportFilename(filename string) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_operation_set_export_filename(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(filename)
}

// SetHasSelection sets whether there is a selection to print.
//
// Application has to set number of pages to which the selection
// will draw by gtk_print_operation_set_n_pages() in a callback of
// PrintOperation::begin-print.
//
// The function takes the following parameters:
//
//   - hasSelection: TRUE indicates that a selection exists.
func (op *PrintOperation) SetHasSelection(hasSelection bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if hasSelection {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_has_selection(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(hasSelection)
}

// SetJobName sets the name of the print job. The name is used to identify the
// job (e.g. in monitoring applications like eggcups).
//
// If you don’t set a job name, GTK+ picks a default one by numbering successive
// print jobs.
//
// The function takes the following parameters:
//
//   - jobName: string that identifies the print job.
func (op *PrintOperation) SetJobName(jobName string) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(jobName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_operation_set_job_name(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(jobName)
}

// SetNPages sets the number of pages in the document.
//
// This must be set to a positive number before the rendering starts. It may be
// set in a PrintOperation::begin-print signal hander.
//
// Note that the page numbers passed to the PrintOperation::request-page-setup
// and PrintOperation::draw-page signals are 0-based, i.e. if the user chooses
// to print all pages, the last ::draw-page signal will be for page n_pages - 1.
//
// The function takes the following parameters:
//
//   - nPages: number of pages.
func (op *PrintOperation) SetNPages(nPages int) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = C.gint(nPages)

	C.gtk_print_operation_set_n_pages(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(nPages)
}

// SetPrintSettings sets the print settings for op. This is typically used
// to re-establish print settings from a previous print operation, see
// gtk_print_operation_run().
//
// The function takes the following parameters:
//
//   - printSettings (optional): PrintSettings.
func (op *PrintOperation) SetPrintSettings(printSettings *PrintSettings) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintSettings  // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if printSettings != nil {
		_arg1 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(printSettings).Native()))
	}

	C.gtk_print_operation_set_print_settings(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(printSettings)
}

// SetShowProgress: if show_progress is TRUE, the print operation will show a
// progress dialog during the print operation.
//
// The function takes the following parameters:
//
//   - showProgress: TRUE to show a progress dialog.
func (op *PrintOperation) SetShowProgress(showProgress bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if showProgress {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_show_progress(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(showProgress)
}

// SetSupportSelection sets whether selection is supported by PrintOperation.
//
// The function takes the following parameters:
//
//   - supportSelection: TRUE to support selection.
func (op *PrintOperation) SetSupportSelection(supportSelection bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if supportSelection {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_support_selection(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(supportSelection)
}

// SetTrackPrintStatus: if track_status is TRUE, the print operation will try
// to continue report on the status of the print job in the printer queues and
// printer. This can allow your application to show things like “out of paper”
// issues, and when the print job actually reaches the printer.
//
// This function is often implemented using some form of polling, so it should
// not be enabled unless needed.
//
// The function takes the following parameters:
//
//   - trackStatus: TRUE to track status after printing.
func (op *PrintOperation) SetTrackPrintStatus(trackStatus bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if trackStatus {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_track_print_status(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(trackStatus)
}

// SetUnit sets up the transformation for the cairo context obtained from
// PrintContext in such a way that distances are measured in units of unit.
//
// The function takes the following parameters:
//
//   - unit to use.
func (op *PrintOperation) SetUnit(unit Unit) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.GtkUnit            // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	_arg1 = C.GtkUnit(unit)

	C.gtk_print_operation_set_unit(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(unit)
}

// SetUseFullPage: if full_page is TRUE, the transformation for the cairo
// context obtained from PrintContext puts the origin at the top left corner
// of the page (which may not be the top left corner of the sheet, depending on
// page orientation and the number of pages per sheet). Otherwise, the origin is
// at the top left corner of the imageable area (i.e. inside the margins).
//
// The function takes the following parameters:
//
//   - fullPage: TRUE to set up the PrintContext for the full page.
func (op *PrintOperation) SetUseFullPage(fullPage bool) {
	var _arg0 *C.GtkPrintOperation // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(op).Native()))
	if fullPage {
		_arg1 = C.TRUE
	}

	C.gtk_print_operation_set_use_full_page(_arg0, _arg1)
	runtime.KeepAlive(op)
	runtime.KeepAlive(fullPage)
}

// beginPrint: signal emitted after the user has finished changing print
// settings in the dialog, before the actual rendering starts.
func (operation *PrintOperation) beginPrint(context *PrintContext) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.begin_print

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintContext   // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_begin_print(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(context)
}

// customWidgetApply: signal emitted right before “begin-print” if you added a
// custom widget in the “create-custom-widget” handler.
func (operation *PrintOperation) customWidgetApply(widget Widgetter) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.custom_widget_apply

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkWidget         // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_custom_widget_apply(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(widget)
}

// Done: signal emitted when the print operation run has finished doing
// everything required for printing.
func (operation *PrintOperation) done(result PrintOperationResult) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.done

	var _arg0 *C.GtkPrintOperation      // out
	var _arg1 C.GtkPrintOperationResult // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = C.GtkPrintOperationResult(result)

	C._gotk4_gtk3_PrintOperation_virtual_done(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(result)
}

// drawPage: signal emitted for every page that is printed.
//
// The function takes the following parameters:
//
//   - context
//   - pageNr
func (operation *PrintOperation) drawPage(context *PrintContext, pageNr int) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.draw_page

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintContext   // out
	var _arg2 C.gint               // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gint(pageNr)

	C._gotk4_gtk3_PrintOperation_virtual_draw_page(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(context)
	runtime.KeepAlive(pageNr)
}

// endPrint: signal emitted after all pages have been rendered.
func (operation *PrintOperation) endPrint(context *PrintContext) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.end_print

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintContext   // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_end_print(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(context)
}

// Paginate: signal emitted after the “begin-print” signal, but before the
// actual rendering starts.
func (operation *PrintOperation) paginate(context *PrintContext) bool {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.paginate

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintContext   // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C._gotk4_gtk3_PrintOperation_virtual_paginate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(context)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Preview: signal emitted when a preview is requested from the native dialog.
//
// The function takes the following parameters:
//
//   - preview
//   - context
//   - parent
func (operation *PrintOperation) preview(preview PrintOperationPreviewer, context *PrintContext, parent *Window) bool {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.preview

	var _arg0 *C.GtkPrintOperation        // out
	var _arg1 *C.GtkPrintOperationPreview // out
	var _arg2 *C.GtkPrintContext          // out
	var _arg3 *C.GtkWindow                // out
	var _cret C.gboolean                  // in

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintOperationPreview)(unsafe.Pointer(coreglib.InternObject(preview).Native()))
	_arg2 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg3 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))

	_cret = C._gotk4_gtk3_PrintOperation_virtual_preview(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(preview)
	runtime.KeepAlive(context)
	runtime.KeepAlive(parent)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// requestPageSetup is emitted once for every page that is printed, to give the
// application a chance to modify the page setup.
//
// The function takes the following parameters:
//
//   - context
//   - pageNr
//   - setup
func (operation *PrintOperation) requestPageSetup(context *PrintContext, pageNr int, setup *PageSetup) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.request_page_setup

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkPrintContext   // out
	var _arg2 C.gint               // out
	var _arg3 *C.GtkPageSetup      // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkPrintContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gint(pageNr)
	_arg3 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_request_page_setup(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(context)
	runtime.KeepAlive(pageNr)
	runtime.KeepAlive(setup)
}

// statusChanged is emitted at between the various phases of the print
// operation.
func (operation *PrintOperation) statusChanged() {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.status_changed

	var _arg0 *C.GtkPrintOperation // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_status_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(operation)
}

// updateCustomWidget is emitted after change of selected printer.
//
// The function takes the following parameters:
//
//   - widget
//   - setup
//   - settings
func (operation *PrintOperation) updateCustomWidget(widget Widgetter, setup *PageSetup, settings *PrintSettings) {
	gclass := (*C.GtkPrintOperationClass)(coreglib.PeekParentClass(operation))
	fnarg := gclass.update_custom_widget

	var _arg0 *C.GtkPrintOperation // out
	var _arg1 *C.GtkWidget         // out
	var _arg2 *C.GtkPageSetup      // out
	var _arg3 *C.GtkPrintSettings  // out

	_arg0 = (*C.GtkPrintOperation)(unsafe.Pointer(coreglib.InternObject(operation).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = (*C.GtkPageSetup)(unsafe.Pointer(coreglib.InternObject(setup).Native()))
	_arg3 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	C._gotk4_gtk3_PrintOperation_virtual_update_custom_widget(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(operation)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(setup)
	runtime.KeepAlive(settings)
}

// PrintSettings object represents the settings of a print dialog in a
// system-independent way. The main use for this object is that once you’ve
// printed you can get a settings object that represents the settings the user
// chose, and the next time you print you can pass that object in so that the
// user doesn’t have to re-set all his settings.
//
// Its also possible to enumerate the settings so that you can easily save the
// settings for the next time your app runs, or even store them in a document.
// The predefined keys try to use shared values as much as possible so that
// moving such a document between systems still works.
//
// Printing support was added in GTK+ 2.10.
type PrintSettings struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*PrintSettings)(nil)
)

func wrapPrintSettings(obj *coreglib.Object) *PrintSettings {
	return &PrintSettings{
		Object: obj,
	}
}

func marshalPrintSettings(p uintptr) (interface{}, error) {
	return wrapPrintSettings(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewPrintSettings creates a new PrintSettings object.
//
// The function returns the following values:
//
//   - printSettings: new PrintSettings object.
func NewPrintSettings() *PrintSettings {
	var _cret *C.GtkPrintSettings // in

	_cret = C.gtk_print_settings_new()

	var _printSettings *PrintSettings // out

	_printSettings = wrapPrintSettings(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _printSettings
}

// NewPrintSettingsFromFile reads the print settings from file_name. Returns
// a new PrintSettings object with the restored settings, or NULL if an error
// occurred. If the file could not be loaded then error is set to either a Error
// or FileError. See gtk_print_settings_to_file().
//
// The function takes the following parameters:
//
//   - fileName: filename to read the settings from.
//
// The function returns the following values:
//
//   - printSettings: restored PrintSettings.
func NewPrintSettingsFromFile(fileName string) (*PrintSettings, error) {
	var _arg1 *C.gchar            // out
	var _cret *C.GtkPrintSettings // in
	var _cerr *C.GError           // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_new_from_file(_arg1, &_cerr)
	runtime.KeepAlive(fileName)

	var _printSettings *PrintSettings // out
	var _goerr error                  // out

	_printSettings = wrapPrintSettings(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _printSettings, _goerr
}

// NewPrintSettingsFromGVariant: deserialize print settings from an a{sv}
// variant in the format produced by gtk_print_settings_to_gvariant().
//
// The function takes the following parameters:
//
//   - variant: a{sv} #GVariant.
//
// The function returns the following values:
//
//   - printSettings: new PrintSettings object.
func NewPrintSettingsFromGVariant(variant *glib.Variant) *PrintSettings {
	var _arg1 *C.GVariant         // out
	var _cret *C.GtkPrintSettings // in

	_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(variant)))

	_cret = C.gtk_print_settings_new_from_gvariant(_arg1)
	runtime.KeepAlive(variant)

	var _printSettings *PrintSettings // out

	_printSettings = wrapPrintSettings(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _printSettings
}

// NewPrintSettingsFromKeyFile reads the print settings from the group
// group_name in key_file. Returns a new PrintSettings object with the restored
// settings, or NULL if an error occurred. If the file could not be loaded then
// error is set to either a Error or FileError.
//
// The function takes the following parameters:
//
//   - keyFile to retrieve the settings from.
//   - groupName (optional): name of the group to use, or NULL to use the
//     default “Print Settings”.
//
// The function returns the following values:
//
//   - printSettings: restored PrintSettings.
func NewPrintSettingsFromKeyFile(keyFile *glib.KeyFile, groupName string) (*PrintSettings, error) {
	var _arg1 *C.GKeyFile         // out
	var _arg2 *C.gchar            // out
	var _cret *C.GtkPrintSettings // in
	var _cerr *C.GError           // in

	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_print_settings_new_from_key_file(_arg1, _arg2, &_cerr)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)

	var _printSettings *PrintSettings // out
	var _goerr error                  // out

	_printSettings = wrapPrintSettings(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _printSettings, _goerr
}

// Copy copies a PrintSettings object.
//
// The function returns the following values:
//
//   - printSettings: newly allocated copy of other.
func (other *PrintSettings) Copy() *PrintSettings {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.GtkPrintSettings // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(other).Native()))

	_cret = C.gtk_print_settings_copy(_arg0)
	runtime.KeepAlive(other)

	var _printSettings *PrintSettings // out

	_printSettings = wrapPrintSettings(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _printSettings
}

// ForEach calls func for each key-value pair of settings.
//
// The function takes the following parameters:
//
//   - fn: function to call.
func (settings *PrintSettings) ForEach(fn PrintSettingsFunc) {
	var _arg0 *C.GtkPrintSettings    // out
	var _arg1 C.GtkPrintSettingsFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_PrintSettingsFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_print_settings_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(fn)
}

// Get looks up the string value associated with key.
//
// The function takes the following parameters:
//
//   - key: key.
//
// The function returns the following values:
//
//   - utf8: string value for key.
func (settings *PrintSettings) Get(key string) string {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_get(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Bool returns the boolean represented by the value that is associated with
// key.
//
// The string “true” represents TRUE, any other string FALSE.
//
// The function takes the following parameters:
//
//   - key: key.
//
// The function returns the following values:
//
//   - ok: TRUE, if key maps to a true value.
func (settings *PrintSettings) Bool(key string) bool {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_get_bool(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Collate gets the value of GTK_PRINT_SETTINGS_COLLATE.
//
// The function returns the following values:
//
//   - ok: whether to collate the printed pages.
func (settings *PrintSettings) Collate() bool {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_collate(_arg0)
	runtime.KeepAlive(settings)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DefaultSource gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
//
// The function returns the following values:
//
//   - utf8: default source.
func (settings *PrintSettings) DefaultSource() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_default_source(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Dither gets the value of GTK_PRINT_SETTINGS_DITHER.
//
// The function returns the following values:
//
//   - utf8: dithering that is used.
func (settings *PrintSettings) Dither() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_dither(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Double returns the double value associated with key, or 0.
//
// The function takes the following parameters:
//
//   - key: key.
//
// The function returns the following values:
//
//   - gdouble: double value of key.
func (settings *PrintSettings) Double(key string) float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_get_double(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DoubleWithDefault returns the floating point number represented by the value
// that is associated with key, or default_val if the value does not represent a
// floating point number.
//
// Floating point numbers are parsed with g_ascii_strtod().
//
// The function takes the following parameters:
//
//   - key: key.
//   - def: default value.
//
// The function returns the following values:
//
//   - gdouble: floating point number associated with key.
func (settings *PrintSettings) DoubleWithDefault(key string, def float64) float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gdouble           // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(def)

	_cret = C.gtk_print_settings_get_double_with_default(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(def)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Duplex gets the value of GTK_PRINT_SETTINGS_DUPLEX.
//
// The function returns the following values:
//
//   - printDuplex: whether to print the output in duplex.
func (settings *PrintSettings) Duplex() PrintDuplex {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.GtkPrintDuplex    // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_duplex(_arg0)
	runtime.KeepAlive(settings)

	var _printDuplex PrintDuplex // out

	_printDuplex = PrintDuplex(_cret)

	return _printDuplex
}

// Finishings gets the value of GTK_PRINT_SETTINGS_FINISHINGS.
//
// The function returns the following values:
//
//   - utf8: finishings.
func (settings *PrintSettings) Finishings() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_finishings(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Int returns the integer value of key, or 0.
//
// The function takes the following parameters:
//
//   - key: key.
//
// The function returns the following values:
//
//   - gint: integer value of key.
func (settings *PrintSettings) Int(key string) int {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_get_int(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IntWithDefault returns the value of key, interpreted as an integer, or the
// default value.
//
// The function takes the following parameters:
//
//   - key: key.
//   - def: default value.
//
// The function returns the following values:
//
//   - gint: integer value of key.
func (settings *PrintSettings) IntWithDefault(key string, def int) int {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gint              // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(def)

	_cret = C.gtk_print_settings_get_int_with_default(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(def)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Length returns the value associated with key, interpreted as a length.
// The returned value is converted to units.
//
// The function takes the following parameters:
//
//   - key: key.
//   - unit of the return value.
//
// The function returns the following values:
//
//   - gdouble: length value of key, converted to unit.
func (settings *PrintSettings) Length(key string, unit Unit) float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.GtkUnit           // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkUnit(unit)

	_cret = C.gtk_print_settings_get_length(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// MediaType gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.
//
// The set of media types is defined in PWG 5101.1-2002 PWG.
//
// The function returns the following values:
//
//   - utf8: media type.
func (settings *PrintSettings) MediaType() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_media_type(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// NCopies gets the value of GTK_PRINT_SETTINGS_N_COPIES.
//
// The function returns the following values:
//
//   - gint: number of copies to print.
func (settings *PrintSettings) NCopies() int {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_n_copies(_arg0)
	runtime.KeepAlive(settings)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NumberUp gets the value of GTK_PRINT_SETTINGS_NUMBER_UP.
//
// The function returns the following values:
//
//   - gint: number of pages per sheet.
func (settings *PrintSettings) NumberUp() int {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_number_up(_arg0)
	runtime.KeepAlive(settings)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NumberUpLayout gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
//
// The function returns the following values:
//
//   - numberUpLayout: layout of page in number-up mode.
func (settings *PrintSettings) NumberUpLayout() NumberUpLayout {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.GtkNumberUpLayout // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_number_up_layout(_arg0)
	runtime.KeepAlive(settings)

	var _numberUpLayout NumberUpLayout // out

	_numberUpLayout = NumberUpLayout(_cret)

	return _numberUpLayout
}

// Orientation: get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a
// PageOrientation.
//
// The function returns the following values:
//
//   - pageOrientation: orientation.
func (settings *PrintSettings) Orientation() PageOrientation {
	var _arg0 *C.GtkPrintSettings  // out
	var _cret C.GtkPageOrientation // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_orientation(_arg0)
	runtime.KeepAlive(settings)

	var _pageOrientation PageOrientation // out

	_pageOrientation = PageOrientation(_cret)

	return _pageOrientation
}

// OutputBin gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.
//
// The function returns the following values:
//
//   - utf8: output bin.
func (settings *PrintSettings) OutputBin() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_output_bin(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PageRanges gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.
//
// The function returns the following values:
//
//   - pageRanges: array of PageRanges. Use g_free() to free the array when it
//     is no longer needed.
func (settings *PrintSettings) PageRanges() []PageRange {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.GtkPageRange     // in
	var _arg1 C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_page_ranges(_arg0, &_arg1)
	runtime.KeepAlive(settings)

	var _pageRanges []PageRange // out

	defer C.free(unsafe.Pointer(_cret))
	{
		src := unsafe.Slice((*C.GtkPageRange)(_cret), _arg1)
		_pageRanges = make([]PageRange, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_pageRanges[i] = *(*PageRange)(gextras.NewStructNative(unsafe.Pointer((&src[i]))))
			runtime.SetFinalizer(
				gextras.StructIntern(unsafe.Pointer(&_pageRanges[i])),
				func(intern *struct{ C unsafe.Pointer }) {
					C.free(intern.C)
				},
			)
		}
	}

	return _pageRanges
}

// PageSet gets the value of GTK_PRINT_SETTINGS_PAGE_SET.
//
// The function returns the following values:
//
//   - pageSet: set of pages to print.
func (settings *PrintSettings) PageSet() PageSet {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.GtkPageSet        // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_page_set(_arg0)
	runtime.KeepAlive(settings)

	var _pageSet PageSet // out

	_pageSet = PageSet(_cret)

	return _pageSet
}

// PaperHeight gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to
// unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: paper height, in units of unit.
func (settings *PrintSettings) PaperHeight(unit Unit) float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkUnit           // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_print_settings_get_paper_height(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PaperSize gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a
// PaperSize.
//
// The function returns the following values:
//
//   - paperSize: paper size.
func (settings *PrintSettings) PaperSize() *PaperSize {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.GtkPaperSize     // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_paper_size(_arg0)
	runtime.KeepAlive(settings)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// PaperWidth gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to
// unit.
//
// The function takes the following parameters:
//
//   - unit for the return value.
//
// The function returns the following values:
//
//   - gdouble: paper width, in units of unit.
func (settings *PrintSettings) PaperWidth(unit Unit) float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkUnit           // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_print_settings_get_paper_width(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PrintPages gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.
//
// The function returns the following values:
//
//   - printPages: which pages to print.
func (settings *PrintSettings) PrintPages() PrintPages {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.GtkPrintPages     // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_print_pages(_arg0)
	runtime.KeepAlive(settings)

	var _printPages PrintPages // out

	_printPages = PrintPages(_cret)

	return _printPages
}

// Printer: convenience function to obtain the value of
// GTK_PRINT_SETTINGS_PRINTER.
//
// The function returns the following values:
//
//   - utf8: printer name.
func (settings *PrintSettings) Printer() string {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_printer(_arg0)
	runtime.KeepAlive(settings)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PrinterLpi gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.
//
// The function returns the following values:
//
//   - gdouble: resolution in lpi (lines per inch).
func (settings *PrintSettings) PrinterLpi() float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_printer_lpi(_arg0)
	runtime.KeepAlive(settings)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Quality gets the value of GTK_PRINT_SETTINGS_QUALITY.
//
// The function returns the following values:
//
//   - printQuality: print quality.
func (settings *PrintSettings) Quality() PrintQuality {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.GtkPrintQuality   // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_quality(_arg0)
	runtime.KeepAlive(settings)

	var _printQuality PrintQuality // out

	_printQuality = PrintQuality(_cret)

	return _printQuality
}

// Resolution gets the value of GTK_PRINT_SETTINGS_RESOLUTION.
//
// The function returns the following values:
//
//   - gint: resolution in dpi.
func (settings *PrintSettings) Resolution() int {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_resolution(_arg0)
	runtime.KeepAlive(settings)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ResolutionX gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X.
//
// The function returns the following values:
//
//   - gint: horizontal resolution in dpi.
func (settings *PrintSettings) ResolutionX() int {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_resolution_x(_arg0)
	runtime.KeepAlive(settings)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ResolutionY gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y.
//
// The function returns the following values:
//
//   - gint: vertical resolution in dpi.
func (settings *PrintSettings) ResolutionY() int {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_resolution_y(_arg0)
	runtime.KeepAlive(settings)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Reverse gets the value of GTK_PRINT_SETTINGS_REVERSE.
//
// The function returns the following values:
//
//   - ok: whether to reverse the order of the printed pages.
func (settings *PrintSettings) Reverse() bool {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_reverse(_arg0)
	runtime.KeepAlive(settings)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Scale gets the value of GTK_PRINT_SETTINGS_SCALE.
//
// The function returns the following values:
//
//   - gdouble: scale in percent.
func (settings *PrintSettings) Scale() float64 {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gdouble           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_scale(_arg0)
	runtime.KeepAlive(settings)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// UseColor gets the value of GTK_PRINT_SETTINGS_USE_COLOR.
//
// The function returns the following values:
//
//   - ok: whether to use color.
func (settings *PrintSettings) UseColor() bool {
	var _arg0 *C.GtkPrintSettings // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_get_use_color(_arg0)
	runtime.KeepAlive(settings)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasKey returns TRUE, if a value is associated with key.
//
// The function takes the following parameters:
//
//   - key: key.
//
// The function returns the following values:
//
//   - ok: TRUE, if key has a value.
func (settings *PrintSettings) HasKey(key string) bool {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_print_settings_has_key(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LoadFile reads the print settings from file_name. If the file could
// not be loaded then error is set to either a Error or FileError. See
// gtk_print_settings_to_file().
//
// The function takes the following parameters:
//
//   - fileName: filename to read the settings from.
func (settings *PrintSettings) LoadFile(fileName string) error {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_load_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(fileName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// LoadKeyFile reads the print settings from the group group_name in key_file.
// If the file could not be loaded then error is set to either a Error or
// FileError.
//
// The function takes the following parameters:
//
//   - keyFile to retrieve the settings from.
//   - groupName (optional): name of the group to use, or NULL to use the
//     default “Print Settings”.
func (settings *PrintSettings) LoadKeyFile(keyFile *glib.KeyFile, groupName string) error {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.GKeyFile         // out
	var _arg2 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_print_settings_load_key_file(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// Set associates value with key.
//
// The function takes the following parameters:
//
//   - key: key.
//   - value (optional): string value, or NULL.
func (settings *PrintSettings) Set(key, value string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	if value != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(value)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_print_settings_set(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(value)
}

// SetBool sets key to a boolean value.
//
// The function takes the following parameters:
//
//   - key: key.
//   - value: boolean.
func (settings *PrintSettings) SetBool(key string, value bool) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gboolean          // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	if value {
		_arg2 = C.TRUE
	}

	C.gtk_print_settings_set_bool(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(value)
}

// SetCollate sets the value of GTK_PRINT_SETTINGS_COLLATE.
//
// The function takes the following parameters:
//
//   - collate: whether to collate the output.
func (settings *PrintSettings) SetCollate(collate bool) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	if collate {
		_arg1 = C.TRUE
	}

	C.gtk_print_settings_set_collate(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(collate)
}

// SetDefaultSource sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
//
// The function takes the following parameters:
//
//   - defaultSource: default source.
func (settings *PrintSettings) SetDefaultSource(defaultSource string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(defaultSource)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_default_source(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(defaultSource)
}

// SetDither sets the value of GTK_PRINT_SETTINGS_DITHER.
//
// The function takes the following parameters:
//
//   - dither: dithering that is used.
func (settings *PrintSettings) SetDither(dither string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(dither)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_dither(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(dither)
}

// SetDouble sets key to a double value.
//
// The function takes the following parameters:
//
//   - key: key.
//   - value: double value.
func (settings *PrintSettings) SetDouble(key string, value float64) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gdouble           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(value)

	C.gtk_print_settings_set_double(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(value)
}

// SetDuplex sets the value of GTK_PRINT_SETTINGS_DUPLEX.
//
// The function takes the following parameters:
//
//   - duplex: PrintDuplex value.
func (settings *PrintSettings) SetDuplex(duplex PrintDuplex) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkPrintDuplex    // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkPrintDuplex(duplex)

	C.gtk_print_settings_set_duplex(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(duplex)
}

// SetFinishings sets the value of GTK_PRINT_SETTINGS_FINISHINGS.
//
// The function takes the following parameters:
//
//   - finishings: finishings.
func (settings *PrintSettings) SetFinishings(finishings string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(finishings)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_finishings(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(finishings)
}

// SetInt sets key to an integer value.
//
// The function takes the following parameters:
//
//   - key: key.
//   - value: integer.
func (settings *PrintSettings) SetInt(key string, value int) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(value)

	C.gtk_print_settings_set_int(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(value)
}

// SetLength associates a length in units of unit with key.
//
// The function takes the following parameters:
//
//   - key: key.
//   - value: length.
//   - unit of length.
func (settings *PrintSettings) SetLength(key string, value float64, unit Unit) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gdouble           // out
	var _arg3 C.GtkUnit           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(value)
	_arg3 = C.GtkUnit(unit)

	C.gtk_print_settings_set_length(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
	runtime.KeepAlive(value)
	runtime.KeepAlive(unit)
}

// SetMediaType sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.
//
// The set of media types is defined in PWG 5101.1-2002 PWG.
//
// The function takes the following parameters:
//
//   - mediaType: media type.
func (settings *PrintSettings) SetMediaType(mediaType string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(mediaType)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_media_type(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(mediaType)
}

// SetNCopies sets the value of GTK_PRINT_SETTINGS_N_COPIES.
//
// The function takes the following parameters:
//
//   - numCopies: number of copies.
func (settings *PrintSettings) SetNCopies(numCopies int) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gint              // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gint(numCopies)

	C.gtk_print_settings_set_n_copies(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(numCopies)
}

// SetNumberUp sets the value of GTK_PRINT_SETTINGS_NUMBER_UP.
//
// The function takes the following parameters:
//
//   - numberUp: number of pages per sheet.
func (settings *PrintSettings) SetNumberUp(numberUp int) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gint              // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gint(numberUp)

	C.gtk_print_settings_set_number_up(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(numberUp)
}

// SetNumberUpLayout sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
//
// The function takes the following parameters:
//
//   - numberUpLayout: NumberUpLayout value.
func (settings *PrintSettings) SetNumberUpLayout(numberUpLayout NumberUpLayout) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkNumberUpLayout // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkNumberUpLayout(numberUpLayout)

	C.gtk_print_settings_set_number_up_layout(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(numberUpLayout)
}

// SetOrientation sets the value of GTK_PRINT_SETTINGS_ORIENTATION.
//
// The function takes the following parameters:
//
//   - orientation: page orientation.
func (settings *PrintSettings) SetOrientation(orientation PageOrientation) {
	var _arg0 *C.GtkPrintSettings  // out
	var _arg1 C.GtkPageOrientation // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkPageOrientation(orientation)

	C.gtk_print_settings_set_orientation(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(orientation)
}

// SetOutputBin sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.
//
// The function takes the following parameters:
//
//   - outputBin: output bin.
func (settings *PrintSettings) SetOutputBin(outputBin string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(outputBin)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_output_bin(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(outputBin)
}

// SetPageRanges sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.
//
// The function takes the following parameters:
//
//   - pageRanges: array of PageRanges.
func (settings *PrintSettings) SetPageRanges(pageRanges []PageRange) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.GtkPageRange     // out
	var _arg2 C.gint

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg2 = (C.gint)(len(pageRanges))
	_arg1 = (*C.GtkPageRange)(C.calloc(C.size_t(len(pageRanges)), C.size_t(C.sizeof_GtkPageRange)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkPageRange)(_arg1), len(pageRanges))
		for i := range pageRanges {
			out[i] = *(*C.GtkPageRange)(gextras.StructNative(unsafe.Pointer((&pageRanges[i]))))
		}
	}

	C.gtk_print_settings_set_page_ranges(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(pageRanges)
}

// SetPageSet sets the value of GTK_PRINT_SETTINGS_PAGE_SET.
//
// The function takes the following parameters:
//
//   - pageSet: PageSet value.
func (settings *PrintSettings) SetPageSet(pageSet PageSet) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkPageSet        // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkPageSet(pageSet)

	C.gtk_print_settings_set_page_set(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(pageSet)
}

// SetPaperHeight sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT.
//
// The function takes the following parameters:
//
//   - height: paper height.
//   - unit units of height.
func (settings *PrintSettings) SetPaperHeight(height float64, unit Unit) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gdouble           // out
	var _arg2 C.GtkUnit           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gdouble(height)
	_arg2 = C.GtkUnit(unit)

	C.gtk_print_settings_set_paper_height(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(height)
	runtime.KeepAlive(unit)
}

// SetPaperSize sets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT,
// GTK_PRINT_SETTINGS_PAPER_WIDTH and GTK_PRINT_SETTINGS_PAPER_HEIGHT.
//
// The function takes the following parameters:
//
//   - paperSize: paper size.
func (settings *PrintSettings) SetPaperSize(paperSize *PaperSize) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.GtkPaperSize     // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(paperSize)))

	C.gtk_print_settings_set_paper_size(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(paperSize)
}

// SetPaperWidth sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH.
//
// The function takes the following parameters:
//
//   - width: paper width.
//   - unit units of width.
func (settings *PrintSettings) SetPaperWidth(width float64, unit Unit) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gdouble           // out
	var _arg2 C.GtkUnit           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gdouble(width)
	_arg2 = C.GtkUnit(unit)

	C.gtk_print_settings_set_paper_width(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(width)
	runtime.KeepAlive(unit)
}

// SetPrintPages sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.
//
// The function takes the following parameters:
//
//   - pages PrintPages value.
func (settings *PrintSettings) SetPrintPages(pages PrintPages) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkPrintPages     // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkPrintPages(pages)

	C.gtk_print_settings_set_print_pages(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(pages)
}

// SetPrinter: convenience function to set GTK_PRINT_SETTINGS_PRINTER to
// printer.
//
// The function takes the following parameters:
//
//   - printer name.
func (settings *PrintSettings) SetPrinter(printer string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(printer)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_set_printer(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(printer)
}

// SetPrinterLpi sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.
//
// The function takes the following parameters:
//
//   - lpi: resolution in lpi (lines per inch).
func (settings *PrintSettings) SetPrinterLpi(lpi float64) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gdouble           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gdouble(lpi)

	C.gtk_print_settings_set_printer_lpi(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(lpi)
}

// SetQuality sets the value of GTK_PRINT_SETTINGS_QUALITY.
//
// The function takes the following parameters:
//
//   - quality: PrintQuality value.
func (settings *PrintSettings) SetQuality(quality PrintQuality) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.GtkPrintQuality   // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.GtkPrintQuality(quality)

	C.gtk_print_settings_set_quality(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(quality)
}

// SetResolution sets the values of GTK_PRINT_SETTINGS_RESOLUTION,
// GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y.
//
// The function takes the following parameters:
//
//   - resolution in dpi.
func (settings *PrintSettings) SetResolution(resolution int) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gint              // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gint(resolution)

	C.gtk_print_settings_set_resolution(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(resolution)
}

// SetResolutionXY sets the values of GTK_PRINT_SETTINGS_RESOLUTION,
// GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y.
//
// The function takes the following parameters:
//
//   - resolutionX: horizontal resolution in dpi.
//   - resolutionY: vertical resolution in dpi.
func (settings *PrintSettings) SetResolutionXY(resolutionX, resolutionY int) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gint              // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gint(resolutionX)
	_arg2 = C.gint(resolutionY)

	C.gtk_print_settings_set_resolution_xy(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(resolutionX)
	runtime.KeepAlive(resolutionY)
}

// SetReverse sets the value of GTK_PRINT_SETTINGS_REVERSE.
//
// The function takes the following parameters:
//
//   - reverse: whether to reverse the output.
func (settings *PrintSettings) SetReverse(reverse bool) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	if reverse {
		_arg1 = C.TRUE
	}

	C.gtk_print_settings_set_reverse(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(reverse)
}

// SetScale sets the value of GTK_PRINT_SETTINGS_SCALE.
//
// The function takes the following parameters:
//
//   - scale in percent.
func (settings *PrintSettings) SetScale(scale float64) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gdouble           // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = C.gdouble(scale)

	C.gtk_print_settings_set_scale(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(scale)
}

// SetUseColor sets the value of GTK_PRINT_SETTINGS_USE_COLOR.
//
// The function takes the following parameters:
//
//   - useColor: whether to use color.
func (settings *PrintSettings) SetUseColor(useColor bool) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	if useColor {
		_arg1 = C.TRUE
	}

	C.gtk_print_settings_set_use_color(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(useColor)
}

// ToFile: this function saves the print settings from settings to file_name.
// If the file could not be loaded then error is set to either a Error or
// FileError.
//
// The function takes the following parameters:
//
//   - fileName: file to save to.
func (settings *PrintSettings) ToFile(fileName string) error {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(fileName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_to_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(fileName)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// ToGVariant: serialize print settings to an a{sv} variant.
//
// The function returns the following values:
//
//   - variant: new, floating, #GVariant.
func (settings *PrintSettings) ToGVariant() *glib.Variant {
	var _arg0 *C.GtkPrintSettings // out
	var _cret *C.GVariant         // in

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))

	_cret = C.gtk_print_settings_to_gvariant(_arg0)
	runtime.KeepAlive(settings)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// ToKeyFile: this function adds the print settings from settings to key_file.
//
// The function takes the following parameters:
//
//   - keyFile to save the print settings to.
//   - groupName (optional): group to add the settings to in key_file, or NULL
//     to use the default “Print Settings”.
func (settings *PrintSettings) ToKeyFile(keyFile *glib.KeyFile, groupName string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.GKeyFile         // out
	var _arg2 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_print_settings_to_key_file(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)
}

// Unset removes any value associated with key. This has the same effect as
// setting the value to NULL.
//
// The function takes the following parameters:
//
//   - key: key.
func (settings *PrintSettings) Unset(key string) {
	var _arg0 *C.GtkPrintSettings // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkPrintSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(key)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_print_settings_unset(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(key)
}

// ProgressBarOverrides contains methods that are overridable.
type ProgressBarOverrides struct {
}

func defaultProgressBarOverrides(v *ProgressBar) ProgressBarOverrides {
	return ProgressBarOverrides{}
}

// ProgressBar is typically used to display the progress of a long running
// operation. It provides a visual clue that processing is underway.
// The GtkProgressBar can be used in two different modes: percentage mode and
// activity mode.
//
// When an application can determine how much work needs to take place (e.g.
// read a fixed number of bytes from a file) and can monitor its progress,
// it can use the GtkProgressBar in percentage mode and the user sees a growing
// bar indicating the percentage of the work that has been completed. In this
// mode, the application is required to call gtk_progress_bar_set_fraction()
// periodically to update the progress bar.
//
// When an application has no accurate way of knowing the amount of work to do,
// it can use the ProgressBar in activity mode, which shows activity by a block
// moving back and forth within the progress area. In this mode, the application
// is required to call gtk_progress_bar_pulse() periodically to update the
// progress bar.
//
// There is quite a bit of flexibility provided to control the appearance of the
// ProgressBar. Functions are provided to control the orientation of the bar,
// optional text can be displayed along with the bar, and the step size used in
// activity mode can be set.
//
// CSS nodes
//
//	progressbar[.osd]
//	├── [text]
//	╰── trough[.empty][.full]
//	    ╰── progress[.pulse]
//
// GtkProgressBar has a main CSS node with name progressbar and subnodes with
// names text and trough, of which the latter has a subnode named progress. The
// text subnode is only present if text is shown. The progress subnode has the
// style class .pulse when in activity mode. It gets the style classes .left,
// .right, .top or .bottom added when the progress 'touches' the corresponding
// end of the GtkProgressBar. The .osd class on the progressbar node is for use
// in overlays like the one Epiphany has for page loading progress.
type ProgressBar struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	Orientable
}

var (
	_ Widgetter         = (*ProgressBar)(nil)
	_ coreglib.Objector = (*ProgressBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ProgressBar, *ProgressBarClass, ProgressBarOverrides](
		GTypeProgressBar,
		initProgressBarClass,
		wrapProgressBar,
		defaultProgressBarOverrides,
	)
}

func initProgressBarClass(gclass unsafe.Pointer, overrides ProgressBarOverrides, classInitFunc func(*ProgressBarClass)) {
	if classInitFunc != nil {
		class := (*ProgressBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapProgressBar(obj *coreglib.Object) *ProgressBar {
	return &ProgressBar{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalProgressBar(p uintptr) (interface{}, error) {
	return wrapProgressBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewProgressBar creates a new ProgressBar.
//
// The function returns the following values:
//
//   - progressBar: ProgressBar.
func NewProgressBar() *ProgressBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_progress_bar_new()

	var _progressBar *ProgressBar // out

	_progressBar = wrapProgressBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _progressBar
}

// Ellipsize returns the ellipsizing position of the progress bar. See
// gtk_progress_bar_set_ellipsize().
//
// The function returns the following values:
//
//   - ellipsizeMode: EllipsizeMode.
func (pbar *ProgressBar) Ellipsize() pango.EllipsizeMode {
	var _arg0 *C.GtkProgressBar    // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_ellipsize(_arg0)
	runtime.KeepAlive(pbar)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// Fraction returns the current fraction of the task that’s been completed.
//
// The function returns the following values:
//
//   - gdouble: fraction from 0.0 to 1.0.
func (pbar *ProgressBar) Fraction() float64 {
	var _arg0 *C.GtkProgressBar // out
	var _cret C.gdouble         // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_fraction(_arg0)
	runtime.KeepAlive(pbar)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Inverted gets the value set by gtk_progress_bar_set_inverted().
//
// The function returns the following values:
//
//   - ok: TRUE if the progress bar is inverted.
func (pbar *ProgressBar) Inverted() bool {
	var _arg0 *C.GtkProgressBar // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_inverted(_arg0)
	runtime.KeepAlive(pbar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PulseStep retrieves the pulse step set with
// gtk_progress_bar_set_pulse_step().
//
// The function returns the following values:
//
//   - gdouble: fraction from 0.0 to 1.0.
func (pbar *ProgressBar) PulseStep() float64 {
	var _arg0 *C.GtkProgressBar // out
	var _cret C.gdouble         // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_pulse_step(_arg0)
	runtime.KeepAlive(pbar)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// ShowText gets the value of the ProgressBar:show-text property. See
// gtk_progress_bar_set_show_text().
//
// The function returns the following values:
//
//   - ok: TRUE if text is shown in the progress bar.
func (pbar *ProgressBar) ShowText() bool {
	var _arg0 *C.GtkProgressBar // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_show_text(_arg0)
	runtime.KeepAlive(pbar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Text retrieves the text that is displayed with the progress bar, if any,
// otherwise NULL. The return value is a reference to the text, not a copy of
// it, so will become invalid if you change the text in the progress bar.
//
// The function returns the following values:
//
//   - utf8 (optional): text, or NULL; this string is owned by the widget and
//     should not be modified or freed.
func (pbar *ProgressBar) Text() string {
	var _arg0 *C.GtkProgressBar // out
	var _cret *C.gchar          // in

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	_cret = C.gtk_progress_bar_get_text(_arg0)
	runtime.KeepAlive(pbar)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Pulse indicates that some progress has been made, but you don’t know how
// much. Causes the progress bar to enter “activity mode,” where a block bounces
// back and forth. Each call to gtk_progress_bar_pulse() causes the block to
// move by a little bit (the amount of movement per pulse is determined by
// gtk_progress_bar_set_pulse_step()).
func (pbar *ProgressBar) Pulse() {
	var _arg0 *C.GtkProgressBar // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))

	C.gtk_progress_bar_pulse(_arg0)
	runtime.KeepAlive(pbar)
}

// SetEllipsize sets the mode used to ellipsize (add an ellipsis: "...") the
// text if there is not enough space to render the entire string.
//
// The function takes the following parameters:
//
//   - mode: EllipsizeMode.
func (pbar *ProgressBar) SetEllipsize(mode pango.EllipsizeMode) {
	var _arg0 *C.GtkProgressBar    // out
	var _arg1 C.PangoEllipsizeMode // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	_arg1 = C.PangoEllipsizeMode(mode)

	C.gtk_progress_bar_set_ellipsize(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(mode)
}

// SetFraction causes the progress bar to “fill in” the given fraction of the
// bar. The fraction should be between 0.0 and 1.0, inclusive.
//
// The function takes the following parameters:
//
//   - fraction of the task that’s been completed.
func (pbar *ProgressBar) SetFraction(fraction float64) {
	var _arg0 *C.GtkProgressBar // out
	var _arg1 C.gdouble         // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	_arg1 = C.gdouble(fraction)

	C.gtk_progress_bar_set_fraction(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(fraction)
}

// SetInverted progress bars normally grow from top to bottom or left to right.
// Inverted progress bars grow in the opposite direction.
//
// The function takes the following parameters:
//
//   - inverted: TRUE to invert the progress bar.
func (pbar *ProgressBar) SetInverted(inverted bool) {
	var _arg0 *C.GtkProgressBar // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	if inverted {
		_arg1 = C.TRUE
	}

	C.gtk_progress_bar_set_inverted(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(inverted)
}

// SetPulseStep sets the fraction of total progress bar length to move the
// bouncing block for each call to gtk_progress_bar_pulse().
//
// The function takes the following parameters:
//
//   - fraction between 0.0 and 1.0.
func (pbar *ProgressBar) SetPulseStep(fraction float64) {
	var _arg0 *C.GtkProgressBar // out
	var _arg1 C.gdouble         // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	_arg1 = C.gdouble(fraction)

	C.gtk_progress_bar_set_pulse_step(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(fraction)
}

// SetShowText sets whether the progress bar will show text next to the bar.
// The shown text is either the value of the ProgressBar:text property or,
// if that is NULL, the ProgressBar:fraction value, as a percentage.
//
// To make a progress bar that is styled and sized suitably for containing text
// (even if the actual text is blank), set ProgressBar:show-text to TRUE and
// ProgressBar:text to the empty string (not NULL).
//
// The function takes the following parameters:
//
//   - showText: whether to show text.
func (pbar *ProgressBar) SetShowText(showText bool) {
	var _arg0 *C.GtkProgressBar // out
	var _arg1 C.gboolean        // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	if showText {
		_arg1 = C.TRUE
	}

	C.gtk_progress_bar_set_show_text(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(showText)
}

// SetText causes the given text to appear next to the progress bar.
//
// If text is NULL and ProgressBar:show-text is TRUE, the current value of
// ProgressBar:fraction will be displayed as a percentage.
//
// If text is non-NULL and ProgressBar:show-text is TRUE, the text will be
// displayed. In this case, it will not display the progress percentage. If text
// is the empty string, the progress bar will still be styled and sized suitably
// for containing text, as long as ProgressBar:show-text is TRUE.
//
// The function takes the following parameters:
//
//   - text (optional): UTF-8 string, or NULL.
func (pbar *ProgressBar) SetText(text string) {
	var _arg0 *C.GtkProgressBar // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkProgressBar)(unsafe.Pointer(coreglib.InternObject(pbar).Native()))
	if text != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_progress_bar_set_text(_arg0, _arg1)
	runtime.KeepAlive(pbar)
	runtime.KeepAlive(text)
}

// ProgressBarAccessibleOverrides contains methods that are overridable.
type ProgressBarAccessibleOverrides struct {
}

func defaultProgressBarAccessibleOverrides(v *ProgressBarAccessible) ProgressBarAccessibleOverrides {
	return ProgressBarAccessibleOverrides{}
}

type ProgressBarAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Value
}

var (
	_ coreglib.Objector = (*ProgressBarAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ProgressBarAccessible, *ProgressBarAccessibleClass, ProgressBarAccessibleOverrides](
		GTypeProgressBarAccessible,
		initProgressBarAccessibleClass,
		wrapProgressBarAccessible,
		defaultProgressBarAccessibleOverrides,
	)
}

func initProgressBarAccessibleClass(gclass unsafe.Pointer, overrides ProgressBarAccessibleOverrides, classInitFunc func(*ProgressBarAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ProgressBarAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapProgressBarAccessible(obj *coreglib.Object) *ProgressBarAccessible {
	return &ProgressBarAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalProgressBarAccessible(p uintptr) (interface{}, error) {
	return wrapProgressBarAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// RadioActionOverrides contains methods that are overridable.
type RadioActionOverrides struct {
	Changed func(current *RadioAction)
}

func defaultRadioActionOverrides(v *RadioAction) RadioActionOverrides {
	return RadioActionOverrides{
		Changed: v.changed,
	}
}

// RadioAction is similar to RadioMenuItem. A number of radio actions can be
// linked together so that only one may be active at any one time.
type RadioAction struct {
	_ [0]func() // equal guard
	ToggleAction
}

var (
	_ coreglib.Objector = (*RadioAction)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioAction, *RadioActionClass, RadioActionOverrides](
		GTypeRadioAction,
		initRadioActionClass,
		wrapRadioAction,
		defaultRadioActionOverrides,
	)
}

func initRadioActionClass(gclass unsafe.Pointer, overrides RadioActionOverrides, classInitFunc func(*RadioActionClass)) {
	pclass := (*C.GtkRadioActionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRadioAction))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_RadioActionClass_changed)
	}

	if classInitFunc != nil {
		class := (*RadioActionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioAction(obj *coreglib.Object) *RadioAction {
	return &RadioAction{
		ToggleAction: ToggleAction{
			Action: Action{
				Object: obj,
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalRadioAction(p uintptr) (interface{}, error) {
	return wrapRadioAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged signal is emitted on every member of a radio group when the
// active member is changed. The signal gets emitted after the ::activate
// signals for the previous and current active members.
func (action *RadioAction) ConnectChanged(f func(current *RadioAction)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(action, "changed", false, unsafe.Pointer(C._gotk4_gtk3_RadioAction_ConnectChanged), f)
}

// NewRadioAction creates a new RadioAction object. To add the action
// to a ActionGroup and set the accelerator for the action, call
// gtk_action_group_add_action_with_accel().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - name: unique name for the action.
//   - label (optional) displayed in menu items and on buttons, or NULL.
//   - tooltip (optional) for this action, or NULL.
//   - stockId (optional): stock icon to display in widgets representing this
//     action, or NULL.
//   - value which gtk_radio_action_get_current_value() should return if this
//     action is selected.
//
// The function returns the following values:
//
//   - radioAction: new RadioAction.
func NewRadioAction(name, label, tooltip, stockId string, value int) *RadioAction {
	var _arg1 *C.gchar          // out
	var _arg2 *C.gchar          // out
	var _arg3 *C.gchar          // out
	var _arg4 *C.gchar          // out
	var _arg5 C.gint            // out
	var _cret *C.GtkRadioAction // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if tooltip != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	if stockId != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg4))
	}
	_arg5 = C.gint(value)

	_cret = C.gtk_radio_action_new(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(value)

	var _radioAction *RadioAction // out

	_radioAction = wrapRadioAction(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _radioAction
}

// CurrentValue obtains the value property of the currently active member of the
// group to which action belongs.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - gint: value of the currently active group member.
func (action *RadioAction) CurrentValue() int {
	var _arg0 *C.GtkRadioAction // out
	var _cret C.gint            // in

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_radio_action_get_current_value(_arg0)
	runtime.KeepAlive(action)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Group returns the list representing the radio group for this object. Note
// that the returned list is only valid until the next change to the group.
//
// A common way to set up a group of radio group is the following:
//
//	GSList *group = NULL;
//	GtkRadioAction *action;
//
//	while ( ...more actions to add... /)
//	  {
//	     action = gtk_radio_action_new (...);
//
//	     gtk_radio_action_set_group (action, group);
//	     group = gtk_radio_action_get_group (action);
//	  }
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - sList: list representing the radio group for this object.
func (action *RadioAction) Group() []*RadioAction {
	var _arg0 *C.GtkRadioAction // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_radio_action_get_group(_arg0)
	runtime.KeepAlive(action)

	var _sList []*RadioAction // out

	_sList = make([]*RadioAction, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkRadioAction)(v)
		var dst *RadioAction // out
		dst = wrapRadioAction(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// JoinGroup joins a radio action object to the group of another radio action
// object.
//
// Use this in language bindings instead of the gtk_radio_action_get_group() and
// gtk_radio_action_set_group() methods
//
// A common way to set up a group of radio actions is the following:
//
//	GtkRadioAction *action;
//	GtkRadioAction *last_action;
//
//	while ( ...more actions to add... /)
//	  {
//	     action = gtk_radio_action_new (...);
//
//	     gtk_radio_action_join_group (action, last_action);
//	     last_action = action;
//	  }
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - groupSource (optional): radio action object whos group we are joining,
//     or NULL to remove the radio action from its group.
func (action *RadioAction) JoinGroup(groupSource *RadioAction) {
	var _arg0 *C.GtkRadioAction // out
	var _arg1 *C.GtkRadioAction // out

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if groupSource != nil {
		_arg1 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(groupSource).Native()))
	}

	C.gtk_radio_action_join_group(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(groupSource)
}

// SetCurrentValue sets the currently active group member to the member with
// value property current_value.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - currentValue: new value.
func (action *RadioAction) SetCurrentValue(currentValue int) {
	var _arg0 *C.GtkRadioAction // out
	var _arg1 C.gint            // out

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = C.gint(currentValue)

	C.gtk_radio_action_set_current_value(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(currentValue)
}

// SetGroup sets the radio group for the radio action object.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - group (optional): list representing a radio group, or NULL.
func (action *RadioAction) SetGroup(group []*RadioAction) {
	var _arg0 *C.GtkRadioAction // out
	var _arg1 *C.GSList         // out

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioAction // out
			dst = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	C.gtk_radio_action_set_group(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(group)
}

func (action *RadioAction) changed(current *RadioAction) {
	gclass := (*C.GtkRadioActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.changed

	var _arg0 *C.GtkRadioAction // out
	var _arg1 *C.GtkRadioAction // out

	_arg0 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg1 = (*C.GtkRadioAction)(unsafe.Pointer(coreglib.InternObject(current).Native()))

	C._gotk4_gtk3_RadioAction_virtual_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(current)
}

// RadioButtonOverrides contains methods that are overridable.
type RadioButtonOverrides struct {
	GroupChanged func()
}

func defaultRadioButtonOverrides(v *RadioButton) RadioButtonOverrides {
	return RadioButtonOverrides{
		GroupChanged: v.groupChanged,
	}
}

// RadioButton: single radio button performs the same basic function as a
// CheckButton, as its position in the object hierarchy reflects. It is only
// when multiple radio buttons are grouped together that they become a different
// user interface component in their own right.
//
// Every radio button is a member of some group of radio buttons. When one
// is selected, all other radio buttons in the same group are deselected.
// A RadioButton is one way of giving the user a choice from many options.
//
// Radio button widgets are created with gtk_radio_button_new(), passing NULL
// as the argument if this is the first radio button in a group. In subsequent
// calls, the group you wish to add this button to should be passed as an
// argument. Optionally, gtk_radio_button_new_with_label() can be used if you
// want a text label on the radio button.
//
// Alternatively, when adding widgets to an existing group of radio
// buttons, use gtk_radio_button_new_from_widget() with a RadioButton
// that already has a group assigned to it. The convenience function
// gtk_radio_button_new_with_label_from_widget() is also provided.
//
// To retrieve the group a RadioButton is assigned to, use
// gtk_radio_button_get_group().
//
// To remove a RadioButton from one group and make it part of a new one,
// use gtk_radio_button_set_group().
//
// The group list does not need to be freed, as each RadioButton will remove
// itself and its list item when it is destroyed.
//
// CSS nodes
//
//	void create_radio_buttons (void) {
//
//	   GtkWidget *window, *radio1, *radio2, *box, *entry;
//	   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
//	   gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
//
//	   // Create a radio button with a GtkEntry widget
//	   radio1 = gtk_radio_button_new (NULL);
//	   entry = gtk_entry_new ();
//	   gtk_container_add (GTK_CONTAINER (radio1), entry);
//
//
//	   // Create a radio button with a label
//	   radio2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio1),
//	                                                         "I’m the second radio button.");
//
//	   // Pack them into a box, then show all the widgets
//	   gtk_box_pack_start (GTK_BOX (box), radio1);
//	   gtk_box_pack_start (GTK_BOX (box), radio2);
//	   gtk_container_add (GTK_CONTAINER (window), box);
//	   gtk_widget_show_all (window);
//	   return;
//	}
//
// When an unselected button in the group is clicked the clicked button receives
// the ToggleButton::toggled signal, as does the previously selected button.
// Inside the ToggleButton::toggled handler, gtk_toggle_button_get_active() can
// be used to determine if the button has been selected or deselected.
type RadioButton struct {
	_ [0]func() // equal guard
	CheckButton
}

var (
	_ Binner            = (*RadioButton)(nil)
	_ coreglib.Objector = (*RadioButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioButton, *RadioButtonClass, RadioButtonOverrides](
		GTypeRadioButton,
		initRadioButtonClass,
		wrapRadioButton,
		defaultRadioButtonOverrides,
	)
}

func initRadioButtonClass(gclass unsafe.Pointer, overrides RadioButtonOverrides, classInitFunc func(*RadioButtonClass)) {
	pclass := (*C.GtkRadioButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRadioButton))))

	if overrides.GroupChanged != nil {
		pclass.group_changed = (*[0]byte)(C._gotk4_gtk3_RadioButtonClass_group_changed)
	}

	if classInitFunc != nil {
		class := (*RadioButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioButton(obj *coreglib.Object) *RadioButton {
	return &RadioButton{
		CheckButton: CheckButton{
			ToggleButton: ToggleButton{
				Button: Button{
					Bin: Bin{
						Container: Container{
							Widget: Widget{
								InitiallyUnowned: coreglib.InitiallyUnowned{
									Object: obj,
								},
								Object: obj,
								ImplementorIface: atk.ImplementorIface{
									Object: obj,
								},
								Buildable: Buildable{
									Object: obj,
								},
							},
						},
					},
					Object: obj,
					Actionable: Actionable{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
					Activatable: Activatable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalRadioButton(p uintptr) (interface{}, error) {
	return wrapRadioButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectGroupChanged is emitted when the group of radio buttons that a radio
// button belongs to changes. This is emitted when a radio button switches from
// being alone to being part of a group of 2 or more buttons, or vice-versa,
// and when a button is moved from one group of 2 or more buttons to a different
// one, but not when the composition of the group that a button belongs to
// changes.
func (radioButton *RadioButton) ConnectGroupChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(radioButton, "group-changed", false, unsafe.Pointer(C._gotk4_gtk3_RadioButton_ConnectGroupChanged), f)
}

// NewRadioButton creates a new RadioButton. To be of any practical value,
// a widget should then be packed into the radio button.
//
// The function takes the following parameters:
//
//   - group (optional): existing radio button group, or NULL if you are
//     creating a new group.
//
// The function returns the following values:
//
//   - radioButton: new radio button.
func NewRadioButton(group []*RadioButton) *RadioButton {
	var _arg1 *C.GSList    // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	_cret = C.gtk_radio_button_new(_arg1)
	runtime.KeepAlive(group)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// NewRadioButtonFromWidget creates a new RadioButton, adding it to the same
// group as radio_group_member. As with gtk_radio_button_new(), a widget should
// be packed into the radio button.
//
// The function takes the following parameters:
//
//   - radioGroupMember (optional): existing RadioButton.
//
// The function returns the following values:
//
//   - radioButton: new radio button.
func NewRadioButtonFromWidget(radioGroupMember *RadioButton) *RadioButton {
	var _arg1 *C.GtkRadioButton // out
	var _cret *C.GtkWidget      // in

	if radioGroupMember != nil {
		_arg1 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioGroupMember).Native()))
	}

	_cret = C.gtk_radio_button_new_from_widget(_arg1)
	runtime.KeepAlive(radioGroupMember)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// NewRadioButtonWithLabel creates a new RadioButton with a text label.
//
// The function takes the following parameters:
//
//   - group (optional): existing radio button group, or NULL if you are
//     creating a new group.
//   - label: text label to display next to the radio button.
//
// The function returns the following values:
//
//   - radioButton: new radio button.
func NewRadioButtonWithLabel(group []*RadioButton, label string) *RadioButton {
	var _arg1 *C.GSList    // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_button_new_with_label(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// NewRadioButtonWithLabelFromWidget creates a new RadioButton with a text
// label, adding it to the same group as radio_group_member.
//
// The function takes the following parameters:
//
//   - radioGroupMember (optional): widget to get radio group from or NULL.
//   - label: text string to display next to the radio button.
//
// The function returns the following values:
//
//   - radioButton: new radio button.
func NewRadioButtonWithLabelFromWidget(radioGroupMember *RadioButton, label string) *RadioButton {
	var _arg1 *C.GtkRadioButton // out
	var _arg2 *C.gchar          // out
	var _cret *C.GtkWidget      // in

	if radioGroupMember != nil {
		_arg1 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioGroupMember).Native()))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_button_new_with_label_from_widget(_arg1, _arg2)
	runtime.KeepAlive(radioGroupMember)
	runtime.KeepAlive(label)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// NewRadioButtonWithMnemonic creates a new RadioButton containing a label,
// adding it to the same group as group. The label will be created using
// gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic
// for the button.
//
// The function takes the following parameters:
//
//   - group (optional): radio button group, or NULL.
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - radioButton: new RadioButton.
func NewRadioButtonWithMnemonic(group []*RadioButton, label string) *RadioButton {
	var _arg1 *C.GSList    // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_button_new_with_mnemonic(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// NewRadioButtonWithMnemonicFromWidget creates a new RadioButton containing
// a label. The label will be created using gtk_label_new_with_mnemonic(),
// so underscores in label indicate the mnemonic for the button.
//
// The function takes the following parameters:
//
//   - radioGroupMember (optional): widget to get radio group from or NULL.
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - radioButton: new RadioButton.
func NewRadioButtonWithMnemonicFromWidget(radioGroupMember *RadioButton, label string) *RadioButton {
	var _arg1 *C.GtkRadioButton // out
	var _arg2 *C.gchar          // out
	var _cret *C.GtkWidget      // in

	if radioGroupMember != nil {
		_arg1 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioGroupMember).Native()))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_button_new_with_mnemonic_from_widget(_arg1, _arg2)
	runtime.KeepAlive(radioGroupMember)
	runtime.KeepAlive(label)

	var _radioButton *RadioButton // out

	_radioButton = wrapRadioButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioButton
}

// Group retrieves the group assigned to a radio button.
//
// The function returns the following values:
//
//   - sList: linked list containing all the radio buttons in the same group as
//     radio_button. The returned list is owned by the radio button and must not
//     be modified or freed.
func (radioButton *RadioButton) Group() []*RadioButton {
	var _arg0 *C.GtkRadioButton // out
	var _cret *C.GSList         // in

	_arg0 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioButton).Native()))

	_cret = C.gtk_radio_button_get_group(_arg0)
	runtime.KeepAlive(radioButton)

	var _sList []*RadioButton // out

	_sList = make([]*RadioButton, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkRadioButton)(v)
		var dst *RadioButton // out
		dst = wrapRadioButton(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// JoinGroup joins a RadioButton object to the group of another RadioButton
// object
//
// Use this in language bindings instead of the gtk_radio_button_get_group() and
// gtk_radio_button_set_group() methods
//
// A common way to set up a group of radio buttons is the following:
//
//	GtkRadioButton *radio_button;
//	GtkRadioButton *last_button;
//
//	while (some_condition)
//	  {
//	     radio_button = gtk_radio_button_new (NULL);
//
//	     gtk_radio_button_join_group (radio_button, last_button);
//	     last_button = radio_button;
//	  }.
//
// The function takes the following parameters:
//
//   - groupSource (optional): radio button object whos group we are joining,
//     or NULL to remove the radio button from its group.
func (radioButton *RadioButton) JoinGroup(groupSource *RadioButton) {
	var _arg0 *C.GtkRadioButton // out
	var _arg1 *C.GtkRadioButton // out

	_arg0 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioButton).Native()))
	if groupSource != nil {
		_arg1 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(groupSource).Native()))
	}

	C.gtk_radio_button_join_group(_arg0, _arg1)
	runtime.KeepAlive(radioButton)
	runtime.KeepAlive(groupSource)
}

// SetGroup sets a RadioButton’s group. It should be noted that this does not
// change the layout of your interface in any way, so if you are changing the
// group, it is likely you will need to re-arrange the user interface to reflect
// these changes.
//
// The function takes the following parameters:
//
//   - group (optional): existing radio button group, such as one returned from
//     gtk_radio_button_get_group(), or NULL.
func (radioButton *RadioButton) SetGroup(group []*RadioButton) {
	var _arg0 *C.GtkRadioButton // out
	var _arg1 *C.GSList         // out

	_arg0 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioButton).Native()))
	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	C.gtk_radio_button_set_group(_arg0, _arg1)
	runtime.KeepAlive(radioButton)
	runtime.KeepAlive(group)
}

func (radioButton *RadioButton) groupChanged() {
	gclass := (*C.GtkRadioButtonClass)(coreglib.PeekParentClass(radioButton))
	fnarg := gclass.group_changed

	var _arg0 *C.GtkRadioButton // out

	_arg0 = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(radioButton).Native()))

	C._gotk4_gtk3_RadioButton_virtual_group_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(radioButton)
}

// RadioButtonAccessibleOverrides contains methods that are overridable.
type RadioButtonAccessibleOverrides struct {
}

func defaultRadioButtonAccessibleOverrides(v *RadioButtonAccessible) RadioButtonAccessibleOverrides {
	return RadioButtonAccessibleOverrides{}
}

type RadioButtonAccessible struct {
	_ [0]func() // equal guard
	ToggleButtonAccessible
}

var (
	_ coreglib.Objector = (*RadioButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioButtonAccessible, *RadioButtonAccessibleClass, RadioButtonAccessibleOverrides](
		GTypeRadioButtonAccessible,
		initRadioButtonAccessibleClass,
		wrapRadioButtonAccessible,
		defaultRadioButtonAccessibleOverrides,
	)
}

func initRadioButtonAccessibleClass(gclass unsafe.Pointer, overrides RadioButtonAccessibleOverrides, classInitFunc func(*RadioButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*RadioButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioButtonAccessible(obj *coreglib.Object) *RadioButtonAccessible {
	return &RadioButtonAccessible{
		ToggleButtonAccessible: ToggleButtonAccessible{
			ButtonAccessible: ButtonAccessible{
				ContainerAccessible: ContainerAccessible{
					WidgetAccessible: WidgetAccessible{
						Accessible: Accessible{
							AtkObject: atk.AtkObject{
								Object: obj,
							},
						},
						Component: atk.Component{
							Object: obj,
						},
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				Image: atk.Image{
					Object: obj,
				},
			},
		},
	}
}

func marshalRadioButtonAccessible(p uintptr) (interface{}, error) {
	return wrapRadioButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// RadioMenuItemOverrides contains methods that are overridable.
type RadioMenuItemOverrides struct {
	GroupChanged func()
}

func defaultRadioMenuItemOverrides(v *RadioMenuItem) RadioMenuItemOverrides {
	return RadioMenuItemOverrides{
		GroupChanged: v.groupChanged,
	}
}

// RadioMenuItem: radio menu item is a check menu item that belongs to a group.
// At each instant exactly one of the radio menu items from a group is selected.
//
// The group list does not need to be freed, as each RadioMenuItem will remove
// itself and its list item when it is destroyed.
//
// The correct way to create a group of radio menu items is approximatively
// this:
//
// How to create a group of radio menu items.
//
//	menuitem
//	├── radio.left
//	╰── <child>
//
// GtkRadioMenuItem has a main CSS node with name menuitem, and a subnode with
// name radio, which gets the .left or .right style class.
type RadioMenuItem struct {
	_ [0]func() // equal guard
	CheckMenuItem
}

var (
	_ Binner            = (*RadioMenuItem)(nil)
	_ coreglib.Objector = (*RadioMenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioMenuItem, *RadioMenuItemClass, RadioMenuItemOverrides](
		GTypeRadioMenuItem,
		initRadioMenuItemClass,
		wrapRadioMenuItem,
		defaultRadioMenuItemOverrides,
	)
}

func initRadioMenuItemClass(gclass unsafe.Pointer, overrides RadioMenuItemOverrides, classInitFunc func(*RadioMenuItemClass)) {
	pclass := (*C.GtkRadioMenuItemClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRadioMenuItem))))

	if overrides.GroupChanged != nil {
		pclass.group_changed = (*[0]byte)(C._gotk4_gtk3_RadioMenuItemClass_group_changed)
	}

	if classInitFunc != nil {
		class := (*RadioMenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioMenuItem(obj *coreglib.Object) *RadioMenuItem {
	return &RadioMenuItem{
		CheckMenuItem: CheckMenuItem{
			MenuItem: MenuItem{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Actionable: Actionable{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Activatable: Activatable{
					Object: obj,
				},
			},
		},
	}
}

func marshalRadioMenuItem(p uintptr) (interface{}, error) {
	return wrapRadioMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (radioMenuItem *RadioMenuItem) ConnectGroupChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(radioMenuItem, "group-changed", false, unsafe.Pointer(C._gotk4_gtk3_RadioMenuItem_ConnectGroupChanged), f)
}

// NewRadioMenuItem creates a new RadioMenuItem.
//
// The function takes the following parameters:
//
//   - group (optional) to which the radio menu item is to be attached, or NULL.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItem(group []*RadioMenuItem) *RadioMenuItem {
	var _arg1 *C.GSList    // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioMenuItem // out
			dst = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	_cret = C.gtk_radio_menu_item_new(_arg1)
	runtime.KeepAlive(group)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// NewRadioMenuItemFromWidget creates a new RadioMenuItem adding it to the same
// group as group.
//
// The function takes the following parameters:
//
//   - group (optional): existing RadioMenuItem.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItemFromWidget(group *RadioMenuItem) *RadioMenuItem {
	var _arg1 *C.GtkRadioMenuItem // out
	var _cret *C.GtkWidget        // in

	if group != nil {
		_arg1 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}

	_cret = C.gtk_radio_menu_item_new_from_widget(_arg1)
	runtime.KeepAlive(group)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// NewRadioMenuItemWithLabel creates a new RadioMenuItem whose child is a simple
// Label.
//
// The function takes the following parameters:
//
//   - group (optional): group the radio menu item is inside, or NULL.
//   - label: text for the label.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItemWithLabel(group []*RadioMenuItem, label string) *RadioMenuItem {
	var _arg1 *C.GSList    // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioMenuItem // out
			dst = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_menu_item_new_with_label(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// NewRadioMenuItemWithLabelFromWidget creates a new GtkRadioMenuItem whose
// child is a simple GtkLabel. The new RadioMenuItem is added to the same group
// as group.
//
// The function takes the following parameters:
//
//   - group (optional): existing RadioMenuItem.
//   - label (optional): text for the label.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItemWithLabelFromWidget(group *RadioMenuItem, label string) *RadioMenuItem {
	var _arg1 *C.GtkRadioMenuItem // out
	var _arg2 *C.gchar            // out
	var _cret *C.GtkWidget        // in

	if group != nil {
		_arg1 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_radio_menu_item_new_with_label_from_widget(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// NewRadioMenuItemWithMnemonic creates a new RadioMenuItem containing a label.
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the menu item.
//
// The function takes the following parameters:
//
//   - group (optional): group the radio menu item is inside, or NULL.
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItemWithMnemonic(group []*RadioMenuItem, label string) *RadioMenuItem {
	var _arg1 *C.GSList    // out
	var _arg2 *C.gchar     // out
	var _cret *C.GtkWidget // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioMenuItem // out
			dst = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_menu_item_new_with_mnemonic(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// NewRadioMenuItemWithMnemonicFromWidget creates a new
// GtkRadioMenuItem containing a label. The label will be created using
// gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic
// for the menu item.
//
// The new RadioMenuItem is added to the same group as group.
//
// The function takes the following parameters:
//
//   - group (optional): existing RadioMenuItem.
//   - label (optional): text of the button, with an underscore in front of the
//     mnemonic character.
//
// The function returns the following values:
//
//   - radioMenuItem: new RadioMenuItem.
func NewRadioMenuItemWithMnemonicFromWidget(group *RadioMenuItem, label string) *RadioMenuItem {
	var _arg1 *C.GtkRadioMenuItem // out
	var _arg2 *C.gchar            // out
	var _cret *C.GtkWidget        // in

	if group != nil {
		_arg1 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_radio_menu_item_new_with_mnemonic_from_widget(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)

	var _radioMenuItem *RadioMenuItem // out

	_radioMenuItem = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioMenuItem
}

// Group returns the group to which the radio menu item belongs, as a #GList of
// RadioMenuItem. The list belongs to GTK+ and should not be freed.
//
// The function returns the following values:
//
//   - sList: group of radio_menu_item.
func (radioMenuItem *RadioMenuItem) Group() []*RadioMenuItem {
	var _arg0 *C.GtkRadioMenuItem // out
	var _cret *C.GSList           // in

	_arg0 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(radioMenuItem).Native()))

	_cret = C.gtk_radio_menu_item_get_group(_arg0)
	runtime.KeepAlive(radioMenuItem)

	var _sList []*RadioMenuItem // out

	_sList = make([]*RadioMenuItem, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkRadioMenuItem)(v)
		var dst *RadioMenuItem // out
		dst = wrapRadioMenuItem(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// JoinGroup joins a RadioMenuItem object to the group of another RadioMenuItem
// object.
//
// This function should be used by language bindings to avoid the memory
// manangement of the opaque List of gtk_radio_menu_item_get_group() and
// gtk_radio_menu_item_set_group().
//
// A common way to set up a group of RadioMenuItem instances is:
//
//	GtkRadioMenuItem *last_item = NULL;
//
//	while ( ...more items to add... )
//	  {
//	    GtkRadioMenuItem *radio_item;
//
//	    radio_item = gtk_radio_menu_item_new (...);
//
//	    gtk_radio_menu_item_join_group (radio_item, last_item);
//	    last_item = radio_item;
//	  }.
//
// The function takes the following parameters:
//
//   - groupSource (optional) whose group we are joining, or NULL to remove the
//     radio_menu_item from its current group.
func (radioMenuItem *RadioMenuItem) JoinGroup(groupSource *RadioMenuItem) {
	var _arg0 *C.GtkRadioMenuItem // out
	var _arg1 *C.GtkRadioMenuItem // out

	_arg0 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(radioMenuItem).Native()))
	if groupSource != nil {
		_arg1 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(groupSource).Native()))
	}

	C.gtk_radio_menu_item_join_group(_arg0, _arg1)
	runtime.KeepAlive(radioMenuItem)
	runtime.KeepAlive(groupSource)
}

// SetGroup sets the group of a radio menu item, or changes it.
//
// The function takes the following parameters:
//
//   - group (optional): new group, or NULL.
func (radioMenuItem *RadioMenuItem) SetGroup(group []*RadioMenuItem) {
	var _arg0 *C.GtkRadioMenuItem // out
	var _arg1 *C.GSList           // out

	_arg0 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(radioMenuItem).Native()))
	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioMenuItem // out
			dst = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	C.gtk_radio_menu_item_set_group(_arg0, _arg1)
	runtime.KeepAlive(radioMenuItem)
	runtime.KeepAlive(group)
}

func (radioMenuItem *RadioMenuItem) groupChanged() {
	gclass := (*C.GtkRadioMenuItemClass)(coreglib.PeekParentClass(radioMenuItem))
	fnarg := gclass.group_changed

	var _arg0 *C.GtkRadioMenuItem // out

	_arg0 = (*C.GtkRadioMenuItem)(unsafe.Pointer(coreglib.InternObject(radioMenuItem).Native()))

	C._gotk4_gtk3_RadioMenuItem_virtual_group_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(radioMenuItem)
}

// RadioMenuItemAccessibleOverrides contains methods that are overridable.
type RadioMenuItemAccessibleOverrides struct {
}

func defaultRadioMenuItemAccessibleOverrides(v *RadioMenuItemAccessible) RadioMenuItemAccessibleOverrides {
	return RadioMenuItemAccessibleOverrides{}
}

type RadioMenuItemAccessible struct {
	_ [0]func() // equal guard
	CheckMenuItemAccessible
}

var (
	_ coreglib.Objector = (*RadioMenuItemAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioMenuItemAccessible, *RadioMenuItemAccessibleClass, RadioMenuItemAccessibleOverrides](
		GTypeRadioMenuItemAccessible,
		initRadioMenuItemAccessibleClass,
		wrapRadioMenuItemAccessible,
		defaultRadioMenuItemAccessibleOverrides,
	)
}

func initRadioMenuItemAccessibleClass(gclass unsafe.Pointer, overrides RadioMenuItemAccessibleOverrides, classInitFunc func(*RadioMenuItemAccessibleClass)) {
	if classInitFunc != nil {
		class := (*RadioMenuItemAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioMenuItemAccessible(obj *coreglib.Object) *RadioMenuItemAccessible {
	return &RadioMenuItemAccessible{
		CheckMenuItemAccessible: CheckMenuItemAccessible{
			MenuItemAccessible: MenuItemAccessible{
				ContainerAccessible: ContainerAccessible{
					WidgetAccessible: WidgetAccessible{
						Accessible: Accessible{
							AtkObject: atk.AtkObject{
								Object: obj,
							},
						},
						Component: atk.Component{
							Object: obj,
						},
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				Selection: atk.Selection{
					Object: obj,
				},
			},
		},
	}
}

func marshalRadioMenuItemAccessible(p uintptr) (interface{}, error) {
	return wrapRadioMenuItemAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// RadioToolButtonOverrides contains methods that are overridable.
type RadioToolButtonOverrides struct {
}

func defaultRadioToolButtonOverrides(v *RadioToolButton) RadioToolButtonOverrides {
	return RadioToolButtonOverrides{}
}

// RadioToolButton is a ToolItem that contains a radio button, that is, a button
// that is part of a group of toggle buttons where only one button can be active
// at a time.
//
// Use gtk_radio_tool_button_new() to create a new GtkRadioToolButton. Use
// gtk_radio_tool_button_new_from_widget() to create a new GtkRadioToolButton
// that is part of the same group as an existing GtkRadioToolButton.
//
// # CSS nodes
//
// GtkRadioToolButton has a single CSS node with name toolbutton.
type RadioToolButton struct {
	_ [0]func() // equal guard
	ToggleToolButton
}

var (
	_ coreglib.Objector = (*RadioToolButton)(nil)
	_ Binner            = (*RadioToolButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RadioToolButton, *RadioToolButtonClass, RadioToolButtonOverrides](
		GTypeRadioToolButton,
		initRadioToolButtonClass,
		wrapRadioToolButton,
		defaultRadioToolButtonOverrides,
	)
}

func initRadioToolButtonClass(gclass unsafe.Pointer, overrides RadioToolButtonOverrides, classInitFunc func(*RadioToolButtonClass)) {
	if classInitFunc != nil {
		class := (*RadioToolButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRadioToolButton(obj *coreglib.Object) *RadioToolButton {
	return &RadioToolButton{
		ToggleToolButton: ToggleToolButton{
			ToolButton: ToolButton{
				ToolItem: ToolItem{
					Bin: Bin{
						Container: Container{
							Widget: Widget{
								InitiallyUnowned: coreglib.InitiallyUnowned{
									Object: obj,
								},
								Object: obj,
								ImplementorIface: atk.ImplementorIface{
									Object: obj,
								},
								Buildable: Buildable{
									Object: obj,
								},
							},
						},
					},
					Object: obj,
					Activatable: Activatable{
						Object: obj,
					},
				},
				Object: obj,
				Actionable: Actionable{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalRadioToolButton(p uintptr) (interface{}, error) {
	return wrapRadioToolButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRadioToolButton creates a new RadioToolButton, adding it to group.
//
// The function takes the following parameters:
//
//   - group (optional): an existing radio button group, or NULL if you are
//     creating a new group.
//
// The function returns the following values:
//
//   - radioToolButton: new RadioToolButton.
func NewRadioToolButton(group []*RadioButton) *RadioToolButton {
	var _arg1 *C.GSList      // out
	var _cret *C.GtkToolItem // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	_cret = C.gtk_radio_tool_button_new(_arg1)
	runtime.KeepAlive(group)

	var _radioToolButton *RadioToolButton // out

	_radioToolButton = wrapRadioToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioToolButton
}

// NewRadioToolButtonFromStock creates a new RadioToolButton, adding it to
// group. The new RadioToolButton will contain an icon and label from the stock
// item indicated by stock_id.
//
// Deprecated: Use gtk_radio_tool_button_new() instead.
//
// The function takes the following parameters:
//
//   - group (optional): existing radio button group, or NULL if you are
//     creating a new group.
//   - stockId: name of a stock item.
//
// The function returns the following values:
//
//   - radioToolButton: new RadioToolButton.
func NewRadioToolButtonFromStock(group []*RadioButton, stockId string) *RadioToolButton {
	var _arg1 *C.GSList      // out
	var _arg2 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_tool_button_new_from_stock(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(stockId)

	var _radioToolButton *RadioToolButton // out

	_radioToolButton = wrapRadioToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioToolButton
}

// NewRadioToolButtonFromWidget creates a new RadioToolButton adding it to the
// same group as gruup.
//
// The function takes the following parameters:
//
//   - group (optional): existing RadioToolButton, or NULL.
//
// The function returns the following values:
//
//   - radioToolButton: new RadioToolButton.
func NewRadioToolButtonFromWidget(group *RadioToolButton) *RadioToolButton {
	var _arg1 *C.GtkRadioToolButton // out
	var _cret *C.GtkToolItem        // in

	if group != nil {
		_arg1 = (*C.GtkRadioToolButton)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}

	_cret = C.gtk_radio_tool_button_new_from_widget(_arg1)
	runtime.KeepAlive(group)

	var _radioToolButton *RadioToolButton // out

	_radioToolButton = wrapRadioToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioToolButton
}

// NewRadioToolButtonWithStockFromWidget creates a new RadioToolButton adding it
// to the same group as group. The new RadioToolButton will contain an icon and
// label from the stock item indicated by stock_id.
//
// Deprecated: gtk_radio_tool_button_new_from_widget.
//
// The function takes the following parameters:
//
//   - group (optional): existing RadioToolButton.
//   - stockId: name of a stock item.
//
// The function returns the following values:
//
//   - radioToolButton: new RadioToolButton.
func NewRadioToolButtonWithStockFromWidget(group *RadioToolButton, stockId string) *RadioToolButton {
	var _arg1 *C.GtkRadioToolButton // out
	var _arg2 *C.gchar              // out
	var _cret *C.GtkToolItem        // in

	if group != nil {
		_arg1 = (*C.GtkRadioToolButton)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_radio_tool_button_new_with_stock_from_widget(_arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(stockId)

	var _radioToolButton *RadioToolButton // out

	_radioToolButton = wrapRadioToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _radioToolButton
}

// Group returns the radio button group button belongs to.
//
// The function returns the following values:
//
//   - sList: group button belongs to.
func (button *RadioToolButton) Group() []*RadioButton {
	var _arg0 *C.GtkRadioToolButton // out
	var _cret *C.GSList             // in

	_arg0 = (*C.GtkRadioToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_radio_tool_button_get_group(_arg0)
	runtime.KeepAlive(button)

	var _sList []*RadioButton // out

	_sList = make([]*RadioButton, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkRadioButton)(v)
		var dst *RadioButton // out
		dst = wrapRadioButton(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// SetGroup adds button to group, removing it from the group it belonged to
// before.
//
// The function takes the following parameters:
//
//   - group (optional): existing radio button group, or NULL.
func (button *RadioToolButton) SetGroup(group []*RadioButton) {
	var _arg0 *C.GtkRadioToolButton // out
	var _arg1 *C.GSList             // out

	_arg0 = (*C.GtkRadioToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if group != nil {
		for i := len(group) - 1; i >= 0; i-- {
			src := group[i]
			var dst *C.GtkRadioButton // out
			dst = (*C.GtkRadioButton)(unsafe.Pointer(coreglib.InternObject(src).Native()))
			_arg1 = C.g_slist_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
		}
		defer C.g_slist_free(_arg1)
	}

	C.gtk_radio_tool_button_set_group(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(group)
}

// RangeOverrides contains methods that are overridable.
type RangeOverrides struct {
	AdjustBounds func(newValue float64)
	// The function takes the following parameters:
	//
	//   - scroll
	//   - newValue
	ChangeValue func(scroll ScrollType, newValue float64) bool
	RangeBorder func(border_ *Border)
	// The function takes the following parameters:
	//
	//   - orientation
	//   - minimum
	//   - natural
	RangeSizeRequest func(orientation Orientation, minimum, natural *int)
	MoveSlider       func(scroll ScrollType)
	ValueChanged     func()
}

func defaultRangeOverrides(v *Range) RangeOverrides {
	return RangeOverrides{
		AdjustBounds:     v.adjustBounds,
		ChangeValue:      v.changeValue,
		RangeBorder:      v.rangeBorder,
		RangeSizeRequest: v.rangeSizeRequest,
		MoveSlider:       v.moveSlider,
		ValueChanged:     v.valueChanged,
	}
}

// Range is the common base class for widgets which visualize an adjustment,
// e.g Scale or Scrollbar.
//
// Apart from signals for monitoring the parameters of the adjustment,
// Range provides properties and methods for influencing the sensitivity of
// the “steppers”. It also provides properties and methods for setting a “fill
// level” on range widgets. See gtk_range_set_fill_level().
type Range struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	Orientable
}

var (
	_ Widgetter         = (*Range)(nil)
	_ coreglib.Objector = (*Range)(nil)
)

// Ranger describes types inherited from class Range.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Ranger interface {
	coreglib.Objector
	baseRange() *Range
}

var _ Ranger = (*Range)(nil)

func init() {
	coreglib.RegisterClassInfo[*Range, *RangeClass, RangeOverrides](
		GTypeRange,
		initRangeClass,
		wrapRange,
		defaultRangeOverrides,
	)
}

func initRangeClass(gclass unsafe.Pointer, overrides RangeOverrides, classInitFunc func(*RangeClass)) {
	pclass := (*C.GtkRangeClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRange))))

	if overrides.AdjustBounds != nil {
		pclass.adjust_bounds = (*[0]byte)(C._gotk4_gtk3_RangeClass_adjust_bounds)
	}

	if overrides.ChangeValue != nil {
		pclass.change_value = (*[0]byte)(C._gotk4_gtk3_RangeClass_change_value)
	}

	if overrides.RangeBorder != nil {
		pclass.get_range_border = (*[0]byte)(C._gotk4_gtk3_RangeClass_get_range_border)
	}

	if overrides.RangeSizeRequest != nil {
		pclass.get_range_size_request = (*[0]byte)(C._gotk4_gtk3_RangeClass_get_range_size_request)
	}

	if overrides.MoveSlider != nil {
		pclass.move_slider = (*[0]byte)(C._gotk4_gtk3_RangeClass_move_slider)
	}

	if overrides.ValueChanged != nil {
		pclass.value_changed = (*[0]byte)(C._gotk4_gtk3_RangeClass_value_changed)
	}

	if classInitFunc != nil {
		class := (*RangeClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRange(obj *coreglib.Object) *Range {
	return &Range{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalRange(p uintptr) (interface{}, error) {
	return wrapRange(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (_range *Range) baseRange() *Range {
	return _range
}

// BaseRange returns the underlying base object.
func BaseRange(obj Ranger) *Range {
	return obj.baseRange()
}

// ConnectAdjustBounds is emitted before clamping a value, to give the
// application a chance to adjust the bounds.
func (_range *Range) ConnectAdjustBounds(f func(value float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(_range, "adjust-bounds", false, unsafe.Pointer(C._gotk4_gtk3_Range_ConnectAdjustBounds), f)
}

// ConnectChangeValue signal is emitted when a scroll action is performed on a
// range. It allows an application to determine the type of scroll event that
// occurred and the resultant new value. The application can handle the event
// itself and return TRUE to prevent further processing. Or, by returning FALSE,
// it can pass the event to other handlers until the default GTK+ handler is
// reached.
//
// The value parameter is unrounded. An application that overrides the
// GtkRange::change-value signal is responsible for clamping the value to the
// desired number of decimal digits; the default GTK+ handler clamps the value
// based on Range:round-digits.
func (_range *Range) ConnectChangeValue(f func(scroll ScrollType, value float64) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(_range, "change-value", false, unsafe.Pointer(C._gotk4_gtk3_Range_ConnectChangeValue), f)
}

// ConnectMoveSlider: virtual function that moves the slider. Used for
// keybindings.
func (_range *Range) ConnectMoveSlider(f func(step ScrollType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(_range, "move-slider", false, unsafe.Pointer(C._gotk4_gtk3_Range_ConnectMoveSlider), f)
}

// ConnectValueChanged is emitted when the range value changes.
func (_range *Range) ConnectValueChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(_range, "value-changed", false, unsafe.Pointer(C._gotk4_gtk3_Range_ConnectValueChanged), f)
}

// Adjustment: get the Adjustment which is the “model” object for Range.
// See gtk_range_set_adjustment() for details. The return value does not have a
// reference added, so should not be unreferenced.
//
// The function returns the following values:
//
//   - adjustment: Adjustment.
func (_range *Range) Adjustment() *Adjustment {
	var _arg0 *C.GtkRange      // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_adjustment(_arg0)
	runtime.KeepAlive(_range)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// FillLevel gets the current position of the fill level indicator.
//
// The function returns the following values:
//
//   - gdouble: current fill level.
func (_range *Range) FillLevel() float64 {
	var _arg0 *C.GtkRange // out
	var _cret C.gdouble   // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_fill_level(_arg0)
	runtime.KeepAlive(_range)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Flippable gets the value set by gtk_range_set_flippable().
//
// The function returns the following values:
//
//   - ok: TRUE if the range is flippable.
func (_range *Range) Flippable() bool {
	var _arg0 *C.GtkRange // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_flippable(_arg0)
	runtime.KeepAlive(_range)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Inverted gets the value set by gtk_range_set_inverted().
//
// The function returns the following values:
//
//   - ok: TRUE if the range is inverted.
func (_range *Range) Inverted() bool {
	var _arg0 *C.GtkRange // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_inverted(_arg0)
	runtime.KeepAlive(_range)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LowerStepperSensitivity gets the sensitivity policy for the stepper that
// points to the 'lower' end of the GtkRange’s adjustment.
//
// The function returns the following values:
//
//   - sensitivityType: lower stepper’s sensitivity policy.
func (_range *Range) LowerStepperSensitivity() SensitivityType {
	var _arg0 *C.GtkRange          // out
	var _cret C.GtkSensitivityType // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_lower_stepper_sensitivity(_arg0)
	runtime.KeepAlive(_range)

	var _sensitivityType SensitivityType // out

	_sensitivityType = SensitivityType(_cret)

	return _sensitivityType
}

// MinSliderSize: this function is useful mainly for Range subclasses.
//
// See gtk_range_set_min_slider_size().
//
// Deprecated: Use the min-height/min-width CSS properties on the slider node.
//
// The function returns the following values:
//
//   - gint: minimum size of the range’s slider.
func (_range *Range) MinSliderSize() int {
	var _arg0 *C.GtkRange // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_min_slider_size(_arg0)
	runtime.KeepAlive(_range)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// RangeRect: this function returns the area that contains the range’s trough
// and its steppers, in widget->window coordinates.
//
// This function is useful mainly for Range subclasses.
//
// The function returns the following values:
//
//   - rangeRect: return location for the range rectangle.
func (_range *Range) RangeRect() *gdk.Rectangle {
	var _arg0 *C.GtkRange    // out
	var _arg1 C.GdkRectangle // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	C.gtk_range_get_range_rect(_arg0, &_arg1)
	runtime.KeepAlive(_range)

	var _rangeRect *gdk.Rectangle // out

	_rangeRect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _rangeRect
}

// RestrictToFillLevel gets whether the range is restricted to the fill level.
//
// The function returns the following values:
//
//   - ok: TRUE if range is restricted to the fill level.
func (_range *Range) RestrictToFillLevel() bool {
	var _arg0 *C.GtkRange // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_restrict_to_fill_level(_arg0)
	runtime.KeepAlive(_range)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RoundDigits gets the number of digits to round the value to when it changes.
// See Range::change-value.
//
// The function returns the following values:
//
//   - gint: number of digits to round to.
func (_range *Range) RoundDigits() int {
	var _arg0 *C.GtkRange // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_round_digits(_arg0)
	runtime.KeepAlive(_range)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ShowFillLevel gets whether the range displays the fill level graphically.
//
// The function returns the following values:
//
//   - ok: TRUE if range shows the fill level.
func (_range *Range) ShowFillLevel() bool {
	var _arg0 *C.GtkRange // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_show_fill_level(_arg0)
	runtime.KeepAlive(_range)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SliderRange: this function returns sliders range along the long dimension,
// in widget->window coordinates.
//
// This function is useful mainly for Range subclasses.
//
// The function returns the following values:
//
//   - sliderStart (optional): return location for the slider's start, or NULL.
//   - sliderEnd (optional): return location for the slider's end, or NULL.
func (_range *Range) SliderRange() (sliderStart, sliderEnd int) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	C.gtk_range_get_slider_range(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(_range)

	var _sliderStart int // out
	var _sliderEnd int   // out

	_sliderStart = int(_arg1)
	_sliderEnd = int(_arg2)

	return _sliderStart, _sliderEnd
}

// SliderSizeFixed: this function is useful mainly for Range subclasses.
//
// See gtk_range_set_slider_size_fixed().
//
// The function returns the following values:
//
//   - ok: whether the range’s slider has a fixed size.
func (_range *Range) SliderSizeFixed() bool {
	var _arg0 *C.GtkRange // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_slider_size_fixed(_arg0)
	runtime.KeepAlive(_range)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UpperStepperSensitivity gets the sensitivity policy for the stepper that
// points to the 'upper' end of the GtkRange’s adjustment.
//
// The function returns the following values:
//
//   - sensitivityType: upper stepper’s sensitivity policy.
func (_range *Range) UpperStepperSensitivity() SensitivityType {
	var _arg0 *C.GtkRange          // out
	var _cret C.GtkSensitivityType // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_upper_stepper_sensitivity(_arg0)
	runtime.KeepAlive(_range)

	var _sensitivityType SensitivityType // out

	_sensitivityType = SensitivityType(_cret)

	return _sensitivityType
}

// Value gets the current value of the range.
//
// The function returns the following values:
//
//   - gdouble: current value of the range.
func (_range *Range) Value() float64 {
	var _arg0 *C.GtkRange // out
	var _cret C.gdouble   // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	_cret = C.gtk_range_get_value(_arg0)
	runtime.KeepAlive(_range)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// SetAdjustment sets the adjustment to be used as the “model” object for
// this range widget. The adjustment indicates the current range value,
// the minimum and maximum range values, the step/page increments used for
// keybindings and scrolling, and the page size. The page size is normally 0 for
// Scale and nonzero for Scrollbar, and indicates the size of the visible area
// of the widget being scrolled. The page size affects the size of the scrollbar
// slider.
//
// The function takes the following parameters:
//
//   - adjustment: Adjustment.
func (_range *Range) SetAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkRange      // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_range_set_adjustment(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(adjustment)
}

// SetFillLevel: set the new position of the fill level indicator.
//
// The “fill level” is probably best described by its most prominent use case,
// which is an indicator for the amount of pre-buffering in a streaming media
// player. In that use case, the value of the range would indicate the current
// play position, and the fill level would be the position up to which the
// file/stream has been downloaded.
//
// This amount of prebuffering can be displayed on the range’s trough and
// is themeable separately from the trough. To enable fill level display,
// use gtk_range_set_show_fill_level(). The range defaults to not showing the
// fill level.
//
// Additionally, it’s possible to restrict the range’s slider position
// to values which are smaller than the fill level. This is controller by
// gtk_range_set_restrict_to_fill_level() and is by default enabled.
//
// The function takes the following parameters:
//
//   - fillLevel: new position of the fill level indicator.
func (_range *Range) SetFillLevel(fillLevel float64) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gdouble(fillLevel)

	C.gtk_range_set_fill_level(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(fillLevel)
}

// SetFlippable: if a range is flippable, it will switch its direction if it is
// horizontal and its direction is GTK_TEXT_DIR_RTL.
//
// See gtk_widget_get_direction().
//
// The function takes the following parameters:
//
//   - flippable: TRUE to make the range flippable.
func (_range *Range) SetFlippable(flippable bool) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	if flippable {
		_arg1 = C.TRUE
	}

	C.gtk_range_set_flippable(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(flippable)
}

// SetIncrements sets the step and page sizes for the range. The step size is
// used when the user clicks the Scrollbar arrows or moves Scale via arrow keys.
// The page size is used for example when moving via Page Up or Page Down keys.
//
// The function takes the following parameters:
//
//   - step size.
//   - page size.
func (_range *Range) SetIncrements(step, page float64) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gdouble   // out
	var _arg2 C.gdouble   // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gdouble(step)
	_arg2 = C.gdouble(page)

	C.gtk_range_set_increments(_arg0, _arg1, _arg2)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(step)
	runtime.KeepAlive(page)
}

// SetInverted ranges normally move from lower to higher values as the slider
// moves from top to bottom or left to right. Inverted ranges have higher values
// at the top or on the right rather than on the bottom or left.
//
// The function takes the following parameters:
//
//   - setting: TRUE to invert the range.
func (_range *Range) SetInverted(setting bool) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_range_set_inverted(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(setting)
}

// SetLowerStepperSensitivity sets the sensitivity policy for the stepper that
// points to the 'lower' end of the GtkRange’s adjustment.
//
// The function takes the following parameters:
//
//   - sensitivity: lower stepper’s sensitivity policy.
func (_range *Range) SetLowerStepperSensitivity(sensitivity SensitivityType) {
	var _arg0 *C.GtkRange          // out
	var _arg1 C.GtkSensitivityType // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.GtkSensitivityType(sensitivity)

	C.gtk_range_set_lower_stepper_sensitivity(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(sensitivity)
}

// SetMinSliderSize sets the minimum size of the range’s slider.
//
// This function is useful mainly for Range subclasses.
//
// Deprecated: Use the min-height/min-width CSS properties on the slider node.
//
// The function takes the following parameters:
//
//   - minSize slider’s minimum size.
func (_range *Range) SetMinSliderSize(minSize int) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gint(minSize)

	C.gtk_range_set_min_slider_size(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(minSize)
}

// SetRange sets the allowable values in the Range, and clamps the range
// value to be between min and max. (If the range has a non-zero page size,
// it is clamped between min and max - page-size.).
//
// The function takes the following parameters:
//
//   - min: minimum range value.
//   - max: maximum range value.
func (_range *Range) SetRange(min, max float64) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gdouble   // out
	var _arg2 C.gdouble   // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gdouble(min)
	_arg2 = C.gdouble(max)

	C.gtk_range_set_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
}

// SetRestrictToFillLevel sets whether the slider is restricted to the fill
// level. See gtk_range_set_fill_level() for a general description of the fill
// level concept.
//
// The function takes the following parameters:
//
//   - restrictToFillLevel: whether the fill level restricts slider movement.
func (_range *Range) SetRestrictToFillLevel(restrictToFillLevel bool) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	if restrictToFillLevel {
		_arg1 = C.TRUE
	}

	C.gtk_range_set_restrict_to_fill_level(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(restrictToFillLevel)
}

// SetRoundDigits sets the number of digits to round the value to when it
// changes. See Range::change-value.
//
// The function takes the following parameters:
//
//   - roundDigits: precision in digits, or -1.
func (_range *Range) SetRoundDigits(roundDigits int) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gint(roundDigits)

	C.gtk_range_set_round_digits(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(roundDigits)
}

// SetShowFillLevel sets whether a graphical fill level is show on the trough.
// See gtk_range_set_fill_level() for a general description of the fill level
// concept.
//
// The function takes the following parameters:
//
//   - showFillLevel: whether a fill level indicator graphics is shown.
func (_range *Range) SetShowFillLevel(showFillLevel bool) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	if showFillLevel {
		_arg1 = C.TRUE
	}

	C.gtk_range_set_show_fill_level(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(showFillLevel)
}

// SetSliderSizeFixed sets whether the range’s slider has a fixed size, or a
// size that depends on its adjustment’s page size.
//
// This function is useful mainly for Range subclasses.
//
// The function takes the following parameters:
//
//   - sizeFixed: TRUE to make the slider size constant.
func (_range *Range) SetSliderSizeFixed(sizeFixed bool) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	if sizeFixed {
		_arg1 = C.TRUE
	}

	C.gtk_range_set_slider_size_fixed(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(sizeFixed)
}

// SetUpperStepperSensitivity sets the sensitivity policy for the stepper that
// points to the 'upper' end of the GtkRange’s adjustment.
//
// The function takes the following parameters:
//
//   - sensitivity: upper stepper’s sensitivity policy.
func (_range *Range) SetUpperStepperSensitivity(sensitivity SensitivityType) {
	var _arg0 *C.GtkRange          // out
	var _arg1 C.GtkSensitivityType // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.GtkSensitivityType(sensitivity)

	C.gtk_range_set_upper_stepper_sensitivity(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(sensitivity)
}

// SetValue sets the current value of the range; if the value is outside the
// minimum or maximum range values, it will be clamped to fit inside them.
// The range emits the Range::value-changed signal if the value changes.
//
// The function takes the following parameters:
//
//   - value: new value of the range.
func (_range *Range) SetValue(value float64) {
	var _arg0 *C.GtkRange // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_range_set_value(_arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(value)
}

func (_range *Range) adjustBounds(newValue float64) {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.adjust_bounds

	var _arg0 *C.GtkRange // out
	var _arg1 C.gdouble   // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.gdouble(newValue)

	C._gotk4_gtk3_Range_virtual_adjust_bounds(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(newValue)
}

// The function takes the following parameters:
//
//   - scroll
//   - newValue
func (_range *Range) changeValue(scroll ScrollType, newValue float64) bool {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.change_value

	var _arg0 *C.GtkRange     // out
	var _arg1 C.GtkScrollType // out
	var _arg2 C.gdouble       // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.GtkScrollType(scroll)
	_arg2 = C.gdouble(newValue)

	_cret = C._gotk4_gtk3_Range_virtual_change_value(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(scroll)
	runtime.KeepAlive(newValue)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (_range *Range) rangeBorder(border_ *Border) {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.get_range_border

	var _arg0 *C.GtkRange  // out
	var _arg1 *C.GtkBorder // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = (*C.GtkBorder)(gextras.StructNative(unsafe.Pointer(border_)))

	C._gotk4_gtk3_Range_virtual_get_range_border(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(border_)
}

// The function takes the following parameters:
//
//   - orientation
//   - minimum
//   - natural
func (_range *Range) rangeSizeRequest(orientation Orientation, minimum, natural *int) {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.get_range_size_request

	var _arg0 *C.GtkRange      // out
	var _arg1 C.GtkOrientation // out
	var _arg2 *C.gint          // out
	var _arg3 *C.gint          // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.GtkOrientation(orientation)
	_arg2 = (*C.gint)(unsafe.Pointer(minimum))
	_arg3 = (*C.gint)(unsafe.Pointer(natural))

	C._gotk4_gtk3_Range_virtual_get_range_size_request(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(minimum)
	runtime.KeepAlive(natural)
}

func (_range *Range) moveSlider(scroll ScrollType) {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.move_slider

	var _arg0 *C.GtkRange     // out
	var _arg1 C.GtkScrollType // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))
	_arg1 = C.GtkScrollType(scroll)

	C._gotk4_gtk3_Range_virtual_move_slider(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(_range)
	runtime.KeepAlive(scroll)
}

func (_range *Range) valueChanged() {
	gclass := (*C.GtkRangeClass)(coreglib.PeekParentClass(_range))
	fnarg := gclass.value_changed

	var _arg0 *C.GtkRange // out

	_arg0 = (*C.GtkRange)(unsafe.Pointer(coreglib.InternObject(_range).Native()))

	C._gotk4_gtk3_Range_virtual_value_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(_range)
}

// RangeAccessibleOverrides contains methods that are overridable.
type RangeAccessibleOverrides struct {
}

func defaultRangeAccessibleOverrides(v *RangeAccessible) RangeAccessibleOverrides {
	return RangeAccessibleOverrides{}
}

type RangeAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Value
}

var (
	_ coreglib.Objector = (*RangeAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RangeAccessible, *RangeAccessibleClass, RangeAccessibleOverrides](
		GTypeRangeAccessible,
		initRangeAccessibleClass,
		wrapRangeAccessible,
		defaultRangeAccessibleOverrides,
	)
}

func initRangeAccessibleClass(gclass unsafe.Pointer, overrides RangeAccessibleOverrides, classInitFunc func(*RangeAccessibleClass)) {
	if classInitFunc != nil {
		class := (*RangeAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRangeAccessible(obj *coreglib.Object) *RangeAccessible {
	return &RangeAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalRangeAccessible(p uintptr) (interface{}, error) {
	return wrapRangeAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// RCStyleOverrides contains methods that are overridable.
type RCStyleOverrides struct {
	Merge func(src *RCStyle)
	// The function takes the following parameters:
	//
	//   - settings
	//   - scanner
	Parse func(settings *Settings, scanner *glib.Scanner) uint
}

func defaultRCStyleOverrides(v *RCStyle) RCStyleOverrides {
	return RCStyleOverrides{
		Merge: v.merge,
		Parse: v.parse,
	}
}

// RCStyle is used to represent a set of information about the appearance of a
// widget. This can later be composited together with other RcStyle-struct<!--
// -->s to form a Style.
type RCStyle struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*RCStyle)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RCStyle, *RCStyleClass, RCStyleOverrides](
		GTypeRCStyle,
		initRCStyleClass,
		wrapRCStyle,
		defaultRCStyleOverrides,
	)
}

func initRCStyleClass(gclass unsafe.Pointer, overrides RCStyleOverrides, classInitFunc func(*RCStyleClass)) {
	pclass := (*C.GtkRcStyleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRCStyle))))

	if overrides.Merge != nil {
		pclass.merge = (*[0]byte)(C._gotk4_gtk3_RcStyleClass_merge)
	}

	if overrides.Parse != nil {
		pclass.parse = (*[0]byte)(C._gotk4_gtk3_RcStyleClass_parse)
	}

	if classInitFunc != nil {
		class := (*RCStyleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRCStyle(obj *coreglib.Object) *RCStyle {
	return &RCStyle{
		Object: obj,
	}
}

func marshalRCStyle(p uintptr) (interface{}, error) {
	return wrapRCStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRCStyle creates a new RcStyle with no fields set and a reference count of
// 1.
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - rcStyle: newly-created RcStyle.
func NewRCStyle() *RCStyle {
	var _cret *C.GtkRcStyle // in

	_cret = C.gtk_rc_style_new()

	var _rcStyle *RCStyle // out

	_rcStyle = wrapRCStyle(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _rcStyle
}

// Copy makes a copy of the specified RcStyle. This function will correctly copy
// an RC style that is a member of a class derived from RcStyle.
//
// Deprecated: Use CssProvider instead.
//
// The function returns the following values:
//
//   - rcStyle: resulting RcStyle.
func (orig *RCStyle) Copy() *RCStyle {
	var _arg0 *C.GtkRcStyle // out
	var _cret *C.GtkRcStyle // in

	_arg0 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(orig).Native()))

	_cret = C.gtk_rc_style_copy(_arg0)
	runtime.KeepAlive(orig)

	var _rcStyle *RCStyle // out

	_rcStyle = wrapRCStyle(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _rcStyle
}

func (dest *RCStyle) merge(src *RCStyle) {
	gclass := (*C.GtkRcStyleClass)(coreglib.PeekParentClass(dest))
	fnarg := gclass.merge

	var _arg0 *C.GtkRcStyle // out
	var _arg1 *C.GtkRcStyle // out

	_arg0 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(dest).Native()))
	_arg1 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(src).Native()))

	C._gotk4_gtk3_RCStyle_virtual_merge(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(dest)
	runtime.KeepAlive(src)
}

// The function takes the following parameters:
//
//   - settings
//   - scanner
func (rcStyle *RCStyle) parse(settings *Settings, scanner *glib.Scanner) uint {
	gclass := (*C.GtkRcStyleClass)(coreglib.PeekParentClass(rcStyle))
	fnarg := gclass.parse

	var _arg0 *C.GtkRcStyle  // out
	var _arg1 *C.GtkSettings // out
	var _arg2 *C.GScanner    // out
	var _cret C.guint        // in

	_arg0 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(rcStyle).Native()))
	_arg1 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg2 = (*C.GScanner)(gextras.StructNative(unsafe.Pointer(scanner)))

	_cret = C._gotk4_gtk3_RCStyle_virtual_parse(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(rcStyle)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(scanner)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// RecentActionOverrides contains methods that are overridable.
type RecentActionOverrides struct {
}

func defaultRecentActionOverrides(v *RecentAction) RecentActionOverrides {
	return RecentActionOverrides{}
}

// RecentAction represents a list of recently used files, which can be shown by
// widgets such as RecentChooserDialog or RecentChooserMenu.
//
// To construct a submenu showing recently used files, use a RecentAction as
// the action for a <menuitem>. To construct a menu toolbutton showing the
// recently used files in the popup menu, use a RecentAction as the action for a
// <toolitem> element.
type RecentAction struct {
	_ [0]func() // equal guard
	Action

	*coreglib.Object
	RecentChooser
}

var (
	_ coreglib.Objector = (*RecentAction)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RecentAction, *RecentActionClass, RecentActionOverrides](
		GTypeRecentAction,
		initRecentActionClass,
		wrapRecentAction,
		defaultRecentActionOverrides,
	)
}

func initRecentActionClass(gclass unsafe.Pointer, overrides RecentActionOverrides, classInitFunc func(*RecentActionClass)) {
	if classInitFunc != nil {
		class := (*RecentActionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRecentAction(obj *coreglib.Object) *RecentAction {
	return &RecentAction{
		Action: Action{
			Object: obj,
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		RecentChooser: RecentChooser{
			Object: obj,
		},
	}
}

func marshalRecentAction(p uintptr) (interface{}, error) {
	return wrapRecentAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRecentAction creates a new RecentAction object. To add the
// action to a ActionGroup and set the accelerator for the action, call
// gtk_action_group_add_action_with_accel().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - name: unique name for the action.
//   - label (optional) displayed in menu items and on buttons, or NULL.
//   - tooltip (optional) for the action, or NULL.
//   - stockId (optional): stock icon to display in widgets representing the
//     action, or NULL.
//
// The function returns the following values:
//
//   - recentAction: newly created RecentAction.
func NewRecentAction(name, label, tooltip, stockId string) *RecentAction {
	var _arg1 *C.gchar     // out
	var _arg2 *C.gchar     // out
	var _arg3 *C.gchar     // out
	var _arg4 *C.gchar     // out
	var _cret *C.GtkAction // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if tooltip != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	if stockId != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg4))
	}

	_cret = C.gtk_recent_action_new(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)

	var _recentAction *RecentAction // out

	_recentAction = wrapRecentAction(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _recentAction
}

// NewRecentActionForManager creates a new RecentAction object. To add the
// action to a ActionGroup and set the accelerator for the action, call
// gtk_action_group_add_action_with_accel().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - name: unique name for the action.
//   - label (optional) displayed in menu items and on buttons, or NULL.
//   - tooltip (optional) for the action, or NULL.
//   - stockId (optional): stock icon to display in widgets representing the
//     action, or NULL.
//   - manager (optional) or NULL for using the default RecentManager.
//
// The function returns the following values:
//
//   - recentAction: newly created RecentAction.
func NewRecentActionForManager(name, label, tooltip, stockId string, manager *RecentManager) *RecentAction {
	var _arg1 *C.gchar            // out
	var _arg2 *C.gchar            // out
	var _arg3 *C.gchar            // out
	var _arg4 *C.gchar            // out
	var _arg5 *C.GtkRecentManager // out
	var _cret *C.GtkAction        // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if tooltip != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	if stockId != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg4))
	}
	if manager != nil {
		_arg5 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	}

	_cret = C.gtk_recent_action_new_for_manager(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(manager)

	var _recentAction *RecentAction // out

	_recentAction = wrapRecentAction(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _recentAction
}

// ShowNumbers returns the value set by
// gtk_recent_chooser_menu_set_show_numbers().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: TRUE if numbers should be shown.
func (action *RecentAction) ShowNumbers() bool {
	var _arg0 *C.GtkRecentAction // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkRecentAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_recent_action_get_show_numbers(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetShowNumbers sets whether a number should be added to the items shown by
// the widgets representing action. The numbers are shown to provide a unique
// character for a mnemonic to be used inside the menu item's label. Only the
// first ten items get a number to avoid clashes.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - showNumbers: TRUE if the shown items should be numbered.
func (action *RecentAction) SetShowNumbers(showNumbers bool) {
	var _arg0 *C.GtkRecentAction // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkRecentAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if showNumbers {
		_arg1 = C.TRUE
	}

	C.gtk_recent_action_set_show_numbers(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(showNumbers)
}

// RecentChooserDialogOverrides contains methods that are overridable.
type RecentChooserDialogOverrides struct {
}

func defaultRecentChooserDialogOverrides(v *RecentChooserDialog) RecentChooserDialogOverrides {
	return RecentChooserDialogOverrides{}
}

// RecentChooserDialog is a dialog box suitable for displaying the recently
// used documents. This widgets works by putting a RecentChooserWidget inside a
// Dialog. It exposes the RecentChooserIface interface, so you can use all the
// RecentChooser functions on the recent chooser dialog as well as those for
// Dialog.
//
// Note that RecentChooserDialog does not have any methods of its own. Instead,
// you should use the functions that work on a RecentChooser.
//
// # Typical usage
//
// In the simplest of cases, you can use the following code to use a
// RecentChooserDialog to select a recently used file:
//
//	GtkWidget *dialog;
//	gint res;
//
//	dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
//	                                        parent_window,
//	                                        _("_Cancel"),
//	                                        GTK_RESPONSE_CANCEL,
//	                                        _("_Open"),
//	                                        GTK_RESPONSE_ACCEPT,
//	                                        NULL);
//
//	res = gtk_dialog_run (GTK_DIALOG (dialog));
//	if (res == GTK_RESPONSE_ACCEPT)
//	  {
//	    GtkRecentInfo *info;
//	    GtkRecentChooser *chooser = GTK_RECENT_CHOOSER (dialog);
//
//	    info = gtk_recent_chooser_get_current_item (chooser);
//	    open_file (gtk_recent_info_get_uri (info));
//	    gtk_recent_info_unref (info);
//	  }
//
//	gtk_widget_destroy (dialog);
//
// Recently used files are supported since GTK+ 2.10.
type RecentChooserDialog struct {
	_ [0]func() // equal guard
	Dialog

	*coreglib.Object
	RecentChooser
}

var (
	_ coreglib.Objector = (*RecentChooserDialog)(nil)
	_ Binner            = (*RecentChooserDialog)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RecentChooserDialog, *RecentChooserDialogClass, RecentChooserDialogOverrides](
		GTypeRecentChooserDialog,
		initRecentChooserDialogClass,
		wrapRecentChooserDialog,
		defaultRecentChooserDialogOverrides,
	)
}

func initRecentChooserDialogClass(gclass unsafe.Pointer, overrides RecentChooserDialogOverrides, classInitFunc func(*RecentChooserDialogClass)) {
	if classInitFunc != nil {
		class := (*RecentChooserDialogClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRecentChooserDialog(obj *coreglib.Object) *RecentChooserDialog {
	return &RecentChooserDialog{
		Dialog: Dialog{
			Window: Window{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
			},
		},
		Object: obj,
		RecentChooser: RecentChooser{
			Object: obj,
		},
	}
}

func marshalRecentChooserDialog(p uintptr) (interface{}, error) {
	return wrapRecentChooserDialog(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// RecentChooserMenuOverrides contains methods that are overridable.
type RecentChooserMenuOverrides struct {
}

func defaultRecentChooserMenuOverrides(v *RecentChooserMenu) RecentChooserMenuOverrides {
	return RecentChooserMenuOverrides{}
}

// RecentChooserMenu is a widget suitable for displaying recently used
// files inside a menu. It can be used to set a sub-menu of a MenuItem using
// gtk_menu_item_set_submenu(), or as the menu of a MenuToolButton.
//
// Note that RecentChooserMenu does not have any methods of its own. Instead,
// you should use the functions that work on a RecentChooser.
//
// Note also that RecentChooserMenu does not support multiple filters, as it
// has no way to let the user choose between them as the RecentChooserWidget and
// RecentChooserDialog widgets do. Thus using gtk_recent_chooser_add_filter()
// on a RecentChooserMenu widget will yield the same effects as using
// gtk_recent_chooser_set_filter(), replacing any currently set filter with
// the supplied filter; gtk_recent_chooser_remove_filter() will remove any
// currently set RecentFilter object and will unset the current filter;
// gtk_recent_chooser_list_filters() will return a list containing a single
// RecentFilter object.
//
// Recently used files are supported since GTK+ 2.10.
type RecentChooserMenu struct {
	_ [0]func() // equal guard
	Menu

	*coreglib.Object
	Activatable
	RecentChooser
}

var (
	_ coreglib.Objector = (*RecentChooserMenu)(nil)
	_ MenuSheller       = (*RecentChooserMenu)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RecentChooserMenu, *RecentChooserMenuClass, RecentChooserMenuOverrides](
		GTypeRecentChooserMenu,
		initRecentChooserMenuClass,
		wrapRecentChooserMenu,
		defaultRecentChooserMenuOverrides,
	)
}

func initRecentChooserMenuClass(gclass unsafe.Pointer, overrides RecentChooserMenuOverrides, classInitFunc func(*RecentChooserMenuClass)) {
	if classInitFunc != nil {
		class := (*RecentChooserMenuClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRecentChooserMenu(obj *coreglib.Object) *RecentChooserMenu {
	return &RecentChooserMenu{
		Menu: Menu{
			MenuShell: MenuShell{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
		Object: obj,
		Activatable: Activatable{
			Object: obj,
		},
		RecentChooser: RecentChooser{
			Object: obj,
		},
	}
}

func marshalRecentChooserMenu(p uintptr) (interface{}, error) {
	return wrapRecentChooserMenu(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRecentChooserMenu creates a new RecentChooserMenu widget.
//
// This kind of widget shows the list of recently used resources as a menu,
// each item as a menu item. Each item inside the menu might have an icon,
// representing its MIME type, and a number, for mnemonic access.
//
// This widget implements the RecentChooser interface.
//
// This widget creates its own RecentManager object. See the
// gtk_recent_chooser_menu_new_for_manager() function to know how to create a
// RecentChooserMenu widget bound to another RecentManager object.
//
// The function returns the following values:
//
//   - recentChooserMenu: new RecentChooserMenu.
func NewRecentChooserMenu() *RecentChooserMenu {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_recent_chooser_menu_new()

	var _recentChooserMenu *RecentChooserMenu // out

	_recentChooserMenu = wrapRecentChooserMenu(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentChooserMenu
}

// NewRecentChooserMenuForManager creates a new RecentChooserMenu widget using
// manager as the underlying recently used resources manager.
//
// This is useful if you have implemented your own recent manager, or if you
// have a customized instance of a RecentManager object or if you wish to share
// a common RecentManager object among multiple RecentChooser widgets.
//
// The function takes the following parameters:
//
//   - manager: RecentManager.
//
// The function returns the following values:
//
//   - recentChooserMenu: new RecentChooserMenu, bound to manager.
func NewRecentChooserMenuForManager(manager *RecentManager) *RecentChooserMenu {
	var _arg1 *C.GtkRecentManager // out
	var _cret *C.GtkWidget        // in

	_arg1 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_recent_chooser_menu_new_for_manager(_arg1)
	runtime.KeepAlive(manager)

	var _recentChooserMenu *RecentChooserMenu // out

	_recentChooserMenu = wrapRecentChooserMenu(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentChooserMenu
}

// ShowNumbers returns the value set by
// gtk_recent_chooser_menu_set_show_numbers().
//
// The function returns the following values:
//
//   - ok: TRUE if numbers should be shown.
func (menu *RecentChooserMenu) ShowNumbers() bool {
	var _arg0 *C.GtkRecentChooserMenu // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkRecentChooserMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))

	_cret = C.gtk_recent_chooser_menu_get_show_numbers(_arg0)
	runtime.KeepAlive(menu)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetShowNumbers sets whether a number should be added to the items of menu.
// The numbers are shown to provide a unique character for a mnemonic to be used
// inside ten menu item’s label. Only the first the items get a number to avoid
// clashes.
//
// The function takes the following parameters:
//
//   - showNumbers: whether to show numbers.
func (menu *RecentChooserMenu) SetShowNumbers(showNumbers bool) {
	var _arg0 *C.GtkRecentChooserMenu // out
	var _arg1 C.gboolean              // out

	_arg0 = (*C.GtkRecentChooserMenu)(unsafe.Pointer(coreglib.InternObject(menu).Native()))
	if showNumbers {
		_arg1 = C.TRUE
	}

	C.gtk_recent_chooser_menu_set_show_numbers(_arg0, _arg1)
	runtime.KeepAlive(menu)
	runtime.KeepAlive(showNumbers)
}

// RecentChooserWidgetOverrides contains methods that are overridable.
type RecentChooserWidgetOverrides struct {
}

func defaultRecentChooserWidgetOverrides(v *RecentChooserWidget) RecentChooserWidgetOverrides {
	return RecentChooserWidgetOverrides{}
}

// RecentChooserWidget is a widget suitable for selecting recently used files.
// It is the main building block of a RecentChooserDialog. Most applications
// will only need to use the latter; you can use RecentChooserWidget as part of
// a larger window if you have special needs.
//
// Note that RecentChooserWidget does not have any methods of its own. Instead,
// you should use the functions that work on a RecentChooser.
//
// Recently used files are supported since GTK+ 2.10.
type RecentChooserWidget struct {
	_ [0]func() // equal guard
	Box

	*coreglib.Object
	RecentChooser
}

var (
	_ coreglib.Objector = (*RecentChooserWidget)(nil)
	_ Containerer       = (*RecentChooserWidget)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RecentChooserWidget, *RecentChooserWidgetClass, RecentChooserWidgetOverrides](
		GTypeRecentChooserWidget,
		initRecentChooserWidgetClass,
		wrapRecentChooserWidget,
		defaultRecentChooserWidgetOverrides,
	)
}

func initRecentChooserWidgetClass(gclass unsafe.Pointer, overrides RecentChooserWidgetOverrides, classInitFunc func(*RecentChooserWidgetClass)) {
	if classInitFunc != nil {
		class := (*RecentChooserWidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRecentChooserWidget(obj *coreglib.Object) *RecentChooserWidget {
	return &RecentChooserWidget{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
		Object: obj,
		RecentChooser: RecentChooser{
			Object: obj,
		},
	}
}

func marshalRecentChooserWidget(p uintptr) (interface{}, error) {
	return wrapRecentChooserWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRecentChooserWidget creates a new RecentChooserWidget object. This is an
// embeddable widget used to access the recently used resources list.
//
// The function returns the following values:
//
//   - recentChooserWidget: new RecentChooserWidget.
func NewRecentChooserWidget() *RecentChooserWidget {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_recent_chooser_widget_new()

	var _recentChooserWidget *RecentChooserWidget // out

	_recentChooserWidget = wrapRecentChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentChooserWidget
}

// NewRecentChooserWidgetForManager creates a new RecentChooserWidget with a
// specified recent manager.
//
// This is useful if you have implemented your own recent manager, or if you
// have a customized instance of a RecentManager object.
//
// The function takes the following parameters:
//
//   - manager: RecentManager.
//
// The function returns the following values:
//
//   - recentChooserWidget: new RecentChooserWidget.
func NewRecentChooserWidgetForManager(manager *RecentManager) *RecentChooserWidget {
	var _arg1 *C.GtkRecentManager // out
	var _cret *C.GtkWidget        // in

	_arg1 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_recent_chooser_widget_new_for_manager(_arg1)
	runtime.KeepAlive(manager)

	var _recentChooserWidget *RecentChooserWidget // out

	_recentChooserWidget = wrapRecentChooserWidget(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentChooserWidget
}

// RecentFilter can be used to restrict the files being shown in a
// RecentChooser. Files can be filtered based on their name (with
// gtk_recent_filter_add_pattern()), on their mime type (with
// gtk_file_filter_add_mime_type()), on the application that has registered them
// (with gtk_recent_filter_add_application()), or by a custom filter function
// (with gtk_recent_filter_add_custom()).
//
// Filtering by mime type handles aliasing and subclassing of mime types; e.g.
// a filter for text/plain also matches a file with mime type application/rtf,
// since application/rtf is a subclass of text/plain. Note that RecentFilter
// allows wildcards for the subtype of a mime type, so you can e.g. filter for
// image/\*.
//
// Normally, filters are used by adding them to a RecentChooser, see
// gtk_recent_chooser_add_filter(), but it is also possible to manually use a
// filter on a file with gtk_recent_filter_filter().
//
// Recently used files are supported since GTK+ 2.10.
//
// # GtkRecentFilter as GtkBuildable
//
// The GtkRecentFilter implementation of the GtkBuildable interface
// supports adding rules using the <mime-types>, <patterns> and
// <applications> elements and listing the rules within. Specifying a
// <mime-type>, <pattern> or <application> has the same effect as calling
// gtk_recent_filter_add_mime_type(), gtk_recent_filter_add_pattern() or
// gtk_recent_filter_add_application().
//
// An example of a UI definition fragment specifying GtkRecentFilter rules:
//
//	<object class="GtkRecentFilter">
//	  <mime-types>
//	    <mime-type>text/plain</mime-type>
//	    <mime-type>image/png</mime-type>
//	  </mime-types>
//	  <patterns>
//	    <pattern>*.txt</pattern>
//	    <pattern>*.png</pattern>
//	  </patterns>
//	  <applications>
//	    <application>gimp</application>
//	    <application>gedit</application>
//	    <application>glade</application>
//	  </applications>
//	</object>.
type RecentFilter struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned

	*coreglib.Object
	Buildable
}

var (
	_ coreglib.Objector = (*RecentFilter)(nil)
)

func wrapRecentFilter(obj *coreglib.Object) *RecentFilter {
	return &RecentFilter{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalRecentFilter(p uintptr) (interface{}, error) {
	return wrapRecentFilter(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRecentFilter creates a new RecentFilter with no rules added to it.
// Such filter does not accept any recently used resources, so is not
// particularly useful until you add rules with gtk_recent_filter_add_pattern(),
// gtk_recent_filter_add_mime_type(), gtk_recent_filter_add_application(),
// gtk_recent_filter_add_age(). To create a filter that accepts any recently
// used resource, use:
//
//	GtkRecentFilter *filter = gtk_recent_filter_new ();
//	gtk_recent_filter_add_pattern (filter, "*");.
//
// The function returns the following values:
//
//   - recentFilter: new RecentFilter.
func NewRecentFilter() *RecentFilter {
	var _cret *C.GtkRecentFilter // in

	_cret = C.gtk_recent_filter_new()

	var _recentFilter *RecentFilter // out

	_recentFilter = wrapRecentFilter(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentFilter
}

// AddAge adds a rule that allows resources based on their age - that is,
// the number of days elapsed since they were last modified.
//
// The function takes the following parameters:
//
//   - days: number of days.
func (filter *RecentFilter) AddAge(days int) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 C.gint             // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = C.gint(days)

	C.gtk_recent_filter_add_age(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(days)
}

// AddApplication adds a rule that allows resources based on the name of the
// application that has registered them.
//
// The function takes the following parameters:
//
//   - application name.
func (filter *RecentFilter) AddApplication(application string) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(application)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_filter_add_application(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(application)
}

// AddCustom adds a rule to a filter that allows resources based on a custom
// callback function. The bitfield needed which is passed in provides
// information about what sorts of information that the filter function needs;
// this allows GTK+ to avoid retrieving expensive information when it isn’t
// needed by the filter.
//
// The function takes the following parameters:
//
//   - needed: bitfield of flags indicating the information that the custom
//     filter function needs.
//   - fn: callback function; if the function returns TRUE, then the file will
//     be displayed.
func (filter *RecentFilter) AddCustom(needed RecentFilterFlags, fn RecentFilterFunc) {
	var _arg0 *C.GtkRecentFilter     // out
	var _arg1 C.GtkRecentFilterFlags // out
	var _arg2 C.GtkRecentFilterFunc  // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = C.GtkRecentFilterFlags(needed)
	_arg2 = (*[0]byte)(C._gotk4_gtk3_RecentFilterFunc)
	_arg3 = C.gpointer(gbox.Assign(fn))
	_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_recent_filter_add_custom(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(needed)
	runtime.KeepAlive(fn)
}

// AddGroup adds a rule that allows resources based on the name of the group to
// which they belong.
//
// The function takes the following parameters:
//
//   - group name.
func (filter *RecentFilter) AddGroup(group string) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(group)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_filter_add_group(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(group)
}

// AddMIMEType adds a rule that allows resources based on their registered MIME
// type.
//
// The function takes the following parameters:
//
//   - mimeType: MIME type.
func (filter *RecentFilter) AddMIMEType(mimeType string) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(mimeType)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_filter_add_mime_type(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(mimeType)
}

// AddPattern adds a rule that allows resources based on a pattern matching
// their display name.
//
// The function takes the following parameters:
//
//   - pattern: file pattern.
func (filter *RecentFilter) AddPattern(pattern string) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(pattern)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_filter_add_pattern(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(pattern)
}

// AddPixbufFormats adds a rule allowing image files in the formats supported by
// GdkPixbuf.
func (filter *RecentFilter) AddPixbufFormats() {
	var _arg0 *C.GtkRecentFilter // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_recent_filter_add_pixbuf_formats(_arg0)
	runtime.KeepAlive(filter)
}

// Filter tests whether a file should be displayed according to filter.
// The RecentFilterInfo filter_info should include the fields returned from
// gtk_recent_filter_get_needed(), and must set the RecentFilterInfo.contains
// field of filter_info to indicate which fields have been set.
//
// This function will not typically be used by applications; it is intended
// principally for use in the implementation of RecentChooser.
//
// The function takes the following parameters:
//
//   - filterInfo containing information about a recently used resource.
//
// The function returns the following values:
//
//   - ok: TRUE if the file should be displayed.
func (filter *RecentFilter) Filter(filterInfo *RecentFilterInfo) bool {
	var _arg0 *C.GtkRecentFilter     // out
	var _arg1 *C.GtkRecentFilterInfo // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.GtkRecentFilterInfo)(gextras.StructNative(unsafe.Pointer(filterInfo)))

	_cret = C.gtk_recent_filter_filter(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(filterInfo)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Name gets the human-readable name for the filter. See
// gtk_recent_filter_set_name().
//
// The function returns the following values:
//
//   - utf8 (optional): name of the filter, or NULL. The returned string is
//     owned by the filter object and should not be freed.
func (filter *RecentFilter) Name() string {
	var _arg0 *C.GtkRecentFilter // out
	var _cret *C.gchar           // in

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_recent_filter_get_name(_arg0)
	runtime.KeepAlive(filter)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Needed gets the fields that need to be filled in for the RecentFilterInfo
// passed to gtk_recent_filter_filter()
//
// This function will not typically be used by applications; it is intended
// principally for use in the implementation of RecentChooser.
//
// The function returns the following values:
//
//   - recentFilterFlags: bitfield of flags indicating needed fields when
//     calling gtk_recent_filter_filter().
func (filter *RecentFilter) Needed() RecentFilterFlags {
	var _arg0 *C.GtkRecentFilter     // out
	var _cret C.GtkRecentFilterFlags // in

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_recent_filter_get_needed(_arg0)
	runtime.KeepAlive(filter)

	var _recentFilterFlags RecentFilterFlags // out

	_recentFilterFlags = RecentFilterFlags(_cret)

	return _recentFilterFlags
}

// SetName sets the human-readable name of the filter; this is the string that
// will be displayed in the recently used resources selector user interface if
// there is a selectable list of filters.
//
// The function takes the following parameters:
//
//   - name: then human readable name of filter.
func (filter *RecentFilter) SetName(name string) {
	var _arg0 *C.GtkRecentFilter // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkRecentFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_filter_set_name(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(name)
}

// RecentManagerOverrides contains methods that are overridable.
type RecentManagerOverrides struct {
	Changed func()
}

func defaultRecentManagerOverrides(v *RecentManager) RecentManagerOverrides {
	return RecentManagerOverrides{
		Changed: v.changed,
	}
}

// RecentManager provides a facility for adding, removing and looking up
// recently used files. Each recently used file is identified by its URI,
// and has meta-data associated to it, like the names and command lines of the
// applications that have registered it, the number of time each application
// has registered the same file, the mime type of the file and whether the file
// should be displayed only by the applications that have registered it.
//
// The recently used files list is per user.
//
// The RecentManager acts like a database of all the recently used files.
// You can create new RecentManager objects, but it is more efficient to use the
// default manager created by GTK+.
//
// Adding a new recently used file is as simple as:
//
//	GtkRecentManager *manager;
//	GtkRecentInfo *info;
//	GError *error = NULL;
//
//	manager = gtk_recent_manager_get_default ();
//	info = gtk_recent_manager_lookup_item (manager, file_uri, &error);
//	if (error)
//	  {
//	    g_warning ("Could not find the file: s", error->message);
//	    g_error_free (error);
//	  }
//	else
//	 {
//	   // Use the info object
//	   gtk_recent_info_unref (info);
//	 }
//
// In order to retrieve the list of recently used files, you can use
// gtk_recent_manager_get_items(), which returns a list of RecentInfo-structs.
//
// A RecentManager is the model used to populate the contents of one, or more
// RecentChooser implementations.
//
// Note that the maximum age of the recently used files list is controllable
// through the Settings:gtk-recent-files-max-age property.
//
// Recently used files are supported since GTK+ 2.10.
type RecentManager struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*RecentManager)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RecentManager, *RecentManagerClass, RecentManagerOverrides](
		GTypeRecentManager,
		initRecentManagerClass,
		wrapRecentManager,
		defaultRecentManagerOverrides,
	)
}

func initRecentManagerClass(gclass unsafe.Pointer, overrides RecentManagerOverrides, classInitFunc func(*RecentManagerClass)) {
	pclass := (*C.GtkRecentManagerClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeRecentManager))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_RecentManagerClass_changed)
	}

	if classInitFunc != nil {
		class := (*RecentManagerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRecentManager(obj *coreglib.Object) *RecentManager {
	return &RecentManager{
		Object: obj,
	}
}

func marshalRecentManager(p uintptr) (interface{}, error) {
	return wrapRecentManager(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged is emitted when the current recently used resources manager
// changes its contents, either by calling gtk_recent_manager_add_item() or by
// another application.
func (manager *RecentManager) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "changed", false, unsafe.Pointer(C._gotk4_gtk3_RecentManager_ConnectChanged), f)
}

// NewRecentManager creates a new recent manager object. Recent manager objects
// are used to handle the list of recently used resources. A RecentManager
// object monitors the recently used resources list, and emits the “changed”
// signal each time something inside the list changes.
//
// RecentManager objects are expensive: be sure to create them only when needed.
// You should use gtk_recent_manager_get_default() instead.
//
// The function returns the following values:
//
//   - recentManager: newly created RecentManager object.
func NewRecentManager() *RecentManager {
	var _cret *C.GtkRecentManager // in

	_cret = C.gtk_recent_manager_new()

	var _recentManager *RecentManager // out

	_recentManager = wrapRecentManager(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _recentManager
}

// AddFull adds a new resource, pointed by uri, into the recently used resources
// list, using the metadata specified inside the RecentData-struct passed in
// recent_data.
//
// The passed URI will be used to identify this resource inside the list.
//
// In order to register the new recently used resource, metadata about the
// resource must be passed as well as the URI; the metadata is stored in a
// RecentData-struct, which must contain the MIME type of the resource pointed
// by the URI; the name of the application that is registering the item,
// and a command line to be used when launching the item.
//
// Optionally, a RecentData-struct might contain a UTF-8 string to be used
// when viewing the item instead of the last component of the URI; a short
// description of the item; whether the item should be considered private - that
// is, should be displayed only by the applications that have registered it.
//
// The function takes the following parameters:
//
//   - uri: valid URI.
//   - recentData: metadata of the resource.
//
// The function returns the following values:
//
//   - ok: TRUE if the new item was successfully added to the recently used
//     resources list, FALSE otherwise.
func (manager *RecentManager) AddFull(uri string, recentData *RecentData) bool {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _arg2 *C.GtkRecentData    // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkRecentData)(gextras.StructNative(unsafe.Pointer(recentData)))

	_cret = C.gtk_recent_manager_add_full(_arg0, _arg1, _arg2)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)
	runtime.KeepAlive(recentData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AddItem adds a new resource, pointed by uri, into the recently used resources
// list.
//
// This function automatically retrieves some of the needed metadata and
// setting other metadata to common default values; it then feeds the data to
// gtk_recent_manager_add_full().
//
// See gtk_recent_manager_add_full() if you want to explicitly define the
// metadata for the resource pointed by uri.
//
// The function takes the following parameters:
//
//   - uri: valid URI.
//
// The function returns the following values:
//
//   - ok: TRUE if the new item was successfully added to the recently used
//     resources list.
func (manager *RecentManager) AddItem(uri string) bool {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_recent_manager_add_item(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Items gets the list of recently used resources.
//
// The function returns the following values:
//
//   - list of newly allocated RecentInfo objects. Use gtk_recent_info_unref()
//     on each item inside the list, and then free the list itself using
//     g_list_free().
func (manager *RecentManager) Items() []*RecentInfo {
	var _arg0 *C.GtkRecentManager // out
	var _cret *C.GList            // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_recent_manager_get_items(_arg0)
	runtime.KeepAlive(manager)

	var _list []*RecentInfo // out

	_list = make([]*RecentInfo, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkRecentInfo)(v)
		var dst *RecentInfo // out
		dst = (*RecentInfo)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_recent_info_unref((*C.GtkRecentInfo)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _list
}

// HasItem checks whether there is a recently used resource registered with uri
// inside the recent manager.
//
// The function takes the following parameters:
//
//   - uri: URI.
//
// The function returns the following values:
//
//   - ok: TRUE if the resource was found, FALSE otherwise.
func (manager *RecentManager) HasItem(uri string) bool {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_recent_manager_has_item(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LookupItem searches for a URI inside the recently used resources list,
// and returns a RecentInfo-struct containing informations about the resource
// like its MIME type, or its display name.
//
// The function takes the following parameters:
//
//   - uri: URI.
//
// The function returns the following values:
//
//   - recentInfo (optional) containing information about the resource pointed
//     by uri, or NULL if the URI was not registered in the recently used
//     resources list. Free with gtk_recent_info_unref().
func (manager *RecentManager) LookupItem(uri string) (*RecentInfo, error) {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _cret *C.GtkRecentInfo    // in
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_recent_manager_lookup_item(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)

	var _recentInfo *RecentInfo // out
	var _goerr error            // out

	if _cret != nil {
		_recentInfo = (*RecentInfo)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_recentInfo)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_recent_info_unref((*C.GtkRecentInfo)(intern.C))
			},
		)
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _recentInfo, _goerr
}

// MoveItem changes the location of a recently used resource from uri to
// new_uri.
//
// Please note that this function will not affect the resource pointed by the
// URIs, but only the URI used in the recently used resources list.
//
// The function takes the following parameters:
//
//   - uri: URI of a recently used resource.
//   - newUri (optional): new URI of the recently used resource, or NULL to
//     remove the item pointed by uri in the list.
func (manager *RecentManager) MoveItem(uri, newUri string) error {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _arg2 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))
	if newUri != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(newUri)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_recent_manager_move_item(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)
	runtime.KeepAlive(newUri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// PurgeItems purges every item from the recently used resources list.
//
// The function returns the following values:
//
//   - gint: number of items that have been removed from the recently used
//     resources list.
func (manager *RecentManager) PurgeItems() (int, error) {
	var _arg0 *C.GtkRecentManager // out
	var _cret C.gint              // in
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_recent_manager_purge_items(_arg0, &_cerr)
	runtime.KeepAlive(manager)

	var _gint int    // out
	var _goerr error // out

	_gint = int(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _gint, _goerr
}

// RemoveItem removes a resource pointed by uri from the recently used resources
// list handled by a recent manager.
//
// The function takes the following parameters:
//
//   - uri: URI of the item you wish to remove.
func (manager *RecentManager) RemoveItem(uri string) error {
	var _arg0 *C.GtkRecentManager // out
	var _arg1 *C.gchar            // out
	var _cerr *C.GError           // in

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(uri)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_recent_manager_remove_item(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(uri)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

func (manager *RecentManager) changed() {
	gclass := (*C.GtkRecentManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.changed

	var _arg0 *C.GtkRecentManager // out

	_arg0 = (*C.GtkRecentManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	C._gotk4_gtk3_RecentManager_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(manager)
}

// RecentManagerGetDefault gets a unique instance of RecentManager, that you can
// share in your application without caring about memory management.
//
// The function returns the following values:
//
//   - recentManager: unique RecentManager. Do not ref or unref it.
func RecentManagerGetDefault() *RecentManager {
	var _cret *C.GtkRecentManager // in

	_cret = C.gtk_recent_manager_get_default()

	var _recentManager *RecentManager // out

	_recentManager = wrapRecentManager(coreglib.Take(unsafe.Pointer(_cret)))

	return _recentManager
}

// RendererCellAccessibleOverrides contains methods that are overridable.
type RendererCellAccessibleOverrides struct {
}

func defaultRendererCellAccessibleOverrides(v *RendererCellAccessible) RendererCellAccessibleOverrides {
	return RendererCellAccessibleOverrides{}
}

type RendererCellAccessible struct {
	_ [0]func() // equal guard
	CellAccessible
}

var (
	_ coreglib.Objector = (*RendererCellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*RendererCellAccessible, *RendererCellAccessibleClass, RendererCellAccessibleOverrides](
		GTypeRendererCellAccessible,
		initRendererCellAccessibleClass,
		wrapRendererCellAccessible,
		defaultRendererCellAccessibleOverrides,
	)
}

func initRendererCellAccessibleClass(gclass unsafe.Pointer, overrides RendererCellAccessibleOverrides, classInitFunc func(*RendererCellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*RendererCellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRendererCellAccessible(obj *coreglib.Object) *RendererCellAccessible {
	return &RendererCellAccessible{
		CellAccessible: CellAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			AtkObject: atk.AtkObject{
				Object: obj,
			},
			Component: atk.Component{
				Object: obj,
			},
			TableCell: atk.TableCell{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
		},
	}
}

func marshalRendererCellAccessible(p uintptr) (interface{}, error) {
	return wrapRendererCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func NewRendererCellAccessible(renderer CellRendererer) *RendererCellAccessible {
	var _arg1 *C.GtkCellRenderer // out
	var _cret *C.AtkObject       // in

	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(renderer).Native()))

	_cret = C.gtk_renderer_cell_accessible_new(_arg1)
	runtime.KeepAlive(renderer)

	var _rendererCellAccessible *RendererCellAccessible // out

	_rendererCellAccessible = wrapRendererCellAccessible(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _rendererCellAccessible
}

// RevealerOverrides contains methods that are overridable.
type RevealerOverrides struct {
}

func defaultRevealerOverrides(v *Revealer) RevealerOverrides {
	return RevealerOverrides{}
}

// Revealer widget is a container which animates the transition of its child
// from invisible to visible.
//
// The style of transition can be controlled with
// gtk_revealer_set_transition_type().
//
// These animations respect the Settings:gtk-enable-animations setting.
//
// # CSS nodes
//
// GtkRevealer has a single CSS node with name revealer.
//
// The GtkRevealer widget was added in GTK+ 3.10.
type Revealer struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Revealer)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Revealer, *RevealerClass, RevealerOverrides](
		GTypeRevealer,
		initRevealerClass,
		wrapRevealer,
		defaultRevealerOverrides,
	)
}

func initRevealerClass(gclass unsafe.Pointer, overrides RevealerOverrides, classInitFunc func(*RevealerClass)) {
	if classInitFunc != nil {
		class := (*RevealerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapRevealer(obj *coreglib.Object) *Revealer {
	return &Revealer{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalRevealer(p uintptr) (interface{}, error) {
	return wrapRevealer(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewRevealer creates a new Revealer.
//
// The function returns the following values:
//
//   - revealer: newly created Revealer.
func NewRevealer() *Revealer {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_revealer_new()

	var _revealer *Revealer // out

	_revealer = wrapRevealer(coreglib.Take(unsafe.Pointer(_cret)))

	return _revealer
}

// ChildRevealed returns whether the child is fully revealed, in other words
// whether the transition to the revealed state is completed.
//
// The function returns the following values:
//
//   - ok: TRUE if the child is fully revealed.
func (revealer *Revealer) ChildRevealed() bool {
	var _arg0 *C.GtkRevealer // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))

	_cret = C.gtk_revealer_get_child_revealed(_arg0)
	runtime.KeepAlive(revealer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RevealChild returns whether the child is currently revealed. See
// gtk_revealer_set_reveal_child().
//
// This function returns TRUE as soon as the transition is to the revealed state
// is started. To learn whether the child is fully revealed (ie the transition
// is completed), use gtk_revealer_get_child_revealed().
//
// The function returns the following values:
//
//   - ok: TRUE if the child is revealed.
func (revealer *Revealer) RevealChild() bool {
	var _arg0 *C.GtkRevealer // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))

	_cret = C.gtk_revealer_get_reveal_child(_arg0)
	runtime.KeepAlive(revealer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TransitionDuration returns the amount of time (in milliseconds) that
// transitions will take.
//
// The function returns the following values:
//
//   - guint: transition duration.
func (revealer *Revealer) TransitionDuration() uint {
	var _arg0 *C.GtkRevealer // out
	var _cret C.guint        // in

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))

	_cret = C.gtk_revealer_get_transition_duration(_arg0)
	runtime.KeepAlive(revealer)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// TransitionType gets the type of animation that will be used for transitions
// in revealer.
//
// The function returns the following values:
//
//   - revealerTransitionType: current transition type of revealer.
func (revealer *Revealer) TransitionType() RevealerTransitionType {
	var _arg0 *C.GtkRevealer              // out
	var _cret C.GtkRevealerTransitionType // in

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))

	_cret = C.gtk_revealer_get_transition_type(_arg0)
	runtime.KeepAlive(revealer)

	var _revealerTransitionType RevealerTransitionType // out

	_revealerTransitionType = RevealerTransitionType(_cret)

	return _revealerTransitionType
}

// SetRevealChild tells the Revealer to reveal or conceal its child.
//
// The transition will be animated with the current transition type of revealer.
//
// The function takes the following parameters:
//
//   - revealChild: TRUE to reveal the child.
func (revealer *Revealer) SetRevealChild(revealChild bool) {
	var _arg0 *C.GtkRevealer // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))
	if revealChild {
		_arg1 = C.TRUE
	}

	C.gtk_revealer_set_reveal_child(_arg0, _arg1)
	runtime.KeepAlive(revealer)
	runtime.KeepAlive(revealChild)
}

// SetTransitionDuration sets the duration that transitions will take.
//
// The function takes the following parameters:
//
//   - duration: new duration, in milliseconds.
func (revealer *Revealer) SetTransitionDuration(duration uint) {
	var _arg0 *C.GtkRevealer // out
	var _arg1 C.guint        // out

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))
	_arg1 = C.guint(duration)

	C.gtk_revealer_set_transition_duration(_arg0, _arg1)
	runtime.KeepAlive(revealer)
	runtime.KeepAlive(duration)
}

// SetTransitionType sets the type of animation that will be used for
// transitions in revealer. Available types include various kinds of fades and
// slides.
//
// The function takes the following parameters:
//
//   - transition: new transition type.
func (revealer *Revealer) SetTransitionType(transition RevealerTransitionType) {
	var _arg0 *C.GtkRevealer              // out
	var _arg1 C.GtkRevealerTransitionType // out

	_arg0 = (*C.GtkRevealer)(unsafe.Pointer(coreglib.InternObject(revealer).Native()))
	_arg1 = C.GtkRevealerTransitionType(transition)

	C.gtk_revealer_set_transition_type(_arg0, _arg1)
	runtime.KeepAlive(revealer)
	runtime.KeepAlive(transition)
}

// ScaleOverrides contains methods that are overridable.
type ScaleOverrides struct {
	DrawValue   func()
	FormatValue func(value float64) string
	// LayoutOffsets obtains the coordinates where the scale will draw the
	// Layout representing the text in the scale. Remember when using the Layout
	// function you need to convert to and from pixels using PANGO_PIXELS() or
	// NGO_SCALE.
	//
	// If the Scale:draw-value property is FALSE, the return values are
	// undefined.
	//
	// The function returns the following values:
	//
	//   - x (optional): location to store X offset of layout, or NULL.
	//   - y (optional): location to store Y offset of layout, or NULL.
	LayoutOffsets func() (x, y int)
}

func defaultScaleOverrides(v *Scale) ScaleOverrides {
	return ScaleOverrides{
		DrawValue:     v.drawValue,
		FormatValue:   v.formatValue,
		LayoutOffsets: v.layoutOffsets,
	}
}

// Scale is a slider control used to select a numeric value. To use it,
// you’ll probably want to investigate the methods on its base class, Range,
// in addition to the methods for GtkScale itself. To set the value of a scale,
// you would normally use gtk_range_set_value(). To detect changes to the value,
// you would normally use the Range::value-changed signal.
//
// Note that using the same upper and lower bounds for the Scale (through the
// Range methods) will hide the slider itself. This is useful for applications
// that want to show an undeterminate value on the scale, without changing the
// layout of the application (such as movie or music players).
//
// # GtkScale as GtkBuildable
//
// GtkScale supports a custom <marks> element, which can contain multiple
// <mark> elements. The “value” and “position” attributes have the same meaning
// as gtk_scale_add_mark() parameters of the same name. If the element is not
// empty, its content is taken as the markup to show at the mark. It can be
// translated with the usual ”translatable” and “context” attributes.
//
// CSS nodes
//
//	scale[.fine-tune][.marks-before][.marks-after]
//	├── marks.top
//	│   ├── mark
//	│   ┊    ├── [label]
//	│   ┊    ╰── indicator
//	┊   ┊
//	│   ╰── mark
//	├── [value]
//	├── contents
//	│   ╰── trough
//	│       ├── slider
//	│       ├── [highlight]
//	│       ╰── [fill]
//	╰── marks.bottom
//	    ├── mark
//	    ┊    ├── indicator
//	    ┊    ╰── [label]
//	    ╰── mark
//
// GtkScale has a main CSS node with name scale and a subnode for its contents,
// with subnodes named trough and slider.
//
// The main node gets the style class .fine-tune added when the scale is in
// 'fine-tuning' mode.
//
// If the scale has an origin (see gtk_scale_set_has_origin()), there is a
// subnode with name highlight below the trough node that is used for rendering
// the highlighted part of the trough.
//
// If the scale is showing a fill level (see gtk_range_set_show_fill_level()),
// there is a subnode with name fill below the trough node that is used for
// rendering the filled in part of the trough.
//
// If marks are present, there is a marks subnode before or after the contents
// node, below which each mark gets a node with name mark. The marks nodes get
// either the .top or .bottom style class.
//
// The mark node has a subnode named indicator. If the mark has text, it also
// has a subnode named label. When the mark is either above or left of the
// scale, the label subnode is the first when present. Otherwise, the indicator
// subnode is the first.
//
// The main CSS node gets the 'marks-before' and/or 'marks-after' style classes
// added depending on what marks are present.
//
// If the scale is displaying the value (see Scale:draw-value), there is subnode
// with name value.
type Scale struct {
	_ [0]func() // equal guard
	Range
}

var (
	_ Ranger = (*Scale)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Scale, *ScaleClass, ScaleOverrides](
		GTypeScale,
		initScaleClass,
		wrapScale,
		defaultScaleOverrides,
	)
}

func initScaleClass(gclass unsafe.Pointer, overrides ScaleOverrides, classInitFunc func(*ScaleClass)) {
	pclass := (*C.GtkScaleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeScale))))

	if overrides.DrawValue != nil {
		pclass.draw_value = (*[0]byte)(C._gotk4_gtk3_ScaleClass_draw_value)
	}

	if overrides.FormatValue != nil {
		pclass.format_value = (*[0]byte)(C._gotk4_gtk3_ScaleClass_format_value)
	}

	if overrides.LayoutOffsets != nil {
		pclass.get_layout_offsets = (*[0]byte)(C._gotk4_gtk3_ScaleClass_get_layout_offsets)
	}

	if classInitFunc != nil {
		class := (*ScaleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScale(obj *coreglib.Object) *Scale {
	return &Scale{
		Range: Range{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalScale(p uintptr) (interface{}, error) {
	return wrapScale(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectFormatValue: signal which allows you to change how the scale value
// is displayed. Connect a signal handler which returns an allocated string
// representing value. That string will then be used to display the scale's
// value.
//
// If no user-provided handlers are installed, the value will be displayed on
// its own, rounded according to the value of the Scale:digits property.
//
// Here's an example signal handler which displays a value 1.0 as with
// "-->1.0<--".
//
//	static gchar*
//	format_value_callback (GtkScale *scale,
//	                       gdouble   value)
//	{
//	  return g_strdup_printf ("-->\0.*g<--",
//	                          gtk_scale_get_digits (scale), value);
//	 }.
func (scale *Scale) ConnectFormatValue(f func(value float64) (utf8 string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scale, "format-value", false, unsafe.Pointer(C._gotk4_gtk3_Scale_ConnectFormatValue), f)
}

// NewScale creates a new Scale.
//
// The function takes the following parameters:
//
//   - orientation scale’s orientation.
//   - adjustment (optional) which sets the range of the scale, or NULL to
//     create a new adjustment.
//
// The function returns the following values:
//
//   - scale: new Scale.
func NewScale(orientation Orientation, adjustment *Adjustment) *Scale {
	var _arg1 C.GtkOrientation // out
	var _arg2 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)
	if adjustment != nil {
		_arg2 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	_cret = C.gtk_scale_new(_arg1, _arg2)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(adjustment)

	var _scale *Scale // out

	_scale = wrapScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _scale
}

// NewScaleWithRange creates a new scale widget with the given orientation that
// lets the user input a number between min and max (including min and max) with
// the increment step. step must be nonzero; it’s the distance the slider moves
// when using the arrow keys to adjust the scale value.
//
// Note that the way in which the precision is derived works best if step is
// a power of ten. If the resulting precision is not suitable for your needs,
// use gtk_scale_set_digits() to correct it.
//
// The function takes the following parameters:
//
//   - orientation scale’s orientation.
//   - min: minimum value.
//   - max: maximum value.
//   - step increment (tick size) used with keyboard shortcuts.
//
// The function returns the following values:
//
//   - scale: new Scale.
func NewScaleWithRange(orientation Orientation, min, max, step float64) *Scale {
	var _arg1 C.GtkOrientation // out
	var _arg2 C.gdouble        // out
	var _arg3 C.gdouble        // out
	var _arg4 C.gdouble        // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)
	_arg2 = C.gdouble(min)
	_arg3 = C.gdouble(max)
	_arg4 = C.gdouble(step)

	_cret = C.gtk_scale_new_with_range(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
	runtime.KeepAlive(step)

	var _scale *Scale // out

	_scale = wrapScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _scale
}

// AddMark adds a mark at value.
//
// A mark is indicated visually by drawing a tick mark next to the scale,
// and GTK+ makes it easy for the user to position the scale exactly at the
// marks value.
//
// If markup is not NULL, text is shown next to the tick mark.
//
// To remove marks from a scale, use gtk_scale_clear_marks().
//
// The function takes the following parameters:
//
//   - value at which the mark is placed, must be between the lower and upper
//     limits of the scales’ adjustment.
//   - position: where to draw the mark. For a horizontal scale, K_POS_TOP
//     and GTK_POS_LEFT are drawn above the scale, anything else below. For a
//     vertical scale, K_POS_LEFT and GTK_POS_TOP are drawn to the left of the
//     scale, anything else to the right.
//   - markup (optional): text to be shown at the mark, using [Pango
//     markup][PangoMarkupFormat], or NULL.
func (scale *Scale) AddMark(value float64, position PositionType, markup string) {
	var _arg0 *C.GtkScale       // out
	var _arg1 C.gdouble         // out
	var _arg2 C.GtkPositionType // out
	var _arg3 *C.gchar          // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	_arg1 = C.gdouble(value)
	_arg2 = C.GtkPositionType(position)
	if markup != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	C.gtk_scale_add_mark(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(value)
	runtime.KeepAlive(position)
	runtime.KeepAlive(markup)
}

// ClearMarks removes any marks that have been added with gtk_scale_add_mark().
func (scale *Scale) ClearMarks() {
	var _arg0 *C.GtkScale // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	C.gtk_scale_clear_marks(_arg0)
	runtime.KeepAlive(scale)
}

// Digits gets the number of decimal places that are displayed in the value.
//
// The function returns the following values:
//
//   - gint: number of decimal places that are displayed.
func (scale *Scale) Digits() int {
	var _arg0 *C.GtkScale // out
	var _cret C.gint      // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	_cret = C.gtk_scale_get_digits(_arg0)
	runtime.KeepAlive(scale)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// DrawValue returns whether the current value is displayed as a string next to
// the slider.
//
// The function returns the following values:
//
//   - ok: whether the current value is displayed as a string.
func (scale *Scale) DrawValue() bool {
	var _arg0 *C.GtkScale // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	_cret = C.gtk_scale_get_draw_value(_arg0)
	runtime.KeepAlive(scale)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasOrigin returns whether the scale has an origin.
//
// The function returns the following values:
//
//   - ok: TRUE if the scale has an origin.
func (scale *Scale) HasOrigin() bool {
	var _arg0 *C.GtkScale // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	_cret = C.gtk_scale_get_has_origin(_arg0)
	runtime.KeepAlive(scale)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Layout gets the Layout used to display the scale. The returned object is
// owned by the scale so does not need to be freed by the caller.
//
// The function returns the following values:
//
//   - layout (optional) for this scale, or NULL if the Scale:draw-value
//     property is FALSE.
func (scale *Scale) Layout() *pango.Layout {
	var _arg0 *C.GtkScale    // out
	var _cret *C.PangoLayout // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	_cret = C.gtk_scale_get_layout(_arg0)
	runtime.KeepAlive(scale)

	var _layout *pango.Layout // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_layout = &pango.Layout{
				Object: obj,
			}
		}
	}

	return _layout
}

// LayoutOffsets obtains the coordinates where the scale will draw the Layout
// representing the text in the scale. Remember when using the Layout function
// you need to convert to and from pixels using PANGO_PIXELS() or NGO_SCALE.
//
// If the Scale:draw-value property is FALSE, the return values are undefined.
//
// The function returns the following values:
//
//   - x (optional): location to store X offset of layout, or NULL.
//   - y (optional): location to store Y offset of layout, or NULL.
func (scale *Scale) LayoutOffsets() (x, y int) {
	var _arg0 *C.GtkScale // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	C.gtk_scale_get_layout_offsets(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(scale)

	var _x int // out
	var _y int // out

	_x = int(_arg1)
	_y = int(_arg2)

	return _x, _y
}

// ValuePos gets the position in which the current value is displayed.
//
// The function returns the following values:
//
//   - positionType: position in which the current value is displayed.
func (scale *Scale) ValuePos() PositionType {
	var _arg0 *C.GtkScale       // out
	var _cret C.GtkPositionType // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	_cret = C.gtk_scale_get_value_pos(_arg0)
	runtime.KeepAlive(scale)

	var _positionType PositionType // out

	_positionType = PositionType(_cret)

	return _positionType
}

// SetDigits sets the number of decimal places that are displayed in the value.
// Also causes the value of the adjustment to be rounded to this number of
// digits, so the retrieved value matches the displayed one, if Scale:draw-value
// is TRUE when the value changes. If you want to enforce rounding the value
// when Scale:draw-value is FALSE, you can set Range:round-digits instead.
//
// Note that rounding to a small number of digits can interfere with the smooth
// autoscrolling that is built into Scale. As an alternative, you can use the
// Scale::format-value signal to format the displayed value yourself.
//
// The function takes the following parameters:
//
//   - digits: number of decimal places to display, e.g. use 1 to display 1.0,
//     2 to display 1.00, etc.
func (scale *Scale) SetDigits(digits int) {
	var _arg0 *C.GtkScale // out
	var _arg1 C.gint      // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	_arg1 = C.gint(digits)

	C.gtk_scale_set_digits(_arg0, _arg1)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(digits)
}

// SetDrawValue specifies whether the current value is displayed as a string
// next to the slider.
//
// The function takes the following parameters:
//
//   - drawValue: TRUE to draw the value.
func (scale *Scale) SetDrawValue(drawValue bool) {
	var _arg0 *C.GtkScale // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	if drawValue {
		_arg1 = C.TRUE
	}

	C.gtk_scale_set_draw_value(_arg0, _arg1)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(drawValue)
}

// SetHasOrigin: if Scale:has-origin is set to TRUE (the default), the scale
// will highlight the part of the trough between the origin (bottom or left
// side) and the current value.
//
// The function takes the following parameters:
//
//   - hasOrigin: TRUE if the scale has an origin.
func (scale *Scale) SetHasOrigin(hasOrigin bool) {
	var _arg0 *C.GtkScale // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	if hasOrigin {
		_arg1 = C.TRUE
	}

	C.gtk_scale_set_has_origin(_arg0, _arg1)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(hasOrigin)
}

// SetValuePos sets the position in which the current value is displayed.
//
// The function takes the following parameters:
//
//   - pos: position in which the current value is displayed.
func (scale *Scale) SetValuePos(pos PositionType) {
	var _arg0 *C.GtkScale       // out
	var _arg1 C.GtkPositionType // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	_arg1 = C.GtkPositionType(pos)

	C.gtk_scale_set_value_pos(_arg0, _arg1)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(pos)
}

func (scale *Scale) drawValue() {
	gclass := (*C.GtkScaleClass)(coreglib.PeekParentClass(scale))
	fnarg := gclass.draw_value

	var _arg0 *C.GtkScale // out

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	C._gotk4_gtk3_Scale_virtual_draw_value(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(scale)
}

func (scale *Scale) formatValue(value float64) string {
	gclass := (*C.GtkScaleClass)(coreglib.PeekParentClass(scale))
	fnarg := gclass.format_value

	var _arg0 *C.GtkScale // out
	var _arg1 C.gdouble   // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))
	_arg1 = C.gdouble(value)

	_cret = C._gotk4_gtk3_Scale_virtual_format_value(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(value)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// layoutOffsets obtains the coordinates where the scale will draw the Layout
// representing the text in the scale. Remember when using the Layout function
// you need to convert to and from pixels using PANGO_PIXELS() or NGO_SCALE.
//
// If the Scale:draw-value property is FALSE, the return values are undefined.
//
// The function returns the following values:
//
//   - x (optional): location to store X offset of layout, or NULL.
//   - y (optional): location to store Y offset of layout, or NULL.
func (scale *Scale) layoutOffsets() (x, y int) {
	gclass := (*C.GtkScaleClass)(coreglib.PeekParentClass(scale))
	fnarg := gclass.get_layout_offsets

	var _arg0 *C.GtkScale // out
	var _arg1 C.gint      // in
	var _arg2 C.gint      // in

	_arg0 = (*C.GtkScale)(unsafe.Pointer(coreglib.InternObject(scale).Native()))

	C._gotk4_gtk3_Scale_virtual_get_layout_offsets(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(scale)

	var _x int // out
	var _y int // out

	_x = int(_arg1)
	_y = int(_arg2)

	return _x, _y
}

// ScaleAccessibleOverrides contains methods that are overridable.
type ScaleAccessibleOverrides struct {
}

func defaultScaleAccessibleOverrides(v *ScaleAccessible) ScaleAccessibleOverrides {
	return ScaleAccessibleOverrides{}
}

type ScaleAccessible struct {
	_ [0]func() // equal guard
	RangeAccessible
}

var (
	_ coreglib.Objector = (*ScaleAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ScaleAccessible, *ScaleAccessibleClass, ScaleAccessibleOverrides](
		GTypeScaleAccessible,
		initScaleAccessibleClass,
		wrapScaleAccessible,
		defaultScaleAccessibleOverrides,
	)
}

func initScaleAccessibleClass(gclass unsafe.Pointer, overrides ScaleAccessibleOverrides, classInitFunc func(*ScaleAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ScaleAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScaleAccessible(obj *coreglib.Object) *ScaleAccessible {
	return &ScaleAccessible{
		RangeAccessible: RangeAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
			Value: atk.Value{
				Object: obj,
			},
		},
	}
}

func marshalScaleAccessible(p uintptr) (interface{}, error) {
	return wrapScaleAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ScaleButtonOverrides contains methods that are overridable.
type ScaleButtonOverrides struct {
	ValueChanged func(value float64)
}

func defaultScaleButtonOverrides(v *ScaleButton) ScaleButtonOverrides {
	return ScaleButtonOverrides{
		ValueChanged: v.valueChanged,
	}
}

// ScaleButton provides a button which pops up a scale widget. This kind of
// widget is commonly used for volume controls in multimedia applications,
// and GTK+ provides a VolumeButton subclass that is tailored for this use case.
//
// # CSS nodes
//
// GtkScaleButton has a single CSS node with name button. To differentiate it
// from a plain Button, it gets the .scale style class.
//
// The popup widget that contains the scale has a .scale-popup style class.
type ScaleButton struct {
	_ [0]func() // equal guard
	Button

	*coreglib.Object
	Orientable
}

var (
	_ coreglib.Objector = (*ScaleButton)(nil)
	_ Binner            = (*ScaleButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ScaleButton, *ScaleButtonClass, ScaleButtonOverrides](
		GTypeScaleButton,
		initScaleButtonClass,
		wrapScaleButton,
		defaultScaleButtonOverrides,
	)
}

func initScaleButtonClass(gclass unsafe.Pointer, overrides ScaleButtonOverrides, classInitFunc func(*ScaleButtonClass)) {
	pclass := (*C.GtkScaleButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeScaleButton))))

	if overrides.ValueChanged != nil {
		pclass.value_changed = (*[0]byte)(C._gotk4_gtk3_ScaleButtonClass_value_changed)
	}

	if classInitFunc != nil {
		class := (*ScaleButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScaleButton(obj *coreglib.Object) *ScaleButton {
	return &ScaleButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalScaleButton(p uintptr) (interface{}, error) {
	return wrapScaleButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectPopdown signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to popdown the scale widget.
//
// The default binding for this signal is Escape.
func (button *ScaleButton) ConnectPopdown(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "popdown", false, unsafe.Pointer(C._gotk4_gtk3_ScaleButton_ConnectPopdown), f)
}

// ConnectPopup signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to popup the scale widget.
//
// The default bindings for this signal are Space, Enter and Return.
func (button *ScaleButton) ConnectPopup(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "popup", false, unsafe.Pointer(C._gotk4_gtk3_ScaleButton_ConnectPopup), f)
}

// ConnectValueChanged signal is emitted when the value field has changed.
func (button *ScaleButton) ConnectValueChanged(f func(value float64)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "value-changed", false, unsafe.Pointer(C._gotk4_gtk3_ScaleButton_ConnectValueChanged), f)
}

// NewScaleButton creates a ScaleButton, with a range between min and max,
// with a stepping of step.
//
// The function takes the following parameters:
//
//   - size: stock icon size (IconSize).
//   - min: minimum value of the scale (usually 0).
//   - max: maximum value of the scale (usually 100).
//   - step: stepping of value when a scroll-wheel event, or up/down arrow event
//     occurs (usually 2).
//   - icons (optional): NULL-terminated array of icon names, or NULL if you
//     want to set the list later with gtk_scale_button_set_icons().
//
// The function returns the following values:
//
//   - scaleButton: new ScaleButton.
func NewScaleButton(size int, min, max, step float64, icons []string) *ScaleButton {
	var _arg1 C.GtkIconSize // out
	var _arg2 C.gdouble     // out
	var _arg3 C.gdouble     // out
	var _arg4 C.gdouble     // out
	var _arg5 **C.gchar     // out
	var _cret *C.GtkWidget  // in

	_arg1 = C.GtkIconSize(size)
	_arg2 = C.gdouble(min)
	_arg3 = C.gdouble(max)
	_arg4 = C.gdouble(step)
	{
		_arg5 = (**C.gchar)(C.calloc(C.size_t((len(icons) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg5))
		{
			out := unsafe.Slice(_arg5, len(icons)+1)
			var zero *C.gchar
			out[len(icons)] = zero
			for i := range icons {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(icons[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	_cret = C.gtk_scale_button_new(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(size)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
	runtime.KeepAlive(step)
	runtime.KeepAlive(icons)

	var _scaleButton *ScaleButton // out

	_scaleButton = wrapScaleButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _scaleButton
}

// Adjustment gets the Adjustment associated with the ScaleButton’s scale.
// See gtk_range_get_adjustment() for details.
//
// The function returns the following values:
//
//   - adjustment associated with the scale.
func (button *ScaleButton) Adjustment() *Adjustment {
	var _arg0 *C.GtkScaleButton // out
	var _cret *C.GtkAdjustment  // in

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_scale_button_get_adjustment(_arg0)
	runtime.KeepAlive(button)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// MinusButton retrieves the minus button of the ScaleButton.
//
// The function returns the following values:
//
//   - ret minus button of the ScaleButton as a Button.
func (button *ScaleButton) MinusButton() *Button {
	var _arg0 *C.GtkScaleButton // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_scale_button_get_minus_button(_arg0)
	runtime.KeepAlive(button)

	var _ret *Button // out

	_ret = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _ret
}

// PlusButton retrieves the plus button of the ScaleButton.
//
// The function returns the following values:
//
//   - ret plus button of the ScaleButton as a Button.
func (button *ScaleButton) PlusButton() *Button {
	var _arg0 *C.GtkScaleButton // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_scale_button_get_plus_button(_arg0)
	runtime.KeepAlive(button)

	var _ret *Button // out

	_ret = wrapButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _ret
}

// Popup retrieves the popup of the ScaleButton.
//
// The function returns the following values:
//
//   - widget: popup of the ScaleButton.
func (button *ScaleButton) Popup() Widgetter {
	var _arg0 *C.GtkScaleButton // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_scale_button_get_popup(_arg0)
	runtime.KeepAlive(button)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// Value gets the current value of the scale button.
//
// The function returns the following values:
//
//   - gdouble: current value of the scale button.
func (button *ScaleButton) Value() float64 {
	var _arg0 *C.GtkScaleButton // out
	var _cret C.gdouble         // in

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_scale_button_get_value(_arg0)
	runtime.KeepAlive(button)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// SetAdjustment sets the Adjustment to be used as a model for the ScaleButton’s
// scale. See gtk_range_set_adjustment() for details.
//
// The function takes the following parameters:
//
//   - adjustment: Adjustment.
func (button *ScaleButton) SetAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkScaleButton // out
	var _arg1 *C.GtkAdjustment  // out

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_scale_button_set_adjustment(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(adjustment)
}

// SetIcons sets the icons to be used by the scale button. For details, see the
// ScaleButton:icons property.
//
// The function takes the following parameters:
//
//   - icons: NULL-terminated array of icon names.
func (button *ScaleButton) SetIcons(icons []string) {
	var _arg0 *C.GtkScaleButton // out
	var _arg1 **C.gchar         // out

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(icons) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(icons)+1)
			var zero *C.gchar
			out[len(icons)] = zero
			for i := range icons {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(icons[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	C.gtk_scale_button_set_icons(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(icons)
}

// SetValue sets the current value of the scale; if the value is outside the
// minimum or maximum range values, it will be clamped to fit inside them.
// The scale button emits the ScaleButton::value-changed signal if the value
// changes.
//
// The function takes the following parameters:
//
//   - value: new value of the scale button.
func (button *ScaleButton) SetValue(value float64) {
	var _arg0 *C.GtkScaleButton // out
	var _arg1 C.gdouble         // out

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_scale_button_set_value(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(value)
}

func (button *ScaleButton) valueChanged(value float64) {
	gclass := (*C.GtkScaleButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.value_changed

	var _arg0 *C.GtkScaleButton // out
	var _arg1 C.gdouble         // out

	_arg0 = (*C.GtkScaleButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	_arg1 = C.gdouble(value)

	C._gotk4_gtk3_ScaleButton_virtual_value_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(value)
}

// ScaleButtonAccessibleOverrides contains methods that are overridable.
type ScaleButtonAccessibleOverrides struct {
}

func defaultScaleButtonAccessibleOverrides(v *ScaleButtonAccessible) ScaleButtonAccessibleOverrides {
	return ScaleButtonAccessibleOverrides{}
}

type ScaleButtonAccessible struct {
	_ [0]func() // equal guard
	ButtonAccessible

	*coreglib.Object
	atk.Value
}

var (
	_ coreglib.Objector = (*ScaleButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ScaleButtonAccessible, *ScaleButtonAccessibleClass, ScaleButtonAccessibleOverrides](
		GTypeScaleButtonAccessible,
		initScaleButtonAccessibleClass,
		wrapScaleButtonAccessible,
		defaultScaleButtonAccessibleOverrides,
	)
}

func initScaleButtonAccessibleClass(gclass unsafe.Pointer, overrides ScaleButtonAccessibleOverrides, classInitFunc func(*ScaleButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ScaleButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScaleButtonAccessible(obj *coreglib.Object) *ScaleButtonAccessible {
	return &ScaleButtonAccessible{
		ButtonAccessible: ButtonAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			Image: atk.Image{
				Object: obj,
			},
		},
		Object: obj,
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalScaleButtonAccessible(p uintptr) (interface{}, error) {
	return wrapScaleButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ScrollbarOverrides contains methods that are overridable.
type ScrollbarOverrides struct {
}

func defaultScrollbarOverrides(v *Scrollbar) ScrollbarOverrides {
	return ScrollbarOverrides{}
}

// Scrollbar widget is a horizontal or vertical scrollbar, depending on the
// value of the Orientable:orientation property.
//
// Its position and movement are controlled by the adjustment that is passed
// to or created by gtk_scrollbar_new(). See Adjustment for more details.
// The Adjustment:value field sets the position of the thumb and must be
// between Adjustment:lower and Adjustment:upper - Adjustment:page-size.
// The Adjustment:page-size represents the size of the visible scrollable area.
// The fields Adjustment:step-increment and Adjustment:page-increment fields
// are added to or subtracted from the Adjustment:value when the user asks to
// move by a step (using e.g. the cursor arrow keys or, if present, the stepper
// buttons) or by a page (using e.g. the Page Down/Up keys).
//
// CSS nodes
//
//	scrollbar[.fine-tune]
//	╰── contents
//	    ├── [button.up]
//	    ├── [button.down]
//	    ├── trough
//	    │   ╰── slider
//	    ├── [button.up]
//	    ╰── [button.down]
//
// GtkScrollbar has a main CSS node with name scrollbar and a subnode for its
// contents, with subnodes named trough and slider.
//
// The main node gets the style class .fine-tune added when the scrollbar is in
// 'fine-tuning' mode.
//
// If steppers are enabled, they are represented by up to four additional
// subnodes with name button. These get the style classes .up and .down to
// indicate in which direction they are moving.
//
// Other style classes that may be added to scrollbars inside ScrolledWindow
// include the positional classes (.left, .right, .top, .bottom) and style
// classes related to overlay scrolling (.overlay-indicator, .dragging,
// .hovering).
type Scrollbar struct {
	_ [0]func() // equal guard
	Range
}

var (
	_ Ranger = (*Scrollbar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Scrollbar, *ScrollbarClass, ScrollbarOverrides](
		GTypeScrollbar,
		initScrollbarClass,
		wrapScrollbar,
		defaultScrollbarOverrides,
	)
}

func initScrollbarClass(gclass unsafe.Pointer, overrides ScrollbarOverrides, classInitFunc func(*ScrollbarClass)) {
	if classInitFunc != nil {
		class := (*ScrollbarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScrollbar(obj *coreglib.Object) *Scrollbar {
	return &Scrollbar{
		Range: Range{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalScrollbar(p uintptr) (interface{}, error) {
	return wrapScrollbar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewScrollbar creates a new scrollbar with the given orientation.
//
// The function takes the following parameters:
//
//   - orientation scrollbar’s orientation.
//   - adjustment (optional) to use, or NULL to create a new adjustment.
//
// The function returns the following values:
//
//   - scrollbar: new Scrollbar.
func NewScrollbar(orientation Orientation, adjustment *Adjustment) *Scrollbar {
	var _arg1 C.GtkOrientation // out
	var _arg2 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)
	if adjustment != nil {
		_arg2 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	_cret = C.gtk_scrollbar_new(_arg1, _arg2)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(adjustment)

	var _scrollbar *Scrollbar // out

	_scrollbar = wrapScrollbar(coreglib.Take(unsafe.Pointer(_cret)))

	return _scrollbar
}

// ScrolledWindowOverrides contains methods that are overridable.
type ScrolledWindowOverrides struct {
	// MoveFocusOut: keybinding signal which gets emitted when focus is moved
	// away from the scrolled window by a keybinding.
	MoveFocusOut func(direction DirectionType)
	// ScrollChild: keybinding signal which gets emitted when a keybinding that
	// scrolls is pressed.
	//
	// The function takes the following parameters:
	//
	//   - scroll
	//   - horizontal
	ScrollChild func(scroll ScrollType, horizontal bool) bool
}

func defaultScrolledWindowOverrides(v *ScrolledWindow) ScrolledWindowOverrides {
	return ScrolledWindowOverrides{
		MoveFocusOut: v.moveFocusOut,
		ScrollChild:  v.scrollChild,
	}
}

// ScrolledWindow is a container that accepts a single child widget and makes
// that child scrollable using either internally added scrollbars or externally
// associated adjustments.
//
// Widgets with native scrolling support, i.e. those whose classes implement
// the Scrollable interface, are added directly. For other types of widget,
// the class Viewport acts as an adaptor, giving scrollability to other widgets.
// GtkScrolledWindow’s implementation of gtk_container_add() intelligently
// accounts for whether or not the added child is a Scrollable. If it isn’t,
// ScrolledWindow wraps the child in a Viewport and adds that for you.
// Therefore, you can just add any child widget and not worry about the details.
//
// If gtk_container_add() has added a Viewport for you, you can remove both
// your added child widget from the Viewport, and the Viewport from the
// GtkScrolledWindow, like this:
//
//	GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
//	GtkWidget *child_widget = gtk_button_new ();
//
//	// GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
//	// add a GtkViewport.
//	gtk_container_add (GTK_CONTAINER (scrolled_window),
//	                   child_widget);
//
//	// Either of these will result in child_widget being unparented:
//	gtk_container_remove (GTK_CONTAINER (scrolled_window),
//	                      child_widget);
//	// or
//	gtk_container_remove (GTK_CONTAINER (scrolled_window),
//	                      gtk_bin_get_child (GTK_BIN (scrolled_window)));
//
// Unless ScrolledWindow:policy is GTK_POLICY_NEVER or GTK_POLICY_EXTERNAL,
// GtkScrolledWindow adds internal Scrollbar widgets around its child. The
// scroll position of the child, and if applicable the scrollbars, is controlled
// by the ScrolledWindow:hadjustment and ScrolledWindow:vadjustment that are
// associated with the GtkScrolledWindow. See the docs on Scrollbar for the
// details, but note that the “step_increment” and “page_increment” fields are
// only effective if the policy causes scrollbars to be present.
//
// If a GtkScrolledWindow doesn’t behave quite as you would like, or doesn’t
// have exactly the right layout, it’s very possible to set up your own
// scrolling with Scrollbar and for example a Grid.
//
// # Touch support
//
// GtkScrolledWindow has built-in support for touch devices. When a touchscreen
// is used, swiping will move the scrolled window, and will expose 'kinetic'
// behavior. This can be turned off with the ScrolledWindow:kinetic-scrolling
// property if it is undesired.
//
// GtkScrolledWindow also displays visual 'overshoot' indication when the
// content is pulled beyond the end, and this situation can be captured with the
// ScrolledWindow::edge-overshot signal.
//
// If no mouse device is present, the scrollbars will overlayed as narrow,
// auto-hiding indicators over the content. If traditional scrollbars are
// desired although no mouse is present, this behaviour can be turned off with
// the ScrolledWindow:overlay-scrolling property.
//
// # CSS nodes
//
// GtkScrolledWindow has a main CSS node with name scrolledwindow.
//
// It uses subnodes with names overshoot and undershoot to draw the overflow
// and underflow indications. These nodes get the .left, .right, .top or .bottom
// style class added depending on where the indication is drawn.
//
// GtkScrolledWindow also sets the positional style classes (.left,
// .right, .top, .bottom) and style classes related to overlay scrolling
// (.overlay-indicator, .dragging, .hovering) on its scrollbars.
//
// If both scrollbars are visible, the area where they meet is drawn with a
// subnode named junction.
type ScrolledWindow struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*ScrolledWindow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ScrolledWindow, *ScrolledWindowClass, ScrolledWindowOverrides](
		GTypeScrolledWindow,
		initScrolledWindowClass,
		wrapScrolledWindow,
		defaultScrolledWindowOverrides,
	)
}

func initScrolledWindowClass(gclass unsafe.Pointer, overrides ScrolledWindowOverrides, classInitFunc func(*ScrolledWindowClass)) {
	pclass := (*C.GtkScrolledWindowClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeScrolledWindow))))

	if overrides.MoveFocusOut != nil {
		pclass.move_focus_out = (*[0]byte)(C._gotk4_gtk3_ScrolledWindowClass_move_focus_out)
	}

	if overrides.ScrollChild != nil {
		pclass.scroll_child = (*[0]byte)(C._gotk4_gtk3_ScrolledWindowClass_scroll_child)
	}

	if classInitFunc != nil {
		class := (*ScrolledWindowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScrolledWindow(obj *coreglib.Object) *ScrolledWindow {
	return &ScrolledWindow{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalScrolledWindow(p uintptr) (interface{}, error) {
	return wrapScrolledWindow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEdgeOvershot signal is emitted whenever user initiated scrolling makes
// the scrolled window firmly surpass (i.e. with some edge resistance) the lower
// or upper limits defined by the adjustment in that orientation.
//
// A similar behavior without edge resistance is provided by the
// ScrolledWindow::edge-reached signal.
//
// Note: The pos argument is LTR/RTL aware, so callers should be aware too if
// intending to provide behavior on horizontal edges.
func (scrolledWindow *ScrolledWindow) ConnectEdgeOvershot(f func(pos PositionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scrolledWindow, "edge-overshot", false, unsafe.Pointer(C._gotk4_gtk3_ScrolledWindow_ConnectEdgeOvershot), f)
}

// ConnectEdgeReached signal is emitted whenever user-initiated scrolling makes
// the scrolled window exactly reach the lower or upper limits defined by the
// adjustment in that orientation.
//
// A similar behavior with edge resistance is provided by the
// ScrolledWindow::edge-overshot signal.
//
// Note: The pos argument is LTR/RTL aware, so callers should be aware too if
// intending to provide behavior on horizontal edges.
func (scrolledWindow *ScrolledWindow) ConnectEdgeReached(f func(pos PositionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scrolledWindow, "edge-reached", false, unsafe.Pointer(C._gotk4_gtk3_ScrolledWindow_ConnectEdgeReached), f)
}

// ConnectMoveFocusOut signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when focus is moved away from the scrolled window by a
// keybinding. The Widget::move-focus signal is emitted with direction_type
// on this scrolled window’s toplevel parent in the container hierarchy.
// The default bindings for this signal are Ctrl + Tab to move forward and Ctrl
// + Shift + Tab to move backward.
func (scrolledWindow *ScrolledWindow) ConnectMoveFocusOut(f func(directionType DirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scrolledWindow, "move-focus-out", false, unsafe.Pointer(C._gotk4_gtk3_ScrolledWindow_ConnectMoveFocusOut), f)
}

// ConnectScrollChild signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when a keybinding that scrolls is pressed. The horizontal or
// vertical adjustment is updated which triggers a signal that the scrolled
// window’s child may listen to and scroll itself.
func (scrolledWindow *ScrolledWindow) ConnectScrollChild(f func(scroll ScrollType, horizontal bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(scrolledWindow, "scroll-child", false, unsafe.Pointer(C._gotk4_gtk3_ScrolledWindow_ConnectScrollChild), f)
}

// NewScrolledWindow creates a new scrolled window.
//
// The two arguments are the scrolled window’s adjustments; these will be shared
// with the scrollbars and the child widget to keep the bars in sync with the
// child. Usually you want to pass NULL for the adjustments, which will cause
// the scrolled window to create them for you.
//
// The function takes the following parameters:
//
//   - hadjustment (optional): horizontal adjustment.
//   - vadjustment (optional): vertical adjustment.
//
// The function returns the following values:
//
//   - scrolledWindow: new scrolled window.
func NewScrolledWindow(hadjustment, vadjustment *Adjustment) *ScrolledWindow {
	var _arg1 *C.GtkAdjustment // out
	var _arg2 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if hadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(hadjustment).Native()))
	}
	if vadjustment != nil {
		_arg2 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(vadjustment).Native()))
	}

	_cret = C.gtk_scrolled_window_new(_arg1, _arg2)
	runtime.KeepAlive(hadjustment)
	runtime.KeepAlive(vadjustment)

	var _scrolledWindow *ScrolledWindow // out

	_scrolledWindow = wrapScrolledWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _scrolledWindow
}

// AddWithViewport: used to add children without native scrolling capabilities.
// This is simply a convenience function; it is equivalent to adding the
// unscrollable child to a viewport, then adding the viewport to the scrolled
// window. If a child has native scrolling, use gtk_container_add() instead of
// this function.
//
// The viewport scrolls the child by moving its Window, and takes the size of
// the child to be the size of its toplevel Window. This will be very wrong for
// most widgets that support native scrolling; for example, if you add a widget
// such as TreeView with a viewport, the whole widget will scroll, including the
// column headings. Thus, widgets with native scrolling support should not be
// used with the Viewport proxy.
//
// A widget supports scrolling natively if it implements the Scrollable
// interface.
//
// Deprecated: gtk_container_add() will automatically add a Viewport if the
// child doesn’t implement Scrollable.
//
// The function takes the following parameters:
//
//   - child: widget you want to scroll.
func (scrolledWindow *ScrolledWindow) AddWithViewport(child Widgetter) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 *C.GtkWidget         // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_scrolled_window_add_with_viewport(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(child)
}

// CaptureButtonPress: return whether button presses are captured during kinetic
// scrolling. See gtk_scrolled_window_set_capture_button_press().
//
// The function returns the following values:
//
//   - ok: TRUE if button presses are captured during kinetic scrolling.
func (scrolledWindow *ScrolledWindow) CaptureButtonPress() bool {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_capture_button_press(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HAdjustment returns the horizontal scrollbar’s adjustment, used to
// connect the horizontal scrollbar to the child widget’s horizontal scroll
// functionality.
//
// The function returns the following values:
//
//   - adjustment: horizontal Adjustment.
func (scrolledWindow *ScrolledWindow) HAdjustment() *Adjustment {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret *C.GtkAdjustment     // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_hadjustment(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// HScrollbar returns the horizontal scrollbar of scrolled_window.
//
// The function returns the following values:
//
//   - widget: horizontal scrollbar of the scrolled window.
func (scrolledWindow *ScrolledWindow) HScrollbar() Widgetter {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_hscrollbar(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// KineticScrolling returns the specified kinetic scrolling behavior.
//
// The function returns the following values:
//
//   - ok: scrolling behavior flags.
func (scrolledWindow *ScrolledWindow) KineticScrolling() bool {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_kinetic_scrolling(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MaxContentHeight returns the maximum content height set.
//
// The function returns the following values:
//
//   - gint: maximum content height, or -1.
func (scrolledWindow *ScrolledWindow) MaxContentHeight() int {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_max_content_height(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MaxContentWidth returns the maximum content width set.
//
// The function returns the following values:
//
//   - gint: maximum content width, or -1.
func (scrolledWindow *ScrolledWindow) MaxContentWidth() int {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_max_content_width(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MinContentHeight gets the minimal content height of scrolled_window, or -1 if
// not set.
//
// The function returns the following values:
//
//   - gint: minimal content height.
func (scrolledWindow *ScrolledWindow) MinContentHeight() int {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_min_content_height(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MinContentWidth gets the minimum content width of scrolled_window, or -1 if
// not set.
//
// The function returns the following values:
//
//   - gint: minimum content width.
func (scrolledWindow *ScrolledWindow) MinContentWidth() int {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_min_content_width(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// OverlayScrolling returns whether overlay scrolling is enabled for this
// scrolled window.
//
// The function returns the following values:
//
//   - ok: TRUE if overlay scrolling is enabled.
func (scrolledWindow *ScrolledWindow) OverlayScrolling() bool {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_overlay_scrolling(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Placement gets the placement of the contents with respect to the scrollbars
// for the scrolled window. See gtk_scrolled_window_set_placement().
//
// The function returns the following values:
//
//   - cornerType: current placement value.
//
//     See also gtk_scrolled_window_set_placement() and
//     gtk_scrolled_window_unset_placement().
func (scrolledWindow *ScrolledWindow) Placement() CornerType {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.GtkCornerType      // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_placement(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _cornerType CornerType // out

	_cornerType = CornerType(_cret)

	return _cornerType
}

// Policy retrieves the current policy values for the horizontal and vertical
// scrollbars. See gtk_scrolled_window_set_policy().
//
// The function returns the following values:
//
//   - hscrollbarPolicy (optional): location to store the policy for the
//     horizontal scrollbar, or NULL.
//   - vscrollbarPolicy (optional): location to store the policy for the
//     vertical scrollbar, or NULL.
func (scrolledWindow *ScrolledWindow) Policy() (hscrollbarPolicy, vscrollbarPolicy PolicyType) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkPolicyType      // in
	var _arg2 C.GtkPolicyType      // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	C.gtk_scrolled_window_get_policy(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(scrolledWindow)

	var _hscrollbarPolicy PolicyType // out
	var _vscrollbarPolicy PolicyType // out

	_hscrollbarPolicy = PolicyType(_arg1)
	_vscrollbarPolicy = PolicyType(_arg2)

	return _hscrollbarPolicy, _vscrollbarPolicy
}

// PropagateNaturalHeight reports whether the natural height of the child will
// be calculated and propagated through the scrolled window’s requested natural
// height.
//
// The function returns the following values:
//
//   - ok: whether natural height propagation is enabled.
func (scrolledWindow *ScrolledWindow) PropagateNaturalHeight() bool {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_propagate_natural_height(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PropagateNaturalWidth reports whether the natural width of the child will be
// calculated and propagated through the scrolled window’s requested natural
// width.
//
// The function returns the following values:
//
//   - ok: whether natural width propagation is enabled.
func (scrolledWindow *ScrolledWindow) PropagateNaturalWidth() bool {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_propagate_natural_width(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShadowType gets the shadow type of the scrolled window. See
// gtk_scrolled_window_set_shadow_type().
//
// The function returns the following values:
//
//   - shadowType: current shadow type.
func (scrolledWindow *ScrolledWindow) ShadowType() ShadowType {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret C.GtkShadowType      // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_shadow_type(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _shadowType ShadowType // out

	_shadowType = ShadowType(_cret)

	return _shadowType
}

// VAdjustment returns the vertical scrollbar’s adjustment, used to connect the
// vertical scrollbar to the child widget’s vertical scroll functionality.
//
// The function returns the following values:
//
//   - adjustment: vertical Adjustment.
func (scrolledWindow *ScrolledWindow) VAdjustment() *Adjustment {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret *C.GtkAdjustment     // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_vadjustment(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// VScrollbar returns the vertical scrollbar of scrolled_window.
//
// The function returns the following values:
//
//   - widget: vertical scrollbar of the scrolled window.
func (scrolledWindow *ScrolledWindow) VScrollbar() Widgetter {
	var _arg0 *C.GtkScrolledWindow // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	_cret = C.gtk_scrolled_window_get_vscrollbar(_arg0)
	runtime.KeepAlive(scrolledWindow)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetCaptureButtonPress changes the behaviour of scrolled_window with
// regard to the initial event that possibly starts kinetic scrolling. When
// capture_button_press is set to TRUE, the event is captured by the scrolled
// window, and then later replayed if it is meant to go to the child widget.
//
// This should be enabled if any child widgets perform non-reversible actions
// on Widget::button-press-event. If they don't, and handle additionally handle
// Widget::grab-broken-event, it might be better to set capture_button_press to
// FALSE.
//
// This setting only has an effect if kinetic scrolling is enabled.
//
// The function takes the following parameters:
//
//   - captureButtonPress: TRUE to capture button presses.
func (scrolledWindow *ScrolledWindow) SetCaptureButtonPress(captureButtonPress bool) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if captureButtonPress {
		_arg1 = C.TRUE
	}

	C.gtk_scrolled_window_set_capture_button_press(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(captureButtonPress)
}

// SetHAdjustment sets the Adjustment for the horizontal scrollbar.
//
// The function takes the following parameters:
//
//   - hadjustment (optional) to use, or NULL to create a new one.
func (scrolledWindow *ScrolledWindow) SetHAdjustment(hadjustment *Adjustment) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 *C.GtkAdjustment     // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if hadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(hadjustment).Native()))
	}

	C.gtk_scrolled_window_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(hadjustment)
}

// SetKineticScrolling turns kinetic scrolling on or off. Kinetic scrolling only
// applies to devices with source GDK_SOURCE_TOUCHSCREEN.
//
// The function takes the following parameters:
//
//   - kineticScrolling: TRUE to enable kinetic scrolling.
func (scrolledWindow *ScrolledWindow) SetKineticScrolling(kineticScrolling bool) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if kineticScrolling {
		_arg1 = C.TRUE
	}

	C.gtk_scrolled_window_set_kinetic_scrolling(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(kineticScrolling)
}

// SetMaxContentHeight sets the maximum height that scrolled_window should keep
// visible. The scrolled_window will grow up to this height before it starts
// scrolling the content.
//
// It is a programming error to set the maximum content height to a value
// smaller than ScrolledWindow:min-content-height.
//
// The function takes the following parameters:
//
//   - height: maximum content height.
func (scrolledWindow *ScrolledWindow) SetMaxContentHeight(height int) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.gint(height)

	C.gtk_scrolled_window_set_max_content_height(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(height)
}

// SetMaxContentWidth sets the maximum width that scrolled_window should keep
// visible. The scrolled_window will grow up to this width before it starts
// scrolling the content.
//
// It is a programming error to set the maximum content width to a value smaller
// than ScrolledWindow:min-content-width.
//
// The function takes the following parameters:
//
//   - width: maximum content width.
func (scrolledWindow *ScrolledWindow) SetMaxContentWidth(width int) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.gint(width)

	C.gtk_scrolled_window_set_max_content_width(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(width)
}

// SetMinContentHeight sets the minimum height that scrolled_window should keep
// visible. Note that this can and (usually will) be smaller than the minimum
// size of the content.
//
// It is a programming error to set the minimum content height to a value
// greater than ScrolledWindow:max-content-height.
//
// The function takes the following parameters:
//
//   - height: minimal content height.
func (scrolledWindow *ScrolledWindow) SetMinContentHeight(height int) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.gint(height)

	C.gtk_scrolled_window_set_min_content_height(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(height)
}

// SetMinContentWidth sets the minimum width that scrolled_window should keep
// visible. Note that this can and (usually will) be smaller than the minimum
// size of the content.
//
// It is a programming error to set the minimum content width to a value greater
// than ScrolledWindow:max-content-width.
//
// The function takes the following parameters:
//
//   - width: minimal content width.
func (scrolledWindow *ScrolledWindow) SetMinContentWidth(width int) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.gint(width)

	C.gtk_scrolled_window_set_min_content_width(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(width)
}

// SetOverlayScrolling enables or disables overlay scrolling for this scrolled
// window.
//
// The function takes the following parameters:
//
//   - overlayScrolling: whether to enable overlay scrolling.
func (scrolledWindow *ScrolledWindow) SetOverlayScrolling(overlayScrolling bool) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if overlayScrolling {
		_arg1 = C.TRUE
	}

	C.gtk_scrolled_window_set_overlay_scrolling(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(overlayScrolling)
}

// SetPlacement sets the placement of the contents with respect to the
// scrollbars for the scrolled window.
//
// The default is GTK_CORNER_TOP_LEFT, meaning the child is in the top left,
// with the scrollbars underneath and to the right. Other values in
// CornerType are GTK_CORNER_TOP_RIGHT, GTK_CORNER_BOTTOM_LEFT, and
// GTK_CORNER_BOTTOM_RIGHT.
//
// See also gtk_scrolled_window_get_placement() and
// gtk_scrolled_window_unset_placement().
//
// The function takes the following parameters:
//
//   - windowPlacement: position of the child window.
func (scrolledWindow *ScrolledWindow) SetPlacement(windowPlacement CornerType) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkCornerType      // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.GtkCornerType(windowPlacement)

	C.gtk_scrolled_window_set_placement(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(windowPlacement)
}

// SetPolicy sets the scrollbar policy for the horizontal and vertical
// scrollbars.
//
// The policy determines when the scrollbar should appear; it is a value
// from the PolicyType enumeration. If GTK_POLICY_ALWAYS, the scrollbar is
// always present; if GTK_POLICY_NEVER, the scrollbar is never present;
// if GTK_POLICY_AUTOMATIC, the scrollbar is present only if needed (that is,
// if the slider part of the bar would be smaller than the trough — the display
// is larger than the page size).
//
// The function takes the following parameters:
//
//   - hscrollbarPolicy: policy for horizontal bar.
//   - vscrollbarPolicy: policy for vertical bar.
func (scrolledWindow *ScrolledWindow) SetPolicy(hscrollbarPolicy, vscrollbarPolicy PolicyType) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkPolicyType      // out
	var _arg2 C.GtkPolicyType      // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.GtkPolicyType(hscrollbarPolicy)
	_arg2 = C.GtkPolicyType(vscrollbarPolicy)

	C.gtk_scrolled_window_set_policy(_arg0, _arg1, _arg2)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(hscrollbarPolicy)
	runtime.KeepAlive(vscrollbarPolicy)
}

// SetPropagateNaturalHeight sets whether the natural height of the child should
// be calculated and propagated through the scrolled window’s requested natural
// height.
//
// The function takes the following parameters:
//
//   - propagate: whether to propagate natural height.
func (scrolledWindow *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if propagate {
		_arg1 = C.TRUE
	}

	C.gtk_scrolled_window_set_propagate_natural_height(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(propagate)
}

// SetPropagateNaturalWidth sets whether the natural width of the child should
// be calculated and propagated through the scrolled window’s requested natural
// width.
//
// The function takes the following parameters:
//
//   - propagate: whether to propagate natural width.
func (scrolledWindow *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if propagate {
		_arg1 = C.TRUE
	}

	C.gtk_scrolled_window_set_propagate_natural_width(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(propagate)
}

// SetShadowType changes the type of shadow drawn around the contents of
// scrolled_window.
//
// The function takes the following parameters:
//
//   - typ: kind of shadow to draw around scrolled window contents.
func (scrolledWindow *ScrolledWindow) SetShadowType(typ ShadowType) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkShadowType      // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.GtkShadowType(typ)

	C.gtk_scrolled_window_set_shadow_type(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(typ)
}

// SetVAdjustment sets the Adjustment for the vertical scrollbar.
//
// The function takes the following parameters:
//
//   - vadjustment (optional) to use, or NULL to create a new one.
func (scrolledWindow *ScrolledWindow) SetVAdjustment(vadjustment *Adjustment) {
	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 *C.GtkAdjustment     // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	if vadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(vadjustment).Native()))
	}

	C.gtk_scrolled_window_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(vadjustment)
}

// UnsetPlacement unsets the placement of the contents with respect to the
// scrollbars for the scrolled window. If no window placement is set for a
// scrolled window, it defaults to GTK_CORNER_TOP_LEFT.
//
// See also gtk_scrolled_window_set_placement() and
// gtk_scrolled_window_get_placement().
func (scrolledWindow *ScrolledWindow) UnsetPlacement() {
	var _arg0 *C.GtkScrolledWindow // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))

	C.gtk_scrolled_window_unset_placement(_arg0)
	runtime.KeepAlive(scrolledWindow)
}

// moveFocusOut: keybinding signal which gets emitted when focus is moved away
// from the scrolled window by a keybinding.
func (scrolledWindow *ScrolledWindow) moveFocusOut(direction DirectionType) {
	gclass := (*C.GtkScrolledWindowClass)(coreglib.PeekParentClass(scrolledWindow))
	fnarg := gclass.move_focus_out

	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkDirectionType   // out

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.GtkDirectionType(direction)

	C._gotk4_gtk3_ScrolledWindow_virtual_move_focus_out(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(direction)
}

// scrollChild: keybinding signal which gets emitted when a keybinding that
// scrolls is pressed.
//
// The function takes the following parameters:
//
//   - scroll
//   - horizontal
func (scrolledWindow *ScrolledWindow) scrollChild(scroll ScrollType, horizontal bool) bool {
	gclass := (*C.GtkScrolledWindowClass)(coreglib.PeekParentClass(scrolledWindow))
	fnarg := gclass.scroll_child

	var _arg0 *C.GtkScrolledWindow // out
	var _arg1 C.GtkScrollType      // out
	var _arg2 C.gboolean           // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkScrolledWindow)(unsafe.Pointer(coreglib.InternObject(scrolledWindow).Native()))
	_arg1 = C.GtkScrollType(scroll)
	if horizontal {
		_arg2 = C.TRUE
	}

	_cret = C._gotk4_gtk3_ScrolledWindow_virtual_scroll_child(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(scrolledWindow)
	runtime.KeepAlive(scroll)
	runtime.KeepAlive(horizontal)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ScrolledWindowAccessibleOverrides contains methods that are overridable.
type ScrolledWindowAccessibleOverrides struct {
}

func defaultScrolledWindowAccessibleOverrides(v *ScrolledWindowAccessible) ScrolledWindowAccessibleOverrides {
	return ScrolledWindowAccessibleOverrides{}
}

type ScrolledWindowAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*ScrolledWindowAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ScrolledWindowAccessible, *ScrolledWindowAccessibleClass, ScrolledWindowAccessibleOverrides](
		GTypeScrolledWindowAccessible,
		initScrolledWindowAccessibleClass,
		wrapScrolledWindowAccessible,
		defaultScrolledWindowAccessibleOverrides,
	)
}

func initScrolledWindowAccessibleClass(gclass unsafe.Pointer, overrides ScrolledWindowAccessibleOverrides, classInitFunc func(*ScrolledWindowAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ScrolledWindowAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapScrolledWindowAccessible(obj *coreglib.Object) *ScrolledWindowAccessible {
	return &ScrolledWindowAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalScrolledWindowAccessible(p uintptr) (interface{}, error) {
	return wrapScrolledWindowAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// SearchBarOverrides contains methods that are overridable.
type SearchBarOverrides struct {
}

func defaultSearchBarOverrides(v *SearchBar) SearchBarOverrides {
	return SearchBarOverrides{}
}

// SearchBar is a container made to have a search entry (possibly with
// additional connex widgets, such as drop-down menus, or buttons) built-in.
// The search bar would appear when a search is started through typing on the
// keyboard, or the application’s search mode is toggled on.
//
// For keyboard presses to start a search, events will need to be
// forwarded from the top-level window that contains the search bar.
// See gtk_search_bar_handle_event() for example code. Common shortcuts such as
// Ctrl+F should be handled as an application action, or through the menu items.
//
// You will also need to tell the search bar about which entry you are using as
// your search entry using gtk_search_bar_connect_entry(). The following example
// shows you how to create a more complex search entry.
//
// # CSS nodes
//
// GtkSearchBar has a single CSS node with name searchbar.
//
// # Creating a search bar
//
// A simple example
// (https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/examples/search-bar.c).
type SearchBar struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*SearchBar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SearchBar, *SearchBarClass, SearchBarOverrides](
		GTypeSearchBar,
		initSearchBarClass,
		wrapSearchBar,
		defaultSearchBarOverrides,
	)
}

func initSearchBarClass(gclass unsafe.Pointer, overrides SearchBarOverrides, classInitFunc func(*SearchBarClass)) {
	if classInitFunc != nil {
		class := (*SearchBarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSearchBar(obj *coreglib.Object) *SearchBar {
	return &SearchBar{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalSearchBar(p uintptr) (interface{}, error) {
	return wrapSearchBar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSearchBar creates a SearchBar. You will need to tell it about which widget
// is going to be your text entry using gtk_search_bar_connect_entry().
//
// The function returns the following values:
//
//   - searchBar: new SearchBar.
func NewSearchBar() *SearchBar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_search_bar_new()

	var _searchBar *SearchBar // out

	_searchBar = wrapSearchBar(coreglib.Take(unsafe.Pointer(_cret)))

	return _searchBar
}

// ConnectEntry connects the Entry widget passed as the one to be used in this
// search bar. The entry should be a descendant of the search bar. This is only
// required if the entry isn’t the direct child of the search bar (as in our
// main example).
//
// The function takes the following parameters:
//
//   - entry: Entry.
func (bar *SearchBar) ConnectEntry(entry *Entry) {
	var _arg0 *C.GtkSearchBar // out
	var _arg1 *C.GtkEntry     // out

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	_arg1 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C.gtk_search_bar_connect_entry(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(entry)
}

// SearchMode returns whether the search mode is on or off.
//
// The function returns the following values:
//
//   - ok: whether search mode is toggled on.
func (bar *SearchBar) SearchMode() bool {
	var _arg0 *C.GtkSearchBar // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_search_bar_get_search_mode(_arg0)
	runtime.KeepAlive(bar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShowCloseButton returns whether the close button is shown.
//
// The function returns the following values:
//
//   - ok: whether the close button is shown.
func (bar *SearchBar) ShowCloseButton() bool {
	var _arg0 *C.GtkSearchBar // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))

	_cret = C.gtk_search_bar_get_show_close_button(_arg0)
	runtime.KeepAlive(bar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HandleEvent: this function should be called when the top-level window which
// contains the search bar received a key event.
//
// If the key event is handled by the search bar, the bar will be shown, the
// entry populated with the entered text and GDK_EVENT_STOP will be returned.
// The caller should ensure that events are not propagated further.
//
// If no entry has been connected to the search bar, using
// gtk_search_bar_connect_entry(), this function will return immediately with a
// warning.
//
// Showing the search bar on key presses
//
//	static gboolean
//	on_key_press_event (GtkWidget *widget,
//	                    GdkEvent  *event,
//	                    gpointer   user_data)
//	{
//	  GtkSearchBar *bar = GTK_SEARCH_BAR (user_data);
//	  return gtk_search_bar_handle_event (bar, event);
//	}
//
//	static void
//	create_toplevel (void)
//	{
//	  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	  GtkWindow *search_bar = gtk_search_bar_new ();
//
//	 // Add more widgets to the window...
//
//	  g_signal_connect (window,
//	                   "key-press-event",
//	                    G_CALLBACK (on_key_press_event),
//	                    search_bar);
//	}.
//
// The function takes the following parameters:
//
//   - event containing key press events.
//
// The function returns the following values:
//
//   - ok: GDK_EVENT_STOP if the key press event resulted in text being
//     entered in the search entry (and revealing the search bar if necessary),
//     GDK_EVENT_PROPAGATE otherwise.
func (bar *SearchBar) HandleEvent(event *gdk.Event) bool {
	var _arg0 *C.GtkSearchBar // out
	var _arg1 *C.GdkEvent     // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_search_bar_handle_event(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetSearchMode switches the search mode on or off.
//
// The function takes the following parameters:
//
//   - searchMode: new state of the search mode.
func (bar *SearchBar) SetSearchMode(searchMode bool) {
	var _arg0 *C.GtkSearchBar // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if searchMode {
		_arg1 = C.TRUE
	}

	C.gtk_search_bar_set_search_mode(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(searchMode)
}

// SetShowCloseButton shows or hides the close button. Applications that already
// have a “search” toggle button should not show a close button in their search
// bar, as it duplicates the role of the toggle button.
//
// The function takes the following parameters:
//
//   - visible: whether the close button will be shown or not.
func (bar *SearchBar) SetShowCloseButton(visible bool) {
	var _arg0 *C.GtkSearchBar // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkSearchBar)(unsafe.Pointer(coreglib.InternObject(bar).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_search_bar_set_show_close_button(_arg0, _arg1)
	runtime.KeepAlive(bar)
	runtime.KeepAlive(visible)
}

// SearchEntryOverrides contains methods that are overridable.
type SearchEntryOverrides struct {
	NextMatch     func()
	PreviousMatch func()
	SearchChanged func()
	StopSearch    func()
}

func defaultSearchEntryOverrides(v *SearchEntry) SearchEntryOverrides {
	return SearchEntryOverrides{
		NextMatch:     v.nextMatch,
		PreviousMatch: v.previousMatch,
		SearchChanged: v.searchChanged,
		StopSearch:    v.stopSearch,
	}
}

// SearchEntry is a subclass of Entry that has been tailored for use as a search
// entry.
//
// It will show an inactive symbolic “find” icon when the search entry is empty,
// and a symbolic “clear” icon when there is text. Clicking on the “clear” icon
// will empty the search entry.
//
// Note that the search/clear icon is shown using a secondary icon, and thus
// does not work if you are using the secondary icon position for some other
// purpose.
//
// To make filtering appear more reactive, it is a good idea to not react to
// every change in the entry text immediately, but only after a short delay.
// To support this, SearchEntry emits the SearchEntry::search-changed signal
// which can be used instead of the Editable::changed signal.
//
// The SearchEntry::previous-match, SearchEntry::next-match and
// SearchEntry::stop-search signals can be used to implement moving between
// search results and ending the search.
//
// Often, GtkSearchEntry will be fed events by means of being
// placed inside a SearchBar. If that is not the case, you can use
// gtk_search_entry_handle_event() to pass events.
type SearchEntry struct {
	_ [0]func() // equal guard
	Entry
}

var (
	_ Widgetter         = (*SearchEntry)(nil)
	_ coreglib.Objector = (*SearchEntry)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SearchEntry, *SearchEntryClass, SearchEntryOverrides](
		GTypeSearchEntry,
		initSearchEntryClass,
		wrapSearchEntry,
		defaultSearchEntryOverrides,
	)
}

func initSearchEntryClass(gclass unsafe.Pointer, overrides SearchEntryOverrides, classInitFunc func(*SearchEntryClass)) {
	pclass := (*C.GtkSearchEntryClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeSearchEntry))))

	if overrides.NextMatch != nil {
		pclass.next_match = (*[0]byte)(C._gotk4_gtk3_SearchEntryClass_next_match)
	}

	if overrides.PreviousMatch != nil {
		pclass.previous_match = (*[0]byte)(C._gotk4_gtk3_SearchEntryClass_previous_match)
	}

	if overrides.SearchChanged != nil {
		pclass.search_changed = (*[0]byte)(C._gotk4_gtk3_SearchEntryClass_search_changed)
	}

	if overrides.StopSearch != nil {
		pclass.stop_search = (*[0]byte)(C._gotk4_gtk3_SearchEntryClass_stop_search)
	}

	if classInitFunc != nil {
		class := (*SearchEntryClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSearchEntry(obj *coreglib.Object) *SearchEntry {
	return &SearchEntry{
		Entry: Entry{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			CellEditable: CellEditable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Editable: Editable{
				Object: obj,
			},
		},
	}
}

func marshalSearchEntry(p uintptr) (interface{}, error) {
	return wrapSearchEntry(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectNextMatch signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a move to the next match for the current
// search string.
//
// Applications should connect to it, to implement moving between matches.
//
// The default bindings for this signal is Ctrl-g.
func (entry *SearchEntry) ConnectNextMatch(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "next-match", false, unsafe.Pointer(C._gotk4_gtk3_SearchEntry_ConnectNextMatch), f)
}

// ConnectPreviousMatch signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a move to the previous match for the
// current search string.
//
// Applications should connect to it, to implement moving between matches.
//
// The default bindings for this signal is Ctrl-Shift-g.
func (entry *SearchEntry) ConnectPreviousMatch(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "previous-match", false, unsafe.Pointer(C._gotk4_gtk3_SearchEntry_ConnectPreviousMatch), f)
}

// ConnectSearchChanged signal is emitted with a short delay of 150 milliseconds
// after the last change to the entry text.
func (entry *SearchEntry) ConnectSearchChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "search-changed", false, unsafe.Pointer(C._gotk4_gtk3_SearchEntry_ConnectSearchChanged), f)
}

// ConnectStopSearch signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user stops a search via keyboard input.
//
// Applications should connect to it, to implement hiding the search entry in
// this case.
//
// The default bindings for this signal is Escape.
func (entry *SearchEntry) ConnectStopSearch(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(entry, "stop-search", false, unsafe.Pointer(C._gotk4_gtk3_SearchEntry_ConnectStopSearch), f)
}

// NewSearchEntry creates a SearchEntry, with a find icon when the search field
// is empty, and a clear icon when it isn't.
//
// The function returns the following values:
//
//   - searchEntry: new SearchEntry.
func NewSearchEntry() *SearchEntry {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_search_entry_new()

	var _searchEntry *SearchEntry // out

	_searchEntry = wrapSearchEntry(coreglib.Take(unsafe.Pointer(_cret)))

	return _searchEntry
}

// HandleEvent: this function should be called when the top-level window which
// contains the search entry received a key event. If the entry is part of a
// SearchBar, it is preferable to call gtk_search_bar_handle_event() instead,
// which will reveal the entry in addition to passing the event to this
// function.
//
// If the key event is handled by the search entry and starts or continues a
// search, GDK_EVENT_STOP will be returned. The caller should ensure that the
// entry is shown in this case, and not propagate the event further.
//
// The function takes the following parameters:
//
//   - event: key event.
//
// The function returns the following values:
//
//   - ok: GDK_EVENT_STOP if the key press event resulted in a search beginning
//     or continuing, GDK_EVENT_PROPAGATE otherwise.
func (entry *SearchEntry) HandleEvent(event *gdk.Event) bool {
	var _arg0 *C.GtkSearchEntry // out
	var _arg1 *C.GdkEvent       // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkSearchEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_search_entry_handle_event(_arg0, _arg1)
	runtime.KeepAlive(entry)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (entry *SearchEntry) nextMatch() {
	gclass := (*C.GtkSearchEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.next_match

	var _arg0 *C.GtkSearchEntry // out

	_arg0 = (*C.GtkSearchEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_SearchEntry_virtual_next_match(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

func (entry *SearchEntry) previousMatch() {
	gclass := (*C.GtkSearchEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.previous_match

	var _arg0 *C.GtkSearchEntry // out

	_arg0 = (*C.GtkSearchEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_SearchEntry_virtual_previous_match(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

func (entry *SearchEntry) searchChanged() {
	gclass := (*C.GtkSearchEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.search_changed

	var _arg0 *C.GtkSearchEntry // out

	_arg0 = (*C.GtkSearchEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_SearchEntry_virtual_search_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

func (entry *SearchEntry) stopSearch() {
	gclass := (*C.GtkSearchEntryClass)(coreglib.PeekParentClass(entry))
	fnarg := gclass.stop_search

	var _arg0 *C.GtkSearchEntry // out

	_arg0 = (*C.GtkSearchEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))

	C._gotk4_gtk3_SearchEntry_virtual_stop_search(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(entry)
}

// SeparatorOverrides contains methods that are overridable.
type SeparatorOverrides struct {
}

func defaultSeparatorOverrides(v *Separator) SeparatorOverrides {
	return SeparatorOverrides{}
}

// Separator is a horizontal or vertical separator widget, depending on the
// value of the Orientable:orientation property, used to group the widgets
// within a window. It displays a line with a shadow to make it appear sunken
// into the interface.
//
// # CSS nodes
//
// GtkSeparator has a single CSS node with name separator. The node gets one of
// the .horizontal or .vertical style classes.
type Separator struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	Orientable
}

var (
	_ Widgetter         = (*Separator)(nil)
	_ coreglib.Objector = (*Separator)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Separator, *SeparatorClass, SeparatorOverrides](
		GTypeSeparator,
		initSeparatorClass,
		wrapSeparator,
		defaultSeparatorOverrides,
	)
}

func initSeparatorClass(gclass unsafe.Pointer, overrides SeparatorOverrides, classInitFunc func(*SeparatorClass)) {
	if classInitFunc != nil {
		class := (*SeparatorClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSeparator(obj *coreglib.Object) *Separator {
	return &Separator{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalSeparator(p uintptr) (interface{}, error) {
	return wrapSeparator(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSeparator creates a new Separator with the given orientation.
//
// The function takes the following parameters:
//
//   - orientation separator’s orientation.
//
// The function returns the following values:
//
//   - separator: new Separator.
func NewSeparator(orientation Orientation) *Separator {
	var _arg1 C.GtkOrientation // out
	var _cret *C.GtkWidget     // in

	_arg1 = C.GtkOrientation(orientation)

	_cret = C.gtk_separator_new(_arg1)
	runtime.KeepAlive(orientation)

	var _separator *Separator // out

	_separator = wrapSeparator(coreglib.Take(unsafe.Pointer(_cret)))

	return _separator
}

// SeparatorMenuItemOverrides contains methods that are overridable.
type SeparatorMenuItemOverrides struct {
}

func defaultSeparatorMenuItemOverrides(v *SeparatorMenuItem) SeparatorMenuItemOverrides {
	return SeparatorMenuItemOverrides{}
}

// SeparatorMenuItem is a separator used to group items within a menu.
// It displays a horizontal line with a shadow to make it appear sunken into the
// interface.
//
// # CSS nodes
//
// GtkSeparatorMenuItem has a single CSS node with name separator.
type SeparatorMenuItem struct {
	_ [0]func() // equal guard
	MenuItem
}

var (
	_ Binner            = (*SeparatorMenuItem)(nil)
	_ coreglib.Objector = (*SeparatorMenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SeparatorMenuItem, *SeparatorMenuItemClass, SeparatorMenuItemOverrides](
		GTypeSeparatorMenuItem,
		initSeparatorMenuItemClass,
		wrapSeparatorMenuItem,
		defaultSeparatorMenuItemOverrides,
	)
}

func initSeparatorMenuItemClass(gclass unsafe.Pointer, overrides SeparatorMenuItemOverrides, classInitFunc func(*SeparatorMenuItemClass)) {
	if classInitFunc != nil {
		class := (*SeparatorMenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSeparatorMenuItem(obj *coreglib.Object) *SeparatorMenuItem {
	return &SeparatorMenuItem{
		MenuItem: MenuItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalSeparatorMenuItem(p uintptr) (interface{}, error) {
	return wrapSeparatorMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSeparatorMenuItem creates a new SeparatorMenuItem.
//
// The function returns the following values:
//
//   - separatorMenuItem: new SeparatorMenuItem.
func NewSeparatorMenuItem() *SeparatorMenuItem {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_separator_menu_item_new()

	var _separatorMenuItem *SeparatorMenuItem // out

	_separatorMenuItem = wrapSeparatorMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _separatorMenuItem
}

// SeparatorToolItemOverrides contains methods that are overridable.
type SeparatorToolItemOverrides struct {
}

func defaultSeparatorToolItemOverrides(v *SeparatorToolItem) SeparatorToolItemOverrides {
	return SeparatorToolItemOverrides{}
}

// SeparatorToolItem is a ToolItem that separates groups of other ToolItems.
// Depending on the theme, a SeparatorToolItem will often look like a vertical
// line on horizontally docked toolbars.
//
// If the Toolbar child property “expand” is TRUE and the property
// SeparatorToolItem:draw is FALSE, a SeparatorToolItem will act as a “spring”
// that forces other items to the ends of the toolbar.
//
// Use gtk_separator_tool_item_new() to create a new SeparatorToolItem.
//
// # CSS nodes
//
// GtkSeparatorToolItem has a single CSS node with name separator.
type SeparatorToolItem struct {
	_ [0]func() // equal guard
	ToolItem
}

var (
	_ Binner            = (*SeparatorToolItem)(nil)
	_ coreglib.Objector = (*SeparatorToolItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SeparatorToolItem, *SeparatorToolItemClass, SeparatorToolItemOverrides](
		GTypeSeparatorToolItem,
		initSeparatorToolItemClass,
		wrapSeparatorToolItem,
		defaultSeparatorToolItemOverrides,
	)
}

func initSeparatorToolItemClass(gclass unsafe.Pointer, overrides SeparatorToolItemOverrides, classInitFunc func(*SeparatorToolItemClass)) {
	if classInitFunc != nil {
		class := (*SeparatorToolItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSeparatorToolItem(obj *coreglib.Object) *SeparatorToolItem {
	return &SeparatorToolItem{
		ToolItem: ToolItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalSeparatorToolItem(p uintptr) (interface{}, error) {
	return wrapSeparatorToolItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSeparatorToolItem: create a new SeparatorToolItem.
//
// The function returns the following values:
//
//   - separatorToolItem: new SeparatorToolItem.
func NewSeparatorToolItem() *SeparatorToolItem {
	var _cret *C.GtkToolItem // in

	_cret = C.gtk_separator_tool_item_new()

	var _separatorToolItem *SeparatorToolItem // out

	_separatorToolItem = wrapSeparatorToolItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _separatorToolItem
}

// Draw returns whether item is drawn as a line, or just blank. See
// gtk_separator_tool_item_set_draw().
//
// The function returns the following values:
//
//   - ok: TRUE if item is drawn as a line, or just blank.
func (item *SeparatorToolItem) Draw() bool {
	var _arg0 *C.GtkSeparatorToolItem // out
	var _cret C.gboolean              // in

	_arg0 = (*C.GtkSeparatorToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))

	_cret = C.gtk_separator_tool_item_get_draw(_arg0)
	runtime.KeepAlive(item)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetDraw: whether item is drawn as a vertical line, or just blank. Setting
// this to FALSE along with gtk_tool_item_set_expand() is useful to create an
// item that forces following items to the end of the toolbar.
//
// The function takes the following parameters:
//
//   - draw: whether item is drawn as a vertical line.
func (item *SeparatorToolItem) SetDraw(draw bool) {
	var _arg0 *C.GtkSeparatorToolItem // out
	var _arg1 C.gboolean              // out

	_arg0 = (*C.GtkSeparatorToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))
	if draw {
		_arg1 = C.TRUE
	}

	C.gtk_separator_tool_item_set_draw(_arg0, _arg1)
	runtime.KeepAlive(item)
	runtime.KeepAlive(draw)
}

// SettingsOverrides contains methods that are overridable.
type SettingsOverrides struct {
}

func defaultSettingsOverrides(v *Settings) SettingsOverrides {
	return SettingsOverrides{}
}

// Settings provide a mechanism to share global settings between applications.
//
// On the X window system, this sharing is realized by an XSettings
// (http://www.freedesktop.org/wiki/Specifications/xsettings-spec) manager that
// is usually part of the desktop environment, along with utilities that let
// the user change these settings. In the absence of an Xsettings manager, GTK+
// reads default values for settings from settings.ini files in /etc/gtk-3.0,
// $XDG_CONFIG_DIRS/gtk-3.0 and $XDG_CONFIG_HOME/gtk-3.0. These files must be
// valid key files (see File), and have a section called Settings. Themes can
// also provide default values for settings by installing a settings.ini file
// next to their gtk.css file.
//
// Applications can override system-wide settings by setting the property of the
// GtkSettings object with g_object_set(). This should be restricted to special
// cases though; GtkSettings are not meant as an application configuration
// facility. When doing so, you need to be aware that settings that are specific
// to individual widgets may not be available before the widget type has been
// realized at least once. The following example demonstrates a way to do this:
//
//	gtk_init (&argc, &argv);
//
//	// make sure the type is realized
//	g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
//
//	g_object_set (gtk_settings_get_default (), "gtk-enable-animations", FALSE, NULL);
//
// There is one GtkSettings instance per screen. It can be obtained with
// gtk_settings_get_for_screen(), but in many cases, it is more convenient
// to use gtk_widget_get_settings(). gtk_settings_get_default() returns the
// GtkSettings instance for the default screen.
type Settings struct {
	_ [0]func() // equal guard
	*coreglib.Object

	StyleProvider
}

var (
	_ coreglib.Objector = (*Settings)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Settings, *SettingsClass, SettingsOverrides](
		GTypeSettings,
		initSettingsClass,
		wrapSettings,
		defaultSettingsOverrides,
	)
}

func initSettingsClass(gclass unsafe.Pointer, overrides SettingsOverrides, classInitFunc func(*SettingsClass)) {
	if classInitFunc != nil {
		class := (*SettingsClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSettings(obj *coreglib.Object) *Settings {
	return &Settings{
		Object: obj,
		StyleProvider: StyleProvider{
			Object: obj,
		},
	}
}

func marshalSettings(p uintptr) (interface{}, error) {
	return wrapSettings(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ResetProperty undoes the effect of calling g_object_set() to install an
// application-specific value for a setting. After this call, the setting will
// again follow the session-wide value for this setting.
//
// The function takes the following parameters:
//
//   - name of the setting to reset.
func (settings *Settings) ResetProperty(name string) {
	var _arg0 *C.GtkSettings // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_settings_reset_property(_arg0, _arg1)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(name)
}

// SetDoubleProperty: deprecated: Use g_object_set() instead.
//
// The function takes the following parameters:
//
//   - name
//   - vDouble
//   - origin
func (settings *Settings) SetDoubleProperty(name string, vDouble float64, origin string) {
	var _arg0 *C.GtkSettings // out
	var _arg1 *C.gchar       // out
	var _arg2 C.gdouble      // out
	var _arg3 *C.gchar       // out

	_arg0 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(vDouble)
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(origin)))
	defer C.free(unsafe.Pointer(_arg3))

	C.gtk_settings_set_double_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(name)
	runtime.KeepAlive(vDouble)
	runtime.KeepAlive(origin)
}

// SetLongProperty: deprecated: Use g_object_set() instead.
//
// The function takes the following parameters:
//
//   - name
//   - vLong
//   - origin
func (settings *Settings) SetLongProperty(name string, vLong int32, origin string) {
	var _arg0 *C.GtkSettings // out
	var _arg1 *C.gchar       // out
	var _arg2 C.glong        // out
	var _arg3 *C.gchar       // out

	_arg0 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.glong(vLong)
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(origin)))
	defer C.free(unsafe.Pointer(_arg3))

	C.gtk_settings_set_long_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(name)
	runtime.KeepAlive(vLong)
	runtime.KeepAlive(origin)
}

// SetPropertyValue: deprecated: Use g_object_set() instead.
//
// The function takes the following parameters:
//
//   - name
//   - svalue
func (settings *Settings) SetPropertyValue(name string, svalue *SettingsValue) {
	var _arg0 *C.GtkSettings      // out
	var _arg1 *C.gchar            // out
	var _arg2 *C.GtkSettingsValue // out

	_arg0 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkSettingsValue)(gextras.StructNative(unsafe.Pointer(svalue)))

	C.gtk_settings_set_property_value(_arg0, _arg1, _arg2)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(name)
	runtime.KeepAlive(svalue)
}

// SetStringProperty: deprecated: Use g_object_set() instead.
//
// The function takes the following parameters:
//
//   - name
//   - vString
//   - origin
func (settings *Settings) SetStringProperty(name, vString, origin string) {
	var _arg0 *C.GtkSettings // out
	var _arg1 *C.gchar       // out
	var _arg2 *C.gchar       // out
	var _arg3 *C.gchar       // out

	_arg0 = (*C.GtkSettings)(unsafe.Pointer(coreglib.InternObject(settings).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(vString)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(origin)))
	defer C.free(unsafe.Pointer(_arg3))

	C.gtk_settings_set_string_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(settings)
	runtime.KeepAlive(name)
	runtime.KeepAlive(vString)
	runtime.KeepAlive(origin)
}

// SettingsGetDefault gets the Settings object for the default GDK screen,
// creating it if necessary. See gtk_settings_get_for_screen().
//
// The function returns the following values:
//
//   - settings (optional) object. If there is no default screen, then returns
//     NULL.
func SettingsGetDefault() *Settings {
	var _cret *C.GtkSettings // in

	_cret = C.gtk_settings_get_default()

	var _settings *Settings // out

	if _cret != nil {
		_settings = wrapSettings(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _settings
}

// SettingsGetForScreen gets the Settings object for screen, creating it if
// necessary.
//
// The function takes the following parameters:
//
//   - screen: Screen.
//
// The function returns the following values:
//
//   - settings Settings object.
func SettingsGetForScreen(screen *gdk.Screen) *Settings {
	var _arg1 *C.GdkScreen   // out
	var _cret *C.GtkSettings // in

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	_cret = C.gtk_settings_get_for_screen(_arg1)
	runtime.KeepAlive(screen)

	var _settings *Settings // out

	_settings = wrapSettings(coreglib.Take(unsafe.Pointer(_cret)))

	return _settings
}

// ShortcutLabel is a widget that represents a single keyboard shortcut or
// gesture in the user interface.
type ShortcutLabel struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ShortcutLabel)(nil)
	_ coreglib.Objector = (*ShortcutLabel)(nil)
)

func wrapShortcutLabel(obj *coreglib.Object) *ShortcutLabel {
	return &ShortcutLabel{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalShortcutLabel(p uintptr) (interface{}, error) {
	return wrapShortcutLabel(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewShortcutLabel creates a new ShortcutLabel with accelerator set.
//
// The function takes the following parameters:
//
//   - accelerator: initial accelerator.
//
// The function returns the following values:
//
//   - shortcutLabel: newly-allocated ShortcutLabel.
func NewShortcutLabel(accelerator string) *ShortcutLabel {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_shortcut_label_new(_arg1)
	runtime.KeepAlive(accelerator)

	var _shortcutLabel *ShortcutLabel // out

	_shortcutLabel = wrapShortcutLabel(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _shortcutLabel
}

// Accelerator retrieves the current accelerator of self.
//
// The function returns the following values:
//
//   - utf8 (optional): current accelerator.
func (self *ShortcutLabel) Accelerator() string {
	var _arg0 *C.GtkShortcutLabel // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkShortcutLabel)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_shortcut_label_get_accelerator(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// DisabledText retrieves the text that is displayed when no accelerator is set.
//
// The function returns the following values:
//
//   - utf8 (optional): current text displayed when no accelerator is set.
func (self *ShortcutLabel) DisabledText() string {
	var _arg0 *C.GtkShortcutLabel // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkShortcutLabel)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	_cret = C.gtk_shortcut_label_get_disabled_text(_arg0)
	runtime.KeepAlive(self)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// SetAccelerator sets the accelerator to be displayed by self.
//
// The function takes the following parameters:
//
//   - accelerator: new accelerator.
func (self *ShortcutLabel) SetAccelerator(accelerator string) {
	var _arg0 *C.GtkShortcutLabel // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkShortcutLabel)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelerator)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_shortcut_label_set_accelerator(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(accelerator)
}

// SetDisabledText sets the text to be displayed by self when no accelerator is
// set.
//
// The function takes the following parameters:
//
//   - disabledText: text to be displayed when no accelerator is set.
func (self *ShortcutLabel) SetDisabledText(disabledText string) {
	var _arg0 *C.GtkShortcutLabel // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkShortcutLabel)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(disabledText)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_shortcut_label_set_disabled_text(_arg0, _arg1)
	runtime.KeepAlive(self)
	runtime.KeepAlive(disabledText)
}

// ShortcutsGroup represents a group of related keyboard shortcuts or gestures.
// The group has a title. It may optionally be associated with a view of the
// application, which can be used to show only relevant shortcuts depending on
// the application context.
//
// This widget is only meant to be used with ShortcutsWindow.
type ShortcutsGroup struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ShortcutsGroup)(nil)
	_ coreglib.Objector = (*ShortcutsGroup)(nil)
)

func wrapShortcutsGroup(obj *coreglib.Object) *ShortcutsGroup {
	return &ShortcutsGroup{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalShortcutsGroup(p uintptr) (interface{}, error) {
	return wrapShortcutsGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ShortcutsSection collects all the keyboard shortcuts and gestures for
// a major application mode. If your application needs multiple sections,
// you should give each section a unique ShortcutsSection:section-name and
// a ShortcutsSection:title that can be shown in the section selector of the
// GtkShortcutsWindow.
//
// The ShortcutsSection:max-height property can be used to influence how the
// groups in the section are distributed over pages and columns.
//
// This widget is only meant to be used with ShortcutsWindow.
type ShortcutsSection struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ShortcutsSection)(nil)
	_ coreglib.Objector = (*ShortcutsSection)(nil)
)

func wrapShortcutsSection(obj *coreglib.Object) *ShortcutsSection {
	return &ShortcutsSection{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalShortcutsSection(p uintptr) (interface{}, error) {
	return wrapShortcutsSection(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (v *ShortcutsSection) ConnectChangeCurrentPage(f func(object int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "change-current-page", false, unsafe.Pointer(C._gotk4_gtk3_ShortcutsSection_ConnectChangeCurrentPage), f)
}

// ShortcutsShortcut represents a single keyboard shortcut or gesture with a
// short text. This widget is only meant to be used with ShortcutsWindow.
type ShortcutsShortcut struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*ShortcutsShortcut)(nil)
	_ coreglib.Objector = (*ShortcutsShortcut)(nil)
)

func wrapShortcutsShortcut(obj *coreglib.Object) *ShortcutsShortcut {
	return &ShortcutsShortcut{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalShortcutsShortcut(p uintptr) (interface{}, error) {
	return wrapShortcutsShortcut(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ShortcutsWindowOverrides contains methods that are overridable.
type ShortcutsWindowOverrides struct {
	Close  func()
	Search func()
}

func defaultShortcutsWindowOverrides(v *ShortcutsWindow) ShortcutsWindowOverrides {
	return ShortcutsWindowOverrides{
		Close:  v.close,
		Search: v.search,
	}
}

// ShortcutsWindow shows brief information about the keyboard shortcuts and
// gestures of an application. The shortcuts can be grouped, and you can have
// multiple sections in this window, corresponding to the major modes of your
// application.
//
// Additionally, the shortcuts can be filtered by the current view, to avoid
// showing information that is not relevant in the current application context.
//
// The recommended way to construct a GtkShortcutsWindow is with GtkBuilder,
// by populating a ShortcutsWindow with one or more ShortcutsSection objects,
// which contain ShortcutsGroups that in turn contain objects of class
// ShortcutsShortcut.
//
// A simple example:
//
// ! (gedit-shortcuts.png)
//
// This example has as single section. As you can see, the shortcut groups are
// arranged in columns, and spread across several pages if there are too many to
// find on a single page.
//
// The .ui file for this example can be found here
// (https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-gedit.ui).
//
// An example with multiple views:
//
// ! (clocks-shortcuts.png)
//
// This example shows a ShortcutsWindow that has been configured to show only
// the shortcuts relevant to the "stopwatch" view.
//
// The .ui file for this example can be found here
// (https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-clocks.ui).
//
// An example with multiple sections:
//
// ! (builder-shortcuts.png)
//
// This example shows a ShortcutsWindow with two sections, "Editor Shortcuts"
// and "Terminal Shortcuts".
//
// The .ui file for this example can be found here
// (https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-builder.ui).
type ShortcutsWindow struct {
	_ [0]func() // equal guard
	Window
}

var (
	_ Binner = (*ShortcutsWindow)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ShortcutsWindow, *ShortcutsWindowClass, ShortcutsWindowOverrides](
		GTypeShortcutsWindow,
		initShortcutsWindowClass,
		wrapShortcutsWindow,
		defaultShortcutsWindowOverrides,
	)
}

func initShortcutsWindowClass(gclass unsafe.Pointer, overrides ShortcutsWindowOverrides, classInitFunc func(*ShortcutsWindowClass)) {
	pclass := (*C.GtkShortcutsWindowClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeShortcutsWindow))))

	if overrides.Close != nil {
		pclass.close = (*[0]byte)(C._gotk4_gtk3_ShortcutsWindowClass_close)
	}

	if overrides.Search != nil {
		pclass.search = (*[0]byte)(C._gotk4_gtk3_ShortcutsWindowClass_search)
	}

	if classInitFunc != nil {
		class := (*ShortcutsWindowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapShortcutsWindow(obj *coreglib.Object) *ShortcutsWindow {
	return &ShortcutsWindow{
		Window: Window{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
		},
	}
}

func marshalShortcutsWindow(p uintptr) (interface{}, error) {
	return wrapShortcutsWindow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectClose signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user uses a keybinding to close the window.
//
// The default binding for this signal is the Escape key.
func (v *ShortcutsWindow) ConnectClose(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "close", false, unsafe.Pointer(C._gotk4_gtk3_ShortcutsWindow_ConnectClose), f)
}

// ConnectSearch signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user uses a keybinding to start a search.
//
// The default binding for this signal is Control-F.
func (v *ShortcutsWindow) ConnectSearch(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(v, "search", false, unsafe.Pointer(C._gotk4_gtk3_ShortcutsWindow_ConnectSearch), f)
}

func (self *ShortcutsWindow) close() {
	gclass := (*C.GtkShortcutsWindowClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.close

	var _arg0 *C.GtkShortcutsWindow // out

	_arg0 = (*C.GtkShortcutsWindow)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C._gotk4_gtk3_ShortcutsWindow_virtual_close(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(self)
}

func (self *ShortcutsWindow) search() {
	gclass := (*C.GtkShortcutsWindowClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.search

	var _arg0 *C.GtkShortcutsWindow // out

	_arg0 = (*C.GtkShortcutsWindow)(unsafe.Pointer(coreglib.InternObject(self).Native()))

	C._gotk4_gtk3_ShortcutsWindow_virtual_search(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(self)
}

// SizeGroupOverrides contains methods that are overridable.
type SizeGroupOverrides struct {
}

func defaultSizeGroupOverrides(v *SizeGroup) SizeGroupOverrides {
	return SizeGroupOverrides{}
}

// SizeGroup provides a mechanism for grouping a number of widgets together so
// they all request the same amount of space. This is typically useful when
// you want a column of widgets to have the same size, but you can’t use a Grid
// widget.
//
// In detail, the size requested for each widget in a SizeGroup is the maximum
// of the sizes that would have been requested for each widget in the size
// group if they were not in the size group. The mode of the size group (see
// gtk_size_group_set_mode()) determines whether this applies to the horizontal
// size, the vertical size, or both sizes.
//
// Note that size groups only affect the amount of space requested, not the size
// that the widgets finally receive. If you want the widgets in a SizeGroup to
// actually be the same size, you need to pack them in such a way that they
// get the size they request and not more. For example, if you are packing your
// widgets into a table, you would not include the GTK_FILL flag.
//
// SizeGroup objects are referenced by each widget in the size group, so once
// you have added all widgets to a SizeGroup, you can drop the initial reference
// to the size group with g_object_unref(). If the widgets in the size group
// are subsequently destroyed, then they will be removed from the size group and
// drop their references on the size group; when all widgets have been removed,
// the size group will be freed.
//
// Widgets can be part of multiple size groups; GTK+ will compute the
// horizontal size of a widget from the horizontal requisition of all widgets
// that can be reached from the widget by a chain of size groups of type
// GTK_SIZE_GROUP_HORIZONTAL or GTK_SIZE_GROUP_BOTH, and the vertical size
// from the vertical requisition of all widgets that can be reached from
// the widget by a chain of size groups of type GTK_SIZE_GROUP_VERTICAL or
// GTK_SIZE_GROUP_BOTH.
//
// Note that only non-contextual sizes of every widget are ever consulted by
// size groups (since size groups have no knowledge of what size a widget will
// be allocated in one dimension, it cannot derive how much height a widget will
// receive for a given width). When grouping widgets that trade height for width
// in mode GTK_SIZE_GROUP_VERTICAL or GTK_SIZE_GROUP_BOTH: the height for the
// minimum width will be the requested height for all widgets in the group. The
// same is of course true when horizontally grouping width for height widgets.
//
// Widgets that trade height-for-width should set a reasonably large minimum
// width by way of Label:width-chars for instance. Widgets with static sizes
// as well as widgets that grow (such as ellipsizing text) need no such
// considerations.
//
// # GtkSizeGroup as GtkBuildable
//
// Size groups can be specified in a UI definition by placing an <object>
// element with class="GtkSizeGroup" somewhere in the UI definition. The widgets
// that belong to the size group are specified by a <widgets> element that may
// contain multiple <widget> elements, one for each member of the size group.
// The ”name” attribute gives the id of the widget.
//
// An example of a UI definition fragment with GtkSizeGroup:
//
//	<object class="GtkSizeGroup">
//	  <property name="mode">GTK_SIZE_GROUP_HORIZONTAL</property>
//	  <widgets>
//	    <widget name="radio1"/>
//	    <widget name="radio2"/>
//	  </widgets>
//	</object>.
type SizeGroup struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*SizeGroup)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SizeGroup, *SizeGroupClass, SizeGroupOverrides](
		GTypeSizeGroup,
		initSizeGroupClass,
		wrapSizeGroup,
		defaultSizeGroupOverrides,
	)
}

func initSizeGroupClass(gclass unsafe.Pointer, overrides SizeGroupOverrides, classInitFunc func(*SizeGroupClass)) {
	if classInitFunc != nil {
		class := (*SizeGroupClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSizeGroup(obj *coreglib.Object) *SizeGroup {
	return &SizeGroup{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalSizeGroup(p uintptr) (interface{}, error) {
	return wrapSizeGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSizeGroup: create a new SizeGroup.
//
// The function takes the following parameters:
//
//   - mode for the new size group.
//
// The function returns the following values:
//
//   - sizeGroup: newly created SizeGroup.
func NewSizeGroup(mode SizeGroupMode) *SizeGroup {
	var _arg1 C.GtkSizeGroupMode // out
	var _cret *C.GtkSizeGroup    // in

	_arg1 = C.GtkSizeGroupMode(mode)

	_cret = C.gtk_size_group_new(_arg1)
	runtime.KeepAlive(mode)

	var _sizeGroup *SizeGroup // out

	_sizeGroup = wrapSizeGroup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _sizeGroup
}

// AddWidget adds a widget to a SizeGroup. In the future, the requisition of
// the widget will be determined as the maximum of its requisition and the
// requisition of the other widgets in the size group. Whether this applies
// horizontally, vertically, or in both directions depends on the mode of the
// size group. See gtk_size_group_set_mode().
//
// When the widget is destroyed or no longer referenced elsewhere, it will be
// removed from the size group.
//
// The function takes the following parameters:
//
//   - widget to add.
func (sizeGroup *SizeGroup) AddWidget(widget Widgetter) {
	var _arg0 *C.GtkSizeGroup // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_size_group_add_widget(_arg0, _arg1)
	runtime.KeepAlive(sizeGroup)
	runtime.KeepAlive(widget)
}

// IgnoreHidden returns if invisible widgets are ignored when calculating the
// size.
//
// Deprecated: Measuring the size of hidden widgets has not worked reliably
// for a long time. In most cases, they will report a size of 0 nowadays,
// and thus, their size will not affect the other size group members. In effect,
// size groups will always operate as if this property was TRUE. Use a Stack
// instead to hide widgets while still having their size taken into account.
//
// The function returns the following values:
//
//   - ok: TRUE if invisible widgets are ignored.
func (sizeGroup *SizeGroup) IgnoreHidden() bool {
	var _arg0 *C.GtkSizeGroup // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))

	_cret = C.gtk_size_group_get_ignore_hidden(_arg0)
	runtime.KeepAlive(sizeGroup)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Mode gets the current mode of the size group. See gtk_size_group_set_mode().
//
// The function returns the following values:
//
//   - sizeGroupMode: current mode of the size group.
func (sizeGroup *SizeGroup) Mode() SizeGroupMode {
	var _arg0 *C.GtkSizeGroup    // out
	var _cret C.GtkSizeGroupMode // in

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))

	_cret = C.gtk_size_group_get_mode(_arg0)
	runtime.KeepAlive(sizeGroup)

	var _sizeGroupMode SizeGroupMode // out

	_sizeGroupMode = SizeGroupMode(_cret)

	return _sizeGroupMode
}

// Widgets returns the list of widgets associated with size_group.
//
// The function returns the following values:
//
//   - sList of widgets. The list is owned by GTK+ and should not be modified.
func (sizeGroup *SizeGroup) Widgets() []Widgetter {
	var _arg0 *C.GtkSizeGroup // out
	var _cret *C.GSList       // in

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))

	_cret = C.gtk_size_group_get_widgets(_arg0)
	runtime.KeepAlive(sizeGroup)

	var _sList []Widgetter // out

	_sList = make([]Widgetter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_sList = append(_sList, dst)
	})

	return _sList
}

// RemoveWidget removes a widget from a SizeGroup.
//
// The function takes the following parameters:
//
//   - widget to remove.
func (sizeGroup *SizeGroup) RemoveWidget(widget Widgetter) {
	var _arg0 *C.GtkSizeGroup // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_size_group_remove_widget(_arg0, _arg1)
	runtime.KeepAlive(sizeGroup)
	runtime.KeepAlive(widget)
}

// SetIgnoreHidden sets whether unmapped widgets should be ignored when
// calculating the size.
//
// Deprecated: Measuring the size of hidden widgets has not worked reliably
// for a long time. In most cases, they will report a size of 0 nowadays,
// and thus, their size will not affect the other size group members. In effect,
// size groups will always operate as if this property was TRUE. Use a Stack
// instead to hide widgets while still having their size taken into account.
//
// The function takes the following parameters:
//
//   - ignoreHidden: whether unmapped widgets should be ignored when calculating
//     the size.
func (sizeGroup *SizeGroup) SetIgnoreHidden(ignoreHidden bool) {
	var _arg0 *C.GtkSizeGroup // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))
	if ignoreHidden {
		_arg1 = C.TRUE
	}

	C.gtk_size_group_set_ignore_hidden(_arg0, _arg1)
	runtime.KeepAlive(sizeGroup)
	runtime.KeepAlive(ignoreHidden)
}

// SetMode sets the SizeGroupMode of the size group. The mode of the size
// group determines whether the widgets in the size group should all have the
// same horizontal requisition (GTK_SIZE_GROUP_HORIZONTAL) all have the same
// vertical requisition (GTK_SIZE_GROUP_VERTICAL), or should all have the same
// requisition in both directions (GTK_SIZE_GROUP_BOTH).
//
// The function takes the following parameters:
//
//   - mode to set for the size group.
func (sizeGroup *SizeGroup) SetMode(mode SizeGroupMode) {
	var _arg0 *C.GtkSizeGroup    // out
	var _arg1 C.GtkSizeGroupMode // out

	_arg0 = (*C.GtkSizeGroup)(unsafe.Pointer(coreglib.InternObject(sizeGroup).Native()))
	_arg1 = C.GtkSizeGroupMode(mode)

	C.gtk_size_group_set_mode(_arg0, _arg1)
	runtime.KeepAlive(sizeGroup)
	runtime.KeepAlive(mode)
}

// SocketOverrides contains methods that are overridable.
type SocketOverrides struct {
	PlugAdded   func()
	PlugRemoved func() bool
}

func defaultSocketOverrides(v *Socket) SocketOverrides {
	return SocketOverrides{
		PlugAdded:   v.plugAdded,
		PlugRemoved: v.plugRemoved,
	}
}

// Socket: together with Plug, Socket provides the ability to embed widgets
// from one process into another process in a fashion that is transparent to the
// user. One process creates a Socket widget and passes that widget’s window
// ID to the other process, which then creates a Plug with that window ID. Any
// widgets contained in the Plug then will appear inside the first application’s
// window.
//
// The socket’s window ID is obtained by using gtk_socket_get_id(). Before using
// this function, the socket must have been realized, and for hence, have been
// added to its parent.
//
// Obtaining the window ID of a socket.
//
//	GtkWidget *socket = gtk_socket_new ();
//	gtk_widget_show (socket);
//	gtk_container_add (GTK_CONTAINER (parent), socket);
//
//	// The following call is only necessary if one of
//	// the ancestors of the socket is not yet visible.
//	gtk_widget_realize (socket);
//	g_print ("The ID of the sockets window is %#x\n",
//	         gtk_socket_get_id (socket));
//
// Note that if you pass the window ID of the socket to another process that
// will create a plug in the socket, you must make sure that the socket widget
// is not destroyed until that plug is created. Violating this rule will cause
// unpredictable consequences, the most likely consequence being that the plug
// will appear as a separate toplevel window. You can check if the plug has
// been created by using gtk_socket_get_plug_window(). If it returns a non-NULL
// value, then the plug has been successfully created inside of the socket.
//
// When GTK+ is notified that the embedded window has been destroyed,
// then it will destroy the socket as well. You should always, therefore,
// be prepared for your sockets to be destroyed at any time when the main event
// loop is running. To prevent this from happening, you can connect to the
// Socket::plug-removed signal.
//
// The communication between a Socket and a Plug follows the XEmbed Protocol
// (http://www.freedesktop.org/Standards/xembed-spec). This protocol has also
// been implemented in other toolkits, e.g. Qt, allowing the same level of
// integration when embedding a Qt widget in GTK or vice versa.
//
// The Plug and Socket widgets are only available when GTK+ is compiled for
// the X11 platform and GDK_WINDOWING_X11 is defined. They can only be used on
// a X11Display. To use Plug and Socket, you need to include the gtk/gtkx.h
// header.
type Socket struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Socket)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Socket, *SocketClass, SocketOverrides](
		GTypeSocket,
		initSocketClass,
		wrapSocket,
		defaultSocketOverrides,
	)
}

func initSocketClass(gclass unsafe.Pointer, overrides SocketOverrides, classInitFunc func(*SocketClass)) {
	pclass := (*C.GtkSocketClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeSocket))))

	if overrides.PlugAdded != nil {
		pclass.plug_added = (*[0]byte)(C._gotk4_gtk3_SocketClass_plug_added)
	}

	if overrides.PlugRemoved != nil {
		pclass.plug_removed = (*[0]byte)(C._gotk4_gtk3_SocketClass_plug_removed)
	}

	if classInitFunc != nil {
		class := (*SocketClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSocket(obj *coreglib.Object) *Socket {
	return &Socket{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalSocket(p uintptr) (interface{}, error) {
	return wrapSocket(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectPlugAdded: this signal is emitted when a client is successfully added
// to the socket.
func (socket_ *Socket) ConnectPlugAdded(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(socket_, "plug-added", false, unsafe.Pointer(C._gotk4_gtk3_Socket_ConnectPlugAdded), f)
}

// ConnectPlugRemoved: this signal is emitted when a client is removed from the
// socket. The default action is to destroy the Socket widget, so if you want to
// reuse it you must add a signal handler that returns TRUE.
func (socket_ *Socket) ConnectPlugRemoved(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(socket_, "plug-removed", false, unsafe.Pointer(C._gotk4_gtk3_Socket_ConnectPlugRemoved), f)
}

// NewSocket: create a new empty Socket.
//
// The function returns the following values:
//
//   - socket: new Socket.
func NewSocket() *Socket {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_socket_new()

	var _socket *Socket // out

	_socket = wrapSocket(coreglib.Take(unsafe.Pointer(_cret)))

	return _socket
}

// PlugWindow retrieves the window of the plug. Use this to check if the plug
// has been created inside of the socket.
//
// The function returns the following values:
//
//   - window (optional) of the plug if available, or NULL.
func (socket_ *Socket) PlugWindow() gdk.Windower {
	var _arg0 *C.GtkSocket // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkSocket)(unsafe.Pointer(coreglib.InternObject(socket_).Native()))

	_cret = C.gtk_socket_get_plug_window(_arg0)
	runtime.KeepAlive(socket_)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

func (socket_ *Socket) plugAdded() {
	gclass := (*C.GtkSocketClass)(coreglib.PeekParentClass(socket_))
	fnarg := gclass.plug_added

	var _arg0 *C.GtkSocket // out

	_arg0 = (*C.GtkSocket)(unsafe.Pointer(coreglib.InternObject(socket_).Native()))

	C._gotk4_gtk3_Socket_virtual_plug_added(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(socket_)
}

func (socket_ *Socket) plugRemoved() bool {
	gclass := (*C.GtkSocketClass)(coreglib.PeekParentClass(socket_))
	fnarg := gclass.plug_removed

	var _arg0 *C.GtkSocket // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkSocket)(unsafe.Pointer(coreglib.InternObject(socket_).Native()))

	_cret = C._gotk4_gtk3_Socket_virtual_plug_removed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(socket_)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SocketAccessibleOverrides contains methods that are overridable.
type SocketAccessibleOverrides struct {
}

func defaultSocketAccessibleOverrides(v *SocketAccessible) SocketAccessibleOverrides {
	return SocketAccessibleOverrides{}
}

type SocketAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*SocketAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SocketAccessible, *SocketAccessibleClass, SocketAccessibleOverrides](
		GTypeSocketAccessible,
		initSocketAccessibleClass,
		wrapSocketAccessible,
		defaultSocketAccessibleOverrides,
	)
}

func initSocketAccessibleClass(gclass unsafe.Pointer, overrides SocketAccessibleOverrides, classInitFunc func(*SocketAccessibleClass)) {
	if classInitFunc != nil {
		class := (*SocketAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSocketAccessible(obj *coreglib.Object) *SocketAccessible {
	return &SocketAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalSocketAccessible(p uintptr) (interface{}, error) {
	return wrapSocketAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (socket *SocketAccessible) Embed(path string) {
	var _arg0 *C.GtkSocketAccessible // out
	var _arg1 *C.gchar               // out

	_arg0 = (*C.GtkSocketAccessible)(unsafe.Pointer(coreglib.InternObject(socket).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_socket_accessible_embed(_arg0, _arg1)
	runtime.KeepAlive(socket)
	runtime.KeepAlive(path)
}

// SpinButtonOverrides contains methods that are overridable.
type SpinButtonOverrides struct {
	ChangeValue  func(scroll ScrollType)
	Input        func(newValue *float64) int
	Output       func() int
	ValueChanged func()
	Wrapped      func()
}

func defaultSpinButtonOverrides(v *SpinButton) SpinButtonOverrides {
	return SpinButtonOverrides{
		ChangeValue:  v.changeValue,
		Input:        v.input,
		Output:       v.output,
		ValueChanged: v.valueChanged,
		Wrapped:      v.wrapped,
	}
}

// SpinButton is an ideal way to allow the user to set the value of some
// attribute. Rather than having to directly type a number into a Entry,
// GtkSpinButton allows the user to click on one of two arrows to increment or
// decrement the displayed value. A value can still be typed in, with the bonus
// that it can be checked to ensure it is in a given range.
//
// The main properties of a GtkSpinButton are through an adjustment. See the
// Adjustment section for more details about an adjustment's properties.
// Note that GtkSpinButton will by default make its entry large enough to
// accomodate the lower and upper bounds of the adjustment, which can lead
// to surprising results. Best practice is to set both the Entry:width-chars
// and Entry:max-width-chars poperties to the desired number of characters to
// display in the entry.
//
// CSS nodes
//
//	// Provides a function to retrieve a floating point value from a
//	// GtkSpinButton, and creates a high precision spin button.
//
//	gfloat
//	grab_float_value (GtkSpinButton *button,
//	                  gpointer       user_data)
//	{
//	  return gtk_spin_button_get_value (button);
//	}
//
//	void
//	create_floating_spin_button (void)
//	{
//	  GtkWidget *window, *button;
//	  GtkAdjustment *adjustment;
//
//	  adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0);
//
//	  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	  gtk_container_set_border_width (GTK_CONTAINER (window), 5);
//
//	  // creates the spinbutton, with three decimal places
//	  button = gtk_spin_button_new (adjustment, 0.001, 3);
//	  gtk_container_add (GTK_CONTAINER (window), button);
//
//	  gtk_widget_show_all (window);
//	}.
type SpinButton struct {
	_ [0]func() // equal guard
	Entry

	*coreglib.Object
	Orientable
}

var (
	_ coreglib.Objector = (*SpinButton)(nil)
	_ Widgetter         = (*SpinButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SpinButton, *SpinButtonClass, SpinButtonOverrides](
		GTypeSpinButton,
		initSpinButtonClass,
		wrapSpinButton,
		defaultSpinButtonOverrides,
	)
}

func initSpinButtonClass(gclass unsafe.Pointer, overrides SpinButtonOverrides, classInitFunc func(*SpinButtonClass)) {
	pclass := (*C.GtkSpinButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeSpinButton))))

	if overrides.ChangeValue != nil {
		pclass.change_value = (*[0]byte)(C._gotk4_gtk3_SpinButtonClass_change_value)
	}

	if overrides.Input != nil {
		pclass.input = (*[0]byte)(C._gotk4_gtk3_SpinButtonClass_input)
	}

	if overrides.Output != nil {
		pclass.output = (*[0]byte)(C._gotk4_gtk3_SpinButtonClass_output)
	}

	if overrides.ValueChanged != nil {
		pclass.value_changed = (*[0]byte)(C._gotk4_gtk3_SpinButtonClass_value_changed)
	}

	if overrides.Wrapped != nil {
		pclass.wrapped = (*[0]byte)(C._gotk4_gtk3_SpinButtonClass_wrapped)
	}

	if classInitFunc != nil {
		class := (*SpinButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSpinButton(obj *coreglib.Object) *SpinButton {
	return &SpinButton{
		Entry: Entry{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			CellEditable: CellEditable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Editable: Editable{
				Object: obj,
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
	}
}

func marshalSpinButton(p uintptr) (interface{}, error) {
	return wrapSpinButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChangeValue signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a value change.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// The default bindings for this signal are Up/Down and PageUp and/PageDown.
func (spinButton *SpinButton) ConnectChangeValue(f func(scroll ScrollType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(spinButton, "change-value", false, unsafe.Pointer(C._gotk4_gtk3_SpinButton_ConnectChangeValue), f)
}

// ConnectOutput signal can be used to change to formatting of the value that is
// displayed in the spin buttons entry.
//
//	// show leading zeros
//	static gboolean
//	on_output (GtkSpinButton *spin,
//	           gpointer       data)
//	{
//	   GtkAdjustment *adjustment;
//	   gchar *text;
//	   int value;
//
//	   adjustment = gtk_spin_button_get_adjustment (spin);
//	   value = (int)gtk_adjustment_get_value (adjustment);
//	   text = g_strdup_printf ("02d", value);
//	   gtk_entry_set_text (GTK_ENTRY (spin), text);
//	   g_free (text);
//
//	   return TRUE;
//	}.
func (spinButton *SpinButton) ConnectOutput(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(spinButton, "output", false, unsafe.Pointer(C._gotk4_gtk3_SpinButton_ConnectOutput), f)
}

// ConnectValueChanged signal is emitted when the value represented by
// spinbutton changes. Also see the SpinButton::output signal.
func (spinButton *SpinButton) ConnectValueChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(spinButton, "value-changed", false, unsafe.Pointer(C._gotk4_gtk3_SpinButton_ConnectValueChanged), f)
}

// ConnectWrapped signal is emitted right after the spinbutton wraps from its
// maximum to minimum value or vice-versa.
func (spinButton *SpinButton) ConnectWrapped(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(spinButton, "wrapped", false, unsafe.Pointer(C._gotk4_gtk3_SpinButton_ConnectWrapped), f)
}

// NewSpinButton creates a new SpinButton.
//
// The function takes the following parameters:
//
//   - adjustment (optional) object that this spin button should use, or NULL.
//   - climbRate specifies by how much the rate of change in the value will
//     accelerate if you continue to hold down an up/down button or arrow key.
//   - digits: number of decimal places to display.
//
// The function returns the following values:
//
//   - spinButton: new spin button as a Widget.
func NewSpinButton(adjustment *Adjustment, climbRate float64, digits uint) *SpinButton {
	var _arg1 *C.GtkAdjustment // out
	var _arg2 C.gdouble        // out
	var _arg3 C.guint          // out
	var _cret *C.GtkWidget     // in

	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}
	_arg2 = C.gdouble(climbRate)
	_arg3 = C.guint(digits)

	_cret = C.gtk_spin_button_new(_arg1, _arg2, _arg3)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(climbRate)
	runtime.KeepAlive(digits)

	var _spinButton *SpinButton // out

	_spinButton = wrapSpinButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _spinButton
}

// NewSpinButtonWithRange: this is a convenience constructor that allows
// creation of a numeric SpinButton without manually creating an adjustment.
// The value is initially set to the minimum value and a page increment of 10
// * step is the default. The precision of the spin button is equivalent to the
// precision of step.
//
// Note that the way in which the precision is derived works best if step is
// a power of ten. If the resulting precision is not suitable for your needs,
// use gtk_spin_button_set_digits() to correct it.
//
// The function takes the following parameters:
//
//   - min: minimum allowable value.
//   - max: maximum allowable value.
//   - step: increment added or subtracted by spinning the widget.
//
// The function returns the following values:
//
//   - spinButton: new spin button as a Widget.
func NewSpinButtonWithRange(min, max, step float64) *SpinButton {
	var _arg1 C.gdouble    // out
	var _arg2 C.gdouble    // out
	var _arg3 C.gdouble    // out
	var _cret *C.GtkWidget // in

	_arg1 = C.gdouble(min)
	_arg2 = C.gdouble(max)
	_arg3 = C.gdouble(step)

	_cret = C.gtk_spin_button_new_with_range(_arg1, _arg2, _arg3)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
	runtime.KeepAlive(step)

	var _spinButton *SpinButton // out

	_spinButton = wrapSpinButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _spinButton
}

// Configure changes the properties of an existing spin button. The adjustment,
// climb rate, and number of decimal places are updated accordingly.
//
// The function takes the following parameters:
//
//   - adjustment (optional) to replace the spin button’s existing adjustment,
//     or NULL to leave its current adjustment unchanged.
//   - climbRate: new climb rate.
//   - digits: number of decimal places to display in the spin button.
func (spinButton *SpinButton) Configure(adjustment *Adjustment, climbRate float64, digits uint) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 *C.GtkAdjustment // out
	var _arg2 C.gdouble        // out
	var _arg3 C.guint          // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}
	_arg2 = C.gdouble(climbRate)
	_arg3 = C.guint(digits)

	C.gtk_spin_button_configure(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(adjustment)
	runtime.KeepAlive(climbRate)
	runtime.KeepAlive(digits)
}

// Adjustment: get the adjustment associated with a SpinButton.
//
// The function returns the following values:
//
//   - adjustment of spin_button.
func (spinButton *SpinButton) Adjustment() *Adjustment {
	var _arg0 *C.GtkSpinButton // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_adjustment(_arg0)
	runtime.KeepAlive(spinButton)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// Digits fetches the precision of spin_button. See
// gtk_spin_button_set_digits().
//
// The function returns the following values:
//
//   - guint: current precision.
func (spinButton *SpinButton) Digits() uint {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_digits(_arg0)
	runtime.KeepAlive(spinButton)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Increments gets the current step and page the increments used by spin_button.
// See gtk_spin_button_set_increments().
//
// The function returns the following values:
//
//   - step (optional): location to store step increment, or NULL.
//   - page (optional): location to store page increment, or NULL.
func (spinButton *SpinButton) Increments() (step, page float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gdouble        // in
	var _arg2 C.gdouble        // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	C.gtk_spin_button_get_increments(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(spinButton)

	var _step float64 // out
	var _page float64 // out

	_step = float64(_arg1)
	_page = float64(_arg2)

	return _step, _page
}

// Numeric returns whether non-numeric text can be typed into the spin button.
// See gtk_spin_button_set_numeric().
//
// The function returns the following values:
//
//   - ok: TRUE if only numeric text can be entered.
func (spinButton *SpinButton) Numeric() bool {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_numeric(_arg0)
	runtime.KeepAlive(spinButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Range gets the range allowed for spin_button. See
// gtk_spin_button_set_range().
//
// The function returns the following values:
//
//   - min (optional): location to store minimum allowed value, or NULL.
//   - max (optional): location to store maximum allowed value, or NULL.
func (spinButton *SpinButton) Range() (min, max float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gdouble        // in
	var _arg2 C.gdouble        // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	C.gtk_spin_button_get_range(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(spinButton)

	var _min float64 // out
	var _max float64 // out

	_min = float64(_arg1)
	_max = float64(_arg2)

	return _min, _max
}

// SnapToTicks returns whether the values are corrected to the nearest step.
// See gtk_spin_button_set_snap_to_ticks().
//
// The function returns the following values:
//
//   - ok: TRUE if values are snapped to the nearest step.
func (spinButton *SpinButton) SnapToTicks() bool {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_snap_to_ticks(_arg0)
	runtime.KeepAlive(spinButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// UpdatePolicy gets the update behavior of a spin button. See
// gtk_spin_button_set_update_policy().
//
// The function returns the following values:
//
//   - spinButtonUpdatePolicy: current update policy.
func (spinButton *SpinButton) UpdatePolicy() SpinButtonUpdatePolicy {
	var _arg0 *C.GtkSpinButton            // out
	var _cret C.GtkSpinButtonUpdatePolicy // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_update_policy(_arg0)
	runtime.KeepAlive(spinButton)

	var _spinButtonUpdatePolicy SpinButtonUpdatePolicy // out

	_spinButtonUpdatePolicy = SpinButtonUpdatePolicy(_cret)

	return _spinButtonUpdatePolicy
}

// Value: get the value in the spin_button.
//
// The function returns the following values:
//
//   - gdouble: value of spin_button.
func (spinButton *SpinButton) Value() float64 {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.gdouble        // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_value(_arg0)
	runtime.KeepAlive(spinButton)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// ValueAsInt: get the value spin_button represented as an integer.
//
// The function returns the following values:
//
//   - gint: value of spin_button.
func (spinButton *SpinButton) ValueAsInt() int {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_value_as_int(_arg0)
	runtime.KeepAlive(spinButton)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Wrap returns whether the spin button’s value wraps around to the
// opposite limit when the upper or lower limit of the range is exceeded.
// See gtk_spin_button_set_wrap().
//
// The function returns the following values:
//
//   - ok: TRUE if the spin button wraps around.
func (spinButton *SpinButton) Wrap() bool {
	var _arg0 *C.GtkSpinButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C.gtk_spin_button_get_wrap(_arg0)
	runtime.KeepAlive(spinButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAdjustment replaces the Adjustment associated with spin_button.
//
// The function takes the following parameters:
//
//   - adjustment to replace the existing adjustment.
func (spinButton *SpinButton) SetAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	C.gtk_spin_button_set_adjustment(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(adjustment)
}

// SetDigits: set the precision to be displayed by spin_button. Up to 20 digit
// precision is allowed.
//
// The function takes the following parameters:
//
//   - digits: number of digits after the decimal point to be displayed for the
//     spin button’s value.
func (spinButton *SpinButton) SetDigits(digits uint) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.guint          // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.guint(digits)

	C.gtk_spin_button_set_digits(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(digits)
}

// SetIncrements sets the step and page increments for spin_button. This affects
// how quickly the value changes when the spin button’s arrows are activated.
//
// The function takes the following parameters:
//
//   - step: increment applied for a button 1 press.
//   - page: increment applied for a button 2 press.
func (spinButton *SpinButton) SetIncrements(step, page float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gdouble        // out
	var _arg2 C.gdouble        // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.gdouble(step)
	_arg2 = C.gdouble(page)

	C.gtk_spin_button_set_increments(_arg0, _arg1, _arg2)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(step)
	runtime.KeepAlive(page)
}

// SetNumeric sets the flag that determines if non-numeric text can be typed
// into the spin button.
//
// The function takes the following parameters:
//
//   - numeric: flag indicating if only numeric entry is allowed.
func (spinButton *SpinButton) SetNumeric(numeric bool) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	if numeric {
		_arg1 = C.TRUE
	}

	C.gtk_spin_button_set_numeric(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(numeric)
}

// SetRange sets the minimum and maximum allowable values for spin_button.
//
// If the current value is outside this range, it will be adjusted to fit within
// the range, otherwise it will remain unchanged.
//
// The function takes the following parameters:
//
//   - min: minimum allowable value.
//   - max: maximum allowable value.
func (spinButton *SpinButton) SetRange(min, max float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gdouble        // out
	var _arg2 C.gdouble        // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.gdouble(min)
	_arg2 = C.gdouble(max)

	C.gtk_spin_button_set_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
}

// SetSnapToTicks sets the policy as to whether values are corrected to the
// nearest step increment when a spin button is activated after providing an
// invalid value.
//
// The function takes the following parameters:
//
//   - snapToTicks: flag indicating if invalid values should be corrected.
func (spinButton *SpinButton) SetSnapToTicks(snapToTicks bool) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	if snapToTicks {
		_arg1 = C.TRUE
	}

	C.gtk_spin_button_set_snap_to_ticks(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(snapToTicks)
}

// SetUpdatePolicy sets the update behavior of a spin button. This determines
// whether the spin button is always updated or only when a valid value is set.
//
// The function takes the following parameters:
//
//   - policy: SpinButtonUpdatePolicy value.
func (spinButton *SpinButton) SetUpdatePolicy(policy SpinButtonUpdatePolicy) {
	var _arg0 *C.GtkSpinButton            // out
	var _arg1 C.GtkSpinButtonUpdatePolicy // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.GtkSpinButtonUpdatePolicy(policy)

	C.gtk_spin_button_set_update_policy(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(policy)
}

// SetValue sets the value of spin_button.
//
// The function takes the following parameters:
//
//   - value: new value.
func (spinButton *SpinButton) SetValue(value float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gdouble        // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.gdouble(value)

	C.gtk_spin_button_set_value(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(value)
}

// SetWrap sets the flag that determines if a spin button value wraps around to
// the opposite limit when the upper or lower limit of the range is exceeded.
//
// The function takes the following parameters:
//
//   - wrap: flag indicating if wrapping behavior is performed.
func (spinButton *SpinButton) SetWrap(wrap bool) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	if wrap {
		_arg1 = C.TRUE
	}

	C.gtk_spin_button_set_wrap(_arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(wrap)
}

// Spin: increment or decrement a spin button’s value in a specified direction
// by a specified amount.
//
// The function takes the following parameters:
//
//   - direction indicating the direction to spin.
//   - increment: step increment to apply in the specified direction.
func (spinButton *SpinButton) Spin(direction SpinType, increment float64) {
	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.GtkSpinType    // out
	var _arg2 C.gdouble        // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.GtkSpinType(direction)
	_arg2 = C.gdouble(increment)

	C.gtk_spin_button_spin(_arg0, _arg1, _arg2)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(increment)
}

// Update: manually force an update of the spin button.
func (spinButton *SpinButton) Update() {
	var _arg0 *C.GtkSpinButton // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	C.gtk_spin_button_update(_arg0)
	runtime.KeepAlive(spinButton)
}

func (spinButton *SpinButton) changeValue(scroll ScrollType) {
	gclass := (*C.GtkSpinButtonClass)(coreglib.PeekParentClass(spinButton))
	fnarg := gclass.change_value

	var _arg0 *C.GtkSpinButton // out
	var _arg1 C.GtkScrollType  // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = C.GtkScrollType(scroll)

	C._gotk4_gtk3_SpinButton_virtual_change_value(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(scroll)
}

func (spinButton *SpinButton) input(newValue *float64) int {
	gclass := (*C.GtkSpinButtonClass)(coreglib.PeekParentClass(spinButton))
	fnarg := gclass.input

	var _arg0 *C.GtkSpinButton // out
	var _arg1 *C.gdouble       // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))
	_arg1 = (*C.gdouble)(unsafe.Pointer(newValue))

	_cret = C._gotk4_gtk3_SpinButton_virtual_input(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(spinButton)
	runtime.KeepAlive(newValue)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

func (spinButton *SpinButton) output() int {
	gclass := (*C.GtkSpinButtonClass)(coreglib.PeekParentClass(spinButton))
	fnarg := gclass.output

	var _arg0 *C.GtkSpinButton // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	_cret = C._gotk4_gtk3_SpinButton_virtual_output(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(spinButton)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

func (spinButton *SpinButton) valueChanged() {
	gclass := (*C.GtkSpinButtonClass)(coreglib.PeekParentClass(spinButton))
	fnarg := gclass.value_changed

	var _arg0 *C.GtkSpinButton // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	C._gotk4_gtk3_SpinButton_virtual_value_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(spinButton)
}

func (spinButton *SpinButton) wrapped() {
	gclass := (*C.GtkSpinButtonClass)(coreglib.PeekParentClass(spinButton))
	fnarg := gclass.wrapped

	var _arg0 *C.GtkSpinButton // out

	_arg0 = (*C.GtkSpinButton)(unsafe.Pointer(coreglib.InternObject(spinButton).Native()))

	C._gotk4_gtk3_SpinButton_virtual_wrapped(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(spinButton)
}

// SpinButtonAccessibleOverrides contains methods that are overridable.
type SpinButtonAccessibleOverrides struct {
}

func defaultSpinButtonAccessibleOverrides(v *SpinButtonAccessible) SpinButtonAccessibleOverrides {
	return SpinButtonAccessibleOverrides{}
}

type SpinButtonAccessible struct {
	_ [0]func() // equal guard
	EntryAccessible

	*coreglib.Object
	atk.Value
}

var (
	_ coreglib.Objector = (*SpinButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SpinButtonAccessible, *SpinButtonAccessibleClass, SpinButtonAccessibleOverrides](
		GTypeSpinButtonAccessible,
		initSpinButtonAccessibleClass,
		wrapSpinButtonAccessible,
		defaultSpinButtonAccessibleOverrides,
	)
}

func initSpinButtonAccessibleClass(gclass unsafe.Pointer, overrides SpinButtonAccessibleOverrides, classInitFunc func(*SpinButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*SpinButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSpinButtonAccessible(obj *coreglib.Object) *SpinButtonAccessible {
	return &SpinButtonAccessible{
		EntryAccessible: EntryAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			EditableText: atk.EditableText{
				Object: obj,
			},
			Text: atk.Text{
				Object: obj,
			},
		},
		Object: obj,
		Value: atk.Value{
			Object: obj,
		},
	}
}

func marshalSpinButtonAccessible(p uintptr) (interface{}, error) {
	return wrapSpinButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// SpinnerOverrides contains methods that are overridable.
type SpinnerOverrides struct {
}

func defaultSpinnerOverrides(v *Spinner) SpinnerOverrides {
	return SpinnerOverrides{}
}

// Spinner widget displays an icon-size spinning animation. It is often used
// as an alternative to a ProgressBar for displaying indefinite activity,
// instead of actual progress.
//
// To start the animation, use gtk_spinner_start(), to stop it use
// gtk_spinner_stop().
//
// # CSS nodes
//
// GtkSpinner has a single CSS node with the name spinner. When the animation is
// active, the :checked pseudoclass is added to this node.
type Spinner struct {
	_ [0]func() // equal guard
	Widget
}

var (
	_ Widgetter = (*Spinner)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Spinner, *SpinnerClass, SpinnerOverrides](
		GTypeSpinner,
		initSpinnerClass,
		wrapSpinner,
		defaultSpinnerOverrides,
	)
}

func initSpinnerClass(gclass unsafe.Pointer, overrides SpinnerOverrides, classInitFunc func(*SpinnerClass)) {
	if classInitFunc != nil {
		class := (*SpinnerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSpinner(obj *coreglib.Object) *Spinner {
	return &Spinner{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalSpinner(p uintptr) (interface{}, error) {
	return wrapSpinner(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewSpinner returns a new spinner widget. Not yet started.
//
// The function returns the following values:
//
//   - spinner: new Spinner.
func NewSpinner() *Spinner {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_spinner_new()

	var _spinner *Spinner // out

	_spinner = wrapSpinner(coreglib.Take(unsafe.Pointer(_cret)))

	return _spinner
}

// Start starts the animation of the spinner.
func (spinner *Spinner) Start() {
	var _arg0 *C.GtkSpinner // out

	_arg0 = (*C.GtkSpinner)(unsafe.Pointer(coreglib.InternObject(spinner).Native()))

	C.gtk_spinner_start(_arg0)
	runtime.KeepAlive(spinner)
}

// Stop stops the animation of the spinner.
func (spinner *Spinner) Stop() {
	var _arg0 *C.GtkSpinner // out

	_arg0 = (*C.GtkSpinner)(unsafe.Pointer(coreglib.InternObject(spinner).Native()))

	C.gtk_spinner_stop(_arg0)
	runtime.KeepAlive(spinner)
}

// SpinnerAccessibleOverrides contains methods that are overridable.
type SpinnerAccessibleOverrides struct {
}

func defaultSpinnerAccessibleOverrides(v *SpinnerAccessible) SpinnerAccessibleOverrides {
	return SpinnerAccessibleOverrides{}
}

type SpinnerAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Image
}

var (
	_ coreglib.Objector = (*SpinnerAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SpinnerAccessible, *SpinnerAccessibleClass, SpinnerAccessibleOverrides](
		GTypeSpinnerAccessible,
		initSpinnerAccessibleClass,
		wrapSpinnerAccessible,
		defaultSpinnerAccessibleOverrides,
	)
}

func initSpinnerAccessibleClass(gclass unsafe.Pointer, overrides SpinnerAccessibleOverrides, classInitFunc func(*SpinnerAccessibleClass)) {
	if classInitFunc != nil {
		class := (*SpinnerAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSpinnerAccessible(obj *coreglib.Object) *SpinnerAccessible {
	return &SpinnerAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Image: atk.Image{
			Object: obj,
		},
	}
}

func marshalSpinnerAccessible(p uintptr) (interface{}, error) {
	return wrapSpinnerAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// StackOverrides contains methods that are overridable.
type StackOverrides struct {
}

func defaultStackOverrides(v *Stack) StackOverrides {
	return StackOverrides{}
}

// Stack widget is a container which only shows one of its children at a time.
// In contrast to GtkNotebook, GtkStack does not provide a means for users to
// change the visible child. Instead, the StackSwitcher widget can be used with
// GtkStack to provide this functionality.
//
// Transitions between pages can be animated as slides or fades. This can be
// controlled with gtk_stack_set_transition_type(). These animations respect the
// Settings:gtk-enable-animations setting.
//
// The GtkStack widget was added in GTK+ 3.10.
//
// # CSS nodes
//
// GtkStack has a single CSS node named stack.
type Stack struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Stack)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Stack, *StackClass, StackOverrides](
		GTypeStack,
		initStackClass,
		wrapStack,
		defaultStackOverrides,
	)
}

func initStackClass(gclass unsafe.Pointer, overrides StackOverrides, classInitFunc func(*StackClass)) {
	if classInitFunc != nil {
		class := (*StackClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStack(obj *coreglib.Object) *Stack {
	return &Stack{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalStack(p uintptr) (interface{}, error) {
	return wrapStack(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewStack creates a new Stack container.
//
// The function returns the following values:
//
//   - stack: new Stack.
func NewStack() *Stack {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_stack_new()

	var _stack *Stack // out

	_stack = wrapStack(coreglib.Take(unsafe.Pointer(_cret)))

	return _stack
}

// AddNamed adds a child to stack. The child is identified by the name.
//
// The function takes the following parameters:
//
//   - child: widget to add.
//   - name for child.
func (stack *Stack) AddNamed(child Widgetter, name string) {
	var _arg0 *C.GtkStack  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.gchar     // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_stack_add_named(_arg0, _arg1, _arg2)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(child)
	runtime.KeepAlive(name)
}

// AddTitled adds a child to stack. The child is identified by the name.
// The title will be used by StackSwitcher to represent child in a tab bar,
// so it should be short.
//
// The function takes the following parameters:
//
//   - child: widget to add.
//   - name for child.
//   - title: human-readable title for child.
func (stack *Stack) AddTitled(child Widgetter, name, title string) {
	var _arg0 *C.GtkStack  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 *C.gchar     // out
	var _arg3 *C.gchar     // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg3))

	C.gtk_stack_add_titled(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(child)
	runtime.KeepAlive(name)
	runtime.KeepAlive(title)
}

// ChildByName finds the child of the Stack with the name given as the argument.
// Returns NULL if there is no child with this name.
//
// The function takes the following parameters:
//
//   - name of the child to find.
//
// The function returns the following values:
//
//   - widget (optional): requested child of the Stack.
func (stack *Stack) ChildByName(name string) Widgetter {
	var _arg0 *C.GtkStack  // out
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_stack_get_child_by_name(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(name)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Hhomogeneous gets whether stack is horizontally homogeneous. See
// gtk_stack_set_hhomogeneous().
//
// The function returns the following values:
//
//   - ok: whether stack is horizontally homogeneous.
func (stack *Stack) Hhomogeneous() bool {
	var _arg0 *C.GtkStack // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_hhomogeneous(_arg0)
	runtime.KeepAlive(stack)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Homogeneous gets whether stack is homogeneous. See
// gtk_stack_set_homogeneous().
//
// The function returns the following values:
//
//   - ok: whether stack is homogeneous.
func (stack *Stack) Homogeneous() bool {
	var _arg0 *C.GtkStack // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_homogeneous(_arg0)
	runtime.KeepAlive(stack)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InterpolateSize returns wether the Stack is set up to interpolate between the
// sizes of children on page switch.
//
// The function returns the following values:
//
//   - ok: TRUE if child sizes are interpolated.
func (stack *Stack) InterpolateSize() bool {
	var _arg0 *C.GtkStack // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_interpolate_size(_arg0)
	runtime.KeepAlive(stack)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TransitionDuration returns the amount of time (in milliseconds) that
// transitions between pages in stack will take.
//
// The function returns the following values:
//
//   - guint: transition duration.
func (stack *Stack) TransitionDuration() uint {
	var _arg0 *C.GtkStack // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_transition_duration(_arg0)
	runtime.KeepAlive(stack)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// TransitionRunning returns whether the stack is currently in a transition from
// one page to another.
//
// The function returns the following values:
//
//   - ok: TRUE if the transition is currently running, FALSE otherwise.
func (stack *Stack) TransitionRunning() bool {
	var _arg0 *C.GtkStack // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_transition_running(_arg0)
	runtime.KeepAlive(stack)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TransitionType gets the type of animation that will be used for transitions
// between pages in stack.
//
// The function returns the following values:
//
//   - stackTransitionType: current transition type of stack.
func (stack *Stack) TransitionType() StackTransitionType {
	var _arg0 *C.GtkStack              // out
	var _cret C.GtkStackTransitionType // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_transition_type(_arg0)
	runtime.KeepAlive(stack)

	var _stackTransitionType StackTransitionType // out

	_stackTransitionType = StackTransitionType(_cret)

	return _stackTransitionType
}

// Vhomogeneous gets whether stack is vertically homogeneous. See
// gtk_stack_set_vhomogeneous().
//
// The function returns the following values:
//
//   - ok: whether stack is vertically homogeneous.
func (stack *Stack) Vhomogeneous() bool {
	var _arg0 *C.GtkStack // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_vhomogeneous(_arg0)
	runtime.KeepAlive(stack)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleChild gets the currently visible child of stack, or NULL if there are
// no visible children.
//
// The function returns the following values:
//
//   - widget (optional): visible child of the Stack.
func (stack *Stack) VisibleChild() Widgetter {
	var _arg0 *C.GtkStack  // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_visible_child(_arg0)
	runtime.KeepAlive(stack)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// VisibleChildName returns the name of the currently visible child of stack,
// or NULL if there is no visible child.
//
// The function returns the following values:
//
//   - utf8 (optional): name of the visible child of the Stack.
func (stack *Stack) VisibleChildName() string {
	var _arg0 *C.GtkStack // out
	var _cret *C.gchar    // in

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	_cret = C.gtk_stack_get_visible_child_name(_arg0)
	runtime.KeepAlive(stack)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// SetHhomogeneous sets the Stack to be horizontally homogeneous or not. If it
// is homogeneous, the Stack will request the same width for all its children.
// If it isn't, the stack may change width when a different child becomes
// visible.
//
// The function takes the following parameters:
//
//   - hhomogeneous: TRUE to make stack horizontally homogeneous.
func (stack *Stack) SetHhomogeneous(hhomogeneous bool) {
	var _arg0 *C.GtkStack // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	if hhomogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_stack_set_hhomogeneous(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(hhomogeneous)
}

// SetHomogeneous sets the Stack to be homogeneous or not. If it is homogeneous,
// the Stack will request the same size for all its children. If it isn't,
// the stack may change size when a different child becomes visible.
//
// Since 3.16, homogeneity can be controlled separately for horizontal and
// vertical size, with the Stack:hhomogeneous and Stack:vhomogeneous.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE to make stack homogeneous.
func (stack *Stack) SetHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkStack // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_stack_set_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(homogeneous)
}

// SetInterpolateSize sets whether or not stack will interpolate its size when
// changing the visible child. If the Stack:interpolate-size property is set
// to TRUE, stack will interpolate its size between the current one and the one
// it'll take after changing the visible child, according to the set transition
// duration.
//
// The function takes the following parameters:
//
//   - interpolateSize: new value.
func (stack *Stack) SetInterpolateSize(interpolateSize bool) {
	var _arg0 *C.GtkStack // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	if interpolateSize {
		_arg1 = C.TRUE
	}

	C.gtk_stack_set_interpolate_size(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(interpolateSize)
}

// SetTransitionDuration sets the duration that transitions between pages in
// stack will take.
//
// The function takes the following parameters:
//
//   - duration: new duration, in milliseconds.
func (stack *Stack) SetTransitionDuration(duration uint) {
	var _arg0 *C.GtkStack // out
	var _arg1 C.guint     // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = C.guint(duration)

	C.gtk_stack_set_transition_duration(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(duration)
}

// SetTransitionType sets the type of animation that will be used for
// transitions between pages in stack. Available types include various kinds of
// fades and slides.
//
// The transition type can be changed without problems at runtime, so it is
// possible to change the animation based on the page that is about to become
// current.
//
// The function takes the following parameters:
//
//   - transition: new transition type.
func (stack *Stack) SetTransitionType(transition StackTransitionType) {
	var _arg0 *C.GtkStack              // out
	var _arg1 C.GtkStackTransitionType // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = C.GtkStackTransitionType(transition)

	C.gtk_stack_set_transition_type(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(transition)
}

// SetVhomogeneous sets the Stack to be vertically homogeneous or not. If it is
// homogeneous, the Stack will request the same height for all its children. If
// it isn't, the stack may change height when a different child becomes visible.
//
// The function takes the following parameters:
//
//   - vhomogeneous: TRUE to make stack vertically homogeneous.
func (stack *Stack) SetVhomogeneous(vhomogeneous bool) {
	var _arg0 *C.GtkStack // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	if vhomogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_stack_set_vhomogeneous(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(vhomogeneous)
}

// SetVisibleChild makes child the visible child of stack.
//
// If child is different from the currently visible child, the transition
// between the two will be animated with the current transition type of stack.
//
// Note that the child widget has to be visible itself (see gtk_widget_show())
// in order to become the visible child of stack.
//
// The function takes the following parameters:
//
//   - child of stack.
func (stack *Stack) SetVisibleChild(child Widgetter) {
	var _arg0 *C.GtkStack  // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))

	C.gtk_stack_set_visible_child(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(child)
}

// SetVisibleChildFull makes the child with the given name visible.
//
// Note that the child widget has to be visible itself (see gtk_widget_show())
// in order to become the visible child of stack.
//
// The function takes the following parameters:
//
//   - name of the child to make visible.
//   - transition type to use.
func (stack *Stack) SetVisibleChildFull(name string, transition StackTransitionType) {
	var _arg0 *C.GtkStack              // out
	var _arg1 *C.gchar                 // out
	var _arg2 C.GtkStackTransitionType // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStackTransitionType(transition)

	C.gtk_stack_set_visible_child_full(_arg0, _arg1, _arg2)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(name)
	runtime.KeepAlive(transition)
}

// SetVisibleChildName makes the child with the given name visible.
//
// If child is different from the currently visible child, the transition
// between the two will be animated with the current transition type of stack.
//
// Note that the child widget has to be visible itself (see gtk_widget_show())
// in order to become the visible child of stack.
//
// The function takes the following parameters:
//
//   - name of the child to make visible.
func (stack *Stack) SetVisibleChildName(name string) {
	var _arg0 *C.GtkStack // out
	var _arg1 *C.gchar    // out

	_arg0 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_stack_set_visible_child_name(_arg0, _arg1)
	runtime.KeepAlive(stack)
	runtime.KeepAlive(name)
}

// StackAccessibleOverrides contains methods that are overridable.
type StackAccessibleOverrides struct {
}

func defaultStackAccessibleOverrides(v *StackAccessible) StackAccessibleOverrides {
	return StackAccessibleOverrides{}
}

type StackAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*StackAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StackAccessible, *StackAccessibleClass, StackAccessibleOverrides](
		GTypeStackAccessible,
		initStackAccessibleClass,
		wrapStackAccessible,
		defaultStackAccessibleOverrides,
	)
}

func initStackAccessibleClass(gclass unsafe.Pointer, overrides StackAccessibleOverrides, classInitFunc func(*StackAccessibleClass)) {
	if classInitFunc != nil {
		class := (*StackAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStackAccessible(obj *coreglib.Object) *StackAccessible {
	return &StackAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalStackAccessible(p uintptr) (interface{}, error) {
	return wrapStackAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// StackSidebarOverrides contains methods that are overridable.
type StackSidebarOverrides struct {
}

func defaultStackSidebarOverrides(v *StackSidebar) StackSidebarOverrides {
	return StackSidebarOverrides{}
}

// StackSidebar enables you to quickly and easily provide a consistent "sidebar"
// object for your user interface.
//
// In order to use a GtkStackSidebar, you simply use a GtkStack to organize
// your UI flow, and add the sidebar to your sidebar area. You can use
// gtk_stack_sidebar_set_stack() to connect the StackSidebar to the Stack.
//
// # CSS nodes
//
// GtkStackSidebar has a single CSS node with name stacksidebar and style class
// .sidebar.
//
// When circumstances require it, GtkStackSidebar adds the .needs-attention
// style class to the widgets representing the stack pages.
type StackSidebar struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*StackSidebar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StackSidebar, *StackSidebarClass, StackSidebarOverrides](
		GTypeStackSidebar,
		initStackSidebarClass,
		wrapStackSidebar,
		defaultStackSidebarOverrides,
	)
}

func initStackSidebarClass(gclass unsafe.Pointer, overrides StackSidebarOverrides, classInitFunc func(*StackSidebarClass)) {
	if classInitFunc != nil {
		class := (*StackSidebarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStackSidebar(obj *coreglib.Object) *StackSidebar {
	return &StackSidebar{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalStackSidebar(p uintptr) (interface{}, error) {
	return wrapStackSidebar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewStackSidebar creates a new sidebar.
//
// The function returns the following values:
//
//   - stackSidebar: new StackSidebar.
func NewStackSidebar() *StackSidebar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_stack_sidebar_new()

	var _stackSidebar *StackSidebar // out

	_stackSidebar = wrapStackSidebar(coreglib.Take(unsafe.Pointer(_cret)))

	return _stackSidebar
}

// Stack retrieves the stack. See gtk_stack_sidebar_set_stack().
//
// The function returns the following values:
//
//   - stack (optional): associated Stack or NULL if none has been set
//     explicitly.
func (sidebar *StackSidebar) Stack() *Stack {
	var _arg0 *C.GtkStackSidebar // out
	var _cret *C.GtkStack        // in

	_arg0 = (*C.GtkStackSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))

	_cret = C.gtk_stack_sidebar_get_stack(_arg0)
	runtime.KeepAlive(sidebar)

	var _stack *Stack // out

	if _cret != nil {
		_stack = wrapStack(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _stack
}

// SetStack: set the Stack associated with this StackSidebar.
//
// The sidebar widget will automatically update according to the order (packing)
// and items within the given Stack.
//
// The function takes the following parameters:
//
//   - stack: Stack.
func (sidebar *StackSidebar) SetStack(stack *Stack) {
	var _arg0 *C.GtkStackSidebar // out
	var _arg1 *C.GtkStack        // out

	_arg0 = (*C.GtkStackSidebar)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
	_arg1 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))

	C.gtk_stack_sidebar_set_stack(_arg0, _arg1)
	runtime.KeepAlive(sidebar)
	runtime.KeepAlive(stack)
}

// StackSwitcherOverrides contains methods that are overridable.
type StackSwitcherOverrides struct {
}

func defaultStackSwitcherOverrides(v *StackSwitcher) StackSwitcherOverrides {
	return StackSwitcherOverrides{}
}

// StackSwitcher widget acts as a controller for a Stack; it shows a row of
// buttons to switch between the various pages of the associated stack widget.
//
// All the content for the buttons comes from the child properties of the Stack;
// the button visibility in a StackSwitcher widget is controlled by the
// visibility of the child in the Stack.
//
// It is possible to associate multiple StackSwitcher widgets with the same
// Stack widget.
//
// The GtkStackSwitcher widget was added in 3.10.
//
// # CSS nodes
//
// GtkStackSwitcher has a single CSS node named stackswitcher and style class
// .stack-switcher.
//
// When circumstances require it, GtkStackSwitcher adds the .needs-attention
// style class to the widgets representing the stack pages.
type StackSwitcher struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*StackSwitcher)(nil)
	_ coreglib.Objector = (*StackSwitcher)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StackSwitcher, *StackSwitcherClass, StackSwitcherOverrides](
		GTypeStackSwitcher,
		initStackSwitcherClass,
		wrapStackSwitcher,
		defaultStackSwitcherOverrides,
	)
}

func initStackSwitcherClass(gclass unsafe.Pointer, overrides StackSwitcherOverrides, classInitFunc func(*StackSwitcherClass)) {
	if classInitFunc != nil {
		class := (*StackSwitcherClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStackSwitcher(obj *coreglib.Object) *StackSwitcher {
	return &StackSwitcher{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalStackSwitcher(p uintptr) (interface{}, error) {
	return wrapStackSwitcher(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewStackSwitcher: create a new StackSwitcher.
//
// The function returns the following values:
//
//   - stackSwitcher: new StackSwitcher.
func NewStackSwitcher() *StackSwitcher {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_stack_switcher_new()

	var _stackSwitcher *StackSwitcher // out

	_stackSwitcher = wrapStackSwitcher(coreglib.Take(unsafe.Pointer(_cret)))

	return _stackSwitcher
}

// Stack retrieves the stack. See gtk_stack_switcher_set_stack().
//
// The function returns the following values:
//
//   - stack (optional): stack, or NULL if none has been set explicitly.
func (switcher *StackSwitcher) Stack() *Stack {
	var _arg0 *C.GtkStackSwitcher // out
	var _cret *C.GtkStack         // in

	_arg0 = (*C.GtkStackSwitcher)(unsafe.Pointer(coreglib.InternObject(switcher).Native()))

	_cret = C.gtk_stack_switcher_get_stack(_arg0)
	runtime.KeepAlive(switcher)

	var _stack *Stack // out

	if _cret != nil {
		_stack = wrapStack(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _stack
}

// SetStack sets the stack to control.
//
// The function takes the following parameters:
//
//   - stack (optional): Stack.
func (switcher *StackSwitcher) SetStack(stack *Stack) {
	var _arg0 *C.GtkStackSwitcher // out
	var _arg1 *C.GtkStack         // out

	_arg0 = (*C.GtkStackSwitcher)(unsafe.Pointer(coreglib.InternObject(switcher).Native()))
	if stack != nil {
		_arg1 = (*C.GtkStack)(unsafe.Pointer(coreglib.InternObject(stack).Native()))
	}

	C.gtk_stack_switcher_set_stack(_arg0, _arg1)
	runtime.KeepAlive(switcher)
	runtime.KeepAlive(stack)
}

// StatusIconOverrides contains methods that are overridable.
type StatusIconOverrides struct {
	Activate           func()
	ButtonPressEvent   func(event *gdk.EventButton) bool
	ButtonReleaseEvent func(event *gdk.EventButton) bool
	// The function takes the following parameters:
	//
	//   - button
	//   - activateTime
	PopupMenu func(button uint, activateTime uint32)
	// The function takes the following parameters:
	//
	//   - x
	//   - y
	//   - keyboardMode
	//   - tooltip
	QueryTooltip func(x, y int, keyboardMode bool, tooltip *Tooltip) bool
	ScrollEvent  func(event *gdk.EventScroll) bool
	SizeChanged  func(size int) bool
}

func defaultStatusIconOverrides(v *StatusIcon) StatusIconOverrides {
	return StatusIconOverrides{
		Activate:           v.activate,
		ButtonPressEvent:   v.buttonPressEvent,
		ButtonReleaseEvent: v.buttonReleaseEvent,
		PopupMenu:          v.popupMenu,
		QueryTooltip:       v.queryTooltip,
		ScrollEvent:        v.scrollEvent,
		SizeChanged:        v.sizeChanged,
	}
}

// StatusIcon: “system tray” or notification area is normally used for transient
// icons that indicate some special state. For example, a system tray icon might
// appear to tell the user that they have new mail, or have an incoming instant
// message, or something along those lines. The basic idea is that creating an
// icon in the notification area is less annoying than popping up a dialog.
//
// A StatusIcon object can be used to display an icon in a “system tray”.
// The icon can have a tooltip, and the user can interact with it by activating
// it or popping up a context menu.
//
// It is very important to notice that status icons depend on the existence
// of a notification area being available to the user; you should not use
// status icons as the only way to convey critical information regarding
// your application, as the notification area may not exist on the user's
// environment, or may have been removed. You should always check that
// a status icon has been embedded into a notification area by using
// gtk_status_icon_is_embedded(), and gracefully recover if the function returns
// FALSE.
//
// On X11, the implementation follows the FreeDesktop System Tray Specification
// (http://www.freedesktop.org/wiki/Specifications/systemtray-spec).
// Implementations of the “tray” side of this specification can be found e.g.
// in the GNOME 2 and KDE panel applications.
//
// Note that a GtkStatusIcon is not a widget, but just a #GObject. Making it a
// widget would be impractical, since the system tray on Windows doesn’t allow
// to embed arbitrary widgets.
//
// GtkStatusIcon has been deprecated in 3.14. You should consider
// using notifications or more modern platform-specific APIs instead.
// GLib provides the #GNotification API which works well with Application
// on multiple platforms and environments, and should be the preferred
// mechanism to notify the users of transient status updates. See this HowDoI
// (https://wiki.gnome.org/HowDoI/GNotification) for code examples.
type StatusIcon struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*StatusIcon)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StatusIcon, *StatusIconClass, StatusIconOverrides](
		GTypeStatusIcon,
		initStatusIconClass,
		wrapStatusIcon,
		defaultStatusIconOverrides,
	)
}

func initStatusIconClass(gclass unsafe.Pointer, overrides StatusIconOverrides, classInitFunc func(*StatusIconClass)) {
	pclass := (*C.GtkStatusIconClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeStatusIcon))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_activate)
	}

	if overrides.ButtonPressEvent != nil {
		pclass.button_press_event = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_button_press_event)
	}

	if overrides.ButtonReleaseEvent != nil {
		pclass.button_release_event = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_button_release_event)
	}

	if overrides.PopupMenu != nil {
		pclass.popup_menu = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_popup_menu)
	}

	if overrides.QueryTooltip != nil {
		pclass.query_tooltip = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_query_tooltip)
	}

	if overrides.ScrollEvent != nil {
		pclass.scroll_event = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_scroll_event)
	}

	if overrides.SizeChanged != nil {
		pclass.size_changed = (*[0]byte)(C._gotk4_gtk3_StatusIconClass_size_changed)
	}

	if classInitFunc != nil {
		class := (*StatusIconClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStatusIcon(obj *coreglib.Object) *StatusIcon {
	return &StatusIcon{
		Object: obj,
	}
}

func marshalStatusIcon(p uintptr) (interface{}, error) {
	return wrapStatusIcon(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate gets emitted when the user activates the status icon.
// If and how status icons can activated is platform-dependent.
//
// Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by
// applications and should be wrapped by language bindings.
func (statusIcon *StatusIcon) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "activate", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectActivate), f)
}

// ConnectButtonPressEvent signal will be emitted when a button (typically from
// a mouse) is pressed.
//
// Whether this event is emitted is platform-dependent. Use the ::activate and
// ::popup-menu signals in preference.
func (statusIcon *StatusIcon) ConnectButtonPressEvent(f func(event *gdk.EventButton) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "button-press-event", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectButtonPressEvent), f)
}

// ConnectButtonReleaseEvent signal will be emitted when a button (typically
// from a mouse) is released.
//
// Whether this event is emitted is platform-dependent. Use the ::activate and
// ::popup-menu signals in preference.
func (statusIcon *StatusIcon) ConnectButtonReleaseEvent(f func(event *gdk.EventButton) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "button-release-event", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectButtonReleaseEvent), f)
}

// ConnectPopupMenu gets emitted when the user brings up the context menu of the
// status icon. Whether status icons can have context menus and how these are
// activated is platform-dependent.
//
// The button and activate_time parameters should be passed as the last to
// arguments to gtk_menu_popup().
//
// Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by
// applications and should be wrapped by language bindings.
func (statusIcon *StatusIcon) ConnectPopupMenu(f func(button, activateTime uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "popup-menu", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectPopupMenu), f)
}

// ConnectQueryTooltip is emitted when the hover timeout has expired with the
// cursor hovering above status_icon; or emitted when status_icon got focus in
// keyboard mode.
//
// Using the given coordinates, the signal handler should determine whether a
// tooltip should be shown for status_icon. If this is the case TRUE should be
// returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of
// x and y are undefined and should not be used.
//
// The signal handler is free to manipulate tooltip with the therefore destined
// function calls.
//
// Whether this signal is emitted is platform-dependent. For plain text
// tooltips, use StatusIcon:tooltip-text in preference.
func (statusIcon *StatusIcon) ConnectQueryTooltip(f func(x, y int, keyboardMode bool, tooltip *Tooltip) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "query-tooltip", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectQueryTooltip), f)
}

// ConnectScrollEvent signal is emitted when a button in the 4 to 7 range is
// pressed. Wheel mice are usually configured to generate button press events
// for buttons 4 and 5 when the wheel is turned.
//
// Whether this event is emitted is platform-dependent.
func (statusIcon *StatusIcon) ConnectScrollEvent(f func(event *gdk.EventScroll) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "scroll-event", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectScrollEvent), f)
}

// ConnectSizeChanged gets emitted when the size available for the image
// changes, e.g. because the notification area got resized.
func (statusIcon *StatusIcon) ConnectSizeChanged(f func(size int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusIcon, "size-changed", false, unsafe.Pointer(C._gotk4_gtk3_StatusIcon_ConnectSizeChanged), f)
}

// NewStatusIcon creates an empty status icon object.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIcon() *StatusIcon {
	var _cret *C.GtkStatusIcon // in

	_cret = C.gtk_status_icon_new()

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// NewStatusIconFromFile creates a status icon displaying the file filename.
//
// The image will be scaled down to fit in the available space in the
// notification area, if necessary.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function takes the following parameters:
//
//   - filename: filename.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIconFromFile(filename string) *StatusIcon {
	var _arg1 *C.gchar         // out
	var _cret *C.GtkStatusIcon // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_status_icon_new_from_file(_arg1)
	runtime.KeepAlive(filename)

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// NewStatusIconFromGIcon creates a status icon displaying a #GIcon. If the icon
// is a themed icon, it will be updated when the theme changes.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function takes the following parameters:
//
//   - icon: #GIcon.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIconFromGIcon(icon gio.Iconner) *StatusIcon {
	var _arg1 *C.GIcon         // out
	var _cret *C.GtkStatusIcon // in

	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	_cret = C.gtk_status_icon_new_from_gicon(_arg1)
	runtime.KeepAlive(icon)

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// NewStatusIconFromIconName creates a status icon displaying an icon from the
// current icon theme. If the current icon theme is changed, the icon will be
// updated appropriately.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function takes the following parameters:
//
//   - iconName: icon name.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIconFromIconName(iconName string) *StatusIcon {
	var _arg1 *C.gchar         // out
	var _cret *C.GtkStatusIcon // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_status_icon_new_from_icon_name(_arg1)
	runtime.KeepAlive(iconName)

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// NewStatusIconFromPixbuf creates a status icon displaying pixbuf.
//
// The image will be scaled down to fit in the available space in the
// notification area, if necessary.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function takes the following parameters:
//
//   - pixbuf: Pixbuf.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIconFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) *StatusIcon {
	var _arg1 *C.GdkPixbuf     // out
	var _cret *C.GtkStatusIcon // in

	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	_cret = C.gtk_status_icon_new_from_pixbuf(_arg1)
	runtime.KeepAlive(pixbuf)

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// NewStatusIconFromStock creates a status icon displaying a stock icon.
// Sample stock icon names are K_STOCK_OPEN, K_STOCK_QUIT. You can register
// your own stock icon names, see gtk_icon_factory_add_default() and
// gtk_icon_factory_add().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications.
//
// The function takes the following parameters:
//
//   - stockId: stock icon id.
//
// The function returns the following values:
//
//   - statusIcon: new StatusIcon.
func NewStatusIconFromStock(stockId string) *StatusIcon {
	var _arg1 *C.gchar         // out
	var _cret *C.GtkStatusIcon // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_status_icon_new_from_stock(_arg1)
	runtime.KeepAlive(stockId)

	var _statusIcon *StatusIcon // out

	_statusIcon = wrapStatusIcon(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _statusIcon
}

// Geometry obtains information about the location of the status icon on screen.
// This information can be used to e.g. position popups like notification
// bubbles.
//
// See gtk_status_icon_position_menu() for a more convenient alternative for
// positioning menus.
//
// Note that some platforms do not allow GTK+ to provide this information,
// and even on platforms that do allow it, the information is not
// reliable unless the status icon is embedded in a notification area,
// see gtk_status_icon_is_embedded().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, as the
// platform is responsible for the presentation of notifications.
//
// The function returns the following values:
//
//   - screen (optional): return location for the screen, or NULL if the
//     information is not needed.
//   - area (optional): return location for the area occupied by the status
//     icon, or NULL.
//   - orientation (optional): return location for the orientation of the panel
//     in which the status icon is embedded, or NULL. A panel at the top or
//     bottom of the screen is horizontal, a panel at the left or right is
//     vertical.
//   - ok: TRUE if the location information has been filled in.
func (statusIcon *StatusIcon) Geometry() (*gdk.Screen, *gdk.Rectangle, Orientation, bool) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.GdkScreen     // in
	var _arg2 C.GdkRectangle   // in
	var _arg3 C.GtkOrientation // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_geometry(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(statusIcon)

	var _screen *gdk.Screen      // out
	var _area *gdk.Rectangle     // out
	var _orientation Orientation // out
	var _ok bool                 // out

	if _arg1 != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_arg1))
			_screen = &gdk.Screen{
				Object: obj,
			}
		}
	}
	_area = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	_orientation = Orientation(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _screen, _area, _orientation, _ok
}

// GIcon retrieves the #GIcon being displayed by the StatusIcon. The storage
// type of the status icon must be GTK_IMAGE_EMPTY or GTK_IMAGE_GICON (see
// gtk_status_icon_get_storage_type()). The caller of this function does not own
// a reference to the returned #GIcon.
//
// If this function fails, icon is left unchanged;
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - icon (optional): displayed icon, or NULL if the image is empty.
func (statusIcon *StatusIcon) GIcon() *gio.Icon {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.GIcon         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_gicon(_arg0)
	runtime.KeepAlive(statusIcon)

	var _icon *gio.Icon // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_icon = &gio.Icon{
				Object: obj,
			}
		}
	}

	return _icon
}

// HasTooltip returns the current value of the has-tooltip property. See
// StatusIcon:has-tooltip for more information.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - ok: current value of has-tooltip on status_icon.
func (statusIcon *StatusIcon) HasTooltip() bool {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_has_tooltip(_arg0)
	runtime.KeepAlive(statusIcon)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IconName gets the name of the icon being displayed by the StatusIcon.
// The storage type of the status icon must be GTK_IMAGE_EMPTY or
// GTK_IMAGE_ICON_NAME (see gtk_status_icon_get_storage_type()). The returned
// string is owned by the StatusIcon and should not be freed or modified.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - utf8 (optional): name of the displayed icon, or NULL if the image is
//     empty.
func (statusIcon *StatusIcon) IconName() string {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_icon_name(_arg0)
	runtime.KeepAlive(statusIcon)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Pixbuf gets the Pixbuf being displayed by the StatusIcon. The storage
// type of the status icon must be GTK_IMAGE_EMPTY or GTK_IMAGE_PIXBUF (see
// gtk_status_icon_get_storage_type()). The caller of this function does not own
// a reference to the returned pixbuf.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - pixbuf (optional): displayed pixbuf, or NULL if the image is empty.
func (statusIcon *StatusIcon) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.GdkPixbuf     // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_pixbuf(_arg0)
	runtime.KeepAlive(statusIcon)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// Screen returns the Screen associated with status_icon.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, as
// notifications are managed by the platform.
//
// The function returns the following values:
//
//   - screen: Screen.
func (statusIcon *StatusIcon) Screen() *gdk.Screen {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.GdkScreen     // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_screen(_arg0)
	runtime.KeepAlive(statusIcon)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// Size gets the size in pixels that is available for the image. Stock icons and
// named icons adapt their size automatically if the size of the notification
// area changes. For other storage types, the size-changed signal can be used to
// react to size changes.
//
// Note that the returned size is only meaningful while the status icon is
// embedded (see gtk_status_icon_is_embedded()).
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, as the
// representation of a notification is left to the platform.
//
// The function returns the following values:
//
//   - gint: size that is available for the image.
func (statusIcon *StatusIcon) Size() int {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_size(_arg0)
	runtime.KeepAlive(statusIcon)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Stock gets the id of the stock icon being displayed by the StatusIcon. The
// storage type of the status icon must be GTK_IMAGE_EMPTY or GTK_IMAGE_STOCK
// (see gtk_status_icon_get_storage_type()). The returned string is owned by the
// StatusIcon and should not be freed or modified.
//
// Deprecated: Use gtk_status_icon_get_icon_name() instead.
//
// The function returns the following values:
//
//   - utf8 (optional): stock id of the displayed stock icon, or NULL if the
//     image is empty.
func (statusIcon *StatusIcon) Stock() string {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_stock(_arg0)
	runtime.KeepAlive(statusIcon)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// StorageType gets the type of representation being used by the StatusIcon to
// store image data. If the StatusIcon has no image data, the return value will
// be GTK_IMAGE_EMPTY.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, and
// #GNotification only supports #GIcon instances.
//
// The function returns the following values:
//
//   - imageType: image representation being used.
func (statusIcon *StatusIcon) StorageType() ImageType {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.GtkImageType   // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_storage_type(_arg0)
	runtime.KeepAlive(statusIcon)

	var _imageType ImageType // out

	_imageType = ImageType(_cret)

	return _imageType
}

// Title gets the title of this tray icon. See gtk_status_icon_set_title().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - utf8: title of the status icon.
func (statusIcon *StatusIcon) Title() string {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_title(_arg0)
	runtime.KeepAlive(statusIcon)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TooltipMarkup gets the contents of the tooltip for status_icon.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. You should free the returned
//     string with g_free() when done.
func (statusIcon *StatusIcon) TooltipMarkup() string {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_tooltip_markup(_arg0)
	runtime.KeepAlive(statusIcon)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// TooltipText gets the contents of the tooltip for status_icon.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. You should free the returned
//     string with g_free() when done.
func (statusIcon *StatusIcon) TooltipText() string {
	var _arg0 *C.GtkStatusIcon // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_tooltip_text(_arg0)
	runtime.KeepAlive(statusIcon)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// Visible returns whether the status icon is visible or not. Note that being
// visible does not guarantee that the user can actually see the icon, see also
// gtk_status_icon_is_embedded().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - ok: TRUE if the status icon is visible.
func (statusIcon *StatusIcon) Visible() bool {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_visible(_arg0)
	runtime.KeepAlive(statusIcon)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// X11WindowID: this function is only useful on the X11/freedesktop.org
// platform.
//
// It returns a window ID for the widget in the underlying status icon
// implementation. This is useful for the Galago notification service, which
// can send a window ID in the protocol in order for the server to position
// notification windows pointing to a status icon reliably.
//
// This function is not intended for other use cases which are more
// likely to be met by one of the non-X11 specific methods, such as
// gtk_status_icon_position_menu().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - guint32: 32 bit unsigned integer identifier for the underlying X11
//     Window.
func (statusIcon *StatusIcon) X11WindowID() uint32 {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.guint32        // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_get_x11_window_id(_arg0)
	runtime.KeepAlive(statusIcon)

	var _guint32 uint32 // out

	_guint32 = uint32(_cret)

	return _guint32
}

// IsEmbedded returns whether the status icon is embedded in a notification
// area.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function returns the following values:
//
//   - ok: TRUE if the status icon is embedded in a notification area.
func (statusIcon *StatusIcon) IsEmbedded() bool {
	var _arg0 *C.GtkStatusIcon // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	_cret = C.gtk_status_icon_is_embedded(_arg0)
	runtime.KeepAlive(statusIcon)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetFromFile makes status_icon display the file filename. See
// gtk_status_icon_new_from_file() for details.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; you can use g_notification_set_icon() to associate a #GIcon
// with a notification.
//
// The function takes the following parameters:
//
//   - filename: filename.
func (statusIcon *StatusIcon) SetFromFile(filename string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_from_file(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(filename)
}

// SetFromGIcon makes status_icon display the #GIcon. See
// gtk_status_icon_new_from_gicon() for details.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; you can use g_notification_set_icon() to associate a #GIcon
// with a notification.
//
// The function takes the following parameters:
//
//   - icon: GIcon.
func (statusIcon *StatusIcon) SetFromGIcon(icon gio.Iconner) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.GIcon         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	C.gtk_status_icon_set_from_gicon(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(icon)
}

// SetFromIconName makes status_icon display the icon named icon_name from the
// current icon theme. See gtk_status_icon_new_from_icon_name() for details.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; you can use g_notification_set_icon() to associate a #GIcon
// with a notification.
//
// The function takes the following parameters:
//
//   - iconName: icon name.
func (statusIcon *StatusIcon) SetFromIconName(iconName string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_from_icon_name(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(iconName)
}

// SetFromPixbuf makes status_icon display pixbuf. See
// gtk_status_icon_new_from_pixbuf() for details.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; you can use g_notification_set_icon() to associate a #GIcon
// with a notification.
//
// The function takes the following parameters:
//
//   - pixbuf (optional) or NULL.
func (statusIcon *StatusIcon) SetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.GdkPixbuf     // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	if pixbuf != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_status_icon_set_from_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(pixbuf)
}

// SetFromStock makes status_icon display the stock icon with the id stock_id.
// See gtk_status_icon_new_from_stock() for details.
//
// Deprecated: Use gtk_status_icon_set_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId: stock icon id.
func (statusIcon *StatusIcon) SetFromStock(stockId string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_from_stock(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(stockId)
}

// SetHasTooltip sets the has-tooltip property on status_icon to has_tooltip.
// See StatusIcon:has-tooltip for more information.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function,
// but notifications can display an arbitrary amount of text using
// g_notification_set_body().
//
// The function takes the following parameters:
//
//   - hasTooltip: whether or not status_icon has a tooltip.
func (statusIcon *StatusIcon) SetHasTooltip(hasTooltip bool) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	if hasTooltip {
		_arg1 = C.TRUE
	}

	C.gtk_status_icon_set_has_tooltip(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(hasTooltip)
}

// SetName sets the name of this tray icon. This should be a string identifying
// this icon. It is may be used for sorting the icons in the tray and will not
// be shown to the user.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function,
// as notifications are associated with a unique application identifier by
// #GApplication.
//
// The function takes the following parameters:
//
//   - name: name.
func (statusIcon *StatusIcon) SetName(name string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_name(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(name)
}

// SetScreen sets the Screen where status_icon is displayed; if the icon is
// already mapped, it will be unmapped, and then remapped on the new screen.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, as GTK
// typically only has one Screen and notifications are managed by the platform.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (statusIcon *StatusIcon) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.GdkScreen     // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_status_icon_set_screen(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(screen)
}

// SetTitle sets the title of this tray icon. This should be a short,
// human-readable, localized string describing the tray icon. It may be used by
// tools like screen readers to render the tray icon.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; you should use g_notification_set_title() and
// g_notification_set_body() to present text inside your notification.
//
// The function takes the following parameters:
//
//   - title: title.
func (statusIcon *StatusIcon) SetTitle(title string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_title(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(title)
}

// SetTooltipMarkup sets markup as the contents of the tooltip, which is marked
// up with the [Pango text markup language][PangoMarkupFormat].
//
// This function will take care of setting StatusIcon:has-tooltip to TRUE and of
// the default handler for the StatusIcon::query-tooltip signal.
//
// See also the StatusIcon:tooltip-markup property and gtk_tooltip_set_markup().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function takes the following parameters:
//
//   - markup (optional) contents of the tooltip for status_icon, or NULL.
func (statusIcon *StatusIcon) SetTooltipMarkup(markup string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	if markup != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_status_icon_set_tooltip_markup(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(markup)
}

// SetTooltipText sets text as the contents of the tooltip.
//
// This function will take care of setting StatusIcon:has-tooltip to TRUE and of
// the default handler for the StatusIcon::query-tooltip signal.
//
// See also the StatusIcon:tooltip-text property and gtk_tooltip_set_text().
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function.
//
// The function takes the following parameters:
//
//   - text contents of the tooltip for status_icon.
func (statusIcon *StatusIcon) SetTooltipText(text string) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_status_icon_set_tooltip_text(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(text)
}

// SetVisible shows or hides a status icon.
//
// Deprecated: Use #GNotification and Application to provide status
// notifications; there is no direct replacement for this function, as
// notifications are managed by the platform.
//
// The function takes the following parameters:
//
//   - visible: TRUE to show the status icon, FALSE to hide it.
func (statusIcon *StatusIcon) SetVisible(visible bool) {
	var _arg0 *C.GtkStatusIcon // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_status_icon_set_visible(_arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(visible)
}

func (statusIcon *StatusIcon) activate() {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.activate

	var _arg0 *C.GtkStatusIcon // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))

	C._gotk4_gtk3_StatusIcon_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(statusIcon)
}

func (statusIcon *StatusIcon) buttonPressEvent(event *gdk.EventButton) bool {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.button_press_event

	var _arg0 *C.GtkStatusIcon  // out
	var _arg1 *C.GdkEventButton // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.GdkEventButton)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_StatusIcon_virtual_button_press_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (statusIcon *StatusIcon) buttonReleaseEvent(event *gdk.EventButton) bool {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.button_release_event

	var _arg0 *C.GtkStatusIcon  // out
	var _arg1 *C.GdkEventButton // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.GdkEventButton)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_StatusIcon_virtual_button_release_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - button
//   - activateTime
func (statusIcon *StatusIcon) popupMenu(button uint, activateTime uint32) {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.popup_menu

	var _arg0 *C.GtkStatusIcon // out
	var _arg1 C.guint          // out
	var _arg2 C.guint32        // out

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = C.guint(button)
	_arg2 = C.guint32(activateTime)

	C._gotk4_gtk3_StatusIcon_virtual_popup_menu(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(button)
	runtime.KeepAlive(activateTime)
}

// The function takes the following parameters:
//
//   - x
//   - y
//   - keyboardMode
//   - tooltip
func (statusIcon *StatusIcon) queryTooltip(x, y int, keyboardMode bool, tooltip *Tooltip) bool {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.query_tooltip

	var _arg0 *C.GtkStatusIcon // out
	var _arg1 C.gint           // out
	var _arg2 C.gint           // out
	var _arg3 C.gboolean       // out
	var _arg4 *C.GtkTooltip    // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)
	if keyboardMode {
		_arg3 = C.TRUE
	}
	_arg4 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))

	_cret = C._gotk4_gtk3_StatusIcon_virtual_query_tooltip(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(keyboardMode)
	runtime.KeepAlive(tooltip)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (statusIcon *StatusIcon) scrollEvent(event *gdk.EventScroll) bool {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.scroll_event

	var _arg0 *C.GtkStatusIcon  // out
	var _arg1 *C.GdkEventScroll // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = (*C.GdkEventScroll)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_StatusIcon_virtual_scroll_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (statusIcon *StatusIcon) sizeChanged(size int) bool {
	gclass := (*C.GtkStatusIconClass)(coreglib.PeekParentClass(statusIcon))
	fnarg := gclass.size_changed

	var _arg0 *C.GtkStatusIcon // out
	var _arg1 C.gint           // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkStatusIcon)(unsafe.Pointer(coreglib.InternObject(statusIcon).Native()))
	_arg1 = C.gint(size)

	_cret = C._gotk4_gtk3_StatusIcon_virtual_size_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(statusIcon)
	runtime.KeepAlive(size)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// StatusbarOverrides contains methods that are overridable.
type StatusbarOverrides struct {
	// The function takes the following parameters:
	//
	//   - contextId
	//   - text
	TextPopped func(contextId uint, text string)
	// The function takes the following parameters:
	//
	//   - contextId
	//   - text
	TextPushed func(contextId uint, text string)
}

func defaultStatusbarOverrides(v *Statusbar) StatusbarOverrides {
	return StatusbarOverrides{
		TextPopped: v.textPopped,
		TextPushed: v.textPushed,
	}
}

// Statusbar is usually placed along the bottom of an application's main Window.
// It may provide a regular commentary of the application's status (as is
// usually the case in a web browser, for example), or may be used to simply
// output a message when the status changes, (when an upload is complete in an
// FTP client, for example).
//
// Status bars in GTK+ maintain a stack of messages. The message at the top of
// the each bar’s stack is the one that will currently be displayed.
//
// Any messages added to a statusbar’s stack must specify a context id that
// is used to uniquely identify the source of a message. This context id can
// be generated by gtk_statusbar_get_context_id(), given a message and the
// statusbar that it will be added to. Note that messages are stored in a stack,
// and when choosing which message to display, the stack structure is adhered
// to, regardless of the context identifier of a message.
//
// One could say that a statusbar maintains one stack of messages for display
// purposes, but allows multiple message producers to maintain sub-stacks of the
// messages they produced (via context ids).
//
// Status bars are created using gtk_statusbar_new().
//
// Messages are added to the bar’s stack with gtk_statusbar_push().
//
// The message at the top of the stack can be removed using gtk_statusbar_pop().
// A message can be removed from anywhere in the stack if its message id was
// recorded at the time it was added. This is done using gtk_statusbar_remove().
//
// # CSS node
//
// GtkStatusbar has a single CSS node with name statusbar.
type Statusbar struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*Statusbar)(nil)
	_ coreglib.Objector = (*Statusbar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Statusbar, *StatusbarClass, StatusbarOverrides](
		GTypeStatusbar,
		initStatusbarClass,
		wrapStatusbar,
		defaultStatusbarOverrides,
	)
}

func initStatusbarClass(gclass unsafe.Pointer, overrides StatusbarOverrides, classInitFunc func(*StatusbarClass)) {
	pclass := (*C.GtkStatusbarClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeStatusbar))))

	if overrides.TextPopped != nil {
		pclass.text_popped = (*[0]byte)(C._gotk4_gtk3_StatusbarClass_text_popped)
	}

	if overrides.TextPushed != nil {
		pclass.text_pushed = (*[0]byte)(C._gotk4_gtk3_StatusbarClass_text_pushed)
	}

	if classInitFunc != nil {
		class := (*StatusbarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStatusbar(obj *coreglib.Object) *Statusbar {
	return &Statusbar{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalStatusbar(p uintptr) (interface{}, error) {
	return wrapStatusbar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectTextPopped is emitted whenever a new message is popped off a
// statusbar's stack.
func (statusbar *Statusbar) ConnectTextPopped(f func(contextId uint, text string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusbar, "text-popped", false, unsafe.Pointer(C._gotk4_gtk3_Statusbar_ConnectTextPopped), f)
}

// ConnectTextPushed is emitted whenever a new message gets pushed onto a
// statusbar's stack.
func (statusbar *Statusbar) ConnectTextPushed(f func(contextId uint, text string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(statusbar, "text-pushed", false, unsafe.Pointer(C._gotk4_gtk3_Statusbar_ConnectTextPushed), f)
}

// NewStatusbar creates a new Statusbar ready for messages.
//
// The function returns the following values:
//
//   - statusbar: new Statusbar.
func NewStatusbar() *Statusbar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_statusbar_new()

	var _statusbar *Statusbar // out

	_statusbar = wrapStatusbar(coreglib.Take(unsafe.Pointer(_cret)))

	return _statusbar
}

// ContextID returns a new context identifier, given a description of the actual
// context. Note that the description is not shown in the UI.
//
// The function takes the following parameters:
//
//   - contextDescription: textual description of what context the new message
//     is being used in.
//
// The function returns the following values:
//
//   - guint: integer id.
func (statusbar *Statusbar) ContextID(contextDescription string) uint {
	var _arg0 *C.GtkStatusbar // out
	var _arg1 *C.gchar        // out
	var _cret C.guint         // in

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(contextDescription)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_statusbar_get_context_id(_arg0, _arg1)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextDescription)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// MessageArea retrieves the box containing the label widget.
//
// The function returns the following values:
//
//   - box: Box.
func (statusbar *Statusbar) MessageArea() *Box {
	var _arg0 *C.GtkStatusbar // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))

	_cret = C.gtk_statusbar_get_message_area(_arg0)
	runtime.KeepAlive(statusbar)

	var _box *Box // out

	_box = wrapBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _box
}

// Pop removes the first message in the Statusbar’s stack with the given context
// id.
//
// Note that this may not change the displayed message, if the message at the
// top of the stack has a different context id.
//
// The function takes the following parameters:
//
//   - contextId: context identifier.
func (statusbar *Statusbar) Pop(contextId uint) {
	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)

	C.gtk_statusbar_pop(_arg0, _arg1)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
}

// Push pushes a new message onto a statusbar’s stack.
//
// The function takes the following parameters:
//
//   - contextId message’s context id, as returned by
//     gtk_statusbar_get_context_id().
//   - text: message to add to the statusbar.
//
// The function returns the following values:
//
//   - guint: message id that can be used with gtk_statusbar_remove().
func (statusbar *Statusbar) Push(contextId uint, text string) uint {
	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out
	var _arg2 *C.gchar        // out
	var _cret C.guint         // in

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_statusbar_push(_arg0, _arg1, _arg2)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
	runtime.KeepAlive(text)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Remove forces the removal of a message from a statusbar’s stack. The exact
// context_id and message_id must be specified.
//
// The function takes the following parameters:
//
//   - contextId: context identifier.
//   - messageId: message identifier, as returned by gtk_statusbar_push().
func (statusbar *Statusbar) Remove(contextId, messageId uint) {
	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out
	var _arg2 C.guint         // out

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)
	_arg2 = C.guint(messageId)

	C.gtk_statusbar_remove(_arg0, _arg1, _arg2)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
	runtime.KeepAlive(messageId)
}

// RemoveAll forces the removal of all messages from a statusbar's stack with
// the exact context_id.
//
// The function takes the following parameters:
//
//   - contextId: context identifier.
func (statusbar *Statusbar) RemoveAll(contextId uint) {
	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)

	C.gtk_statusbar_remove_all(_arg0, _arg1)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
}

// The function takes the following parameters:
//
//   - contextId
//   - text
func (statusbar *Statusbar) textPopped(contextId uint, text string) {
	gclass := (*C.GtkStatusbarClass)(coreglib.PeekParentClass(statusbar))
	fnarg := gclass.text_popped

	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C._gotk4_gtk3_Statusbar_virtual_text_popped(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
	runtime.KeepAlive(text)
}

// The function takes the following parameters:
//
//   - contextId
//   - text
func (statusbar *Statusbar) textPushed(contextId uint, text string) {
	gclass := (*C.GtkStatusbarClass)(coreglib.PeekParentClass(statusbar))
	fnarg := gclass.text_pushed

	var _arg0 *C.GtkStatusbar // out
	var _arg1 C.guint         // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkStatusbar)(unsafe.Pointer(coreglib.InternObject(statusbar).Native()))
	_arg1 = C.guint(contextId)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg2))

	C._gotk4_gtk3_Statusbar_virtual_text_pushed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(statusbar)
	runtime.KeepAlive(contextId)
	runtime.KeepAlive(text)
}

// StatusbarAccessibleOverrides contains methods that are overridable.
type StatusbarAccessibleOverrides struct {
}

func defaultStatusbarAccessibleOverrides(v *StatusbarAccessible) StatusbarAccessibleOverrides {
	return StatusbarAccessibleOverrides{}
}

type StatusbarAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible
}

var (
	_ coreglib.Objector = (*StatusbarAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StatusbarAccessible, *StatusbarAccessibleClass, StatusbarAccessibleOverrides](
		GTypeStatusbarAccessible,
		initStatusbarAccessibleClass,
		wrapStatusbarAccessible,
		defaultStatusbarAccessibleOverrides,
	)
}

func initStatusbarAccessibleClass(gclass unsafe.Pointer, overrides StatusbarAccessibleOverrides, classInitFunc func(*StatusbarAccessibleClass)) {
	if classInitFunc != nil {
		class := (*StatusbarAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStatusbarAccessible(obj *coreglib.Object) *StatusbarAccessible {
	return &StatusbarAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
	}
}

func marshalStatusbarAccessible(p uintptr) (interface{}, error) {
	return wrapStatusbarAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// StyleOverrides contains methods that are overridable.
type StyleOverrides struct {
	Copy func(src *Style)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - arrowType
	//   - fill
	//   - x
	//   - y
	//   - width
	//   - height
	DrawArrow func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, arrowType ArrowType, fill bool, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawBox func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	//   - gapSide
	//   - gapX
	//   - gapWidth
	DrawBoxGap func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawCheck func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawDiamond func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - expanderStyle
	DrawExpander func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y int, expanderStyle ExpanderStyle)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	//   - gapSide
	DrawExtension func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawFlatBox func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawFocus func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	//   - orientation
	DrawHandle func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - x1
	//   - x2
	//   - y
	DrawHline func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x1, x2, y int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - useText
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - layout
	DrawLayout func(cr *cairo.Context, stateType StateType, useText bool, widget Widgetter, detail string, x, y int, layout *pango.Layout)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawOption func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - edge
	//   - x
	//   - y
	//   - width
	//   - height
	DrawResizeGrip func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, edge gdk.WindowEdge, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawShadow func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	//   - gapSide
	//   - gapX
	//   - gapWidth
	DrawShadowGap func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	//   - orientation
	DrawSlider func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - step
	//   - x
	//   - y
	//   - width
	//   - height
	DrawSpinner func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, step uint, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - shadowType
	//   - widget
	//   - detail
	//   - x
	//   - y
	//   - width
	//   - height
	DrawTab func(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int)
	// The function takes the following parameters:
	//
	//   - cr
	//   - stateType
	//   - widget
	//   - detail
	//   - y1
	//   - y2
	//   - x
	DrawVline  func(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, y1, y2, x int)
	InitFromRC func(rcStyle *RCStyle)
	Realize    func()
	// RenderIcon renders the icon specified by source at the given size
	// according to the given parameters and returns the result in a pixbuf.
	//
	// Deprecated: Use gtk_render_icon_pixbuf() instead.
	//
	// The function takes the following parameters:
	//
	//   - source specifying the icon to render.
	//   - direction: text direction.
	//   - state: state.
	//   - size to render the icon at (IconSize). A size of (GtkIconSize)-1
	//     means render at the size of the source and don’t scale.
	//   - widget (optional): widget.
	//   - detail (optional): style detail.
	//
	// The function returns the following values:
	//
	//   - pixbuf: newly-created Pixbuf containing the rendered icon.
	RenderIcon func(source *IconSource, direction TextDirection, state StateType, size int, widget Widgetter, detail string) *gdkpixbuf.Pixbuf
	// SetBackground sets the background of window to the background color or
	// pixmap specified by style for the given state.
	//
	// Deprecated: Use gtk_style_context_set_background() instead.
	//
	// The function takes the following parameters:
	//
	//   - window: Window.
	//   - stateType: state.
	SetBackground func(window gdk.Windower, stateType StateType)
	Unrealize     func()
}

func defaultStyleOverrides(v *Style) StyleOverrides {
	return StyleOverrides{
		Copy:           v.copy,
		DrawArrow:      v.drawArrow,
		DrawBox:        v.drawBox,
		DrawBoxGap:     v.drawBoxGap,
		DrawCheck:      v.drawCheck,
		DrawDiamond:    v.drawDiamond,
		DrawExpander:   v.drawExpander,
		DrawExtension:  v.drawExtension,
		DrawFlatBox:    v.drawFlatBox,
		DrawFocus:      v.drawFocus,
		DrawHandle:     v.drawHandle,
		DrawHline:      v.drawHline,
		DrawLayout:     v.drawLayout,
		DrawOption:     v.drawOption,
		DrawResizeGrip: v.drawResizeGrip,
		DrawShadow:     v.drawShadow,
		DrawShadowGap:  v.drawShadowGap,
		DrawSlider:     v.drawSlider,
		DrawSpinner:    v.drawSpinner,
		DrawTab:        v.drawTab,
		DrawVline:      v.drawVline,
		InitFromRC:     v.initFromRC,
		Realize:        v.realize,
		RenderIcon:     v.renderIcon,
		SetBackground:  v.setBackground,
		Unrealize:      v.unrealize,
	}
}

// Style object encapsulates the information that provides the look and feel for
// a widget.
//
// > In GTK+ 3.0, GtkStyle has been deprecated and replaced by > StyleContext.
//
// Each Widget has an associated Style object that is used when rendering that
// widget. Also, a Style holds information for the five possible widget states
// though not every widget supports all five states; see StateType.
//
// Usually the Style for a widget is the same as the default style that is set
// by GTK+ and modified the theme engine.
//
// Usually applications should not need to use or modify the Style of their
// widgets.
type Style struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Style)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Style, *StyleClass, StyleOverrides](
		GTypeStyle,
		initStyleClass,
		wrapStyle,
		defaultStyleOverrides,
	)
}

func initStyleClass(gclass unsafe.Pointer, overrides StyleOverrides, classInitFunc func(*StyleClass)) {
	pclass := (*C.GtkStyleClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeStyle))))

	if overrides.Copy != nil {
		pclass.copy = (*[0]byte)(C._gotk4_gtk3_StyleClass_copy)
	}

	if overrides.DrawArrow != nil {
		pclass.draw_arrow = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_arrow)
	}

	if overrides.DrawBox != nil {
		pclass.draw_box = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_box)
	}

	if overrides.DrawBoxGap != nil {
		pclass.draw_box_gap = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_box_gap)
	}

	if overrides.DrawCheck != nil {
		pclass.draw_check = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_check)
	}

	if overrides.DrawDiamond != nil {
		pclass.draw_diamond = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_diamond)
	}

	if overrides.DrawExpander != nil {
		pclass.draw_expander = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_expander)
	}

	if overrides.DrawExtension != nil {
		pclass.draw_extension = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_extension)
	}

	if overrides.DrawFlatBox != nil {
		pclass.draw_flat_box = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_flat_box)
	}

	if overrides.DrawFocus != nil {
		pclass.draw_focus = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_focus)
	}

	if overrides.DrawHandle != nil {
		pclass.draw_handle = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_handle)
	}

	if overrides.DrawHline != nil {
		pclass.draw_hline = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_hline)
	}

	if overrides.DrawLayout != nil {
		pclass.draw_layout = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_layout)
	}

	if overrides.DrawOption != nil {
		pclass.draw_option = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_option)
	}

	if overrides.DrawResizeGrip != nil {
		pclass.draw_resize_grip = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_resize_grip)
	}

	if overrides.DrawShadow != nil {
		pclass.draw_shadow = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_shadow)
	}

	if overrides.DrawShadowGap != nil {
		pclass.draw_shadow_gap = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_shadow_gap)
	}

	if overrides.DrawSlider != nil {
		pclass.draw_slider = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_slider)
	}

	if overrides.DrawSpinner != nil {
		pclass.draw_spinner = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_spinner)
	}

	if overrides.DrawTab != nil {
		pclass.draw_tab = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_tab)
	}

	if overrides.DrawVline != nil {
		pclass.draw_vline = (*[0]byte)(C._gotk4_gtk3_StyleClass_draw_vline)
	}

	if overrides.InitFromRC != nil {
		pclass.init_from_rc = (*[0]byte)(C._gotk4_gtk3_StyleClass_init_from_rc)
	}

	if overrides.Realize != nil {
		pclass.realize = (*[0]byte)(C._gotk4_gtk3_StyleClass_realize)
	}

	if overrides.RenderIcon != nil {
		pclass.render_icon = (*[0]byte)(C._gotk4_gtk3_StyleClass_render_icon)
	}

	if overrides.SetBackground != nil {
		pclass.set_background = (*[0]byte)(C._gotk4_gtk3_StyleClass_set_background)
	}

	if overrides.Unrealize != nil {
		pclass.unrealize = (*[0]byte)(C._gotk4_gtk3_StyleClass_unrealize)
	}

	if classInitFunc != nil {
		class := (*StyleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStyle(obj *coreglib.Object) *Style {
	return &Style{
		Object: obj,
	}
}

func marshalStyle(p uintptr) (interface{}, error) {
	return wrapStyle(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectRealize is emitted when the style has been initialized for a
// particular visual. Connecting to this signal is probably seldom useful since
// most of the time applications and widgets only deal with styles that have
// been already realized.
func (style *Style) ConnectRealize(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(style, "realize", false, unsafe.Pointer(C._gotk4_gtk3_Style_ConnectRealize), f)
}

// ConnectUnrealize is emitted when the aspects of the style specific to a
// particular visual is being cleaned up. A connection to this signal can
// be useful if a widget wants to cache objects as object data on Style.
// This signal provides a convenient place to free such cached objects.
func (style *Style) ConnectUnrealize(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(style, "unrealize", false, unsafe.Pointer(C._gotk4_gtk3_Style_ConnectUnrealize), f)
}

// NewStyle creates a new Style.
//
// Deprecated: Use StyleContext.
//
// The function returns the following values:
//
//   - style: new Style.
func NewStyle() *Style {
	var _cret *C.GtkStyle // in

	_cret = C.gtk_style_new()

	var _style *Style // out

	_style = wrapStyle(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _style
}

// ApplyDefaultBackground: deprecated: Use StyleContext instead.
//
// The function takes the following parameters:
//
//   - cr
//   - window
//   - stateType
//   - x
//   - y
//   - width
//   - height
func (style *Style) ApplyDefaultBackground(cr *cairo.Context, window gdk.Windower, stateType StateType, x, y, width, height int) {
	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 *C.GdkWindow   // out
	var _arg3 C.GtkStateType // out
	var _arg4 C.gint         // out
	var _arg5 C.gint         // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg3 = C.GtkStateType(stateType)
	_arg4 = C.gint(x)
	_arg5 = C.gint(y)
	_arg6 = C.gint(width)
	_arg7 = C.gint(height)

	C.gtk_style_apply_default_background(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(window)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// Copy creates a copy of the passed in Style object.
//
// Deprecated: Use StyleContext instead.
//
// The function returns the following values:
//
//   - ret: copy of style.
func (style *Style) Copy() *Style {
	var _arg0 *C.GtkStyle // out
	var _cret *C.GtkStyle // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	_cret = C.gtk_style_copy(_arg0)
	runtime.KeepAlive(style)

	var _ret *Style // out

	_ret = wrapStyle(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _ret
}

// Detach detaches a style from a window. If the style is not attached to any
// windows anymore, it is unrealized. See gtk_style_attach().
//
// Deprecated: Use StyleContext instead.
func (style *Style) Detach() {
	var _arg0 *C.GtkStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	C.gtk_style_detach(_arg0)
	runtime.KeepAlive(style)
}

// StyleProperty queries the value of a style property corresponding to a widget
// class is in the given style.
//
// The function takes the following parameters:
//
//   - widgetType of a descendant of Widget.
//   - propertyName: name of the style property to get.
//
// The function returns the following values:
//
//   - value where the value of the property being queried will be stored.
func (style *Style) StyleProperty(widgetType coreglib.Type, propertyName string) coreglib.Value {
	var _arg0 *C.GtkStyle // out
	var _arg1 C.GType     // out
	var _arg2 *C.gchar    // out
	var _arg3 C.GValue    // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = C.GType(widgetType)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_style_get_style_property(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(style)
	runtime.KeepAlive(widgetType)
	runtime.KeepAlive(propertyName)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))

	return _value
}

// HasContext returns whether style has an associated StyleContext.
//
// The function returns the following values:
//
//   - ok: TRUE if style has a StyleContext.
func (style *Style) HasContext() bool {
	var _arg0 *C.GtkStyle // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	_cret = C.gtk_style_has_context(_arg0)
	runtime.KeepAlive(style)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LookupColor looks up color_name in the style’s logical color mappings,
// filling in color and returning TRUE if found, otherwise returning FALSE.
// Do not cache the found mapping, because it depends on the Style and might
// change when a theme switch occurs.
//
// Deprecated: Use gtk_style_context_lookup_color() instead.
//
// The function takes the following parameters:
//
//   - colorName: name of the logical color to look up.
//
// The function returns the following values:
//
//   - color to fill in.
//   - ok: TRUE if the mapping was found.
func (style *Style) LookupColor(colorName string) (*gdk.Color, bool) {
	var _arg0 *C.GtkStyle // out
	var _arg1 *C.gchar    // out
	var _arg2 C.GdkColor  // in
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(colorName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_lookup_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(style)
	runtime.KeepAlive(colorName)

	var _color *gdk.Color // out
	var _ok bool          // out

	_color = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _color, _ok
}

// LookupIconSet looks up stock_id in the icon factories associated with style
// and the default icon factory, returning an icon set if found, otherwise NULL.
//
// Deprecated: Use gtk_style_context_lookup_icon_set() instead.
//
// The function takes the following parameters:
//
//   - stockId: icon name.
//
// The function returns the following values:
//
//   - iconSet: icon set of stock_id.
func (style *Style) LookupIconSet(stockId string) *IconSet {
	var _arg0 *C.GtkStyle   // out
	var _arg1 *C.gchar      // out
	var _cret *C.GtkIconSet // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_lookup_icon_set(_arg0, _arg1)
	runtime.KeepAlive(style)
	runtime.KeepAlive(stockId)

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_icon_set_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// RenderIcon renders the icon specified by source at the given size according
// to the given parameters and returns the result in a pixbuf.
//
// Deprecated: Use gtk_render_icon_pixbuf() instead.
//
// The function takes the following parameters:
//
//   - source specifying the icon to render.
//   - direction: text direction.
//   - state: state.
//   - size to render the icon at (IconSize). A size of (GtkIconSize)-1 means
//     render at the size of the source and don’t scale.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//
// The function returns the following values:
//
//   - pixbuf: newly-created Pixbuf containing the rendered icon.
func (style *Style) RenderIcon(source *IconSource, direction TextDirection, state StateType, size int, widget Widgetter, detail string) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.GtkIconSource   // out
	var _arg2 C.GtkTextDirection // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkIconSize      // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _cret *C.GdkPixbuf       // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg2 = C.GtkTextDirection(direction)
	_arg3 = C.GtkStateType(state)
	_arg4 = C.GtkIconSize(size)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}

	_cret = C.gtk_style_render_icon(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(style)
	runtime.KeepAlive(source)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(state)
	runtime.KeepAlive(size)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// SetBackground sets the background of window to the background color or pixmap
// specified by style for the given state.
//
// Deprecated: Use gtk_style_context_set_background() instead.
//
// The function takes the following parameters:
//
//   - window: Window.
//   - stateType: state.
func (style *Style) SetBackground(window gdk.Windower, stateType StateType) {
	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.GdkWindow   // out
	var _arg2 C.GtkStateType // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg2 = C.GtkStateType(stateType)

	C.gtk_style_set_background(_arg0, _arg1, _arg2)
	runtime.KeepAlive(style)
	runtime.KeepAlive(window)
	runtime.KeepAlive(stateType)
}

func (style *Style) copy(src *Style) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.copy

	var _arg0 *C.GtkStyle // out
	var _arg1 *C.GtkStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(src).Native()))

	C._gotk4_gtk3_Style_virtual_copy(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(style)
	runtime.KeepAlive(src)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - arrowType
//   - fill
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawArrow(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, arrowType ArrowType, fill bool, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_arrow

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.GtkArrowType  // out
	var _arg7 C.gboolean      // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out
	var _arg10 C.gint         // out
	var _arg11 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.GtkArrowType(arrowType)
	if fill {
		_arg7 = C.TRUE
	}
	_arg8 = C.gint(x)
	_arg9 = C.gint(y)
	_arg10 = C.gint(width)
	_arg11 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_arrow(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(arrowType)
	runtime.KeepAlive(fill)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawBox(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_box

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_box(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
//   - gapSide
//   - gapX
//   - gapWidth
func (style *Style) drawBoxGap(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_box_gap

	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.cairo_t         // out
	var _arg2 C.GtkStateType     // out
	var _arg3 C.GtkShadowType    // out
	var _arg4 *C.GtkWidget       // out
	var _arg5 *C.gchar           // out
	var _arg6 C.gint             // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.GtkPositionType // out
	var _arg11 C.gint            // out
	var _arg12 C.gint            // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)
	_arg10 = C.GtkPositionType(gapSide)
	_arg11 = C.gint(gapX)
	_arg12 = C.gint(gapWidth)

	C._gotk4_gtk3_Style_virtual_draw_box_gap(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(gapX)
	runtime.KeepAlive(gapWidth)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawCheck(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_check

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_check(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawDiamond(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_diamond

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_diamond(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - x
//   - y
//   - expanderStyle
func (style *Style) drawExpander(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y int, expanderStyle ExpanderStyle) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_expander

	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.cairo_t         // out
	var _arg2 C.GtkStateType     // out
	var _arg3 *C.GtkWidget       // out
	var _arg4 *C.gchar           // out
	var _arg5 C.gint             // out
	var _arg6 C.gint             // out
	var _arg7 C.GtkExpanderStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.gint(x)
	_arg6 = C.gint(y)
	_arg7 = C.GtkExpanderStyle(expanderStyle)

	C._gotk4_gtk3_Style_virtual_draw_expander(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(expanderStyle)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
//   - gapSide
func (style *Style) drawExtension(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_extension

	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.cairo_t         // out
	var _arg2 C.GtkStateType     // out
	var _arg3 C.GtkShadowType    // out
	var _arg4 *C.GtkWidget       // out
	var _arg5 *C.gchar           // out
	var _arg6 C.gint             // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.GtkPositionType // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)
	_arg10 = C.GtkPositionType(gapSide)

	C._gotk4_gtk3_Style_virtual_draw_extension(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawFlatBox(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_flat_box

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_flat_box(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawFocus(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_focus

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 C.GtkStateType // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 *C.gchar       // out
	var _arg5 C.gint         // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.gint(x)
	_arg6 = C.gint(y)
	_arg7 = C.gint(width)
	_arg8 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_focus(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
//   - orientation
func (style *Style) drawHandle(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_handle

	var _arg0 *C.GtkStyle       // out
	var _arg1 *C.cairo_t        // out
	var _arg2 C.GtkStateType    // out
	var _arg3 C.GtkShadowType   // out
	var _arg4 *C.GtkWidget      // out
	var _arg5 *C.gchar          // out
	var _arg6 C.gint            // out
	var _arg7 C.gint            // out
	var _arg8 C.gint            // out
	var _arg9 C.gint            // out
	var _arg10 C.GtkOrientation // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)
	_arg10 = C.GtkOrientation(orientation)

	C._gotk4_gtk3_Style_virtual_draw_handle(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - x1
//   - x2
//   - y
func (style *Style) drawHline(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, x1, x2, y int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_hline

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 C.GtkStateType // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 *C.gchar       // out
	var _arg5 C.gint         // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.gint(x1)
	_arg6 = C.gint(x2)
	_arg7 = C.gint(y)

	C._gotk4_gtk3_Style_virtual_draw_hline(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(x2)
	runtime.KeepAlive(y)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - useText
//   - widget
//   - detail
//   - x
//   - y
//   - layout
func (style *Style) drawLayout(cr *cairo.Context, stateType StateType, useText bool, widget Widgetter, detail string, x, y int, layout *pango.Layout) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_layout

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 C.GtkStateType // out
	var _arg3 C.gboolean     // out
	var _arg4 *C.GtkWidget   // out
	var _arg5 *C.gchar       // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 *C.PangoLayout // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	if useText {
		_arg3 = C.TRUE
	}
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = (*C.PangoLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	C._gotk4_gtk3_Style_virtual_draw_layout(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(useText)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(layout)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawOption(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_option

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_option(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - edge
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawResizeGrip(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, edge gdk.WindowEdge, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_resize_grip

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 *C.GtkWidget    // out
	var _arg4 *C.gchar        // out
	var _arg5 C.GdkWindowEdge // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.GdkWindowEdge(edge)
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_resize_grip(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(edge)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawShadow(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_shadow

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_shadow(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
//   - gapSide
//   - gapX
//   - gapWidth
func (style *Style) drawShadowGap(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, gapSide PositionType, gapX, gapWidth int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_shadow_gap

	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.cairo_t         // out
	var _arg2 C.GtkStateType     // out
	var _arg3 C.GtkShadowType    // out
	var _arg4 *C.GtkWidget       // out
	var _arg5 *C.gchar           // out
	var _arg6 C.gint             // out
	var _arg7 C.gint             // out
	var _arg8 C.gint             // out
	var _arg9 C.gint             // out
	var _arg10 C.GtkPositionType // out
	var _arg11 C.gint            // out
	var _arg12 C.gint            // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)
	_arg10 = C.GtkPositionType(gapSide)
	_arg11 = C.gint(gapX)
	_arg12 = C.gint(gapWidth)

	C._gotk4_gtk3_Style_virtual_draw_shadow_gap(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(gapX)
	runtime.KeepAlive(gapWidth)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
//   - orientation
func (style *Style) drawSlider(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int, orientation Orientation) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_slider

	var _arg0 *C.GtkStyle       // out
	var _arg1 *C.cairo_t        // out
	var _arg2 C.GtkStateType    // out
	var _arg3 C.GtkShadowType   // out
	var _arg4 *C.GtkWidget      // out
	var _arg5 *C.gchar          // out
	var _arg6 C.gint            // out
	var _arg7 C.gint            // out
	var _arg8 C.gint            // out
	var _arg9 C.gint            // out
	var _arg10 C.GtkOrientation // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)
	_arg10 = C.GtkOrientation(orientation)

	C._gotk4_gtk3_Style_virtual_draw_slider(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - step
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawSpinner(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, step uint, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_spinner

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 C.GtkStateType // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 *C.gchar       // out
	var _arg5 C.guint        // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out
	var _arg8 C.gint         // out
	var _arg9 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.guint(step)
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_spinner(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(step)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - shadowType
//   - widget
//   - detail
//   - x
//   - y
//   - width
//   - height
func (style *Style) drawTab(cr *cairo.Context, stateType StateType, shadowType ShadowType, widget Widgetter, detail string, x, y, width, height int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_tab

	var _arg0 *C.GtkStyle     // out
	var _arg1 *C.cairo_t      // out
	var _arg2 C.GtkStateType  // out
	var _arg3 C.GtkShadowType // out
	var _arg4 *C.GtkWidget    // out
	var _arg5 *C.gchar        // out
	var _arg6 C.gint          // out
	var _arg7 C.gint          // out
	var _arg8 C.gint          // out
	var _arg9 C.gint          // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = C.GtkShadowType(shadowType)
	_arg4 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg5 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg5))
	_arg6 = C.gint(x)
	_arg7 = C.gint(y)
	_arg8 = C.gint(width)
	_arg9 = C.gint(height)

	C._gotk4_gtk3_Style_virtual_draw_tab(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(shadowType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// The function takes the following parameters:
//
//   - cr
//   - stateType
//   - widget
//   - detail
//   - y1
//   - y2
//   - x
func (style *Style) drawVline(cr *cairo.Context, stateType StateType, widget Widgetter, detail string, y1, y2, x int) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.draw_vline

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.cairo_t     // out
	var _arg2 C.GtkStateType // out
	var _arg3 *C.GtkWidget   // out
	var _arg4 *C.gchar       // out
	var _arg5 C.gint         // out
	var _arg6 C.gint         // out
	var _arg7 C.gint         // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.GtkStateType(stateType)
	_arg3 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
	defer C.free(unsafe.Pointer(_arg4))
	_arg5 = C.gint(y1)
	_arg6 = C.gint(y2)
	_arg7 = C.gint(x)

	C._gotk4_gtk3_Style_virtual_draw_vline(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)
	runtime.KeepAlive(style)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(stateType)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)
	runtime.KeepAlive(y1)
	runtime.KeepAlive(y2)
	runtime.KeepAlive(x)
}

func (style *Style) initFromRC(rcStyle *RCStyle) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.init_from_rc

	var _arg0 *C.GtkStyle   // out
	var _arg1 *C.GtkRcStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(rcStyle).Native()))

	C._gotk4_gtk3_Style_virtual_init_from_rc(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(style)
	runtime.KeepAlive(rcStyle)
}

func (style *Style) realize() {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.realize

	var _arg0 *C.GtkStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	C._gotk4_gtk3_Style_virtual_realize(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(style)
}

// renderIcon renders the icon specified by source at the given size according
// to the given parameters and returns the result in a pixbuf.
//
// Deprecated: Use gtk_render_icon_pixbuf() instead.
//
// The function takes the following parameters:
//
//   - source specifying the icon to render.
//   - direction: text direction.
//   - state: state.
//   - size to render the icon at (IconSize). A size of (GtkIconSize)-1 means
//     render at the size of the source and don’t scale.
//   - widget (optional): widget.
//   - detail (optional): style detail.
//
// The function returns the following values:
//
//   - pixbuf: newly-created Pixbuf containing the rendered icon.
func (style *Style) renderIcon(source *IconSource, direction TextDirection, state StateType, size int, widget Widgetter, detail string) *gdkpixbuf.Pixbuf {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.render_icon

	var _arg0 *C.GtkStyle        // out
	var _arg1 *C.GtkIconSource   // out
	var _arg2 C.GtkTextDirection // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkIconSize      // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _cret *C.GdkPixbuf       // in

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg2 = C.GtkTextDirection(direction)
	_arg3 = C.GtkStateType(state)
	_arg4 = C.GtkIconSize(size)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}

	_cret = C._gotk4_gtk3_Style_virtual_render_icon(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(style)
	runtime.KeepAlive(source)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(state)
	runtime.KeepAlive(size)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// setBackground sets the background of window to the background color or pixmap
// specified by style for the given state.
//
// Deprecated: Use gtk_style_context_set_background() instead.
//
// The function takes the following parameters:
//
//   - window: Window.
//   - stateType: state.
func (style *Style) setBackground(window gdk.Windower, stateType StateType) {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.set_background

	var _arg0 *C.GtkStyle    // out
	var _arg1 *C.GdkWindow   // out
	var _arg2 C.GtkStateType // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg2 = C.GtkStateType(stateType)

	C._gotk4_gtk3_Style_virtual_set_background(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(style)
	runtime.KeepAlive(window)
	runtime.KeepAlive(stateType)
}

func (style *Style) unrealize() {
	gclass := (*C.GtkStyleClass)(coreglib.PeekParentClass(style))
	fnarg := gclass.unrealize

	var _arg0 *C.GtkStyle // out

	_arg0 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	C._gotk4_gtk3_Style_virtual_unrealize(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(style)
}

// StyleContextOverrides contains methods that are overridable.
type StyleContextOverrides struct {
	Changed func()
}

func defaultStyleContextOverrides(v *StyleContext) StyleContextOverrides {
	return StyleContextOverrides{
		Changed: v.changed,
	}
}

// StyleContext is an object that stores styling information affecting a widget
// defined by WidgetPath.
//
// In order to construct the final style information, StyleContext queries
// information from all attached StyleProviders. Style providers can be either
// attached explicitly to the context through gtk_style_context_add_provider(),
// or to the screen through gtk_style_context_add_provider_for_screen(). The
// resulting style is a combination of all providers’ information in priority
// order.
//
// For GTK+ widgets, any StyleContext returned by gtk_widget_get_style_context()
// will already have a WidgetPath, a Screen and RTL/LTR information set.
// The style context will also be updated automatically if any of these settings
// change on the widget.
//
// If you are using the theming layer standalone, you will need to set a
// widget path and a screen yourself to the created style context through
// gtk_style_context_set_path() and possibly gtk_style_context_set_screen().
// See the “Foreign drawing“ example in gtk3-demo.
//
// # Style Classes
//
// Widgets can add style classes to their context, which can be used to
// associate different styles by class. The documentation for individual widgets
// lists which style classes it uses itself, and which style classes may be
// added by applications to affect their appearance.
//
// GTK+ defines macros for a number of style classes.
//
// # Style Regions
//
// Widgets can also add regions with flags to their context. This feature is
// deprecated and will be removed in a future GTK+ update. Please use style
// classes instead.
//
// GTK+ defines macros for a number of style regions.
//
// # Custom styling in UI libraries and applications
//
// If you are developing a library with custom Widgets that render differently
// than standard components, you may need to add a StyleProvider yourself with
// the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority, either a CssProvider or a
// custom object implementing the StyleProvider interface. This way themes may
// still attempt to style your UI elements in a different way if needed so.
//
// If you are using custom styling on an applications, you probably want then
// to make your style information prevail to the theme’s, so you must use a
// StyleProvider with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority,
// keep in mind that the user settings in XDG_CONFIG_HOME/gtk-3.0/gtk.css
// will still take precedence over your changes, as it uses the
// GTK_STYLE_PROVIDER_PRIORITY_USER priority.
type StyleContext struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*StyleContext)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StyleContext, *StyleContextClass, StyleContextOverrides](
		GTypeStyleContext,
		initStyleContextClass,
		wrapStyleContext,
		defaultStyleContextOverrides,
	)
}

func initStyleContextClass(gclass unsafe.Pointer, overrides StyleContextOverrides, classInitFunc func(*StyleContextClass)) {
	pclass := (*C.GtkStyleContextClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeStyleContext))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_StyleContextClass_changed)
	}

	if classInitFunc != nil {
		class := (*StyleContextClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStyleContext(obj *coreglib.Object) *StyleContext {
	return &StyleContext{
		Object: obj,
	}
}

func marshalStyleContext(p uintptr) (interface{}, error) {
	return wrapStyleContext(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged signal is emitted when there is a change in the StyleContext.
//
// For a StyleContext returned by gtk_widget_get_style_context(), the
// Widget::style-updated signal/vfunc might be more convenient to use.
//
// This signal is useful when using the theming layer standalone.
func (context *StyleContext) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(context, "changed", false, unsafe.Pointer(C._gotk4_gtk3_StyleContext_ConnectChanged), f)
}

// NewStyleContext creates a standalone StyleContext, this style
// context won’t be attached to any widget, so you may want to call
// gtk_style_context_set_path() yourself.
//
// This function is only useful when using the theming layer separated
// from GTK+, if you are using StyleContext to theme Widgets, use
// gtk_widget_get_style_context() in order to get a style context ready to theme
// the widget.
//
// The function returns the following values:
//
//   - styleContext: newly created StyleContext.
func NewStyleContext() *StyleContext {
	var _cret *C.GtkStyleContext // in

	_cret = C.gtk_style_context_new()

	var _styleContext *StyleContext // out

	_styleContext = wrapStyleContext(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _styleContext
}

// AddClass adds a style class to context, so posterior calls to
// gtk_style_context_get() or any of the gtk_render_*() functions will make use
// of this new class for styling.
//
// In the CSS file format, a Entry defining a “search” class, would be matched
// by:
//
// |[ <!-- language="CSS" --> entry.search { ... } ]|
//
// While any widget defining a “search” class would be matched by: |[ <!--
// language="CSS" --> .search { ... } ]|.
//
// The function takes the following parameters:
//
//   - className class name to use in styling.
func (context *StyleContext) AddClass(className string) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(className)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_style_context_add_class(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(className)
}

// AddProvider adds a style provider to context, to be used in style
// construction. Note that a style provider added by this function only affects
// the style of the widget to which context belongs. If you want to affect the
// style of all widgets, use gtk_style_context_add_provider_for_screen().
//
// Note: If both priorities are the same, a StyleProvider added
// through this function takes precedence over another added through
// gtk_style_context_add_provider_for_screen().
//
// The function takes the following parameters:
//
//   - provider: StyleProvider.
//   - priority of the style provider. The lower it is, the earlier it
//     will be used in the style construction. Typically this will be
//     in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and
//     GTK_STYLE_PROVIDER_PRIORITY_USER.
func (context *StyleContext) AddProvider(provider StyleProviderer, priority uint) {
	var _arg0 *C.GtkStyleContext  // out
	var _arg1 *C.GtkStyleProvider // out
	var _arg2 C.guint             // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg2 = C.guint(priority)

	C.gtk_style_context_add_provider(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(priority)
}

// AddRegion adds a region to context, so posterior calls to
// gtk_style_context_get() or any of the gtk_render_*() functions will make use
// of this new region for styling.
//
// In the CSS file format, a TreeView defining a “row” region, would be matched
// by:
//
// |[ <!-- language="CSS" --> treeview row { ... } ]|
//
// Pseudo-classes are used for matching flags, so the two following rules:
// |[ <!-- language="CSS" --> treeview row:nth-child(even) { ... } treeview
// row:nth-child(odd) { ... } ]|
//
// would apply to even and odd rows, respectively.
//
// Region names must only contain lowercase letters and “-”, starting always
// with a lowercase letter.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - regionName: region name to use in styling.
//   - flags that apply to the region.
func (context *StyleContext) AddRegion(regionName string, flags RegionFlags) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _arg2 C.GtkRegionFlags   // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(regionName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkRegionFlags(flags)

	C.gtk_style_context_add_region(_arg0, _arg1, _arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(regionName)
	runtime.KeepAlive(flags)
}

// CancelAnimations stops all running animations for region_id and all
// animatable regions underneath.
//
// A NULL region_id will stop all ongoing animations in context, when dealing
// with a StyleContext obtained through gtk_widget_get_style_context(), this is
// normally done for you in all circumstances you would expect all widget to
// be stopped, so this should be only used in complex widgets with different
// animatable regions.
//
// Deprecated: This function does nothing.
//
// The function takes the following parameters:
//
//   - regionId (optional): animatable region to stop, or NULL. See
//     gtk_style_context_push_animatable_region().
func (context *StyleContext) CancelAnimations(regionId unsafe.Pointer) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.gpointer         // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (C.gpointer)(unsafe.Pointer(regionId))

	C.gtk_style_context_cancel_animations(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(regionId)
}

// BackgroundColor gets the background color for a given state.
//
// This function is far less useful than it seems, and it should not be used in
// newly written code. CSS has no concept of "background color", as a background
// can be an image, or a gradient, or any other pattern including solid colors.
//
// The only reason why you would call gtk_style_context_get_background_color()
// is to use the returned value to draw the background with it; the correct way
// to achieve this result is to use gtk_render_background() instead, along with
// CSS style classes to modify the color to be rendered.
//
// Deprecated: Use gtk_render_background() instead.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the background color.
func (context *StyleContext) BackgroundColor(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GdkRGBA          // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_background_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Border gets the border for a given state as a Border.
//
// See gtk_style_context_get_property() and K_STYLE_PROPERTY_BORDER_WIDTH for
// details.
//
// The function takes the following parameters:
//
//   - state to retrieve the border for.
//
// The function returns the following values:
//
//   - border: return value for the border settings.
func (context *StyleContext) Border(state StateFlags) *Border {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GtkBorder        // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_border(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _border *Border // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _border
}

// BorderColor gets the border color for a given state.
//
// Deprecated: Use gtk_render_frame() instead.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the border color.
func (context *StyleContext) BorderColor(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GdkRGBA          // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_border_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Color gets the foreground color for a given state.
//
// See gtk_style_context_get_property() and K_STYLE_PROPERTY_COLOR for details.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the foreground color.
func (context *StyleContext) Color(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GdkRGBA          // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Direction returns the widget direction used for rendering.
//
// Deprecated: Use gtk_style_context_get_state() and check for
// K_STATE_FLAG_DIR_LTR and K_STATE_FLAG_DIR_RTL instead.
//
// The function returns the following values:
//
//   - textDirection: widget direction.
func (context *StyleContext) Direction() TextDirection {
	var _arg0 *C.GtkStyleContext // out
	var _cret C.GtkTextDirection // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_direction(_arg0)
	runtime.KeepAlive(context)

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// Font returns the font description for a given state. The returned object is
// const and will remain valid until the StyleContext::changed signal happens.
//
// Deprecated: Use gtk_style_context_get() for "font" or subproperties instead.
//
// The function takes the following parameters:
//
//   - state to retrieve the font for.
//
// The function returns the following values:
//
//   - fontDescription for the given state. This object is owned by GTK+ and
//     should not be freed.
func (context *StyleContext) Font(state StateFlags) *pango.FontDescription {
	var _arg0 *C.GtkStyleContext      // out
	var _arg1 C.GtkStateFlags         // out
	var _cret *C.PangoFontDescription // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	_cret = C.gtk_style_context_get_font(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _fontDescription *pango.FontDescription // out

	_fontDescription = (*pango.FontDescription)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _fontDescription
}

// FrameClock returns the FrameClock to which context is attached.
//
// The function returns the following values:
//
//   - frameClock (optional) or NULL if context does not have an attached frame
//     clock.
func (context *StyleContext) FrameClock() gdk.FrameClocker {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GdkFrameClock   // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_frame_clock(_arg0)
	runtime.KeepAlive(context)

	var _frameClock gdk.FrameClocker // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.FrameClocker)
				return ok
			})
			rv, ok := casted.(gdk.FrameClocker)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.FrameClocker")
			}
			_frameClock = rv
		}
	}

	return _frameClock
}

// JunctionSides returns the sides where rendered elements connect visually with
// others.
//
// The function returns the following values:
//
//   - junctionSides: junction sides.
func (context *StyleContext) JunctionSides() JunctionSides {
	var _arg0 *C.GtkStyleContext // out
	var _cret C.GtkJunctionSides // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_junction_sides(_arg0)
	runtime.KeepAlive(context)

	var _junctionSides JunctionSides // out

	_junctionSides = JunctionSides(_cret)

	return _junctionSides
}

// Margin gets the margin for a given state as a Border. See
// gtk_style_property_get() and K_STYLE_PROPERTY_MARGIN for details.
//
// The function takes the following parameters:
//
//   - state to retrieve the border for.
//
// The function returns the following values:
//
//   - margin: return value for the margin settings.
func (context *StyleContext) Margin(state StateFlags) *Border {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GtkBorder        // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_margin(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _margin *Border // out

	_margin = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _margin
}

// Padding gets the padding for a given state as a Border. See
// gtk_style_context_get() and K_STYLE_PROPERTY_PADDING for details.
//
// The function takes the following parameters:
//
//   - state to retrieve the padding for.
//
// The function returns the following values:
//
//   - padding: return value for the padding settings.
func (context *StyleContext) Padding(state StateFlags) *Border {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out
	var _arg2 C.GtkBorder        // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_style_context_get_padding(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _padding *Border // out

	_padding = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _padding
}

// Parent gets the parent context set via gtk_style_context_set_parent().
// See that function for details.
//
// The function returns the following values:
//
//   - styleContext (optional): parent context or NULL.
func (context *StyleContext) Parent() *StyleContext {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GtkStyleContext // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_parent(_arg0)
	runtime.KeepAlive(context)

	var _styleContext *StyleContext // out

	if _cret != nil {
		_styleContext = wrapStyleContext(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _styleContext
}

// Path returns the widget path used for style matching.
//
// The function returns the following values:
//
//   - widgetPath: WidgetPath.
func (context *StyleContext) Path() *WidgetPath {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GtkWidgetPath   // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_path(_arg0)
	runtime.KeepAlive(context)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_widget_path_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// Property gets a style property from context for the given state.
//
// Note that not all CSS properties that are supported by GTK+ can be retrieved
// in this way, since they may not be representable as #GValue. GTK+ defines
// macros for a number of properties that can be used with this function.
//
// Note that passing a state other than the current state of context
// is not recommended unless the style context has been saved with
// gtk_style_context_save().
//
// When value is no longer needed, g_value_unset() must be called to free any
// allocated memory.
//
// The function takes the following parameters:
//
//   - property: style property name.
//   - state to retrieve the property value for.
//
// The function returns the following values:
//
//   - value: return location for the style property value.
func (context *StyleContext) Property(property string, state StateFlags) coreglib.Value {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _arg2 C.GtkStateFlags    // out
	var _arg3 C.GValue           // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStateFlags(state)

	C.gtk_style_context_get_property(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(property)
	runtime.KeepAlive(state)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))
	runtime.SetFinalizer(_value, func(v *coreglib.Value) {
		C.g_value_unset((*C.GValue)(unsafe.Pointer(v.Native())))
	})

	return _value
}

// Scale returns the scale used for assets.
//
// The function returns the following values:
//
//   - gint: scale.
func (context *StyleContext) Scale() int {
	var _arg0 *C.GtkStyleContext // out
	var _cret C.gint             // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_scale(_arg0)
	runtime.KeepAlive(context)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Screen returns the Screen to which context is attached.
//
// The function returns the following values:
//
//   - screen: Screen.
func (context *StyleContext) Screen() *gdk.Screen {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GdkScreen       // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_screen(_arg0)
	runtime.KeepAlive(context)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// Section queries the location in the CSS where property was defined for
// the current context. Note that the state to be queried is taken from
// gtk_style_context_get_state().
//
// If the location is not available, NULL will be returned. The location might
// not be available for various reasons, such as the property being overridden,
// property not naming a supported CSS property or tracking of definitions being
// disabled for performance reasons.
//
// Shorthand CSS properties cannot be queried for a location and will always
// return NULL.
//
// The function takes the following parameters:
//
//   - property: style property name.
//
// The function returns the following values:
//
//   - cssSection (optional): NULL or the section where a value for property was
//     defined.
func (context *StyleContext) Section(property string) *CSSSection {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _cret *C.GtkCssSection   // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_context_get_section(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(property)

	var _cssSection *CSSSection // out

	if _cret != nil {
		_cssSection = (*CSSSection)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.gtk_css_section_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_cssSection)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_css_section_unref((*C.GtkCssSection)(intern.C))
			},
		)
	}

	return _cssSection
}

// State returns the state used for style matching.
//
// This method should only be used to retrieve the StateFlags to pass to
// StyleContext methods, like gtk_style_context_get_padding(). If you need to
// retrieve the current state of a Widget, use gtk_widget_get_state_flags().
//
// The function returns the following values:
//
//   - stateFlags: state flags.
func (context *StyleContext) State() StateFlags {
	var _arg0 *C.GtkStyleContext // out
	var _cret C.GtkStateFlags    // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_get_state(_arg0)
	runtime.KeepAlive(context)

	var _stateFlags StateFlags // out

	_stateFlags = StateFlags(_cret)

	return _stateFlags
}

// StyleProperty gets the value for a widget style property.
//
// When value is no longer needed, g_value_unset() must be called to free any
// allocated memory.
//
// The function takes the following parameters:
//
//   - propertyName: name of the widget style property.
//
// The function returns the following values:
//
//   - value: return location for the property value.
func (context *StyleContext) StyleProperty(propertyName string) coreglib.Value {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _arg2 C.GValue           // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_style_context_get_style_property(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(propertyName)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg2)))

	return _value
}

// HasClass returns TRUE if context currently has defined the given class name.
//
// The function takes the following parameters:
//
//   - className class name.
//
// The function returns the following values:
//
//   - ok: TRUE if context has class_name defined.
func (context *StyleContext) HasClass(className string) bool {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(className)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_context_has_class(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(className)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasRegion returns TRUE if context has the region defined. If flags_return is
// not NULL, it is set to the flags affecting the region.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - regionName: region name.
//
// The function returns the following values:
//
//   - flagsReturn (optional): return location for region flags.
//   - ok: TRUE if region is defined.
func (context *StyleContext) HasRegion(regionName string) (RegionFlags, bool) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _arg2 C.GtkRegionFlags   // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(regionName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_context_has_region(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(regionName)

	var _flagsReturn RegionFlags // out
	var _ok bool                 // out

	_flagsReturn = RegionFlags(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _flagsReturn, _ok
}

// Invalidate invalidates context style information, so it will be reconstructed
// again. It is useful if you modify the context and need the new information
// immediately.
//
// Deprecated: Style contexts are invalidated automatically.
func (context *StyleContext) Invalidate() {
	var _arg0 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_style_context_invalidate(_arg0)
	runtime.KeepAlive(context)
}

// ListClasses returns the list of classes currently defined in context.
//
// The function returns the following values:
//
//   - list of strings with the currently defined classes. The contents of
//     the list are owned by GTK+, but you must free the list itself with
//     g_list_free() when you are done with it.
func (context *StyleContext) ListClasses() []string {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GList           // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_list_classes(_arg0)
	runtime.KeepAlive(context)

	var _list []string // out

	_list = make([]string, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// ListRegions returns the list of regions currently defined in context.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - list of strings with the currently defined regions. The contents of
//     the list are owned by GTK+, but you must free the list itself with
//     g_list_free() when you are done with it.
func (context *StyleContext) ListRegions() []string {
	var _arg0 *C.GtkStyleContext // out
	var _cret *C.GList           // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_style_context_list_regions(_arg0)
	runtime.KeepAlive(context)

	var _list []string // out

	_list = make([]string, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// LookupColor looks up and resolves a color name in the context color map.
//
// The function takes the following parameters:
//
//   - colorName: color name to lookup.
//
// The function returns the following values:
//
//   - color: return location for the looked up color.
//   - ok: TRUE if color_name was found and resolved, FALSE otherwise.
func (context *StyleContext) LookupColor(colorName string) (*gdk.RGBA, bool) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _arg2 C.GdkRGBA          // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(colorName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_context_lookup_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(colorName)

	var _color *gdk.RGBA // out
	var _ok bool         // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _color, _ok
}

// LookupIconSet looks up stock_id in the icon factories associated to context
// and the default icon factory, returning an icon set if found, otherwise NULL.
//
// Deprecated: Use gtk_icon_theme_lookup_icon() instead.
//
// The function takes the following parameters:
//
//   - stockId: icon name.
//
// The function returns the following values:
//
//   - iconSet (optional): looked up GtkIconSet, or NULL.
func (context *StyleContext) LookupIconSet(stockId string) *IconSet {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out
	var _cret *C.GtkIconSet      // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_context_lookup_icon_set(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(stockId)

	var _iconSet *IconSet // out

	if _cret != nil {
		_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.gtk_icon_set_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_iconSet)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
			},
		)
	}

	return _iconSet
}

// NotifyStateChange notifies a state change on context, so if the current
// style makes use of transition animations, one will be started so all rendered
// elements under region_id are animated for state state being set to value
// state_value.
//
// The window parameter is used in order to invalidate the rendered area as the
// animation runs, so make sure it is the same window that is being rendered on
// by the gtk_render_*() functions.
//
// If region_id is NULL, all rendered elements using context will be affected by
// this state transition.
//
// As a practical example, a Button notifying a state transition on the prelight
// state: |[ <!-- language="C" --> gtk_style_context_notify_state_change
// (context, gtk_widget_get_window (widget), NULL, GTK_STATE_PRELIGHT,
// button->in_button); ]|
//
// Can be handled in the CSS file like this: |[ <!-- language="CSS" --> button {
// background-color: #f00 }
//
// button:hover { background-color: #fff; transition: 200ms linear } ]|
//
// This combination will animate the button background from red to white if a
// pointer enters the button, and back to red if the pointer leaves the button.
//
// Note that state is used when finding the transition parameters, which is why
// the style places the transition under the :hover pseudo-class.
//
// Deprecated: This function does nothing.
//
// The function takes the following parameters:
//
//   - window: Window.
//   - regionId (optional): animatable region to notify on, or NULL. See
//     gtk_style_context_push_animatable_region().
//   - state to trigger transition for.
//   - stateValue: TRUE if state is the state we are changing to, FALSE if we
//     are changing away from it.
func (context *StyleContext) NotifyStateChange(window gdk.Windower, regionId unsafe.Pointer, state StateType, stateValue bool) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GdkWindow       // out
	var _arg2 C.gpointer         // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.gboolean         // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg2 = (C.gpointer)(unsafe.Pointer(regionId))
	_arg3 = C.GtkStateType(state)
	if stateValue {
		_arg4 = C.TRUE
	}

	C.gtk_style_context_notify_state_change(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(context)
	runtime.KeepAlive(window)
	runtime.KeepAlive(regionId)
	runtime.KeepAlive(state)
	runtime.KeepAlive(stateValue)
}

// PopAnimatableRegion pops an animatable region from context. See
// gtk_style_context_push_animatable_region().
//
// Deprecated: This function does nothing.
func (context *StyleContext) PopAnimatableRegion() {
	var _arg0 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_style_context_pop_animatable_region(_arg0)
	runtime.KeepAlive(context)
}

// PushAnimatableRegion pushes an animatable region, so all
// further gtk_render_*() calls between this call and the following
// gtk_style_context_pop_animatable_region() will potentially show transition
// animations for this region if gtk_style_context_notify_state_change() is
// called for a given state, and the current theme/style defines transition
// animations for state changes.
//
// The region_id used must be unique in context so the themes can uniquely
// identify rendered elements subject to a state transition.
//
// Deprecated: This function does nothing.
//
// The function takes the following parameters:
//
//   - regionId (optional): unique identifier for the animatable region.
func (context *StyleContext) PushAnimatableRegion(regionId unsafe.Pointer) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.gpointer         // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (C.gpointer)(unsafe.Pointer(regionId))

	C.gtk_style_context_push_animatable_region(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(regionId)
}

// RemoveClass removes class_name from context.
//
// The function takes the following parameters:
//
//   - className class name to remove.
func (context *StyleContext) RemoveClass(className string) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(className)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_style_context_remove_class(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(className)
}

// RemoveProvider removes provider from the style providers list in context.
//
// The function takes the following parameters:
//
//   - provider: StyleProvider.
func (context *StyleContext) RemoveProvider(provider StyleProviderer) {
	var _arg0 *C.GtkStyleContext  // out
	var _arg1 *C.GtkStyleProvider // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))

	C.gtk_style_context_remove_provider(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(provider)
}

// RemoveRegion removes a region from context.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - regionName: region name to unset.
func (context *StyleContext) RemoveRegion(regionName string) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.gchar           // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(regionName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_style_context_remove_region(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(regionName)
}

// Restore restores context state to a previous stage. See
// gtk_style_context_save().
func (context *StyleContext) Restore() {
	var _arg0 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_style_context_restore(_arg0)
	runtime.KeepAlive(context)
}

// Save saves the context state, so temporary modifications done through
// gtk_style_context_add_class(), gtk_style_context_remove_class(),
// gtk_style_context_set_state(), etc. can quickly be reverted in one go through
// gtk_style_context_restore().
//
// The matching call to gtk_style_context_restore() must be done before GTK
// returns to the main loop.
func (context *StyleContext) Save() {
	var _arg0 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C.gtk_style_context_save(_arg0)
	runtime.KeepAlive(context)
}

// ScrollAnimations: this function is analogous to gdk_window_scroll(), and
// should be called together with it so the invalidation areas for any ongoing
// animation are scrolled together with it.
//
// Deprecated: This function does nothing.
//
// The function takes the following parameters:
//
//   - window used previously in gtk_style_context_notify_state_change().
//   - dx: amount to scroll in the X axis.
//   - dy: amount to scroll in the Y axis.
func (context *StyleContext) ScrollAnimations(window gdk.Windower, dx, dy int) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GdkWindow       // out
	var _arg2 C.gint             // out
	var _arg3 C.gint             // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg2 = C.gint(dx)
	_arg3 = C.gint(dy)

	C.gtk_style_context_scroll_animations(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(context)
	runtime.KeepAlive(window)
	runtime.KeepAlive(dx)
	runtime.KeepAlive(dy)
}

// SetBackground sets the background of window to the background pattern or
// color specified in context for its current state.
//
// Deprecated: Use gtk_render_background() instead. Note that clients still
// using this function are now responsible for calling this function again
// whenever context is invalidated.
//
// The function takes the following parameters:
//
//   - window: Window.
func (context *StyleContext) SetBackground(window gdk.Windower) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GdkWindow       // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_style_context_set_background(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(window)
}

// SetDirection sets the reading direction for rendering purposes.
//
// If you are using a StyleContext returned from gtk_widget_get_style_context(),
// you do not need to call this yourself.
//
// Deprecated: Use gtk_style_context_set_state() with K_STATE_FLAG_DIR_LTR and
// K_STATE_FLAG_DIR_RTL instead.
//
// The function takes the following parameters:
//
//   - direction: new direction.
func (context *StyleContext) SetDirection(direction TextDirection) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkTextDirection // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkTextDirection(direction)

	C.gtk_style_context_set_direction(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(direction)
}

// SetFrameClock attaches context to the given frame clock.
//
// The frame clock is used for the timing of animations.
//
// If you are using a StyleContext returned from gtk_widget_get_style_context(),
// you do not need to call this yourself.
//
// The function takes the following parameters:
//
//   - frameClock: FrameClock.
func (context *StyleContext) SetFrameClock(frameClock gdk.FrameClocker) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GdkFrameClock   // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkFrameClock)(unsafe.Pointer(coreglib.InternObject(frameClock).Native()))

	C.gtk_style_context_set_frame_clock(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(frameClock)
}

// SetJunctionSides sets the sides where rendered elements (mostly through
// gtk_render_frame()) will visually connect with other visual elements.
//
// This is merely a hint that may or may not be honored by themes.
//
// Container widgets are expected to set junction hints as appropriate for
// their children, so it should not normally be necessary to call this function
// manually.
//
// The function takes the following parameters:
//
//   - sides where rendered elements are visually connected to other elements.
func (context *StyleContext) SetJunctionSides(sides JunctionSides) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkJunctionSides // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkJunctionSides(sides)

	C.gtk_style_context_set_junction_sides(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(sides)
}

// SetParent sets the parent style context for context.
// The parent style context is used to implement inheritance
// (http://www.w3.org/TR/css3-cascade/#inheritance) of properties.
//
// If you are using a StyleContext returned from gtk_widget_get_style_context(),
// the parent will be set for you.
//
// The function takes the following parameters:
//
//   - parent (optional): new parent or NULL.
func (context *StyleContext) SetParent(parent *StyleContext) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	if parent != nil {
		_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	C.gtk_style_context_set_parent(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(parent)
}

// SetPath sets the WidgetPath used for style matching. As a consequence,
// the style will be regenerated to match the new given path.
//
// If you are using a StyleContext returned from gtk_widget_get_style_context(),
// you do not need to call this yourself.
//
// The function takes the following parameters:
//
//   - path: WidgetPath.
func (context *StyleContext) SetPath(path *WidgetPath) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GtkWidgetPath   // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_style_context_set_path(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(path)
}

// SetScale sets the scale to use when getting image assets for the style.
//
// The function takes the following parameters:
//
//   - scale: scale.
func (context *StyleContext) SetScale(scale int) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.gint             // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.gint(scale)

	C.gtk_style_context_set_scale(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(scale)
}

// SetScreen attaches context to the given screen.
//
// The screen is used to add style information from “global” style providers,
// such as the screen’s Settings instance.
//
// If you are using a StyleContext returned from gtk_widget_get_style_context(),
// you do not need to call this yourself.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (context *StyleContext) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 *C.GdkScreen       // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_style_context_set_screen(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(screen)
}

// SetState sets the state to be used for style matching.
//
// The function takes the following parameters:
//
//   - flags: state to represent.
func (context *StyleContext) SetState(flags StateFlags) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateFlags    // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateFlags(flags)

	C.gtk_style_context_set_state(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(flags)
}

// StateIsRunning returns TRUE if there is a transition animation running for
// the current region (see gtk_style_context_push_animatable_region()).
//
// If progress is not NULL, the animation progress will be returned there,
// 0.0 means the state is closest to being unset, while 1.0 means it’s closest
// to being set. This means transition animation will run from 0 to 1 when state
// is being set and from 1 to 0 when it’s being unset.
//
// Deprecated: This function always returns FALSE.
//
// The function takes the following parameters:
//
//   - state: widget state.
//
// The function returns the following values:
//
//   - progress: return location for the transition progress.
//   - ok: TRUE if there is a running transition animation for state.
func (context *StyleContext) StateIsRunning(state StateType) (float64, bool) {
	var _arg0 *C.GtkStyleContext // out
	var _arg1 C.GtkStateType     // out
	var _arg2 C.gdouble          // in
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStateType(state)

	_cret = C.gtk_style_context_state_is_running(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(context)
	runtime.KeepAlive(state)

	var _progress float64 // out
	var _ok bool          // out

	_progress = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _progress, _ok
}

// String converts the style context into a string representation.
//
// The string representation always includes information about the name, state,
// id, visibility and style classes of the CSS node that is backing context.
// Depending on the flags, more information may be included.
//
// This function is intended for testing and debugging of the CSS implementation
// in GTK+. There are no guarantees about the format of the returned string,
// it may change.
//
// The function takes the following parameters:
//
//   - flags flags that determine what to print.
//
// The function returns the following values:
//
//   - utf8: newly allocated string representing context.
func (context *StyleContext) String(flags StyleContextPrintFlags) string {
	var _arg0 *C.GtkStyleContext          // out
	var _arg1 C.GtkStyleContextPrintFlags // out
	var _cret *C.char                     // in

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg1 = C.GtkStyleContextPrintFlags(flags)

	_cret = C.gtk_style_context_to_string(_arg0, _arg1)
	runtime.KeepAlive(context)
	runtime.KeepAlive(flags)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

func (context *StyleContext) changed() {
	gclass := (*C.GtkStyleContextClass)(coreglib.PeekParentClass(context))
	fnarg := gclass.changed

	var _arg0 *C.GtkStyleContext // out

	_arg0 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_StyleContext_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(context)
}

// StyleContextAddProviderForScreen adds a global style provider to screen,
// which will be used in style construction for all StyleContexts under screen.
//
// GTK+ uses this to make styling information from Settings available.
//
// Note: If both priorities are the same, A StyleProvider added through
// gtk_style_context_add_provider() takes precedence over another added through
// this function.
//
// The function takes the following parameters:
//
//   - screen: Screen.
//   - provider: StyleProvider.
//   - priority of the style provider. The lower it is, the earlier it
//     will be used in the style construction. Typically this will be
//     in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and
//     GTK_STYLE_PROVIDER_PRIORITY_USER.
func StyleContextAddProviderForScreen(screen *gdk.Screen, provider StyleProviderer, priority uint) {
	var _arg1 *C.GdkScreen        // out
	var _arg2 *C.GtkStyleProvider // out
	var _arg3 C.guint             // out

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	_arg2 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))
	_arg3 = C.guint(priority)

	C.gtk_style_context_add_provider_for_screen(_arg1, _arg2, _arg3)
	runtime.KeepAlive(screen)
	runtime.KeepAlive(provider)
	runtime.KeepAlive(priority)
}

// StyleContextRemoveProviderForScreen removes provider from the global style
// providers list in screen.
//
// The function takes the following parameters:
//
//   - screen: Screen.
//   - provider: StyleProvider.
func StyleContextRemoveProviderForScreen(screen *gdk.Screen, provider StyleProviderer) {
	var _arg1 *C.GdkScreen        // out
	var _arg2 *C.GtkStyleProvider // out

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	_arg2 = (*C.GtkStyleProvider)(unsafe.Pointer(coreglib.InternObject(provider).Native()))

	C.gtk_style_context_remove_provider_for_screen(_arg1, _arg2)
	runtime.KeepAlive(screen)
	runtime.KeepAlive(provider)
}

// StyleContextResetWidgets: this function recomputes the styles for all widgets
// under a particular Screen. This is useful when some global parameter has
// changed that affects the appearance of all widgets, because when a widget
// gets a new style, it will both redraw and recompute any cached information
// about its appearance. As an example, it is used when the color scheme changes
// in the related Settings object.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func StyleContextResetWidgets(screen *gdk.Screen) {
	var _arg1 *C.GdkScreen // out

	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_style_context_reset_widgets(_arg1)
	runtime.KeepAlive(screen)
}

// StylePropertiesOverrides contains methods that are overridable.
type StylePropertiesOverrides struct {
}

func defaultStylePropertiesOverrides(v *StyleProperties) StylePropertiesOverrides {
	return StylePropertiesOverrides{}
}

// StyleProperties provides the storage for style information that is used by
// StyleContext and other StyleProvider implementations.
//
// Before style properties can be stored in GtkStyleProperties, they must be
// registered with gtk_style_properties_register_property().
//
// Unless you are writing a StyleProvider implementation, you are unlikely to
// use this API directly, as gtk_style_context_get() and its variants are the
// preferred way to access styling information from widget implementations and
// theming engine implementations should use the APIs provided by ThemingEngine
// instead.
//
// StyleProperties has been deprecated in GTK 3.16. The CSS machinery does not
// use it anymore and all users of this object have been deprecated.
type StyleProperties struct {
	_ [0]func() // equal guard
	*coreglib.Object

	StyleProvider
}

var (
	_ coreglib.Objector = (*StyleProperties)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*StyleProperties, *StylePropertiesClass, StylePropertiesOverrides](
		GTypeStyleProperties,
		initStylePropertiesClass,
		wrapStyleProperties,
		defaultStylePropertiesOverrides,
	)
}

func initStylePropertiesClass(gclass unsafe.Pointer, overrides StylePropertiesOverrides, classInitFunc func(*StylePropertiesClass)) {
	if classInitFunc != nil {
		class := (*StylePropertiesClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapStyleProperties(obj *coreglib.Object) *StyleProperties {
	return &StyleProperties{
		Object: obj,
		StyleProvider: StyleProvider{
			Object: obj,
		},
	}
}

func marshalStyleProperties(p uintptr) (interface{}, error) {
	return wrapStyleProperties(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewStyleProperties returns a newly created StyleProperties
//
// Deprecated: StyleProperties are deprecated.
//
// The function returns the following values:
//
//   - styleProperties: new StyleProperties.
func NewStyleProperties() *StyleProperties {
	var _cret *C.GtkStyleProperties // in

	_cret = C.gtk_style_properties_new()

	var _styleProperties *StyleProperties // out

	_styleProperties = wrapStyleProperties(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _styleProperties
}

// Clear clears all style information from props.
//
// Deprecated: StyleProperties are deprecated.
func (props *StyleProperties) Clear() {
	var _arg0 *C.GtkStyleProperties // out

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))

	C.gtk_style_properties_clear(_arg0)
	runtime.KeepAlive(props)
}

// Property gets a style property from props for the given state. When done with
// value, g_value_unset() needs to be called to free any allocated memory.
//
// Deprecated: StyleProperties are deprecated.
//
// The function takes the following parameters:
//
//   - property: style property name.
//   - state to retrieve the property value for.
//
// The function returns the following values:
//
//   - value: return location for the style property value.
//   - ok: TRUE if the property exists in props, FALSE otherwise.
func (props *StyleProperties) Property(property string, state StateFlags) (coreglib.Value, bool) {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.gchar              // out
	var _arg2 C.GtkStateFlags       // out
	var _arg3 C.GValue              // in
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStateFlags(state)

	_cret = C.gtk_style_properties_get_property(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(props)
	runtime.KeepAlive(property)
	runtime.KeepAlive(state)

	var _value coreglib.Value // out
	var _ok bool              // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))
	runtime.SetFinalizer(_value, func(v *coreglib.Value) {
		C.g_value_unset((*C.GValue)(unsafe.Pointer(v.Native())))
	})
	if _cret != 0 {
		_ok = true
	}

	return _value, _ok
}

// LookupColor returns the symbolic color that is mapped to name.
//
// Deprecated: SymbolicColor is deprecated.
//
// The function takes the following parameters:
//
//   - name: color name to lookup.
//
// The function returns the following values:
//
//   - symbolicColor: mapped color.
func (props *StyleProperties) LookupColor(name string) *SymbolicColor {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.gchar              // out
	var _cret *C.GtkSymbolicColor   // in

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_style_properties_lookup_color(_arg0, _arg1)
	runtime.KeepAlive(props)
	runtime.KeepAlive(name)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_symbolic_color_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// MapColor maps color so it can be referenced by name. See
// gtk_style_properties_lookup_color()
//
// Deprecated: SymbolicColor is deprecated.
//
// The function takes the following parameters:
//
//   - name: color name.
//   - color to map name to.
func (props *StyleProperties) MapColor(name string, color *SymbolicColor) {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.gchar              // out
	var _arg2 *C.GtkSymbolicColor   // out

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_style_properties_map_color(_arg0, _arg1, _arg2)
	runtime.KeepAlive(props)
	runtime.KeepAlive(name)
	runtime.KeepAlive(color)
}

// Merge merges into props all the style information contained in
// props_to_merge. If replace is TRUE, the values will be overwritten, if it is
// FALSE, the older values will prevail.
//
// Deprecated: StyleProperties are deprecated.
//
// The function takes the following parameters:
//
//   - propsToMerge: second StyleProperties.
//   - replace: whether to replace values or not.
func (props *StyleProperties) Merge(propsToMerge *StyleProperties, replace bool) {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.GtkStyleProperties // out
	var _arg2 C.gboolean            // out

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(propsToMerge).Native()))
	if replace {
		_arg2 = C.TRUE
	}

	C.gtk_style_properties_merge(_arg0, _arg1, _arg2)
	runtime.KeepAlive(props)
	runtime.KeepAlive(propsToMerge)
	runtime.KeepAlive(replace)
}

// SetProperty sets a styling property in props.
//
// Deprecated: StyleProperties are deprecated.
//
// The function takes the following parameters:
//
//   - property: styling property to set.
//   - state to set the value for.
//   - value: new value for the property.
func (props *StyleProperties) SetProperty(property string, state StateFlags, value *coreglib.Value) {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.gchar              // out
	var _arg2 C.GtkStateFlags       // out
	var _arg3 *C.GValue             // out

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStateFlags(state)
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_style_properties_set_property(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(props)
	runtime.KeepAlive(property)
	runtime.KeepAlive(state)
	runtime.KeepAlive(value)
}

// UnsetProperty unsets a style property in props.
//
// Deprecated: StyleProperties are deprecated.
//
// The function takes the following parameters:
//
//   - property to unset.
//   - state to unset.
func (props *StyleProperties) UnsetProperty(property string, state StateFlags) {
	var _arg0 *C.GtkStyleProperties // out
	var _arg1 *C.gchar              // out
	var _arg2 C.GtkStateFlags       // out

	_arg0 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStateFlags(state)

	C.gtk_style_properties_unset_property(_arg0, _arg1, _arg2)
	runtime.KeepAlive(props)
	runtime.KeepAlive(property)
	runtime.KeepAlive(state)
}

// SwitchOverrides contains methods that are overridable.
type SwitchOverrides struct {
	// Activate: action signal and emitting it causes the switch to animate.
	Activate func()
	// StateSet class handler for the ::state-set signal.
	StateSet func(state bool) bool
}

func defaultSwitchOverrides(v *Switch) SwitchOverrides {
	return SwitchOverrides{
		Activate: v.activate,
		StateSet: v.stateSet,
	}
}

// Switch is a widget that has two states: on or off. The user can control which
// state should be active by clicking the empty area, or by dragging the handle.
//
// GtkSwitch can also handle situations where the underlying state changes with
// a delay. See Switch::state-set for details.
//
// CSS nodes
//
//	switch
//	╰── slider
//
// GtkSwitch has two css nodes, the main node with the name switch and a subnode
// named slider. Neither of them is using any style classes.
type Switch struct {
	_ [0]func() // equal guard
	Widget

	*coreglib.Object
	Actionable
	Activatable
}

var (
	_ Widgetter         = (*Switch)(nil)
	_ coreglib.Objector = (*Switch)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Switch, *SwitchClass, SwitchOverrides](
		GTypeSwitch,
		initSwitchClass,
		wrapSwitch,
		defaultSwitchOverrides,
	)
}

func initSwitchClass(gclass unsafe.Pointer, overrides SwitchOverrides, classInitFunc func(*SwitchClass)) {
	pclass := (*C.GtkSwitchClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeSwitch))))

	if overrides.Activate != nil {
		pclass.activate = (*[0]byte)(C._gotk4_gtk3_SwitchClass_activate)
	}

	if overrides.StateSet != nil {
		pclass.state_set = (*[0]byte)(C._gotk4_gtk3_SwitchClass_state_set)
	}

	if classInitFunc != nil {
		class := (*SwitchClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSwitch(obj *coreglib.Object) *Switch {
	return &Switch{
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
		Object: obj,
		Actionable: Actionable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Activatable: Activatable{
			Object: obj,
		},
	}
}

func marshalSwitch(p uintptr) (interface{}, error) {
	return wrapSwitch(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivate signal on GtkSwitch is an action signal and emitting it
// causes the switch to animate. Applications should never connect to this
// signal, but use the notify::active signal.
func (sw *Switch) ConnectActivate(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sw, "activate", false, unsafe.Pointer(C._gotk4_gtk3_Switch_ConnectActivate), f)
}

// ConnectStateSet signal on GtkSwitch is emitted to change the underlying
// state. It is emitted when the user changes the switch position. The default
// handler keeps the state in sync with the Switch:active property.
//
// To implement delayed state change, applications can connect to this signal,
// initiate the change of the underlying state, and call gtk_switch_set_state()
// when the underlying state change is complete. The signal handler should
// return TRUE to prevent the default handler from running.
//
// Visually, the underlying state is represented by the trough color of the
// switch, while the Switch:active property is represented by the position of
// the switch.
func (sw *Switch) ConnectStateSet(f func(state bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(sw, "state-set", false, unsafe.Pointer(C._gotk4_gtk3_Switch_ConnectStateSet), f)
}

// NewSwitch creates a new Switch widget.
//
// The function returns the following values:
//
//   - _switch: newly created Switch instance.
func NewSwitch() *Switch {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_switch_new()

	var __switch *Switch // out

	__switch = wrapSwitch(coreglib.Take(unsafe.Pointer(_cret)))

	return __switch
}

// Active gets whether the Switch is in its “on” or “off” state.
//
// The function returns the following values:
//
//   - ok: TRUE if the Switch is active, and FALSE otherwise.
func (sw *Switch) Active() bool {
	var _arg0 *C.GtkSwitch // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))

	_cret = C.gtk_switch_get_active(_arg0)
	runtime.KeepAlive(sw)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// State gets the underlying state of the Switch.
//
// The function returns the following values:
//
//   - ok: underlying state.
func (sw *Switch) State() bool {
	var _arg0 *C.GtkSwitch // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))

	_cret = C.gtk_switch_get_state(_arg0)
	runtime.KeepAlive(sw)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActive changes the state of sw to the desired one.
//
// The function takes the following parameters:
//
//   - isActive: TRUE if sw should be active, and FALSE otherwise.
func (sw *Switch) SetActive(isActive bool) {
	var _arg0 *C.GtkSwitch // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))
	if isActive {
		_arg1 = C.TRUE
	}

	C.gtk_switch_set_active(_arg0, _arg1)
	runtime.KeepAlive(sw)
	runtime.KeepAlive(isActive)
}

// SetState sets the underlying state of the Switch.
//
// Normally, this is the same as Switch:active, unless the switch is set
// up for delayed state changes. This function is typically called from a
// Switch::state-set signal handler.
//
// See Switch::state-set for details.
//
// The function takes the following parameters:
//
//   - state: new state.
func (sw *Switch) SetState(state bool) {
	var _arg0 *C.GtkSwitch // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))
	if state {
		_arg1 = C.TRUE
	}

	C.gtk_switch_set_state(_arg0, _arg1)
	runtime.KeepAlive(sw)
	runtime.KeepAlive(state)
}

// Activate: action signal and emitting it causes the switch to animate.
func (sw *Switch) activate() {
	gclass := (*C.GtkSwitchClass)(coreglib.PeekParentClass(sw))
	fnarg := gclass.activate

	var _arg0 *C.GtkSwitch // out

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))

	C._gotk4_gtk3_Switch_virtual_activate(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(sw)
}

// stateSet class handler for the ::state-set signal.
func (sw *Switch) stateSet(state bool) bool {
	gclass := (*C.GtkSwitchClass)(coreglib.PeekParentClass(sw))
	fnarg := gclass.state_set

	var _arg0 *C.GtkSwitch // out
	var _arg1 C.gboolean   // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkSwitch)(unsafe.Pointer(coreglib.InternObject(sw).Native()))
	if state {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Switch_virtual_state_set(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(sw)
	runtime.KeepAlive(state)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SwitchAccessibleOverrides contains methods that are overridable.
type SwitchAccessibleOverrides struct {
}

func defaultSwitchAccessibleOverrides(v *SwitchAccessible) SwitchAccessibleOverrides {
	return SwitchAccessibleOverrides{}
}

type SwitchAccessible struct {
	_ [0]func() // equal guard
	WidgetAccessible

	atk.Action
}

var (
	_ coreglib.Objector = (*SwitchAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*SwitchAccessible, *SwitchAccessibleClass, SwitchAccessibleOverrides](
		GTypeSwitchAccessible,
		initSwitchAccessibleClass,
		wrapSwitchAccessible,
		defaultSwitchAccessibleOverrides,
	)
}

func initSwitchAccessibleClass(gclass unsafe.Pointer, overrides SwitchAccessibleOverrides, classInitFunc func(*SwitchAccessibleClass)) {
	if classInitFunc != nil {
		class := (*SwitchAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapSwitchAccessible(obj *coreglib.Object) *SwitchAccessible {
	return &SwitchAccessible{
		WidgetAccessible: WidgetAccessible{
			Accessible: Accessible{
				AtkObject: atk.AtkObject{
					Object: obj,
				},
			},
			Component: atk.Component{
				Object: obj,
			},
		},
		Action: atk.Action{
			Object: obj,
		},
	}
}

func marshalSwitchAccessible(p uintptr) (interface{}, error) {
	return wrapSwitchAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// TableOverrides contains methods that are overridable.
type TableOverrides struct {
}

func defaultTableOverrides(v *Table) TableOverrides {
	return TableOverrides{}
}

// Table functions allow the programmer to arrange widgets in rows and columns,
// making it easy to align many widgets next to each other, horizontally and
// vertically.
//
// Tables are created with a call to gtk_table_new(), the size of which can
// later be changed with gtk_table_resize().
//
// Widgets can be added to a table using gtk_table_attach() or the more
// convenient (but slightly less flexible) gtk_table_attach_defaults().
//
// To alter the space next to a specific row, use gtk_table_set_row_spacing(),
// and for a column, gtk_table_set_col_spacing(). The gaps between all rows
// or columns can be changed by calling gtk_table_set_row_spacings() or
// gtk_table_set_col_spacings() respectively. Note that spacing is added between
// the children, while padding added by gtk_table_attach() is added on either
// side of the widget it belongs to.
//
// gtk_table_set_homogeneous(), can be used to set whether all cells in the
// table will resize themselves to the size of the largest widget in the table.
//
// > Table has been deprecated. Use Grid instead. It provides the same >
// capabilities as GtkTable for arranging widgets in a rectangular grid,
// but > does support height-for-width geometry management.
type Table struct {
	_ [0]func() // equal guard
	Container
}

var (
	_ Containerer = (*Table)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Table, *TableClass, TableOverrides](
		GTypeTable,
		initTableClass,
		wrapTable,
		defaultTableOverrides,
	)
}

func initTableClass(gclass unsafe.Pointer, overrides TableOverrides, classInitFunc func(*TableClass)) {
	if classInitFunc != nil {
		class := (*TableClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTable(obj *coreglib.Object) *Table {
	return &Table{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalTable(p uintptr) (interface{}, error) {
	return wrapTable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTable: used to create a new table widget. An initial size must be given
// by specifying how many rows and columns the table should have, although this
// can be changed later with gtk_table_resize(). rows and columns must both be
// in the range 1 .. 65535. For historical reasons, 0 is accepted as well and is
// silently interpreted as 1.
//
// Deprecated: Use gtk_grid_new().
//
// The function takes the following parameters:
//
//   - rows: number of rows the new table should have.
//   - columns: number of columns the new table should have.
//   - homogeneous: if set to TRUE, all table cells are resized to the size of
//     the cell containing the largest widget.
//
// The function returns the following values:
//
//   - table: pointer to the newly created table widget.
func NewTable(rows, columns uint, homogeneous bool) *Table {
	var _arg1 C.guint      // out
	var _arg2 C.guint      // out
	var _arg3 C.gboolean   // out
	var _cret *C.GtkWidget // in

	_arg1 = C.guint(rows)
	_arg2 = C.guint(columns)
	if homogeneous {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_table_new(_arg1, _arg2, _arg3)
	runtime.KeepAlive(rows)
	runtime.KeepAlive(columns)
	runtime.KeepAlive(homogeneous)

	var _table *Table // out

	_table = wrapTable(coreglib.Take(unsafe.Pointer(_cret)))

	return _table
}

// Attach adds a widget to a table. The number of “cells” that a widget
// will occupy is specified by left_attach, right_attach, top_attach and
// bottom_attach. These each represent the leftmost, rightmost, uppermost and
// lowest column and row numbers of the table. (Columns and rows are indexed
// from zero).
//
// To make a button occupy the lower right cell of a 2x2 table, use
//
//	gtk_table_attach (table, button,
//	                  1, 2, // left, right attach
//	                  1, 2, // top, bottom attach
//	                  xoptions, yoptions,
//	                  xpadding, ypadding);
//
// If you want to make the button span the entire bottom row, use left_attach ==
// 0 and right_attach = 2 instead.
//
// Deprecated: Use gtk_grid_attach() with Grid. Note that the attach arguments
// differ between those two functions.
//
// The function takes the following parameters:
//
//   - child: widget to add.
//   - leftAttach: column number to attach the left side of a child widget to.
//   - rightAttach: column number to attach the right side of a child widget to.
//   - topAttach: row number to attach the top of a child widget to.
//   - bottomAttach: row number to attach the bottom of a child widget to.
//   - xoptions: used to specify the properties of the child widget when the
//     table is resized.
//   - yoptions: same as xoptions, except this field determines behaviour of
//     vertical resizing.
//   - xpadding: integer value specifying the padding on the left and right of
//     the widget being added to the table.
//   - ypadding: amount of padding above and below the child widget.
func (table *Table) Attach(child Widgetter, leftAttach, rightAttach, topAttach, bottomAttach uint, xoptions, yoptions AttachOptions, xpadding, ypadding uint) {
	var _arg0 *C.GtkTable        // out
	var _arg1 *C.GtkWidget       // out
	var _arg2 C.guint            // out
	var _arg3 C.guint            // out
	var _arg4 C.guint            // out
	var _arg5 C.guint            // out
	var _arg6 C.GtkAttachOptions // out
	var _arg7 C.GtkAttachOptions // out
	var _arg8 C.guint            // out
	var _arg9 C.guint            // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.guint(leftAttach)
	_arg3 = C.guint(rightAttach)
	_arg4 = C.guint(topAttach)
	_arg5 = C.guint(bottomAttach)
	_arg6 = C.GtkAttachOptions(xoptions)
	_arg7 = C.GtkAttachOptions(yoptions)
	_arg8 = C.guint(xpadding)
	_arg9 = C.guint(ypadding)

	C.gtk_table_attach(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9)
	runtime.KeepAlive(table)
	runtime.KeepAlive(child)
	runtime.KeepAlive(leftAttach)
	runtime.KeepAlive(rightAttach)
	runtime.KeepAlive(topAttach)
	runtime.KeepAlive(bottomAttach)
	runtime.KeepAlive(xoptions)
	runtime.KeepAlive(yoptions)
	runtime.KeepAlive(xpadding)
	runtime.KeepAlive(ypadding)
}

// AttachDefaults as there are many options associated with gtk_table_attach(),
// this convenience function provides the programmer with a means to add
// children to a table with identical padding and expansion options. The values
// used for the AttachOptions are GTK_EXPAND | GTK_FILL, and the padding is set
// to 0.
//
// Deprecated: Use gtk_grid_attach() with Grid. Note that the attach arguments
// differ between those two functions.
//
// The function takes the following parameters:
//
//   - widget: child widget to add.
//   - leftAttach: column number to attach the left side of the child widget to.
//   - rightAttach: column number to attach the right side of the child widget
//     to.
//   - topAttach: row number to attach the top of the child widget to.
//   - bottomAttach: row number to attach the bottom of the child widget to.
func (table *Table) AttachDefaults(widget Widgetter, leftAttach, rightAttach, topAttach, bottomAttach uint) {
	var _arg0 *C.GtkTable  // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.guint      // out
	var _arg3 C.guint      // out
	var _arg4 C.guint      // out
	var _arg5 C.guint      // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.guint(leftAttach)
	_arg3 = C.guint(rightAttach)
	_arg4 = C.guint(topAttach)
	_arg5 = C.guint(bottomAttach)

	C.gtk_table_attach_defaults(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(table)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(leftAttach)
	runtime.KeepAlive(rightAttach)
	runtime.KeepAlive(topAttach)
	runtime.KeepAlive(bottomAttach)
}

// ColSpacing gets the amount of space between column col, and column col + 1.
// See gtk_table_set_col_spacing().
//
// Deprecated: Grid does not offer a replacement for this functionality.
//
// The function takes the following parameters:
//
//   - column in the table, 0 indicates the first column.
//
// The function returns the following values:
//
//   - guint: column spacing.
func (table *Table) ColSpacing(column uint) uint {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(column)

	_cret = C.gtk_table_get_col_spacing(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(column)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// DefaultColSpacing gets the default column spacing for the table.
// This is the spacing that will be used for newly added columns. (See
// gtk_table_set_col_spacings())
//
// Deprecated: Use gtk_grid_get_column_spacing() with Grid.
//
// The function returns the following values:
//
//   - guint: default column spacing.
func (table *Table) DefaultColSpacing() uint {
	var _arg0 *C.GtkTable // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))

	_cret = C.gtk_table_get_default_col_spacing(_arg0)
	runtime.KeepAlive(table)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// DefaultRowSpacing gets the default row spacing for the table.
// This is the spacing that will be used for newly added rows. (See
// gtk_table_set_row_spacings())
//
// Deprecated: Use gtk_grid_get_row_spacing() with Grid.
//
// The function returns the following values:
//
//   - guint: default row spacing.
func (table *Table) DefaultRowSpacing() uint {
	var _arg0 *C.GtkTable // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))

	_cret = C.gtk_table_get_default_row_spacing(_arg0)
	runtime.KeepAlive(table)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Homogeneous returns whether the table cells are all constrained to the same
// width and height. (See gtk_table_set_homogeneous ())
//
// Deprecated: Use gtk_grid_get_row_homogeneous() and
// gtk_grid_get_column_homogeneous() with Grid.
//
// The function returns the following values:
//
//   - ok: TRUE if the cells are all constrained to the same size.
func (table *Table) Homogeneous() bool {
	var _arg0 *C.GtkTable // out
	var _cret C.gboolean  // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))

	_cret = C.gtk_table_get_homogeneous(_arg0)
	runtime.KeepAlive(table)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RowSpacing gets the amount of space between row row, and row row + 1.
// See gtk_table_set_row_spacing().
//
// Deprecated: Grid does not offer a replacement for this functionality.
//
// The function takes the following parameters:
//
//   - row in the table, 0 indicates the first row.
//
// The function returns the following values:
//
//   - guint: row spacing.
func (table *Table) RowSpacing(row uint) uint {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out
	var _cret C.guint     // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(row)

	_cret = C.gtk_table_get_row_spacing(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(row)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// Size gets the number of rows and columns in the table.
//
// Deprecated: Grid does not expose the number of columns and rows.
//
// The function returns the following values:
//
//   - rows (optional): return location for the number of rows, or NULL.
//   - columns (optional): return location for the number of columns, or NULL.
func (table *Table) Size() (rows, columns uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // in
	var _arg2 C.guint     // in

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))

	C.gtk_table_get_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(table)

	var _rows uint    // out
	var _columns uint // out

	_rows = uint(_arg1)
	_columns = uint(_arg2)

	return _rows, _columns
}

// Resize: if you need to change a table’s size after it has been created,
// this function allows you to do so.
//
// Deprecated: Grid resizes automatically.
//
// The function takes the following parameters:
//
//   - rows: new number of rows.
//   - columns: new number of columns.
func (table *Table) Resize(rows, columns uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out
	var _arg2 C.guint     // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(rows)
	_arg2 = C.guint(columns)

	C.gtk_table_resize(_arg0, _arg1, _arg2)
	runtime.KeepAlive(table)
	runtime.KeepAlive(rows)
	runtime.KeepAlive(columns)
}

// SetColSpacing alters the amount of space between a given table column and the
// following column.
//
// Deprecated: Use gtk_widget_set_margin_start() and gtk_widget_set_margin_end()
// on the widgets contained in the row if you need this functionality. Grid does
// not support per-row spacing.
//
// The function takes the following parameters:
//
//   - column whose spacing should be changed.
//   - spacing: number of pixels that the spacing should take up.
func (table *Table) SetColSpacing(column, spacing uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out
	var _arg2 C.guint     // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(column)
	_arg2 = C.guint(spacing)

	C.gtk_table_set_col_spacing(_arg0, _arg1, _arg2)
	runtime.KeepAlive(table)
	runtime.KeepAlive(column)
	runtime.KeepAlive(spacing)
}

// SetColSpacings sets the space between every column in table equal to spacing.
//
// Deprecated: Use gtk_grid_set_column_spacing() with Grid.
//
// The function takes the following parameters:
//
//   - spacing: number of pixels of space to place between every column in the
//     table.
func (table *Table) SetColSpacings(spacing uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_table_set_col_spacings(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(spacing)
}

// SetHomogeneous changes the homogenous property of table cells, ie. whether
// all cells are an equal size or not.
//
// Deprecated: Use gtk_grid_set_row_homogeneous() and
// gtk_grid_set_column_homogeneous() with Grid.
//
// The function takes the following parameters:
//
//   - homogeneous: set to TRUE to ensure all table cells are the same size.
//     Set to FALSE if this is not your desired behaviour.
func (table *Table) SetHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.gboolean  // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_table_set_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(homogeneous)
}

// SetRowSpacing changes the space between a given table row and the subsequent
// row.
//
// Deprecated: Use gtk_widget_set_margin_top() and
// gtk_widget_set_margin_bottom() on the widgets contained in the row if you
// need this functionality. Grid does not support per-row spacing.
//
// The function takes the following parameters:
//
//   - row number whose spacing will be changed.
//   - spacing: number of pixels that the spacing should take up.
func (table *Table) SetRowSpacing(row, spacing uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out
	var _arg2 C.guint     // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(row)
	_arg2 = C.guint(spacing)

	C.gtk_table_set_row_spacing(_arg0, _arg1, _arg2)
	runtime.KeepAlive(table)
	runtime.KeepAlive(row)
	runtime.KeepAlive(spacing)
}

// SetRowSpacings sets the space between every row in table equal to spacing.
//
// Deprecated: Use gtk_grid_set_row_spacing() with Grid.
//
// The function takes the following parameters:
//
//   - spacing: number of pixels of space to place between every row in the
//     table.
func (table *Table) SetRowSpacings(spacing uint) {
	var _arg0 *C.GtkTable // out
	var _arg1 C.guint     // out

	_arg0 = (*C.GtkTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = C.guint(spacing)

	C.gtk_table_set_row_spacings(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(spacing)
}

// TearoffMenuItemOverrides contains methods that are overridable.
type TearoffMenuItemOverrides struct {
}

func defaultTearoffMenuItemOverrides(v *TearoffMenuItem) TearoffMenuItemOverrides {
	return TearoffMenuItemOverrides{}
}

// TearoffMenuItem is a special MenuItem which is used to tear off and reattach
// its menu.
//
// When its menu is shown normally, the TearoffMenuItem is drawn as a dotted
// line indicating that the menu can be torn off. Activating it causes its menu
// to be torn off and displayed in its own window as a tearoff menu.
//
// When its menu is shown as a tearoff menu, the TearoffMenuItem is drawn as
// a dotted line which has a left pointing arrow graphic indicating that the
// tearoff menu can be reattached. Activating it will erase the tearoff menu
// window.
//
// > TearoffMenuItem is deprecated and should not be used in newly > written
// code. Menus are not meant to be torn around.
type TearoffMenuItem struct {
	_ [0]func() // equal guard
	MenuItem
}

var (
	_ Binner            = (*TearoffMenuItem)(nil)
	_ coreglib.Objector = (*TearoffMenuItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TearoffMenuItem, *TearoffMenuItemClass, TearoffMenuItemOverrides](
		GTypeTearoffMenuItem,
		initTearoffMenuItemClass,
		wrapTearoffMenuItem,
		defaultTearoffMenuItemOverrides,
	)
}

func initTearoffMenuItemClass(gclass unsafe.Pointer, overrides TearoffMenuItemOverrides, classInitFunc func(*TearoffMenuItemClass)) {
	if classInitFunc != nil {
		class := (*TearoffMenuItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTearoffMenuItem(obj *coreglib.Object) *TearoffMenuItem {
	return &TearoffMenuItem{
		MenuItem: MenuItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalTearoffMenuItem(p uintptr) (interface{}, error) {
	return wrapTearoffMenuItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTearoffMenuItem creates a new TearoffMenuItem.
//
// Deprecated: TearoffMenuItem is deprecated and should not be used in newly
// written code.
//
// The function returns the following values:
//
//   - tearoffMenuItem: new TearoffMenuItem.
func NewTearoffMenuItem() *TearoffMenuItem {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_tearoff_menu_item_new()

	var _tearoffMenuItem *TearoffMenuItem // out

	_tearoffMenuItem = wrapTearoffMenuItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _tearoffMenuItem
}

// TextBufferOverrides contains methods that are overridable.
type TextBufferOverrides struct {
	// ApplyTag emits the “apply-tag” signal on buffer. The default handler for
	// the signal applies tag to the given range. start and end do not have to
	// be in order.
	//
	// The function takes the following parameters:
	//
	//   - tag: TextTag.
	//   - start: one bound of range to be tagged.
	//   - end: other bound of range to be tagged.
	ApplyTag func(tag *TextTag, start, end *TextIter)
	// BeginUserAction: called to indicate that the buffer operations
	// between here and a call to gtk_text_buffer_end_user_action() are
	// part of a single user-visible operation. The operations between
	// gtk_text_buffer_begin_user_action() and gtk_text_buffer_end_user_action()
	// can then be grouped when creating an undo stack. TextBuffer maintains a
	// count of calls to gtk_text_buffer_begin_user_action() that have not been
	// closed with a call to gtk_text_buffer_end_user_action(), and emits the
	// “begin-user-action” and “end-user-action” signals only for the outermost
	// pair of calls. This allows you to build user actions from other user
	// actions.
	//
	// The “interactive” buffer mutation functions, such as
	// gtk_text_buffer_insert_interactive(), automatically call begin/end user
	// action around the buffer operations they perform, so there's no need to
	// add extra calls if you user action consists solely of a single call to
	// one of those functions.
	BeginUserAction func()
	// Changed class handler for the TextBuffer::changed signal.
	Changed func()
	// DeleteRange class handler for the TextBuffer::delete-range signal.
	//
	// The function takes the following parameters:
	//
	//   - start
	//   - end
	DeleteRange func(start, end *TextIter)
	// EndUserAction: should be paired with a call to
	// gtk_text_buffer_begin_user_action(). See that function for a full
	// explanation.
	EndUserAction func()
	// InsertChildAnchor inserts a child widget anchor into the text buffer at
	// iter. The anchor will be counted as one character in character counts,
	// and when obtaining the buffer contents as a string, will be represented
	// by the Unicode “object replacement character” 0xFFFC. Note that the
	// “slice” variants for obtaining portions of the buffer as a string include
	// this character for child anchors, but the “text” variants do not. E.g.
	// see gtk_text_buffer_get_slice() and gtk_text_buffer_get_text(). Consider
	// gtk_text_buffer_create_child_anchor() as a more convenient alternative to
	// this function. The buffer will add a reference to the anchor, so you can
	// unref it after insertion.
	//
	// The function takes the following parameters:
	//
	//   - iter: location to insert the anchor.
	//   - anchor: TextChildAnchor.
	InsertChildAnchor func(iter *TextIter, anchor *TextChildAnchor)
	// InsertPixbuf inserts an image into the text buffer at iter.
	// The image will be counted as one character in character counts,
	// and when obtaining the buffer contents as a string, will be represented
	// by the Unicode “object replacement character” 0xFFFC. Note that the
	// “slice” variants for obtaining portions of the buffer as a string
	// include this character for pixbufs, but the “text” variants do not. e.g.
	// see gtk_text_buffer_get_slice() and gtk_text_buffer_get_text().
	//
	// The function takes the following parameters:
	//
	//   - iter: location to insert the pixbuf.
	//   - pixbuf: Pixbuf.
	InsertPixbuf func(iter *TextIter, pixbuf *gdkpixbuf.Pixbuf)
	// InsertText class handler for the TextBuffer::insert-text signal.
	//
	// The function takes the following parameters:
	//
	//   - pos
	//   - newText
	//   - newTextLength
	InsertText func(pos *TextIter, newText string, newTextLength int)
	// MarkDeleted class handler for the TextBuffer::mark-deleted signal.
	MarkDeleted func(mark *TextMark)
	// MarkSet class handler for the TextBuffer::mark-set signal.
	//
	// The function takes the following parameters:
	//
	//   - location
	//   - mark
	MarkSet func(location *TextIter, mark *TextMark)
	// ModifiedChanged class handler for the TextBuffer::modified-changed
	// signal.
	ModifiedChanged func()
	// PasteDone class handler for the TextBuffer::paste-done signal.
	PasteDone func(clipboard *Clipboard)
	// RemoveTag emits the “remove-tag” signal. The default handler for the
	// signal removes all occurrences of tag from the given range. start and end
	// don’t have to be in order.
	//
	// The function takes the following parameters:
	//
	//   - tag: TextTag.
	//   - start: one bound of range to be untagged.
	//   - end: other bound of range to be untagged.
	RemoveTag func(tag *TextTag, start, end *TextIter)
}

func defaultTextBufferOverrides(v *TextBuffer) TextBufferOverrides {
	return TextBufferOverrides{
		ApplyTag:          v.applyTag,
		BeginUserAction:   v.beginUserAction,
		Changed:           v.changed,
		DeleteRange:       v.deleteRange,
		EndUserAction:     v.endUserAction,
		InsertChildAnchor: v.insertChildAnchor,
		InsertPixbuf:      v.insertPixbuf,
		InsertText:        v.insertText,
		MarkDeleted:       v.markDeleted,
		MarkSet:           v.markSet,
		ModifiedChanged:   v.modifiedChanged,
		PasteDone:         v.pasteDone,
		RemoveTag:         v.removeTag,
	}
}

// TextBuffer: you may wish to begin by reading the text widget conceptual
// overview (TextWidget.html) which gives an overview of all the objects and
// data types related to the text widget and how they work together.
type TextBuffer struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TextBuffer)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextBuffer, *TextBufferClass, TextBufferOverrides](
		GTypeTextBuffer,
		initTextBufferClass,
		wrapTextBuffer,
		defaultTextBufferOverrides,
	)
}

func initTextBufferClass(gclass unsafe.Pointer, overrides TextBufferOverrides, classInitFunc func(*TextBufferClass)) {
	pclass := (*C.GtkTextBufferClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTextBuffer))))

	if overrides.ApplyTag != nil {
		pclass.apply_tag = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_apply_tag)
	}

	if overrides.BeginUserAction != nil {
		pclass.begin_user_action = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_begin_user_action)
	}

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_changed)
	}

	if overrides.DeleteRange != nil {
		pclass.delete_range = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_delete_range)
	}

	if overrides.EndUserAction != nil {
		pclass.end_user_action = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_end_user_action)
	}

	if overrides.InsertChildAnchor != nil {
		pclass.insert_child_anchor = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_insert_child_anchor)
	}

	if overrides.InsertPixbuf != nil {
		pclass.insert_pixbuf = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_insert_pixbuf)
	}

	if overrides.InsertText != nil {
		pclass.insert_text = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_insert_text)
	}

	if overrides.MarkDeleted != nil {
		pclass.mark_deleted = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_mark_deleted)
	}

	if overrides.MarkSet != nil {
		pclass.mark_set = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_mark_set)
	}

	if overrides.ModifiedChanged != nil {
		pclass.modified_changed = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_modified_changed)
	}

	if overrides.PasteDone != nil {
		pclass.paste_done = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_paste_done)
	}

	if overrides.RemoveTag != nil {
		pclass.remove_tag = (*[0]byte)(C._gotk4_gtk3_TextBufferClass_remove_tag)
	}

	if classInitFunc != nil {
		class := (*TextBufferClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextBuffer(obj *coreglib.Object) *TextBuffer {
	return &TextBuffer{
		Object: obj,
	}
}

func marshalTextBuffer(p uintptr) (interface{}, error) {
	return wrapTextBuffer(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectApplyTag signal is emitted to apply a tag to a range of text in a
// TextBuffer. Applying actually occurs in the default handler.
//
// Note that if your handler runs before the default handler it must not
// invalidate the start and end iters (or has to revalidate them).
//
// See also: gtk_text_buffer_apply_tag(), gtk_text_buffer_insert_with_tags(),
// gtk_text_buffer_insert_range().
func (buffer *TextBuffer) ConnectApplyTag(f func(tag *TextTag, start, end *TextIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "apply-tag", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectApplyTag), f)
}

// ConnectBeginUserAction signal is emitted at the beginning of a single
// user-visible operation on a TextBuffer.
//
// See also: gtk_text_buffer_begin_user_action(),
// gtk_text_buffer_insert_interactive(),
// gtk_text_buffer_insert_range_interactive(),
// gtk_text_buffer_delete_interactive(), gtk_text_buffer_backspace(),
// gtk_text_buffer_delete_selection().
func (buffer *TextBuffer) ConnectBeginUserAction(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "begin-user-action", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectBeginUserAction), f)
}

// ConnectChanged signal is emitted when the content of a TextBuffer has
// changed.
func (buffer *TextBuffer) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "changed", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectChanged), f)
}

// ConnectDeleteRange signal is emitted to delete a range from a TextBuffer.
//
// Note that if your handler runs before the default handler it must not
// invalidate the start and end iters (or has to revalidate them). The default
// signal handler revalidates the start and end iters to both point to the
// location where text was deleted. Handlers which run after the default handler
// (see g_signal_connect_after()) do not have access to the deleted text.
//
// See also: gtk_text_buffer_delete().
func (buffer *TextBuffer) ConnectDeleteRange(f func(start, end *TextIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "delete-range", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectDeleteRange), f)
}

// ConnectEndUserAction signal is emitted at the end of a single user-visible
// operation on the TextBuffer.
//
// See also: gtk_text_buffer_end_user_action(),
// gtk_text_buffer_insert_interactive(),
// gtk_text_buffer_insert_range_interactive(),
// gtk_text_buffer_delete_interactive(), gtk_text_buffer_backspace(),
// gtk_text_buffer_delete_selection(), gtk_text_buffer_backspace().
func (buffer *TextBuffer) ConnectEndUserAction(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "end-user-action", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectEndUserAction), f)
}

// ConnectInsertChildAnchor signal is emitted to insert a TextChildAnchor in a
// TextBuffer. Insertion actually occurs in the default handler.
//
// Note that if your handler runs before the default handler it must not
// invalidate the location iter (or has to revalidate it). The default signal
// handler revalidates it to be placed after the inserted anchor.
//
// See also: gtk_text_buffer_insert_child_anchor().
func (buffer *TextBuffer) ConnectInsertChildAnchor(f func(location *TextIter, anchor *TextChildAnchor)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "insert-child-anchor", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectInsertChildAnchor), f)
}

// ConnectInsertPixbuf signal is emitted to insert a Pixbuf in a TextBuffer.
// Insertion actually occurs in the default handler.
//
// Note that if your handler runs before the default handler it must not
// invalidate the location iter (or has to revalidate it). The default signal
// handler revalidates it to be placed after the inserted pixbuf.
//
// See also: gtk_text_buffer_insert_pixbuf().
func (buffer *TextBuffer) ConnectInsertPixbuf(f func(location *TextIter, pixbuf *gdkpixbuf.Pixbuf)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "insert-pixbuf", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectInsertPixbuf), f)
}

// ConnectInsertText signal is emitted to insert text in a TextBuffer. Insertion
// actually occurs in the default handler.
//
// Note that if your handler runs before the default handler it must not
// invalidate the location iter (or has to revalidate it). The default signal
// handler revalidates it to point to the end of the inserted text.
//
// See also: gtk_text_buffer_insert(), gtk_text_buffer_insert_range().
func (buffer *TextBuffer) ConnectInsertText(f func(location *TextIter, text string, len int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "insert-text", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectInsertText), f)
}

// ConnectMarkDeleted signal is emitted as notification after a TextMark is
// deleted.
//
// See also: gtk_text_buffer_delete_mark().
func (buffer *TextBuffer) ConnectMarkDeleted(f func(mark *TextMark)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "mark-deleted", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectMarkDeleted), f)
}

// ConnectMarkSet signal is emitted as notification after a TextMark is set.
//
// See also: gtk_text_buffer_create_mark(), gtk_text_buffer_move_mark().
func (buffer *TextBuffer) ConnectMarkSet(f func(location *TextIter, mark *TextMark)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "mark-set", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectMarkSet), f)
}

// ConnectModifiedChanged signal is emitted when the modified bit of a
// TextBuffer flips.
//
// See also: gtk_text_buffer_set_modified().
func (buffer *TextBuffer) ConnectModifiedChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "modified-changed", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectModifiedChanged), f)
}

// ConnectPasteDone signal is emitted after paste operation has been completed.
// This is useful to properly scroll the view to the end of the pasted text.
// See gtk_text_buffer_paste_clipboard() for more details.
func (buffer *TextBuffer) ConnectPasteDone(f func(clipboard *Clipboard)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "paste-done", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectPasteDone), f)
}

// ConnectRemoveTag signal is emitted to remove all occurrences of tag from
// a range of text in a TextBuffer. Removal actually occurs in the default
// handler.
//
// Note that if your handler runs before the default handler it must not
// invalidate the start and end iters (or has to revalidate them).
//
// See also: gtk_text_buffer_remove_tag().
func (buffer *TextBuffer) ConnectRemoveTag(f func(tag *TextTag, start, end *TextIter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(buffer, "remove-tag", false, unsafe.Pointer(C._gotk4_gtk3_TextBuffer_ConnectRemoveTag), f)
}

// NewTextBuffer creates a new text buffer.
//
// The function takes the following parameters:
//
//   - table (optional): tag table, or NULL to create a new one.
//
// The function returns the following values:
//
//   - textBuffer: new text buffer.
func NewTextBuffer(table *TextTagTable) *TextBuffer {
	var _arg1 *C.GtkTextTagTable // out
	var _cret *C.GtkTextBuffer   // in

	if table != nil {
		_arg1 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	}

	_cret = C.gtk_text_buffer_new(_arg1)
	runtime.KeepAlive(table)

	var _textBuffer *TextBuffer // out

	_textBuffer = wrapTextBuffer(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _textBuffer
}

// AddMark adds the mark at position where. The mark must not be added to
// another buffer, and if its name is not NULL then there must not be another
// mark in the buffer with the same name.
//
// Emits the TextBuffer::mark-set signal as notification of the mark's initial
// placement.
//
// The function takes the following parameters:
//
//   - mark to add.
//   - where: location to place mark.
func (buffer *TextBuffer) AddMark(mark *TextMark, where *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextMark   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(where)))

	C.gtk_text_buffer_add_mark(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(mark)
	runtime.KeepAlive(where)
}

// AddSelectionClipboard adds clipboard to the list of clipboards in which the
// selection contents of buffer are available. In most cases, clipboard will be
// the Clipboard of type GDK_SELECTION_PRIMARY for a view of buffer.
//
// The function takes the following parameters:
//
//   - clipboard: Clipboard.
func (buffer *TextBuffer) AddSelectionClipboard(clipboard *Clipboard) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C.gtk_text_buffer_add_selection_clipboard(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
}

// ApplyTag emits the “apply-tag” signal on buffer. The default handler for the
// signal applies tag to the given range. start and end do not have to be in
// order.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//   - start: one bound of range to be tagged.
//   - end: other bound of range to be tagged.
func (buffer *TextBuffer) ApplyTag(tag *TextTag, start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextTag    // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_apply_tag(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// ApplyTagByName calls gtk_text_tag_table_lookup() on the buffer’s tag table to
// get a TextTag, then calls gtk_text_buffer_apply_tag().
//
// The function takes the following parameters:
//
//   - name of a named TextTag.
//   - start: one bound of range to be tagged.
//   - end: other bound of range to be tagged.
func (buffer *TextBuffer) ApplyTagByName(name string, start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_apply_tag_by_name(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(name)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// Backspace performs the appropriate action as if the user hit the delete
// key with the cursor at the position specified by iter. In the normal case a
// single character will be deleted, but when combining accents are involved,
// more than one character can be deleted, and when precomposed character and
// accent combinations are involved, less than one character will be deleted.
//
// Because the buffer is modified, all outstanding iterators become invalid
// after calling this function; however, the iter will be re-initialized to
// point to the location where text was deleted.
//
// The function takes the following parameters:
//
//   - iter: position in buffer.
//   - interactive: whether the deletion is caused by user interaction.
//   - defaultEditable: whether the buffer is editable by default.
//
// The function returns the following values:
//
//   - ok: TRUE if the buffer was modified.
func (buffer *TextBuffer) Backspace(iter *TextIter, interactive, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 C.gboolean       // out
	var _arg3 C.gboolean       // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if interactive {
		_arg2 = C.TRUE
	}
	if defaultEditable {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_backspace(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(interactive)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BeginUserAction: called to indicate that the buffer operations
// between here and a call to gtk_text_buffer_end_user_action() are
// part of a single user-visible operation. The operations between
// gtk_text_buffer_begin_user_action() and gtk_text_buffer_end_user_action() can
// then be grouped when creating an undo stack. TextBuffer maintains a count of
// calls to gtk_text_buffer_begin_user_action() that have not been closed with a
// call to gtk_text_buffer_end_user_action(), and emits the “begin-user-action”
// and “end-user-action” signals only for the outermost pair of calls. This
// allows you to build user actions from other user actions.
//
// The “interactive” buffer mutation functions, such as
// gtk_text_buffer_insert_interactive(), automatically call begin/end user
// action around the buffer operations they perform, so there's no need to add
// extra calls if you user action consists solely of a single call to one of
// those functions.
func (buffer *TextBuffer) BeginUserAction() {
	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_text_buffer_begin_user_action(_arg0)
	runtime.KeepAlive(buffer)
}

// CopyClipboard copies the currently-selected text to a clipboard.
//
// The function takes the following parameters:
//
//   - clipboard object to copy to.
func (buffer *TextBuffer) CopyClipboard(clipboard *Clipboard) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C.gtk_text_buffer_copy_clipboard(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
}

// CreateChildAnchor: this is a convenience function which simply creates
// a child anchor with gtk_text_child_anchor_new() and inserts it into the
// buffer with gtk_text_buffer_insert_child_anchor(). The new anchor is
// owned by the buffer; no reference count is returned to the caller of
// gtk_text_buffer_create_child_anchor().
//
// The function takes the following parameters:
//
//   - iter: location in the buffer.
//
// The function returns the following values:
//
//   - textChildAnchor: created child anchor.
func (buffer *TextBuffer) CreateChildAnchor(iter *TextIter) *TextChildAnchor {
	var _arg0 *C.GtkTextBuffer      // out
	var _arg1 *C.GtkTextIter        // out
	var _cret *C.GtkTextChildAnchor // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_buffer_create_child_anchor(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)

	var _textChildAnchor *TextChildAnchor // out

	_textChildAnchor = wrapTextChildAnchor(coreglib.Take(unsafe.Pointer(_cret)))

	return _textChildAnchor
}

// CreateMark creates a mark at position where. If mark_name is NULL,
// the mark is anonymous; otherwise, the mark can be retrieved by name using
// gtk_text_buffer_get_mark(). If a mark has left gravity, and text is inserted
// at the mark’s current location, the mark will be moved to the left of the
// newly-inserted text. If the mark has right gravity (left_gravity = FALSE),
// the mark will end up on the right of newly-inserted text. The standard
// left-to-right cursor is a mark with right gravity (when you type, the cursor
// stays on the right side of the text you’re typing).
//
// The caller of this function does not own a reference to the returned
// TextMark, so you can ignore the return value if you like. Marks are owned by
// the buffer and go away when the buffer does.
//
// Emits the TextBuffer::mark-set signal as notification of the mark's initial
// placement.
//
// The function takes the following parameters:
//
//   - markName (optional): name for mark, or NULL.
//   - where: location to place mark.
//   - leftGravity: whether the mark has left gravity.
//
// The function returns the following values:
//
//   - textMark: new TextMark object.
func (buffer *TextBuffer) CreateMark(markName string, where *TextIter, leftGravity bool) *TextMark {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 C.gboolean       // out
	var _cret *C.GtkTextMark   // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	if markName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markName)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(where)))
	if leftGravity {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_create_mark(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(markName)
	runtime.KeepAlive(where)
	runtime.KeepAlive(leftGravity)

	var _textMark *TextMark // out

	_textMark = wrapTextMark(coreglib.Take(unsafe.Pointer(_cret)))

	return _textMark
}

// CutClipboard copies the currently-selected text to a clipboard, then deletes
// said text if it’s editable.
//
// The function takes the following parameters:
//
//   - clipboard object to cut to.
//   - defaultEditable: default editability of the buffer.
func (buffer *TextBuffer) CutClipboard(clipboard *Clipboard, defaultEditable bool) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out
	var _arg2 C.gboolean       // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	if defaultEditable {
		_arg2 = C.TRUE
	}

	C.gtk_text_buffer_cut_clipboard(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(defaultEditable)
}

// Delete deletes text between start and end. The order of start and end is not
// actually relevant; gtk_text_buffer_delete() will reorder them. This function
// actually emits the “delete-range” signal, and the default handler of that
// signal deletes the text. Because the buffer is modified, all outstanding
// iterators become invalid after calling this function; however, the start and
// end will be re-initialized to point to the location where text was deleted.
//
// The function takes the following parameters:
//
//   - start: position in buffer.
//   - end: another position in buffer.
func (buffer *TextBuffer) Delete(start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_delete(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// DeleteInteractive deletes all editable text in the given range. Calls
// gtk_text_buffer_delete() for each editable sub-range of [start,end). start
// and end are revalidated to point to the location of the last deleted range,
// or left untouched if no text was deleted.
//
// The function takes the following parameters:
//
//   - startIter: start of range to delete.
//   - endIter: end of range.
//   - defaultEditable: whether the buffer is editable by default.
//
// The function returns the following values:
//
//   - ok: whether some text was actually deleted.
func (buffer *TextBuffer) DeleteInteractive(startIter, endIter *TextIter, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 C.gboolean       // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(startIter)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(endIter)))
	if defaultEditable {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_delete_interactive(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(startIter)
	runtime.KeepAlive(endIter)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DeleteMark deletes mark, so that it’s no longer located anywhere
// in the buffer. Removes the reference the buffer holds to the mark,
// so if you haven’t called g_object_ref() on the mark, it will be freed.
// Even if the mark isn’t freed, most operations on mark become invalid,
// until it gets added to a buffer again with gtk_text_buffer_add_mark(). Use
// gtk_text_mark_get_deleted() to find out if a mark has been removed from its
// buffer. The TextBuffer::mark-deleted signal will be emitted as notification
// after the mark is deleted.
//
// The function takes the following parameters:
//
//   - mark in buffer.
func (buffer *TextBuffer) DeleteMark(mark *TextMark) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextMark   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	C.gtk_text_buffer_delete_mark(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(mark)
}

// DeleteMarkByName deletes the mark named name; the mark must exist. See
// gtk_text_buffer_delete_mark() for details.
//
// The function takes the following parameters:
//
//   - name of a mark in buffer.
func (buffer *TextBuffer) DeleteMarkByName(name string) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_text_buffer_delete_mark_by_name(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(name)
}

// DeleteSelection deletes the range between the “insert” and “selection_bound”
// marks, that is, the currently-selected text. If interactive is TRUE,
// the editability of the selection will be considered (users can’t delete
// uneditable text).
//
// The function takes the following parameters:
//
//   - interactive: whether the deletion is caused by user interaction.
//   - defaultEditable: whether the buffer is editable by default.
//
// The function returns the following values:
//
//   - ok: whether there was a non-empty selection to delete.
func (buffer *TextBuffer) DeleteSelection(interactive, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.gboolean       // out
	var _arg2 C.gboolean       // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	if interactive {
		_arg1 = C.TRUE
	}
	if defaultEditable {
		_arg2 = C.TRUE
	}

	_cret = C.gtk_text_buffer_delete_selection(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(interactive)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EndUserAction: should be paired with a call to
// gtk_text_buffer_begin_user_action(). See that function for a full
// explanation.
func (buffer *TextBuffer) EndUserAction() {
	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_text_buffer_end_user_action(_arg0)
	runtime.KeepAlive(buffer)
}

// Bounds retrieves the first and last iterators in the buffer, i.e. the entire
// buffer lies within the range [start,end).
//
// The function returns the following values:
//
//   - start: iterator to initialize with first position in the buffer.
//   - end: iterator to initialize with the end iterator.
func (buffer *TextBuffer) Bounds() (start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.GtkTextIter    // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_text_buffer_get_bounds(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(buffer)

	var _start *TextIter // out
	var _end *TextIter   // out

	_start = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	_end = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _start, _end
}

// CharCount gets the number of characters in the buffer; note that characters
// and bytes are not the same, you can’t e.g. expect the contents of the buffer
// in string form to be this many bytes long. The character count is cached,
// so this function is very fast.
//
// The function returns the following values:
//
//   - gint: number of characters in the buffer.
func (buffer *TextBuffer) CharCount() int {
	var _arg0 *C.GtkTextBuffer // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_char_count(_arg0)
	runtime.KeepAlive(buffer)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// CopyTargetList: this function returns the list of targets this text
// buffer can provide for copying and as DND source. The targets in
// the list are added with info values from the TextBufferTargetInfo
// enum, using gtk_target_list_add_rich_text_targets() and
// gtk_target_list_add_text_targets().
//
// The function returns the following values:
//
//   - targetList: TargetList.
func (buffer *TextBuffer) CopyTargetList() *TargetList {
	var _arg0 *C.GtkTextBuffer // out
	var _cret *C.GtkTargetList // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_copy_target_list(_arg0)
	runtime.KeepAlive(buffer)

	var _targetList *TargetList // out

	_targetList = (*TargetList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_target_list_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_targetList)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_target_list_unref((*C.GtkTargetList)(intern.C))
		},
	)

	return _targetList
}

// EndIter initializes iter with the “end iterator,” one past the last valid
// character in the text buffer. If dereferenced with gtk_text_iter_get_char(),
// the end iterator has a character value of 0. The entire buffer
// lies in the range from the first position in the buffer (call
// gtk_text_buffer_get_start_iter() to get character position 0) to the end
// iterator.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) EndIter() *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_text_buffer_get_end_iter(_arg0, &_arg1)
	runtime.KeepAlive(buffer)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// HasSelection indicates whether the buffer has some text currently selected.
//
// The function returns the following values:
//
//   - ok: TRUE if the there is text selected.
func (buffer *TextBuffer) HasSelection() bool {
	var _arg0 *C.GtkTextBuffer // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_has_selection(_arg0)
	runtime.KeepAlive(buffer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// GetInsert returns the mark that represents the cursor (insertion point).
// Equivalent to calling gtk_text_buffer_get_mark() to get the mark named
// “insert”, but very slightly more efficient, and involves less typing.
//
// The function returns the following values:
//
//   - textMark: insertion point mark.
func (buffer *TextBuffer) GetInsert() *TextMark {
	var _arg0 *C.GtkTextBuffer // out
	var _cret *C.GtkTextMark   // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_insert(_arg0)
	runtime.KeepAlive(buffer)

	var _textMark *TextMark // out

	_textMark = wrapTextMark(coreglib.Take(unsafe.Pointer(_cret)))

	return _textMark
}

// IterAtChildAnchor obtains the location of anchor within buffer.
//
// The function takes the following parameters:
//
//   - anchor: child anchor that appears in buffer.
//
// The function returns the following values:
//
//   - iter: iterator to be initialized.
func (buffer *TextBuffer) IterAtChildAnchor(anchor *TextChildAnchor) *TextIter {
	var _arg0 *C.GtkTextBuffer      // out
	var _arg1 C.GtkTextIter         // in
	var _arg2 *C.GtkTextChildAnchor // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	C.gtk_text_buffer_get_iter_at_child_anchor(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(anchor)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterAtLine initializes iter to the start of the given line. If line_number is
// greater than the number of lines in the buffer, the end iterator is returned.
//
// The function takes the following parameters:
//
//   - lineNumber: line number counting from 0.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) IterAtLine(lineNumber int) *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.gint           // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = C.gint(lineNumber)

	C.gtk_text_buffer_get_iter_at_line(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(lineNumber)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterAtLineIndex obtains an iterator pointing to byte_index within the
// given line. byte_index must be the start of a UTF-8 character. Note bytes,
// not characters; UTF-8 may encode one character as multiple bytes.
//
// Before the 3.20 version, it was not allowed to pass an invalid location.
//
// Since the 3.20 version, if line_number is greater than the number of lines in
// the buffer, the end iterator is returned. And if byte_index is off the end of
// the line, the iterator at the end of the line is returned.
//
// The function takes the following parameters:
//
//   - lineNumber: line number counting from 0.
//   - byteIndex: byte index from start of line.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) IterAtLineIndex(lineNumber, byteIndex int) *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.gint           // out
	var _arg3 C.gint           // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = C.gint(lineNumber)
	_arg3 = C.gint(byteIndex)

	C.gtk_text_buffer_get_iter_at_line_index(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(lineNumber)
	runtime.KeepAlive(byteIndex)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterAtLineOffset obtains an iterator pointing to char_offset within the given
// line. Note characters, not bytes; UTF-8 may encode one character as multiple
// bytes.
//
// Before the 3.20 version, it was not allowed to pass an invalid location.
//
// Since the 3.20 version, if line_number is greater than the number of lines in
// the buffer, the end iterator is returned. And if char_offset is off the end
// of the line, the iterator at the end of the line is returned.
//
// The function takes the following parameters:
//
//   - lineNumber: line number counting from 0.
//   - charOffset: char offset from start of line.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) IterAtLineOffset(lineNumber, charOffset int) *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.gint           // out
	var _arg3 C.gint           // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = C.gint(lineNumber)
	_arg3 = C.gint(charOffset)

	C.gtk_text_buffer_get_iter_at_line_offset(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(lineNumber)
	runtime.KeepAlive(charOffset)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterAtMark initializes iter with the current position of mark.
//
// The function takes the following parameters:
//
//   - mark in buffer.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) IterAtMark(mark *TextMark) *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 *C.GtkTextMark   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	C.gtk_text_buffer_get_iter_at_mark(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(mark)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IterAtOffset initializes iter to a position char_offset chars from the
// start of the entire buffer. If char_offset is -1 or greater than the number
// of characters in the buffer, iter is initialized to the end iterator,
// the iterator one past the last valid character in the buffer.
//
// The function takes the following parameters:
//
//   - charOffset: char offset from start of buffer, counting from 0, or -1.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) IterAtOffset(charOffset int) *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.gint           // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = C.gint(charOffset)

	C.gtk_text_buffer_get_iter_at_offset(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(charOffset)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// LineCount obtains the number of lines in the buffer. This value is cached,
// so the function is very fast.
//
// The function returns the following values:
//
//   - gint: number of lines in the buffer.
func (buffer *TextBuffer) LineCount() int {
	var _arg0 *C.GtkTextBuffer // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_line_count(_arg0)
	runtime.KeepAlive(buffer)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Mark returns the mark named name in buffer buffer, or NULL if no such mark
// exists in the buffer.
//
// The function takes the following parameters:
//
//   - name: mark name.
//
// The function returns the following values:
//
//   - textMark (optional) or NULL.
func (buffer *TextBuffer) Mark(name string) *TextMark {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _cret *C.GtkTextMark   // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_text_buffer_get_mark(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(name)

	var _textMark *TextMark // out

	if _cret != nil {
		_textMark = wrapTextMark(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _textMark
}

// Modified indicates whether the buffer has been modified since the last
// call to gtk_text_buffer_set_modified() set the modification flag to FALSE.
// Used for example to enable a “save” function in a text editor.
//
// The function returns the following values:
//
//   - ok: TRUE if the buffer has been modified.
func (buffer *TextBuffer) Modified() bool {
	var _arg0 *C.GtkTextBuffer // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_modified(_arg0)
	runtime.KeepAlive(buffer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PasteTargetList: this function returns the list of targets this text
// buffer supports for pasting and as DND destination. The targets in
// the list are added with info values from the TextBufferTargetInfo
// enum, using gtk_target_list_add_rich_text_targets() and
// gtk_target_list_add_text_targets().
//
// The function returns the following values:
//
//   - targetList: TargetList.
func (buffer *TextBuffer) PasteTargetList() *TargetList {
	var _arg0 *C.GtkTextBuffer // out
	var _cret *C.GtkTargetList // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_paste_target_list(_arg0)
	runtime.KeepAlive(buffer)

	var _targetList *TargetList // out

	_targetList = (*TargetList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_target_list_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_targetList)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_target_list_unref((*C.GtkTargetList)(intern.C))
		},
	)

	return _targetList
}

// SelectionBound returns the mark that represents the selection bound.
// Equivalent to calling gtk_text_buffer_get_mark() to get the mark named
// “selection_bound”, but very slightly more efficient, and involves less
// typing.
//
// The currently-selected text in buffer is the region between the
// “selection_bound” and “insert” marks. If “selection_bound” and
// “insert” are in the same place, then there is no current selection.
// gtk_text_buffer_get_selection_bounds() is another convenient function for
// handling the selection, if you just want to know whether there’s a selection
// and what its bounds are.
//
// The function returns the following values:
//
//   - textMark: selection bound mark.
func (buffer *TextBuffer) SelectionBound() *TextMark {
	var _arg0 *C.GtkTextBuffer // out
	var _cret *C.GtkTextMark   // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_selection_bound(_arg0)
	runtime.KeepAlive(buffer)

	var _textMark *TextMark // out

	_textMark = wrapTextMark(coreglib.Take(unsafe.Pointer(_cret)))

	return _textMark
}

// SelectionBounds returns TRUE if some text is selected; places the bounds of
// the selection in start and end (if the selection has length 0, then start and
// end are filled in with the same value). start and end will be in ascending
// order. If start and end are NULL, then they are not filled in, but the return
// value still indicates whether text is selected.
//
// The function returns the following values:
//
//   - start: iterator to initialize with selection start.
//   - end: iterator to initialize with selection end.
//   - ok: whether the selection has nonzero length.
func (buffer *TextBuffer) SelectionBounds() (start, end *TextIter, ok bool) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in
	var _arg2 C.GtkTextIter    // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_selection_bounds(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(buffer)

	var _start *TextIter // out
	var _end *TextIter   // out
	var _ok bool         // out

	_start = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	_end = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _start, _end, _ok
}

// Slice returns the text in the range [start,end). Excludes undisplayed
// text (text marked with tags that set the invisibility attribute) if
// include_hidden_chars is FALSE. The returned string includes a 0xFFFC
// character whenever the buffer contains embedded images, so byte and character
// indexes into the returned string do correspond to byte and character indexes
// into the buffer. Contrast with gtk_text_buffer_get_text(). Note that 0xFFFC
// can occur in normal text as well, so it is not a reliable indicator that a
// pixbuf or widget is in the buffer.
//
// The function takes the following parameters:
//
//   - start of a range.
//   - end of a range.
//   - includeHiddenChars: whether to include invisible text.
//
// The function returns the following values:
//
//   - utf8: allocated UTF-8 string.
func (buffer *TextBuffer) Slice(start, end *TextIter, includeHiddenChars bool) string {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 C.gboolean       // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))
	if includeHiddenChars {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_get_slice(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
	runtime.KeepAlive(includeHiddenChars)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// StartIter: initialized iter with the first position in the text buffer.
// This is the same as using gtk_text_buffer_get_iter_at_offset() to get the
// iter at character offset 0.
//
// The function returns the following values:
//
//   - iter: iterator to initialize.
func (buffer *TextBuffer) StartIter() *TextIter {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.GtkTextIter    // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_text_buffer_get_start_iter(_arg0, &_arg1)
	runtime.KeepAlive(buffer)

	var _iter *TextIter // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// TagTable: get the TextTagTable associated with this buffer.
//
// The function returns the following values:
//
//   - textTagTable buffer’s tag table.
func (buffer *TextBuffer) TagTable() *TextTagTable {
	var _arg0 *C.GtkTextBuffer   // out
	var _cret *C.GtkTextTagTable // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_buffer_get_tag_table(_arg0)
	runtime.KeepAlive(buffer)

	var _textTagTable *TextTagTable // out

	_textTagTable = wrapTextTagTable(coreglib.Take(unsafe.Pointer(_cret)))

	return _textTagTable
}

// Text returns the text in the range [start,end). Excludes undisplayed
// text (text marked with tags that set the invisibility attribute) if
// include_hidden_chars is FALSE. Does not include characters representing
// embedded images, so byte and character indexes into the returned string do
// not correspond to byte and character indexes into the buffer. Contrast with
// gtk_text_buffer_get_slice().
//
// The function takes the following parameters:
//
//   - start of a range.
//   - end of a range.
//   - includeHiddenChars: whether to include invisible text.
//
// The function returns the following values:
//
//   - utf8: allocated UTF-8 string.
func (buffer *TextBuffer) Text(start, end *TextIter, includeHiddenChars bool) string {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 C.gboolean       // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))
	if includeHiddenChars {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_get_text(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
	runtime.KeepAlive(includeHiddenChars)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Insert inserts len bytes of text at position iter. If len is -1, text must be
// nul-terminated and will be inserted in its entirety. Emits the “insert-text”
// signal; insertion actually occurs in the default handler for the signal. iter
// is invalidated when insertion occurs (because the buffer contents change),
// but the default signal handler revalidates it to point to the end of the
// inserted text.
//
// The function takes the following parameters:
//
//   - iter: position in the buffer.
//   - text in UTF-8 format.
func (buffer *TextBuffer) Insert(iter *TextIter, text string) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.gchar         // out
	var _arg3 C.gint

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg3 = (C.gint)(len(text))
	_arg2 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg2)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_text_buffer_insert(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(text)
}

// InsertAtCursor: simply calls gtk_text_buffer_insert(), using the current
// cursor position as the insertion point.
//
// The function takes the following parameters:
//
//   - text in UTF-8 format.
func (buffer *TextBuffer) InsertAtCursor(text string) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 C.gint

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_text_buffer_insert_at_cursor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(text)
}

// InsertChildAnchor inserts a child widget anchor into the text buffer at
// iter. The anchor will be counted as one character in character counts,
// and when obtaining the buffer contents as a string, will be represented
// by the Unicode “object replacement character” 0xFFFC. Note that the
// “slice” variants for obtaining portions of the buffer as a string include
// this character for child anchors, but the “text” variants do not. E.g.
// see gtk_text_buffer_get_slice() and gtk_text_buffer_get_text(). Consider
// gtk_text_buffer_create_child_anchor() as a more convenient alternative to
// this function. The buffer will add a reference to the anchor, so you can
// unref it after insertion.
//
// The function takes the following parameters:
//
//   - iter: location to insert the anchor.
//   - anchor: TextChildAnchor.
func (buffer *TextBuffer) InsertChildAnchor(iter *TextIter, anchor *TextChildAnchor) {
	var _arg0 *C.GtkTextBuffer      // out
	var _arg1 *C.GtkTextIter        // out
	var _arg2 *C.GtkTextChildAnchor // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	C.gtk_text_buffer_insert_child_anchor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(anchor)
}

// InsertInteractive: like gtk_text_buffer_insert(), but the insertion will not
// occur if iter is at a non-editable location in the buffer. Usually you want
// to prevent insertions at ineditable locations if the insertion results from a
// user action (is interactive).
//
// default_editable indicates the editability of text that doesn't have
// a tag affecting editability applied to it. Typically the result of
// gtk_text_view_get_editable() is appropriate here.
//
// The function takes the following parameters:
//
//   - iter: position in buffer.
//   - text: some UTF-8 text.
//   - defaultEditable: default editability of buffer.
//
// The function returns the following values:
//
//   - ok: whether text was actually inserted.
func (buffer *TextBuffer) InsertInteractive(iter *TextIter, text string, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.gchar         // out
	var _arg3 C.gint
	var _arg4 C.gboolean // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg3 = (C.gint)(len(text))
	_arg2 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg2)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg2))
	if defaultEditable {
		_arg4 = C.TRUE
	}

	_cret = C.gtk_text_buffer_insert_interactive(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(text)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InsertInteractiveAtCursor calls gtk_text_buffer_insert_interactive() at the
// cursor position.
//
// default_editable indicates the editability of text that doesn't have
// a tag affecting editability applied to it. Typically the result of
// gtk_text_view_get_editable() is appropriate here.
//
// The function takes the following parameters:
//
//   - text in UTF-8 format.
//   - defaultEditable: default editability of buffer.
//
// The function returns the following values:
//
//   - ok: whether text was actually inserted.
func (buffer *TextBuffer) InsertInteractiveAtCursor(text string, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 C.gint
	var _arg3 C.gboolean // out
	var _cret C.gboolean // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))
	if defaultEditable {
		_arg3 = C.TRUE
	}

	_cret = C.gtk_text_buffer_insert_interactive_at_cursor(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(text)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InsertMarkup inserts the text in markup at position iter. markup will
// be inserted in its entirety and must be nul-terminated and valid UTF-8.
// Emits the TextBuffer::insert-text signal, possibly multiple times; insertion
// actually occurs in the default handler for the signal. iter will point to the
// end of the inserted text on return.
//
// The function takes the following parameters:
//
//   - iter: location to insert the markup.
//   - markup: nul-terminated UTF-8 string containing [Pango
//     markup][PangoMarkupFormat].
func (buffer *TextBuffer) InsertMarkup(iter *TextIter, markup string) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.gchar         // out
	var _arg3 C.gint

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg3 = (C.gint)(len(markup))
	_arg2 = (*C.gchar)(C.calloc(C.size_t((len(markup) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg2)), len(markup)), markup)
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_text_buffer_insert_markup(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(markup)
}

// InsertPixbuf inserts an image into the text buffer at iter. The image will
// be counted as one character in character counts, and when obtaining the
// buffer contents as a string, will be represented by the Unicode “object
// replacement character” 0xFFFC. Note that the “slice” variants for obtaining
// portions of the buffer as a string include this character for pixbufs,
// but the “text” variants do not. e.g. see gtk_text_buffer_get_slice() and
// gtk_text_buffer_get_text().
//
// The function takes the following parameters:
//
//   - iter: location to insert the pixbuf.
//   - pixbuf: Pixbuf.
func (buffer *TextBuffer) InsertPixbuf(iter *TextIter, pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GdkPixbuf     // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C.gtk_text_buffer_insert_pixbuf(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(pixbuf)
}

// InsertRange copies text, tags, and pixbufs between start and end (the order
// of start and end doesn’t matter) and inserts the copy at iter. Used instead
// of simply getting/inserting text because it preserves images and tags.
// If start and end are in a different buffer from buffer, the two buffers must
// share the same tag table.
//
// Implemented via emissions of the insert_text and apply_tag signals, so expect
// those.
//
// The function takes the following parameters:
//
//   - iter: position in buffer.
//   - start: position in a TextBuffer.
//   - end: another position in the same buffer as start.
func (buffer *TextBuffer) InsertRange(iter, start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_insert_range(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// InsertRangeInteractive: same as gtk_text_buffer_insert_range(), but does
// nothing if the insertion point isn’t editable. The default_editable parameter
// indicates whether the text is editable at iter if no tags enclosing iter
// affect editability. Typically the result of gtk_text_view_get_editable() is
// appropriate here.
//
// The function takes the following parameters:
//
//   - iter: position in buffer.
//   - start: position in a TextBuffer.
//   - end: another position in the same buffer as start.
//   - defaultEditable: default editability of the buffer.
//
// The function returns the following values:
//
//   - ok: whether an insertion was possible at iter.
func (buffer *TextBuffer) InsertRangeInteractive(iter, start, end *TextIter, defaultEditable bool) bool {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out
	var _arg4 C.gboolean       // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))
	if defaultEditable {
		_arg4 = C.TRUE
	}

	_cret = C.gtk_text_buffer_insert_range_interactive(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
	runtime.KeepAlive(defaultEditable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MoveMark moves mark to the new location where. Emits the TextBuffer::mark-set
// signal as notification of the move.
//
// The function takes the following parameters:
//
//   - mark: TextMark.
//   - where: new location for mark in buffer.
func (buffer *TextBuffer) MoveMark(mark *TextMark, where *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextMark   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(where)))

	C.gtk_text_buffer_move_mark(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(mark)
	runtime.KeepAlive(where)
}

// MoveMarkByName moves the mark named name (which must exist) to location
// where. See gtk_text_buffer_move_mark() for details.
//
// The function takes the following parameters:
//
//   - name of a mark.
//   - where: new location for mark.
func (buffer *TextBuffer) MoveMarkByName(name string, where *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(where)))

	C.gtk_text_buffer_move_mark_by_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(name)
	runtime.KeepAlive(where)
}

// PasteClipboard pastes the contents of a clipboard. If override_location is
// NULL, the pasted text will be inserted at the cursor position, or the buffer
// selection will be replaced if the selection is non-empty.
//
// Note: pasting is asynchronous, that is, we’ll ask for the paste data and
// return, and at some point later after the main loop runs, the paste data will
// be inserted.
//
// The function takes the following parameters:
//
//   - clipboard to paste from.
//   - overrideLocation (optional): location to insert pasted text, or NULL.
//   - defaultEditable: whether the buffer is editable by default.
func (buffer *TextBuffer) PasteClipboard(clipboard *Clipboard, overrideLocation *TextIter, defaultEditable bool) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 C.gboolean       // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))
	if overrideLocation != nil {
		_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(overrideLocation)))
	}
	if defaultEditable {
		_arg3 = C.TRUE
	}

	C.gtk_text_buffer_paste_clipboard(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
	runtime.KeepAlive(overrideLocation)
	runtime.KeepAlive(defaultEditable)
}

// PlaceCursor: this function moves the “insert” and “selection_bound”
// marks simultaneously. If you move them to the same place in two steps
// with gtk_text_buffer_move_mark(), you will temporarily select a region
// in between their old and new locations, which can be pretty inefficient
// since the temporarily-selected region will force stuff to be recalculated.
// This function moves them as a unit, which can be optimized.
//
// The function takes the following parameters:
//
//   - where to put the cursor.
func (buffer *TextBuffer) PlaceCursor(where *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(where)))

	C.gtk_text_buffer_place_cursor(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(where)
}

// RemoveAllTags removes all tags in the range between start and end. Be careful
// with this function; it could remove tags added in code unrelated to the code
// you’re currently writing. That is, using this function is probably a bad idea
// if you have two or more unrelated code sections that add tags.
//
// The function takes the following parameters:
//
//   - start: one bound of range to be untagged.
//   - end: other bound of range to be untagged.
func (buffer *TextBuffer) RemoveAllTags(start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_remove_all_tags(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// RemoveSelectionClipboard removes a Clipboard added with
// gtk_text_buffer_add_selection_clipboard().
//
// The function takes the following parameters:
//
//   - clipboard added to buffer by gtk_text_buffer_add_selection_clipboard().
func (buffer *TextBuffer) RemoveSelectionClipboard(clipboard *Clipboard) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C.gtk_text_buffer_remove_selection_clipboard(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
}

// RemoveTag emits the “remove-tag” signal. The default handler for the signal
// removes all occurrences of tag from the given range. start and end don’t have
// to be in order.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//   - start: one bound of range to be untagged.
//   - end: other bound of range to be untagged.
func (buffer *TextBuffer) RemoveTag(tag *TextTag, start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextTag    // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_remove_tag(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// RemoveTagByName calls gtk_text_tag_table_lookup() on the buffer’s tag table
// to get a TextTag, then calls gtk_text_buffer_remove_tag().
//
// The function takes the following parameters:
//
//   - name of a TextTag.
//   - start: one bound of range to be untagged.
//   - end: other bound of range to be untagged.
func (buffer *TextBuffer) RemoveTagByName(name string, start, end *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C.gtk_text_buffer_remove_tag_by_name(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(name)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// SelectRange: this function moves the “insert” and “selection_bound”
// marks simultaneously. If you move them in two steps with
// gtk_text_buffer_move_mark(), you will temporarily select a region in
// between their old and new locations, which can be pretty inefficient since
// the temporarily-selected region will force stuff to be recalculated. This
// function moves them as a unit, which can be optimized.
//
// The function takes the following parameters:
//
//   - ins: where to put the “insert” mark.
//   - bound: where to put the “selection_bound” mark.
func (buffer *TextBuffer) SelectRange(ins, bound *TextIter) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(ins)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(bound)))

	C.gtk_text_buffer_select_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(ins)
	runtime.KeepAlive(bound)
}

// SetModified: used to keep track of whether the buffer has been modified
// since the last time it was saved. Whenever the buffer is saved to disk, call
// gtk_text_buffer_set_modified (buffer, FALSE). When the buffer is modified,
// it will automatically toggled on the modified bit again. When the modified
// bit flips, the buffer emits the TextBuffer::modified-changed signal.
//
// The function takes the following parameters:
//
//   - setting: modification flag setting.
func (buffer *TextBuffer) SetModified(setting bool) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_text_buffer_set_modified(_arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(setting)
}

// SetText deletes current contents of buffer, and inserts text instead.
// If len is -1, text must be nul-terminated. text must be valid UTF-8.
//
// The function takes the following parameters:
//
//   - text: UTF-8 text to insert.
func (buffer *TextBuffer) SetText(text string) {
	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.gchar         // out
	var _arg2 C.gint

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg2 = (C.gint)(len(text))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(text) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(text)), text)
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_text_buffer_set_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(text)
}

// applyTag emits the “apply-tag” signal on buffer. The default handler for the
// signal applies tag to the given range. start and end do not have to be in
// order.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//   - start: one bound of range to be tagged.
//   - end: other bound of range to be tagged.
func (buffer *TextBuffer) applyTag(tag *TextTag, start, end *TextIter) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.apply_tag

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextTag    // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C._gotk4_gtk3_TextBuffer_virtual_apply_tag(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// beginUserAction: called to indicate that the buffer operations
// between here and a call to gtk_text_buffer_end_user_action() are
// part of a single user-visible operation. The operations between
// gtk_text_buffer_begin_user_action() and gtk_text_buffer_end_user_action() can
// then be grouped when creating an undo stack. TextBuffer maintains a count of
// calls to gtk_text_buffer_begin_user_action() that have not been closed with a
// call to gtk_text_buffer_end_user_action(), and emits the “begin-user-action”
// and “end-user-action” signals only for the outermost pair of calls. This
// allows you to build user actions from other user actions.
//
// The “interactive” buffer mutation functions, such as
// gtk_text_buffer_insert_interactive(), automatically call begin/end user
// action around the buffer operations they perform, so there's no need to add
// extra calls if you user action consists solely of a single call to one of
// those functions.
func (buffer *TextBuffer) beginUserAction() {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.begin_user_action

	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_begin_user_action(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buffer)
}

// Changed class handler for the TextBuffer::changed signal.
func (buffer *TextBuffer) changed() {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.changed

	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buffer)
}

// deleteRange class handler for the TextBuffer::delete-range signal.
//
// The function takes the following parameters:
//
//   - start
//   - end
func (buffer *TextBuffer) deleteRange(start, end *TextIter) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.delete_range

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C._gotk4_gtk3_TextBuffer_virtual_delete_range(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// endUserAction: should be paired with a call to
// gtk_text_buffer_begin_user_action(). See that function for a full
// explanation.
func (buffer *TextBuffer) endUserAction() {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.end_user_action

	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_end_user_action(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buffer)
}

// insertChildAnchor inserts a child widget anchor into the text buffer at
// iter. The anchor will be counted as one character in character counts,
// and when obtaining the buffer contents as a string, will be represented
// by the Unicode “object replacement character” 0xFFFC. Note that the
// “slice” variants for obtaining portions of the buffer as a string include
// this character for child anchors, but the “text” variants do not. E.g.
// see gtk_text_buffer_get_slice() and gtk_text_buffer_get_text(). Consider
// gtk_text_buffer_create_child_anchor() as a more convenient alternative to
// this function. The buffer will add a reference to the anchor, so you can
// unref it after insertion.
//
// The function takes the following parameters:
//
//   - iter: location to insert the anchor.
//   - anchor: TextChildAnchor.
func (buffer *TextBuffer) insertChildAnchor(iter *TextIter, anchor *TextChildAnchor) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.insert_child_anchor

	var _arg0 *C.GtkTextBuffer      // out
	var _arg1 *C.GtkTextIter        // out
	var _arg2 *C.GtkTextChildAnchor // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_insert_child_anchor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(anchor)
}

// insertPixbuf inserts an image into the text buffer at iter. The image will
// be counted as one character in character counts, and when obtaining the
// buffer contents as a string, will be represented by the Unicode “object
// replacement character” 0xFFFC. Note that the “slice” variants for obtaining
// portions of the buffer as a string include this character for pixbufs,
// but the “text” variants do not. e.g. see gtk_text_buffer_get_slice() and
// gtk_text_buffer_get_text().
//
// The function takes the following parameters:
//
//   - iter: location to insert the pixbuf.
//   - pixbuf: Pixbuf.
func (buffer *TextBuffer) insertPixbuf(iter *TextIter, pixbuf *gdkpixbuf.Pixbuf) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.insert_pixbuf

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GdkPixbuf     // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_insert_pixbuf(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(pixbuf)
}

// insertText class handler for the TextBuffer::insert-text signal.
//
// The function takes the following parameters:
//
//   - pos
//   - newText
//   - newTextLength
func (buffer *TextBuffer) insertText(pos *TextIter, newText string, newTextLength int) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.insert_text

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.gchar         // out
	var _arg3 C.gint           // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(pos)))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(newText)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(newTextLength)

	C._gotk4_gtk3_TextBuffer_virtual_insert_text(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(newText)
	runtime.KeepAlive(newTextLength)
}

// markDeleted class handler for the TextBuffer::mark-deleted signal.
func (buffer *TextBuffer) markDeleted(mark *TextMark) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.mark_deleted

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextMark   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_mark_deleted(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(mark)
}

// markSet class handler for the TextBuffer::mark-set signal.
//
// The function takes the following parameters:
//
//   - location
//   - mark
func (buffer *TextBuffer) markSet(location *TextIter, mark *TextMark) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.mark_set

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextIter   // out
	var _arg2 *C.GtkTextMark   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(location)))
	_arg2 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_mark_set(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(location)
	runtime.KeepAlive(mark)
}

// modifiedChanged class handler for the TextBuffer::modified-changed signal.
func (buffer *TextBuffer) modifiedChanged() {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.modified_changed

	var _arg0 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_modified_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(buffer)
}

// pasteDone class handler for the TextBuffer::paste-done signal.
func (buffer *TextBuffer) pasteDone(clipboard *Clipboard) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.paste_done

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkClipboard  // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkClipboard)(unsafe.Pointer(coreglib.InternObject(clipboard).Native()))

	C._gotk4_gtk3_TextBuffer_virtual_paste_done(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(clipboard)
}

// removeTag emits the “remove-tag” signal. The default handler for the signal
// removes all occurrences of tag from the given range. start and end don’t have
// to be in order.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//   - start: one bound of range to be untagged.
//   - end: other bound of range to be untagged.
func (buffer *TextBuffer) removeTag(tag *TextTag, start, end *TextIter) {
	gclass := (*C.GtkTextBufferClass)(coreglib.PeekParentClass(buffer))
	fnarg := gclass.remove_tag

	var _arg0 *C.GtkTextBuffer // out
	var _arg1 *C.GtkTextTag    // out
	var _arg2 *C.GtkTextIter   // out
	var _arg3 *C.GtkTextIter   // out

	_arg0 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	C._gotk4_gtk3_TextBuffer_virtual_remove_tag(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(buffer)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)
}

// TextCellAccessibleOverrides contains methods that are overridable.
type TextCellAccessibleOverrides struct {
}

func defaultTextCellAccessibleOverrides(v *TextCellAccessible) TextCellAccessibleOverrides {
	return TextCellAccessibleOverrides{}
}

type TextCellAccessible struct {
	_ [0]func() // equal guard
	RendererCellAccessible

	*coreglib.Object
	atk.AtkObject
	atk.Text
}

var (
	_ coreglib.Objector = (*TextCellAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextCellAccessible, *TextCellAccessibleClass, TextCellAccessibleOverrides](
		GTypeTextCellAccessible,
		initTextCellAccessibleClass,
		wrapTextCellAccessible,
		defaultTextCellAccessibleOverrides,
	)
}

func initTextCellAccessibleClass(gclass unsafe.Pointer, overrides TextCellAccessibleOverrides, classInitFunc func(*TextCellAccessibleClass)) {
	if classInitFunc != nil {
		class := (*TextCellAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextCellAccessible(obj *coreglib.Object) *TextCellAccessible {
	return &TextCellAccessible{
		RendererCellAccessible: RendererCellAccessible{
			CellAccessible: CellAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Object: obj,
				Action: atk.Action{
					Object: obj,
				},
				AtkObject: atk.AtkObject{
					Object: obj,
				},
				Component: atk.Component{
					Object: obj,
				},
				TableCell: atk.TableCell{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		AtkObject: atk.AtkObject{
			Object: obj,
		},
		Text: atk.Text{
			Object: obj,
		},
	}
}

func marshalTextCellAccessible(p uintptr) (interface{}, error) {
	return wrapTextCellAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// TextChildAnchorOverrides contains methods that are overridable.
type TextChildAnchorOverrides struct {
}

func defaultTextChildAnchorOverrides(v *TextChildAnchor) TextChildAnchorOverrides {
	return TextChildAnchorOverrides{}
}

// TextChildAnchor is a spot in the buffer where child widgets can be “anchored”
// (inserted inline, as if they were characters). The anchor can have multiple
// widgets anchored, to allow for multiple views.
type TextChildAnchor struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TextChildAnchor)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextChildAnchor, *TextChildAnchorClass, TextChildAnchorOverrides](
		GTypeTextChildAnchor,
		initTextChildAnchorClass,
		wrapTextChildAnchor,
		defaultTextChildAnchorOverrides,
	)
}

func initTextChildAnchorClass(gclass unsafe.Pointer, overrides TextChildAnchorOverrides, classInitFunc func(*TextChildAnchorClass)) {
	if classInitFunc != nil {
		class := (*TextChildAnchorClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextChildAnchor(obj *coreglib.Object) *TextChildAnchor {
	return &TextChildAnchor{
		Object: obj,
	}
}

func marshalTextChildAnchor(p uintptr) (interface{}, error) {
	return wrapTextChildAnchor(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTextChildAnchor creates a new TextChildAnchor. Usually you would then
// insert it into a TextBuffer with gtk_text_buffer_insert_child_anchor(). To
// perform the creation and insertion in one step, use the convenience function
// gtk_text_buffer_create_child_anchor().
//
// The function returns the following values:
//
//   - textChildAnchor: new TextChildAnchor.
func NewTextChildAnchor() *TextChildAnchor {
	var _cret *C.GtkTextChildAnchor // in

	_cret = C.gtk_text_child_anchor_new()

	var _textChildAnchor *TextChildAnchor // out

	_textChildAnchor = wrapTextChildAnchor(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _textChildAnchor
}

// Deleted determines whether a child anchor has been deleted from the buffer.
// Keep in mind that the child anchor will be unreferenced when removed from the
// buffer, so you need to hold your own reference (with g_object_ref()) if you
// plan to use this function — otherwise all deleted child anchors will also be
// finalized.
//
// The function returns the following values:
//
//   - ok: TRUE if the child anchor has been deleted from its buffer.
func (anchor *TextChildAnchor) Deleted() bool {
	var _arg0 *C.GtkTextChildAnchor // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	_cret = C.gtk_text_child_anchor_get_deleted(_arg0)
	runtime.KeepAlive(anchor)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Widgets gets a list of all widgets anchored at this child anchor. The
// returned list should be freed with g_list_free().
//
// The function returns the following values:
//
//   - list of widgets anchored at anchor.
func (anchor *TextChildAnchor) Widgets() []Widgetter {
	var _arg0 *C.GtkTextChildAnchor // out
	var _cret *C.GList              // in

	_arg0 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	_cret = C.gtk_text_child_anchor_get_widgets(_arg0)
	runtime.KeepAlive(anchor)

	var _list []Widgetter // out

	_list = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// TextMarkOverrides contains methods that are overridable.
type TextMarkOverrides struct {
}

func defaultTextMarkOverrides(v *TextMark) TextMarkOverrides {
	return TextMarkOverrides{}
}

// TextMark: you may wish to begin by reading the text widget conceptual
// overview (TextWidget.html) which gives an overview of all the objects and
// data types related to the text widget and how they work together.
//
// A TextMark is like a bookmark in a text buffer; it preserves a
// position in the text. You can convert the mark to an iterator using
// gtk_text_buffer_get_iter_at_mark(). Unlike iterators, marks remain valid
// across buffer mutations, because their behavior is defined when text is
// inserted or deleted. When text containing a mark is deleted, the mark
// remains in the position originally occupied by the deleted text. When text is
// inserted at a mark, a mark with “left gravity” will be moved to the beginning
// of the newly-inserted text, and a mark with “right gravity” will be moved to
// the end.
//
// Note that “left” and “right” here refer to logical direction (left is
// the toward the start of the buffer); in some languages such as Hebrew the
// logically-leftmost text is not actually on the left when displayed.
//
// Marks are reference counted, but the reference count only controls the
// validity of the memory; marks can be deleted from the buffer at any time
// with gtk_text_buffer_delete_mark(). Once deleted from the buffer, a mark is
// essentially useless.
//
// Marks optionally have names; these can be convenient to avoid passing the
// TextMark object around.
//
// Marks are typically created using the gtk_text_buffer_create_mark() function.
type TextMark struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TextMark)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextMark, *TextMarkClass, TextMarkOverrides](
		GTypeTextMark,
		initTextMarkClass,
		wrapTextMark,
		defaultTextMarkOverrides,
	)
}

func initTextMarkClass(gclass unsafe.Pointer, overrides TextMarkOverrides, classInitFunc func(*TextMarkClass)) {
	if classInitFunc != nil {
		class := (*TextMarkClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextMark(obj *coreglib.Object) *TextMark {
	return &TextMark{
		Object: obj,
	}
}

func marshalTextMark(p uintptr) (interface{}, error) {
	return wrapTextMark(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTextMark creates a text mark. Add it to a buffer using
// gtk_text_buffer_add_mark(). If name is NULL, the mark is
// anonymous; otherwise, the mark can be retrieved by name using
// gtk_text_buffer_get_mark(). If a mark has left gravity, and text is inserted
// at the mark’s current location, the mark will be moved to the left of the
// newly-inserted text. If the mark has right gravity (left_gravity = FALSE),
// the mark will end up on the right of newly-inserted text. The standard
// left-to-right cursor is a mark with right gravity (when you type, the cursor
// stays on the right side of the text you’re typing).
//
// The function takes the following parameters:
//
//   - name (optional): mark name or NULL.
//   - leftGravity: whether the mark should have left gravity.
//
// The function returns the following values:
//
//   - textMark: new TextMark.
func NewTextMark(name string, leftGravity bool) *TextMark {
	var _arg1 *C.gchar       // out
	var _arg2 C.gboolean     // out
	var _cret *C.GtkTextMark // in

	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	if leftGravity {
		_arg2 = C.TRUE
	}

	_cret = C.gtk_text_mark_new(_arg1, _arg2)
	runtime.KeepAlive(name)
	runtime.KeepAlive(leftGravity)

	var _textMark *TextMark // out

	_textMark = wrapTextMark(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _textMark
}

// Buffer gets the buffer this mark is located inside, or NULL if the mark is
// deleted.
//
// The function returns the following values:
//
//   - textBuffer mark’s TextBuffer.
func (mark *TextMark) Buffer() *TextBuffer {
	var _arg0 *C.GtkTextMark   // out
	var _cret *C.GtkTextBuffer // in

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_mark_get_buffer(_arg0)
	runtime.KeepAlive(mark)

	var _textBuffer *TextBuffer // out

	_textBuffer = wrapTextBuffer(coreglib.Take(unsafe.Pointer(_cret)))

	return _textBuffer
}

// Deleted returns TRUE if the mark has been removed from its buffer with
// gtk_text_buffer_delete_mark(). See gtk_text_buffer_add_mark() for a way to
// add it to a buffer again.
//
// The function returns the following values:
//
//   - ok: whether the mark is deleted.
func (mark *TextMark) Deleted() bool {
	var _arg0 *C.GtkTextMark // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_mark_get_deleted(_arg0)
	runtime.KeepAlive(mark)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LeftGravity determines whether the mark has left gravity.
//
// The function returns the following values:
//
//   - ok: TRUE if the mark has left gravity, FALSE otherwise.
func (mark *TextMark) LeftGravity() bool {
	var _arg0 *C.GtkTextMark // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_mark_get_left_gravity(_arg0)
	runtime.KeepAlive(mark)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Name returns the mark name; returns NULL for anonymous marks.
//
// The function returns the following values:
//
//   - utf8 (optional): mark name.
func (mark *TextMark) Name() string {
	var _arg0 *C.GtkTextMark // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_mark_get_name(_arg0)
	runtime.KeepAlive(mark)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Visible returns TRUE if the mark is visible (i.e. a cursor is displayed for
// it).
//
// The function returns the following values:
//
//   - ok: TRUE if visible.
func (mark *TextMark) Visible() bool {
	var _arg0 *C.GtkTextMark // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_mark_get_visible(_arg0)
	runtime.KeepAlive(mark)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetVisible sets the visibility of mark; the insertion point is normally
// visible, i.e. you can see it as a vertical bar. Also, the text widget uses a
// visible mark to indicate where a drop will occur when dragging-and-dropping
// text. Most other marks are not visible. Marks are not visible by default.
//
// The function takes the following parameters:
//
//   - setting: visibility of mark.
func (mark *TextMark) SetVisible(setting bool) {
	var _arg0 *C.GtkTextMark // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_text_mark_set_visible(_arg0, _arg1)
	runtime.KeepAlive(mark)
	runtime.KeepAlive(setting)
}

// TextTagOverrides contains methods that are overridable.
type TextTagOverrides struct {
	// Event emits the “event” signal on the TextTag.
	//
	// The function takes the following parameters:
	//
	//   - eventObject: object that received the event, such as a widget.
	//   - event: event.
	//   - iter: location where the event was received.
	//
	// The function returns the following values:
	//
	//   - ok: result of signal emission (whether the event was handled).
	Event func(eventObject *coreglib.Object, event *gdk.Event, iter *TextIter) bool
}

func defaultTextTagOverrides(v *TextTag) TextTagOverrides {
	return TextTagOverrides{
		Event: v.event,
	}
}

// TextTag: you may wish to begin by reading the text widget conceptual overview
// (TextWidget.html) which gives an overview of all the objects and data types
// related to the text widget and how they work together.
//
// Tags should be in the TextTagTable for a given TextBuffer before using them
// with that buffer.
//
// gtk_text_buffer_create_tag() is the best way to create tags. See “gtk3-demo”
// for numerous examples.
//
// For each property of TextTag, there is a “set” property, e.g. “font-set”
// corresponds to “font”. These “set” properties reflect whether a property
// has been set or not. They are maintained by GTK+ and you should not set them
// independently.
type TextTag struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TextTag)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextTag, *TextTagClass, TextTagOverrides](
		GTypeTextTag,
		initTextTagClass,
		wrapTextTag,
		defaultTextTagOverrides,
	)
}

func initTextTagClass(gclass unsafe.Pointer, overrides TextTagOverrides, classInitFunc func(*TextTagClass)) {
	pclass := (*C.GtkTextTagClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTextTag))))

	if overrides.Event != nil {
		pclass.event = (*[0]byte)(C._gotk4_gtk3_TextTagClass_event)
	}

	if classInitFunc != nil {
		class := (*TextTagClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextTag(obj *coreglib.Object) *TextTag {
	return &TextTag{
		Object: obj,
	}
}

func marshalTextTag(p uintptr) (interface{}, error) {
	return wrapTextTag(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectEvent signal is emitted when an event occurs on a region of the buffer
// marked with this tag.
func (tag *TextTag) ConnectEvent(f func(object *coreglib.Object, event *gdk.Event, iter *TextIter) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(tag, "event", false, unsafe.Pointer(C._gotk4_gtk3_TextTag_ConnectEvent), f)
}

// NewTextTag creates a TextTag. Configure the tag using object arguments, i.e.
// using g_object_set().
//
// The function takes the following parameters:
//
//   - name (optional): tag name, or NULL.
//
// The function returns the following values:
//
//   - textTag: new TextTag.
func NewTextTag(name string) *TextTag {
	var _arg1 *C.gchar      // out
	var _cret *C.GtkTextTag // in

	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_text_tag_new(_arg1)
	runtime.KeepAlive(name)

	var _textTag *TextTag // out

	_textTag = wrapTextTag(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _textTag
}

// Changed emits the TextTagTable::tag-changed signal on the TextTagTable where
// the tag is included.
//
// The signal is already emitted when setting a TextTag property. This function
// is useful for a TextTag subclass.
//
// The function takes the following parameters:
//
//   - sizeChanged: whether the change affects the TextView layout.
func (tag *TextTag) Changed(sizeChanged bool) {
	var _arg0 *C.GtkTextTag // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	if sizeChanged {
		_arg1 = C.TRUE
	}

	C.gtk_text_tag_changed(_arg0, _arg1)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(sizeChanged)
}

// Event emits the “event” signal on the TextTag.
//
// The function takes the following parameters:
//
//   - eventObject: object that received the event, such as a widget.
//   - event: event.
//   - iter: location where the event was received.
//
// The function returns the following values:
//
//   - ok: result of signal emission (whether the event was handled).
func (tag *TextTag) Event(eventObject *coreglib.Object, event *gdk.Event, iter *TextIter) bool {
	var _arg0 *C.GtkTextTag  // out
	var _arg1 *C.GObject     // out
	var _arg2 *C.GdkEvent    // out
	var _arg3 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg1 = (*C.GObject)(unsafe.Pointer(eventObject.Native()))
	_arg2 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_tag_event(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(eventObject)
	runtime.KeepAlive(event)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Priority: get the tag priority.
//
// The function returns the following values:
//
//   - gint tag’s priority.
func (tag *TextTag) Priority() int {
	var _arg0 *C.GtkTextTag // out
	var _cret C.gint        // in

	_arg0 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	_cret = C.gtk_text_tag_get_priority(_arg0)
	runtime.KeepAlive(tag)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SetPriority sets the priority of a TextTag. Valid priorities start at 0 and
// go to one less than gtk_text_tag_table_get_size(). Each tag in a table has
// a unique priority; setting the priority of one tag shifts the priorities of
// all the other tags in the table to maintain a unique priority for each tag.
// Higher priority tags “win” if two tags both set the same text attribute.
// When adding a tag to a tag table, it will be assigned the highest priority
// in the table by default; so normally the precedence of a set of tags
// is the order in which they were added to the table, or created with
// gtk_text_buffer_create_tag(), which adds the tag to the buffer’s table
// automatically.
//
// The function takes the following parameters:
//
//   - priority: new priority.
func (tag *TextTag) SetPriority(priority int) {
	var _arg0 *C.GtkTextTag // out
	var _arg1 C.gint        // out

	_arg0 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg1 = C.gint(priority)

	C.gtk_text_tag_set_priority(_arg0, _arg1)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(priority)
}

// Event emits the “event” signal on the TextTag.
//
// The function takes the following parameters:
//
//   - eventObject: object that received the event, such as a widget.
//   - event: event.
//   - iter: location where the event was received.
//
// The function returns the following values:
//
//   - ok: result of signal emission (whether the event was handled).
func (tag *TextTag) event(eventObject *coreglib.Object, event *gdk.Event, iter *TextIter) bool {
	gclass := (*C.GtkTextTagClass)(coreglib.PeekParentClass(tag))
	fnarg := gclass.event

	var _arg0 *C.GtkTextTag  // out
	var _arg1 *C.GObject     // out
	var _arg2 *C.GdkEvent    // out
	var _arg3 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	_arg1 = (*C.GObject)(unsafe.Pointer(eventObject.Native()))
	_arg2 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TextTag_virtual_event(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(eventObject)
	runtime.KeepAlive(event)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TextTagTableOverrides contains methods that are overridable.
type TextTagTableOverrides struct {
	TagAdded func(tag *TextTag)
	// The function takes the following parameters:
	//
	//   - tag
	//   - sizeChanged
	TagChanged func(tag *TextTag, sizeChanged bool)
	TagRemoved func(tag *TextTag)
}

func defaultTextTagTableOverrides(v *TextTagTable) TextTagTableOverrides {
	return TextTagTableOverrides{
		TagAdded:   v.tagAdded,
		TagChanged: v.tagChanged,
		TagRemoved: v.tagRemoved,
	}
}

// TextTagTable: you may wish to begin by reading the text widget conceptual
// overview (TextWidget.html) which gives an overview of all the objects and
// data types related to the text widget and how they work together.
//
// # GtkTextTagTables as GtkBuildable
//
// The GtkTextTagTable implementation of the GtkBuildable interface supports
// adding tags by specifying “tag” as the “type” attribute of a <child> element.
//
// An example of a UI definition fragment specifying tags:
//
//	<object class="GtkTextTagTable">
//	 <child type="tag">
//	   <object class="GtkTextTag"/>
//	 </child>
//	</object>.
type TextTagTable struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*TextTagTable)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextTagTable, *TextTagTableClass, TextTagTableOverrides](
		GTypeTextTagTable,
		initTextTagTableClass,
		wrapTextTagTable,
		defaultTextTagTableOverrides,
	)
}

func initTextTagTableClass(gclass unsafe.Pointer, overrides TextTagTableOverrides, classInitFunc func(*TextTagTableClass)) {
	pclass := (*C.GtkTextTagTableClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTextTagTable))))

	if overrides.TagAdded != nil {
		pclass.tag_added = (*[0]byte)(C._gotk4_gtk3_TextTagTableClass_tag_added)
	}

	if overrides.TagChanged != nil {
		pclass.tag_changed = (*[0]byte)(C._gotk4_gtk3_TextTagTableClass_tag_changed)
	}

	if overrides.TagRemoved != nil {
		pclass.tag_removed = (*[0]byte)(C._gotk4_gtk3_TextTagTableClass_tag_removed)
	}

	if classInitFunc != nil {
		class := (*TextTagTableClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextTagTable(obj *coreglib.Object) *TextTagTable {
	return &TextTagTable{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalTextTagTable(p uintptr) (interface{}, error) {
	return wrapTextTagTable(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (table *TextTagTable) ConnectTagAdded(f func(tag *TextTag)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(table, "tag-added", false, unsafe.Pointer(C._gotk4_gtk3_TextTagTable_ConnectTagAdded), f)
}

func (table *TextTagTable) ConnectTagChanged(f func(tag *TextTag, sizeChanged bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(table, "tag-changed", false, unsafe.Pointer(C._gotk4_gtk3_TextTagTable_ConnectTagChanged), f)
}

func (table *TextTagTable) ConnectTagRemoved(f func(tag *TextTag)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(table, "tag-removed", false, unsafe.Pointer(C._gotk4_gtk3_TextTagTable_ConnectTagRemoved), f)
}

// NewTextTagTable creates a new TextTagTable. The table contains no tags by
// default.
//
// The function returns the following values:
//
//   - textTagTable: new TextTagTable.
func NewTextTagTable() *TextTagTable {
	var _cret *C.GtkTextTagTable // in

	_cret = C.gtk_text_tag_table_new()

	var _textTagTable *TextTagTable // out

	_textTagTable = wrapTextTagTable(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _textTagTable
}

// Add a tag to the table. The tag is assigned the highest priority in the
// table.
//
// tag must not be in a tag table already, and may not have the same name as an
// already-added tag.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//
// The function returns the following values:
//
//   - ok: TRUE on success.
func (table *TextTagTable) Add(tag *TextTag) bool {
	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.GtkTextTag      // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	_cret = C.gtk_text_tag_table_add(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForEach calls func on each tag in table, with user data data. Note that the
// table may not be modified while iterating over it (you can’t add/remove
// tags).
//
// The function takes the following parameters:
//
//   - fn: function to call on each tag.
func (table *TextTagTable) ForEach(fn TextTagTableForEach) {
	var _arg0 *C.GtkTextTagTable       // out
	var _arg1 C.GtkTextTagTableForeach // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TextTagTableForEach)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_text_tag_table_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(table)
	runtime.KeepAlive(fn)
}

// Size returns the size of the table (number of tags).
//
// The function returns the following values:
//
//   - gint: number of tags in table.
func (table *TextTagTable) Size() int {
	var _arg0 *C.GtkTextTagTable // out
	var _cret C.gint             // in

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))

	_cret = C.gtk_text_tag_table_get_size(_arg0)
	runtime.KeepAlive(table)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Lookup: look up a named tag.
//
// The function takes the following parameters:
//
//   - name of a tag.
//
// The function returns the following values:
//
//   - textTag (optional): tag, or NULL if none by that name is in the table.
func (table *TextTagTable) Lookup(name string) *TextTag {
	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.gchar           // out
	var _cret *C.GtkTextTag      // in

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_text_tag_table_lookup(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(name)

	var _textTag *TextTag // out

	if _cret != nil {
		_textTag = wrapTextTag(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _textTag
}

// Remove a tag from the table. If a TextBuffer has table as its tag table, the
// tag is removed from the buffer. The table’s reference to the tag is removed,
// so the tag will end up destroyed if you don’t have a reference to it.
//
// The function takes the following parameters:
//
//   - tag: TextTag.
func (table *TextTagTable) Remove(tag *TextTag) {
	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.GtkTextTag      // out

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	C.gtk_text_tag_table_remove(_arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(tag)
}

func (table *TextTagTable) tagAdded(tag *TextTag) {
	gclass := (*C.GtkTextTagTableClass)(coreglib.PeekParentClass(table))
	fnarg := gclass.tag_added

	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.GtkTextTag      // out

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	C._gotk4_gtk3_TextTagTable_virtual_tag_added(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(tag)
}

// The function takes the following parameters:
//
//   - tag
//   - sizeChanged
func (table *TextTagTable) tagChanged(tag *TextTag, sizeChanged bool) {
	gclass := (*C.GtkTextTagTableClass)(coreglib.PeekParentClass(table))
	fnarg := gclass.tag_changed

	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.GtkTextTag      // out
	var _arg2 C.gboolean         // out

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	if sizeChanged {
		_arg2 = C.TRUE
	}

	C._gotk4_gtk3_TextTagTable_virtual_tag_changed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(table)
	runtime.KeepAlive(tag)
	runtime.KeepAlive(sizeChanged)
}

func (table *TextTagTable) tagRemoved(tag *TextTag) {
	gclass := (*C.GtkTextTagTableClass)(coreglib.PeekParentClass(table))
	fnarg := gclass.tag_removed

	var _arg0 *C.GtkTextTagTable // out
	var _arg1 *C.GtkTextTag      // out

	_arg0 = (*C.GtkTextTagTable)(unsafe.Pointer(coreglib.InternObject(table).Native()))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	C._gotk4_gtk3_TextTagTable_virtual_tag_removed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(table)
	runtime.KeepAlive(tag)
}

// TextViewOverrides contains methods that are overridable.
type TextViewOverrides struct {
	// Backspace class handler for the TextView::backspace keybinding signal.
	Backspace func()
	// CopyClipboard class handler for the Textview::copy-clipboard keybinding
	// signal.
	CopyClipboard func()
	// CutClipboard class handler for the TextView::cut-clipboard keybinding
	// signal.
	CutClipboard func()
	// DeleteFromCursor class handler for the TextView::delete-from-cursor
	// keybinding signal.
	//
	// The function takes the following parameters:
	//
	//   - typ
	//   - count
	DeleteFromCursor func(typ DeleteType, count int)
	// DrawLayer: draw_layer vfunc is called before and after the text view
	// is drawing its own text. Applications can override this vfunc in a
	// subclass to draw customized content underneath or above the text.
	// In the GTK_TEXT_VIEW_LAYER_BELOW_TEXT and GTK_TEXT_VIEW_LAYER_ABOVE_TEXT
	// the drawing is done in the buffer coordinate space,
	// but the older (deprecated) layers GTK_TEXT_VIEW_LAYER_BELOW and
	// GTK_TEXT_VIEW_LAYER_ABOVE work in viewport coordinates, which makes them
	// unnecessarily hard to use. Since: 3.14.
	//
	// The function takes the following parameters:
	//
	//   - layer
	//   - cr
	DrawLayer func(layer TextViewLayer, cr *cairo.Context)
	// ExtendSelection class handler for the TextView::extend-selection signal.
	// Since 3.16.
	//
	// The function takes the following parameters:
	//
	//   - granularity
	//   - location
	//   - start
	//   - end
	ExtendSelection func(granularity TextExtendSelection, location, start, end *TextIter) bool
	// InsertAtCursor class handler for the TextView::insert-at-cursor
	// keybinding signal.
	InsertAtCursor func(str string)
	InsertEmoji    func()
	// MoveCursor class handler for the TextView::move-cursor keybinding signal.
	//
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	//   - extendSelection
	MoveCursor func(step MovementStep, count int, extendSelection bool)
	// PasteClipboard class handler for the TextView::paste-clipboard keybinding
	// signal.
	PasteClipboard func()
	// PopulatePopup class handler for the TextView::populate-popup signal.
	PopulatePopup func(popup Widgetter)
	// SetAnchor class handler for the TextView::set-anchor keybinding signal.
	SetAnchor func()
	// ToggleOverwrite class handler for the TextView::toggle-overwrite
	// keybinding signal.
	ToggleOverwrite func()
}

func defaultTextViewOverrides(v *TextView) TextViewOverrides {
	return TextViewOverrides{
		Backspace:        v.backspace,
		CopyClipboard:    v.copyClipboard,
		CutClipboard:     v.cutClipboard,
		DeleteFromCursor: v.deleteFromCursor,
		DrawLayer:        v.drawLayer,
		ExtendSelection:  v.extendSelection,
		InsertAtCursor:   v.insertAtCursor,
		InsertEmoji:      v.insertEmoji,
		MoveCursor:       v.moveCursor,
		PasteClipboard:   v.pasteClipboard,
		PopulatePopup:    v.populatePopup,
		SetAnchor:        v.setAnchor,
		ToggleOverwrite:  v.toggleOverwrite,
	}
}

// TextView: you may wish to begin by reading the text widget conceptual
// overview (TextWidget.html) which gives an overview of all the objects and
// data types related to the text widget and how they work together.
//
// CSS nodes
//
//	textview.view
//	├── border.top
//	├── border.left
//	├── text
//	│   ╰── [selection]
//	├── border.right
//	├── border.bottom
//	╰── [window.popup]
//
// GtkTextView has a main css node with name textview and style class .view,
// and subnodes for each of the border windows, and the main text area,
// with names border and text, respectively. The border nodes each get one of
// the style classes .left, .right, .top or .bottom.
//
// A node representing the selection will appear below the text node.
//
// If a context menu is opened, the window node will appear as a subnode of the
// main node.
type TextView struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Scrollable
}

var (
	_ Containerer       = (*TextView)(nil)
	_ coreglib.Objector = (*TextView)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextView, *TextViewClass, TextViewOverrides](
		GTypeTextView,
		initTextViewClass,
		wrapTextView,
		defaultTextViewOverrides,
	)
}

func initTextViewClass(gclass unsafe.Pointer, overrides TextViewOverrides, classInitFunc func(*TextViewClass)) {
	pclass := (*C.GtkTextViewClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTextView))))

	if overrides.Backspace != nil {
		pclass.backspace = (*[0]byte)(C._gotk4_gtk3_TextViewClass_backspace)
	}

	if overrides.CopyClipboard != nil {
		pclass.copy_clipboard = (*[0]byte)(C._gotk4_gtk3_TextViewClass_copy_clipboard)
	}

	if overrides.CutClipboard != nil {
		pclass.cut_clipboard = (*[0]byte)(C._gotk4_gtk3_TextViewClass_cut_clipboard)
	}

	if overrides.DeleteFromCursor != nil {
		pclass.delete_from_cursor = (*[0]byte)(C._gotk4_gtk3_TextViewClass_delete_from_cursor)
	}

	if overrides.DrawLayer != nil {
		pclass.draw_layer = (*[0]byte)(C._gotk4_gtk3_TextViewClass_draw_layer)
	}

	if overrides.ExtendSelection != nil {
		pclass.extend_selection = (*[0]byte)(C._gotk4_gtk3_TextViewClass_extend_selection)
	}

	if overrides.InsertAtCursor != nil {
		pclass.insert_at_cursor = (*[0]byte)(C._gotk4_gtk3_TextViewClass_insert_at_cursor)
	}

	if overrides.InsertEmoji != nil {
		pclass.insert_emoji = (*[0]byte)(C._gotk4_gtk3_TextViewClass_insert_emoji)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_TextViewClass_move_cursor)
	}

	if overrides.PasteClipboard != nil {
		pclass.paste_clipboard = (*[0]byte)(C._gotk4_gtk3_TextViewClass_paste_clipboard)
	}

	if overrides.PopulatePopup != nil {
		pclass.populate_popup = (*[0]byte)(C._gotk4_gtk3_TextViewClass_populate_popup)
	}

	if overrides.SetAnchor != nil {
		pclass.set_anchor = (*[0]byte)(C._gotk4_gtk3_TextViewClass_set_anchor)
	}

	if overrides.ToggleOverwrite != nil {
		pclass.toggle_overwrite = (*[0]byte)(C._gotk4_gtk3_TextViewClass_toggle_overwrite)
	}

	if classInitFunc != nil {
		class := (*TextViewClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextView(obj *coreglib.Object) *TextView {
	return &TextView{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalTextView(p uintptr) (interface{}, error) {
	return wrapTextView(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectBackspace signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user asks for it.
//
// The default bindings for this signal are Backspace and Shift-Backspace.
func (textView *TextView) ConnectBackspace(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "backspace", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectBackspace), f)
}

// ConnectCopyClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to copy the selection to the clipboard.
//
// The default bindings for this signal are Ctrl-c and Ctrl-Insert.
func (textView *TextView) ConnectCopyClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "copy-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectCopyClipboard), f)
}

// ConnectCutClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to cut the selection to the clipboard.
//
// The default bindings for this signal are Ctrl-x and Shift-Delete.
func (textView *TextView) ConnectCutClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "cut-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectCutClipboard), f)
}

// ConnectDeleteFromCursor signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user initiates a text deletion.
//
// If the type is GTK_DELETE_CHARS, GTK+ deletes the selection if there is one,
// otherwise it deletes the requested number of characters.
//
// The default bindings for this signal are Delete for deleting a character,
// Ctrl-Delete for deleting a word and Ctrl-Backspace for deleting a word
// backwords.
func (textView *TextView) ConnectDeleteFromCursor(f func(typ DeleteType, count int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "delete-from-cursor", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectDeleteFromCursor), f)
}

// ConnectExtendSelection signal is emitted when the selection needs to be
// extended at location.
func (textView *TextView) ConnectExtendSelection(f func(granularity TextExtendSelection, location, start, end *TextIter) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "extend-selection", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectExtendSelection), f)
}

// ConnectInsertAtCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates the insertion of a fixed string at the
// cursor.
//
// This signal has no default bindings.
func (textView *TextView) ConnectInsertAtCursor(f func(str string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "insert-at-cursor", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectInsertAtCursor), f)
}

// ConnectInsertEmoji signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to present the Emoji chooser for the text_view.
//
// The default bindings for this signal are Ctrl-. and Ctrl-;.
func (textView *TextView) ConnectInsertEmoji(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "insert-emoji", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectInsertEmoji), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user initiates a cursor movement. If the cursor is not
// visible in text_view, this signal causes the viewport to be moved instead.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor programmatically.
//
// The default bindings for this signal come in two variants, the variant with
// the Shift modifier extends the selection, the variant without the Shift
// modifer does not. There are too many key combinations to list them all here.
//
// - Arrow keys move by individual characters/lines
//
// - Ctrl-arrow key combinations move by words/paragraphs
//
// - Home/End keys move to the ends of the buffer
//
// - PageUp/PageDown keys move vertically by pages
//
// - Ctrl-PageUp/PageDown keys move horizontally by pages.
func (textView *TextView) ConnectMoveCursor(f func(step MovementStep, count int, extendSelection bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectMoveCursor), f)
}

// ConnectMoveViewport signal is a [keybinding signal][GtkBindingSignal] which
// can be bound to key combinations to allow the user to move the viewport, i.e.
// change what part of the text view is visible in a containing scrolled window.
//
// There are no default bindings for this signal.
func (textView *TextView) ConnectMoveViewport(f func(step ScrollStep, count int)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "move-viewport", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectMoveViewport), f)
}

// ConnectPasteClipboard signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted to paste the contents of the clipboard into the text view.
//
// The default bindings for this signal are Ctrl-v and Shift-Insert.
func (textView *TextView) ConnectPasteClipboard(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "paste-clipboard", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectPasteClipboard), f)
}

// ConnectPopulatePopup signal gets emitted before showing the context menu of
// the text view.
//
// If you need to add items to the context menu, connect to this signal and
// append your items to the popup, which will be a Menu in this case.
//
// If TextView:populate-all is TRUE, this signal will also be emitted to
// populate touch popups. In this case, popup will be a different container,
// e.g. a Toolbar.
//
// The signal handler should not make assumptions about the type of widget,
// but check whether popup is a Menu or Toolbar or another kind of container.
func (textView *TextView) ConnectPopulatePopup(f func(popup Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "populate-popup", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectPopulatePopup), f)
}

// ConnectPreeditChanged: if an input method is used, the typed text will not
// immediately be committed to the buffer. So if you are interested in the text,
// connect to this signal.
//
// This signal is only emitted if the text at the given position is actually
// editable.
func (textView *TextView) ConnectPreeditChanged(f func(preedit string)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "preedit-changed", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectPreeditChanged), f)
}

// ConnectSelectAll signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted to select or unselect the complete contents of the text view.
//
// The default bindings for this signal are Ctrl-a and Ctrl-/ for selecting and
// Shift-Ctrl-a and Ctrl-\ for unselecting.
func (textView *TextView) ConnectSelectAll(f func(sel bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "select-all", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectSelectAll), f)
}

// ConnectSetAnchor signal is a [keybinding signal][GtkBindingSignal] which gets
// emitted when the user initiates setting the "anchor" mark. The "anchor" mark
// gets placed at the same position as the "insert" mark.
//
// This signal has no default bindings.
func (textView *TextView) ConnectSetAnchor(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "set-anchor", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectSetAnchor), f)
}

// ConnectToggleCursorVisible signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted to toggle the TextView:cursor-visible property.
//
// The default binding for this signal is F7.
func (textView *TextView) ConnectToggleCursorVisible(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "toggle-cursor-visible", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectToggleCursorVisible), f)
}

// ConnectToggleOverwrite signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted to toggle the overwrite mode of the text view.
//
// The default bindings for this signal is Insert.
func (textView *TextView) ConnectToggleOverwrite(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(textView, "toggle-overwrite", false, unsafe.Pointer(C._gotk4_gtk3_TextView_ConnectToggleOverwrite), f)
}

// NewTextView creates a new TextView. If you don’t call
// gtk_text_view_set_buffer() before using the text view, an empty
// default buffer will be created for you. Get the buffer with
// gtk_text_view_get_buffer(). If you want to specify your own buffer, consider
// gtk_text_view_new_with_buffer().
//
// The function returns the following values:
//
//   - textView: new TextView.
func NewTextView() *TextView {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_text_view_new()

	var _textView *TextView // out

	_textView = wrapTextView(coreglib.Take(unsafe.Pointer(_cret)))

	return _textView
}

// NewTextViewWithBuffer creates a new TextView widget displaying the buffer
// buffer. One buffer can be shared among many widgets. buffer may be NULL
// to create a default buffer, in which case this function is equivalent to
// gtk_text_view_new(). The text view adds its own reference count to the
// buffer; it does not take over an existing reference.
//
// The function takes the following parameters:
//
//   - buffer: TextBuffer.
//
// The function returns the following values:
//
//   - textView: new TextView.
func NewTextViewWithBuffer(buffer *TextBuffer) *TextView {
	var _arg1 *C.GtkTextBuffer // out
	var _cret *C.GtkWidget     // in

	_arg1 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_text_view_new_with_buffer(_arg1)
	runtime.KeepAlive(buffer)

	var _textView *TextView // out

	_textView = wrapTextView(coreglib.Take(unsafe.Pointer(_cret)))

	return _textView
}

// AddChildAtAnchor adds a child widget in the text buffer, at the given anchor.
//
// The function takes the following parameters:
//
//   - child: Widget.
//   - anchor in the TextBuffer for text_view.
func (textView *TextView) AddChildAtAnchor(child Widgetter, anchor *TextChildAnchor) {
	var _arg0 *C.GtkTextView        // out
	var _arg1 *C.GtkWidget          // out
	var _arg2 *C.GtkTextChildAnchor // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = (*C.GtkTextChildAnchor)(unsafe.Pointer(coreglib.InternObject(anchor).Native()))

	C.gtk_text_view_add_child_at_anchor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(child)
	runtime.KeepAlive(anchor)
}

// AddChildInWindow adds a child at fixed coordinates in one of the text
// widget's windows.
//
// The window must have nonzero size (see
// gtk_text_view_set_border_window_size()). Note that the child coordinates are
// given relative to scrolling. When placing a child in K_TEXT_WINDOW_WIDGET,
// scrolling is irrelevant, the child floats above all scrollable areas.
// But when placing a child in one of the scrollable windows (border windows or
// text window) it will move with the scrolling as needed.
//
// The function takes the following parameters:
//
//   - child: Widget.
//   - whichWindow: which window the child should appear in.
//   - xpos: x position of child in window coordinates.
//   - ypos: y position of child in window coordinates.
func (textView *TextView) AddChildInWindow(child Widgetter, whichWindow TextWindowType, xpos, ypos int) {
	var _arg0 *C.GtkTextView      // out
	var _arg1 *C.GtkWidget        // out
	var _arg2 C.GtkTextWindowType // out
	var _arg3 C.gint              // out
	var _arg4 C.gint              // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.GtkTextWindowType(whichWindow)
	_arg3 = C.gint(xpos)
	_arg4 = C.gint(ypos)

	C.gtk_text_view_add_child_in_window(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(child)
	runtime.KeepAlive(whichWindow)
	runtime.KeepAlive(xpos)
	runtime.KeepAlive(ypos)
}

// BackwardDisplayLine moves the given iter backward by one display (wrapped)
// line. A display line is different from a paragraph. Paragraphs are separated
// by newlines or other paragraph separator characters. Display lines are
// created by line-wrapping a paragraph. If wrapping is turned off, display
// lines and paragraphs will be the same. Display lines are divided differently
// for each view, since they depend on the view’s width; paragraphs are the same
// in all views, since they depend on the contents of the TextBuffer.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter was moved and is not on the end iterator.
func (textView *TextView) BackwardDisplayLine(iter *TextIter) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_view_backward_display_line(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardDisplayLineStart moves the given iter backward to the next display
// line start. A display line is different from a paragraph. Paragraphs are
// separated by newlines or other paragraph separator characters. Display lines
// are created by line-wrapping a paragraph. If wrapping is turned off, display
// lines and paragraphs will be the same. Display lines are divided differently
// for each view, since they depend on the view’s width; paragraphs are the same
// in all views, since they depend on the contents of the TextBuffer.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter was moved and is not on the end iterator.
func (textView *TextView) BackwardDisplayLineStart(iter *TextIter) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_view_backward_display_line_start(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BufferToWindowCoords converts coordinate (buffer_x, buffer_y) to coordinates
// for the window win, and stores the result in (window_x, window_y).
//
// Note that you can’t convert coordinates for a nonexisting window (see
// gtk_text_view_set_border_window_size()).
//
// The function takes the following parameters:
//
//   - win except GTK_TEXT_WINDOW_PRIVATE.
//   - bufferX: buffer x coordinate.
//   - bufferY: buffer y coordinate.
//
// The function returns the following values:
//
//   - windowX (optional): window x coordinate return location or NULL.
//   - windowY (optional): window y coordinate return location or NULL.
func (textView *TextView) BufferToWindowCoords(win TextWindowType, bufferX, bufferY int) (windowX, windowY int) {
	var _arg0 *C.GtkTextView      // out
	var _arg1 C.GtkTextWindowType // out
	var _arg2 C.gint              // out
	var _arg3 C.gint              // out
	var _arg4 C.gint              // in
	var _arg5 C.gint              // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextWindowType(win)
	_arg2 = C.gint(bufferX)
	_arg3 = C.gint(bufferY)

	C.gtk_text_view_buffer_to_window_coords(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(win)
	runtime.KeepAlive(bufferX)
	runtime.KeepAlive(bufferY)

	var _windowX int // out
	var _windowY int // out

	_windowX = int(_arg4)
	_windowY = int(_arg5)

	return _windowX, _windowY
}

// ForwardDisplayLine moves the given iter forward by one display (wrapped)
// line. A display line is different from a paragraph. Paragraphs are separated
// by newlines or other paragraph separator characters. Display lines are
// created by line-wrapping a paragraph. If wrapping is turned off, display
// lines and paragraphs will be the same. Display lines are divided differently
// for each view, since they depend on the view’s width; paragraphs are the same
// in all views, since they depend on the contents of the TextBuffer.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter was moved and is not on the end iterator.
func (textView *TextView) ForwardDisplayLine(iter *TextIter) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_view_forward_display_line(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardDisplayLineEnd moves the given iter forward to the next display line
// end. A display line is different from a paragraph. Paragraphs are separated
// by newlines or other paragraph separator characters. Display lines are
// created by line-wrapping a paragraph. If wrapping is turned off, display
// lines and paragraphs will be the same. Display lines are divided differently
// for each view, since they depend on the view’s width; paragraphs are the same
// in all views, since they depend on the contents of the TextBuffer.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter was moved and is not on the end iterator.
func (textView *TextView) ForwardDisplayLineEnd(iter *TextIter) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_view_forward_display_line_end(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AcceptsTab returns whether pressing the Tab key inserts a tab characters.
// gtk_text_view_set_accepts_tab().
//
// The function returns the following values:
//
//   - ok: TRUE if pressing the Tab key inserts a tab character, FALSE if
//     pressing the Tab key moves the keyboard focus.
func (textView *TextView) AcceptsTab() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_accepts_tab(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BorderWindowSize gets the width of the specified border window. See
// gtk_text_view_set_border_window_size().
//
// The function takes the following parameters:
//
//   - typ: window to return size from.
//
// The function returns the following values:
//
//   - gint: width of window.
func (textView *TextView) BorderWindowSize(typ TextWindowType) int {
	var _arg0 *C.GtkTextView      // out
	var _arg1 C.GtkTextWindowType // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextWindowType(typ)

	_cret = C.gtk_text_view_get_border_window_size(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(typ)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// BottomMargin gets the bottom margin for text in the text_view.
//
// The function returns the following values:
//
//   - gint: bottom margin in pixels.
func (textView *TextView) BottomMargin() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_bottom_margin(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Buffer returns the TextBuffer being displayed by this text view. The
// reference count on the buffer is not incremented; the caller of this function
// won’t own a new reference.
//
// The function returns the following values:
//
//   - textBuffer: TextBuffer.
func (textView *TextView) Buffer() *TextBuffer {
	var _arg0 *C.GtkTextView   // out
	var _cret *C.GtkTextBuffer // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_buffer(_arg0)
	runtime.KeepAlive(textView)

	var _textBuffer *TextBuffer // out

	_textBuffer = wrapTextBuffer(coreglib.Take(unsafe.Pointer(_cret)))

	return _textBuffer
}

// CursorLocations: given an iter within a text layout, determine the positions
// of the strong and weak cursors if the insertion point is at that iterator.
// The position of each cursor is stored as a zero-width rectangle. The strong
// cursor location is the location where characters of the directionality equal
// to the base direction of the paragraph are inserted. The weak cursor location
// is the location where characters of the directionality opposite to the base
// direction of the paragraph are inserted.
//
// If iter is NULL, the actual cursor position is used.
//
// Note that if iter happens to be the actual cursor position, and there is
// currently an IM preedit sequence being entered, the returned locations will
// be adjusted to account for the preedit cursor’s offset within the preedit
// sequence.
//
// The rectangle position is in buffer coordinates; use
// gtk_text_view_buffer_to_window_coords() to convert these coordinates to
// coordinates for one of the windows in the text view.
//
// The function takes the following parameters:
//
//   - iter (optional): TextIter.
//
// The function returns the following values:
//
//   - strong (optional): location to store the strong cursor position (may be
//     NULL).
//   - weak (optional): location to store the weak cursor position (may be
//     NULL).
func (textView *TextView) CursorLocations(iter *TextIter) (strong, weak *gdk.Rectangle) {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 C.GdkRectangle // in
	var _arg3 C.GdkRectangle // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if iter != nil {
		_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	}

	C.gtk_text_view_get_cursor_locations(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _strong *gdk.Rectangle // out
	var _weak *gdk.Rectangle   // out

	_strong = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	_weak = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))

	return _strong, _weak
}

// CursorVisible: find out whether the cursor should be displayed.
//
// The function returns the following values:
//
//   - ok: whether the insertion mark is visible.
func (textView *TextView) CursorVisible() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_cursor_visible(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DefaultAttributes obtains a copy of the default text attributes. These are
// the attributes used for text unless a tag overrides them. You’d typically
// pass the default attributes in to gtk_text_iter_get_attributes() in order to
// get the attributes in effect at a given text position.
//
// The return value is a copy owned by the caller of this function, and should
// be freed with gtk_text_attributes_unref().
//
// The function returns the following values:
//
//   - textAttributes: new TextAttributes.
func (textView *TextView) DefaultAttributes() *TextAttributes {
	var _arg0 *C.GtkTextView       // out
	var _cret *C.GtkTextAttributes // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_default_attributes(_arg0)
	runtime.KeepAlive(textView)

	var _textAttributes *TextAttributes // out

	_textAttributes = (*TextAttributes)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_textAttributes)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_text_attributes_unref((*C.GtkTextAttributes)(intern.C))
		},
	)

	return _textAttributes
}

// Editable returns the default editability of the TextView. Tags in the buffer
// may override this setting for some ranges of text.
//
// The function returns the following values:
//
//   - ok: whether text is editable by default.
func (textView *TextView) Editable() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_editable(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HAdjustment gets the horizontal-scrolling Adjustment.
//
// Deprecated: Use gtk_scrollable_get_hadjustment().
//
// The function returns the following values:
//
//   - adjustment: pointer to the horizontal Adjustment.
func (textView *TextView) HAdjustment() *Adjustment {
	var _arg0 *C.GtkTextView   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_hadjustment(_arg0)
	runtime.KeepAlive(textView)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// Indent gets the default indentation of paragraphs in text_view. Tags in the
// view’s buffer may override the default. The indentation may be negative.
//
// The function returns the following values:
//
//   - gint: number of pixels of indentation.
func (textView *TextView) Indent() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_indent(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// InputHints gets the value of the TextView:input-hints property.
func (textView *TextView) InputHints() InputHints {
	var _arg0 *C.GtkTextView  // out
	var _cret C.GtkInputHints // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_input_hints(_arg0)
	runtime.KeepAlive(textView)

	var _inputHints InputHints // out

	_inputHints = InputHints(_cret)

	return _inputHints
}

// InputPurpose gets the value of the TextView:input-purpose property.
func (textView *TextView) InputPurpose() InputPurpose {
	var _arg0 *C.GtkTextView    // out
	var _cret C.GtkInputPurpose // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_input_purpose(_arg0)
	runtime.KeepAlive(textView)

	var _inputPurpose InputPurpose // out

	_inputPurpose = InputPurpose(_cret)

	return _inputPurpose
}

// IterAtLocation retrieves the iterator at buffer coordinates x and y.
// Buffer coordinates are coordinates for the entire buffer,
// not just the currently-displayed portion. If you have coordinates
// from an event, you have to convert those to buffer coordinates with
// gtk_text_view_window_to_buffer_coords().
//
// The function takes the following parameters:
//
//   - x position, in buffer coordinates.
//   - y position, in buffer coordinates.
//
// The function returns the following values:
//
//   - iter: TextIter.
//   - ok: TRUE if the position is over text.
func (textView *TextView) IterAtLocation(x, y int) (*TextIter, bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.GtkTextIter  // in
	var _arg2 C.gint         // out
	var _arg3 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)

	_cret = C.gtk_text_view_get_iter_at_location(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _iter *TextIter // out
	var _ok bool        // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _iter, _ok
}

// IterAtPosition retrieves the iterator pointing to the character at buffer
// coordinates x and y. Buffer coordinates are coordinates for the entire
// buffer, not just the currently-displayed portion. If you have coordinates
// from an event, you have to convert those to buffer coordinates with
// gtk_text_view_window_to_buffer_coords().
//
// Note that this is different from gtk_text_view_get_iter_at_location(),
// which returns cursor locations, i.e. positions between characters.
//
// The function takes the following parameters:
//
//   - x position, in buffer coordinates.
//   - y position, in buffer coordinates.
//
// The function returns the following values:
//
//   - iter: TextIter.
//   - trailing (optional): if non-NULL, location to store an integer indicating
//     where in the grapheme the user clicked. It will either be zero, or the
//     number of characters in the grapheme. 0 represents the trailing edge of
//     the grapheme.
//   - ok: TRUE if the position is over text.
func (textView *TextView) IterAtPosition(x, y int) (*TextIter, int, bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.GtkTextIter  // in
	var _arg2 C.gint         // in
	var _arg3 C.gint         // out
	var _arg4 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg3 = C.gint(x)
	_arg4 = C.gint(y)

	_cret = C.gtk_text_view_get_iter_at_position(_arg0, &_arg1, &_arg2, _arg3, _arg4)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _iter *TextIter // out
	var _trailing int   // out
	var _ok bool        // out

	_iter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	_trailing = int(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _iter, _trailing, _ok
}

// IterLocation gets a rectangle which roughly contains the character
// at iter. The rectangle position is in buffer coordinates; use
// gtk_text_view_buffer_to_window_coords() to convert these coordinates to
// coordinates for one of the windows in the text view.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - location bounds of the character at iter.
func (textView *TextView) IterLocation(iter *TextIter) *gdk.Rectangle {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 C.GdkRectangle // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_text_view_get_iter_location(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _location *gdk.Rectangle // out

	_location = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _location
}

// Justification gets the default justification of paragraphs in text_view.
// Tags in the buffer may override the default.
//
// The function returns the following values:
//
//   - justification: default justification.
func (textView *TextView) Justification() Justification {
	var _arg0 *C.GtkTextView     // out
	var _cret C.GtkJustification // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_justification(_arg0)
	runtime.KeepAlive(textView)

	var _justification Justification // out

	_justification = Justification(_cret)

	return _justification
}

// LeftMargin gets the default left margin size of paragraphs in the text_view.
// Tags in the buffer may override the default.
//
// The function returns the following values:
//
//   - gint: left margin in pixels.
func (textView *TextView) LeftMargin() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_left_margin(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// LineAtY gets the TextIter at the start of the line containing the coordinate
// y. y is in buffer coordinates, convert from window coordinates with
// gtk_text_view_window_to_buffer_coords(). If non-NULL, line_top will be filled
// with the coordinate of the top edge of the line.
//
// The function takes the following parameters:
//
//   - y coordinate.
//
// The function returns the following values:
//
//   - targetIter: TextIter.
//   - lineTop: return location for top coordinate of the line.
func (textView *TextView) LineAtY(y int) (*TextIter, int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.GtkTextIter  // in
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg2 = C.gint(y)

	C.gtk_text_view_get_line_at_y(_arg0, &_arg1, _arg2, &_arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(y)

	var _targetIter *TextIter // out
	var _lineTop int          // out

	_targetIter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	_lineTop = int(_arg3)

	return _targetIter, _lineTop
}

// LineYrange gets the y coordinate of the top of the line containing iter,
// and the height of the line. The coordinate is a buffer coordinate; convert to
// window coordinates with gtk_text_view_buffer_to_window_coords().
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - y: return location for a y coordinate.
//   - height: return location for a height.
func (textView *TextView) LineYrange(iter *TextIter) (y, height int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 C.gint         // in
	var _arg3 C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_text_view_get_line_yrange(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _y int      // out
	var _height int // out

	_y = int(_arg2)
	_height = int(_arg3)

	return _y, _height
}

// Monospace gets the value of the TextView:monospace property.
//
// The function returns the following values:
//
//   - ok: TRUE if monospace fonts are desired.
func (textView *TextView) Monospace() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_monospace(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Overwrite returns whether the TextView is in overwrite mode or not.
//
// The function returns the following values:
//
//   - ok: whether text_view is in overwrite mode or not.
func (textView *TextView) Overwrite() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_overwrite(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PixelsAboveLines gets the default number of pixels to put above paragraphs.
// Adding this function with gtk_text_view_get_pixels_below_lines() is equal to
// the line space between each paragraph.
//
// The function returns the following values:
//
//   - gint: default number of pixels above paragraphs.
func (textView *TextView) PixelsAboveLines() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_pixels_above_lines(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PixelsBelowLines gets the value set by
// gtk_text_view_set_pixels_below_lines().
//
// The line space is the sum of the value returned by this function and the
// value returned by gtk_text_view_get_pixels_above_lines().
//
// The function returns the following values:
//
//   - gint: default number of blank pixels below paragraphs.
func (textView *TextView) PixelsBelowLines() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_pixels_below_lines(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PixelsInsideWrap gets the value set by
// gtk_text_view_set_pixels_inside_wrap().
//
// The function returns the following values:
//
//   - gint: default number of pixels of blank space between wrapped lines.
func (textView *TextView) PixelsInsideWrap() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_pixels_inside_wrap(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// RightMargin gets the default right margin for text in text_view. Tags in the
// buffer may override the default.
//
// The function returns the following values:
//
//   - gint: right margin in pixels.
func (textView *TextView) RightMargin() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_right_margin(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Tabs gets the default tabs for text_view. Tags in the buffer may override the
// defaults. The returned array will be NULL if “standard” (8-space) tabs are
// used. Free the return value with pango_tab_array_free().
//
// The function returns the following values:
//
//   - tabArray (optional): copy of default tab array, or NULL if “standard"
//     tabs are used; must be freed with pango_tab_array_free().
func (textView *TextView) Tabs() *pango.TabArray {
	var _arg0 *C.GtkTextView   // out
	var _cret *C.PangoTabArray // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_tabs(_arg0)
	runtime.KeepAlive(textView)

	var _tabArray *pango.TabArray // out

	if _cret != nil {
		_tabArray = (*pango.TabArray)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_tabArray)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.pango_tab_array_free((*C.PangoTabArray)(intern.C))
			},
		)
	}

	return _tabArray
}

// TopMargin gets the top margin for text in the text_view.
//
// The function returns the following values:
//
//   - gint: top margin in pixels.
func (textView *TextView) TopMargin() int {
	var _arg0 *C.GtkTextView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_top_margin(_arg0)
	runtime.KeepAlive(textView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// VAdjustment gets the vertical-scrolling Adjustment.
//
// Deprecated: Use gtk_scrollable_get_vadjustment().
//
// The function returns the following values:
//
//   - adjustment: pointer to the vertical Adjustment.
func (textView *TextView) VAdjustment() *Adjustment {
	var _arg0 *C.GtkTextView   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_vadjustment(_arg0)
	runtime.KeepAlive(textView)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// VisibleRect fills visible_rect with the currently-visible region of
// the buffer, in buffer coordinates. Convert to window coordinates with
// gtk_text_view_buffer_to_window_coords().
//
// The function returns the following values:
//
//   - visibleRect: rectangle to fill.
func (textView *TextView) VisibleRect() *gdk.Rectangle {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.GdkRectangle // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C.gtk_text_view_get_visible_rect(_arg0, &_arg1)
	runtime.KeepAlive(textView)

	var _visibleRect *gdk.Rectangle // out

	_visibleRect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _visibleRect
}

// Window retrieves the Window corresponding to an area of the text view;
// possible windows include the overall widget window, child windows on the
// left, right, top, bottom, and the window that displays the text buffer.
// Windows are NULL and nonexistent if their width or height is 0, and are
// nonexistent before the widget has been realized.
//
// The function takes the following parameters:
//
//   - win: window to get.
//
// The function returns the following values:
//
//   - window (optional) or NULL.
func (textView *TextView) Window(win TextWindowType) gdk.Windower {
	var _arg0 *C.GtkTextView      // out
	var _arg1 C.GtkTextWindowType // out
	var _cret *C.GdkWindow        // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextWindowType(win)

	_cret = C.gtk_text_view_get_window(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(win)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

// WindowType: usually used to find out which window an event corresponds to.
//
// If you connect to an event signal on text_view, this function should be
// called on event->window to see which window it was.
//
// The function takes the following parameters:
//
//   - window type.
//
// The function returns the following values:
//
//   - textWindowType: window type.
func (textView *TextView) WindowType(window gdk.Windower) TextWindowType {
	var _arg0 *C.GtkTextView      // out
	var _arg1 *C.GdkWindow        // out
	var _cret C.GtkTextWindowType // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_text_view_get_window_type(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(window)

	var _textWindowType TextWindowType // out

	_textWindowType = TextWindowType(_cret)

	return _textWindowType
}

// WrapMode gets the line wrapping for the view.
//
// The function returns the following values:
//
//   - wrapMode: line wrap setting.
func (textView *TextView) WrapMode() WrapMode {
	var _arg0 *C.GtkTextView // out
	var _cret C.GtkWrapMode  // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_get_wrap_mode(_arg0)
	runtime.KeepAlive(textView)

	var _wrapMode WrapMode // out

	_wrapMode = WrapMode(_cret)

	return _wrapMode
}

// IMContextFilterKeypress: allow the TextView input method to internally
// handle key press and release events. If this function returns TRUE,
// then no further processing should be done for this key event. See
// gtk_im_context_filter_keypress().
//
// Note that you are expected to call this function from your handler when
// overriding key event handling. This is needed in the case when you need to
// insert your own key handling between the input method and the default key
// event handling of the TextView.
//
//	static gboolean
//	gtk_foo_bar_key_press_event (GtkWidget   *widget,
//	                             GdkEventKey *event)
//	{
//	  guint keyval;
//
//	  gdk_event_get_keyval ((GdkEvent*)event, &keyval);
//
//	  if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter)
//	    {
//	      if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event))
//	        return TRUE;
//	    }
//
//	  // Do some stuff
//
//	  return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
//	}.
//
// The function takes the following parameters:
//
//   - event: key event.
//
// The function returns the following values:
//
//   - ok: TRUE if the input method handled the key event.
func (textView *TextView) IMContextFilterKeypress(event *gdk.EventKey) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_text_view_im_context_filter_keypress(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MoveChild updates the position of a child, as for
// gtk_text_view_add_child_in_window().
//
// The function takes the following parameters:
//
//   - child widget already added to the text view.
//   - xpos: new X position in window coordinates.
//   - ypos: new Y position in window coordinates.
func (textView *TextView) MoveChild(child Widgetter, xpos, ypos int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkWidget   // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(child).Native()))
	_arg2 = C.gint(xpos)
	_arg3 = C.gint(ypos)

	C.gtk_text_view_move_child(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(child)
	runtime.KeepAlive(xpos)
	runtime.KeepAlive(ypos)
}

// MoveMarkOnscreen moves a mark within the buffer so that it's located within
// the currently-visible text area.
//
// The function takes the following parameters:
//
//   - mark: TextMark.
//
// The function returns the following values:
//
//   - ok: TRUE if the mark moved (wasn’t already onscreen).
func (textView *TextView) MoveMarkOnscreen(mark *TextMark) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextMark // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	_cret = C.gtk_text_view_move_mark_onscreen(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(mark)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MoveVisually: move the iterator a given number of characters visually,
// treating it as the strong cursor position. If count is positive, then the new
// strong cursor position will be count positions to the right of the old cursor
// position. If count is negative then the new strong cursor position will be
// count positions to the left of the old cursor position.
//
// In the presence of bi-directional text, the correspondence between logical
// and visual order will depend on the direction of the current run, and there
// may be jumps when the cursor is moved off of the end of a run.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//   - count: number of characters to move (negative moves left, positive moves
//     right).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not on the end iterator.
func (textView *TextView) MoveVisually(iter *TextIter, count int) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gint(count)

	_cret = C.gtk_text_view_move_visually(_arg0, _arg1, _arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PlaceCursorOnscreen moves the cursor to the currently visible region of the
// buffer, it it isn’t there already.
//
// The function returns the following values:
//
//   - ok: TRUE if the cursor had to be moved.
func (textView *TextView) PlaceCursorOnscreen() bool {
	var _arg0 *C.GtkTextView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	_cret = C.gtk_text_view_place_cursor_onscreen(_arg0)
	runtime.KeepAlive(textView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ResetCursorBlink ensures that the cursor is shown (i.e. not in an 'off'
// blink interval) and resets the time that it will stay blinking (or visible,
// in case blinking is disabled).
//
// This function should be called in response to user input (e.g. from derived
// classes that override the textview's Widget::key-press-event handler).
func (textView *TextView) ResetCursorBlink() {
	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C.gtk_text_view_reset_cursor_blink(_arg0)
	runtime.KeepAlive(textView)
}

// ResetIMContext: reset the input method context of the text view if needed.
//
// This can be necessary in the case where modifying the buffer would confuse
// on-going input method behavior.
func (textView *TextView) ResetIMContext() {
	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C.gtk_text_view_reset_im_context(_arg0)
	runtime.KeepAlive(textView)
}

// ScrollMarkOnscreen scrolls text_view the minimum distance such that mark is
// contained within the visible area of the widget.
//
// The function takes the following parameters:
//
//   - mark in the buffer for text_view.
func (textView *TextView) ScrollMarkOnscreen(mark *TextMark) {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextMark // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))

	C.gtk_text_view_scroll_mark_onscreen(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(mark)
}

// ScrollToIter scrolls text_view so that iter is on the screen in the position
// indicated by xalign and yalign. An alignment of 0.0 indicates left or top,
// 1.0 indicates right or bottom, 0.5 means center. If use_align is FALSE,
// the text scrolls the minimal distance to get the mark onscreen, possibly
// not scrolling at all. The effective screen for purposes of this function is
// reduced by a margin of size within_margin.
//
// Note that this function uses the currently-computed height of the lines
// in the text buffer. Line heights are computed in an idle handler; so this
// function may not have the desired effect if it’s called before the height
// computations. To avoid oddness, consider using gtk_text_view_scroll_to_mark()
// which saves a point to be scrolled to after line validation.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//   - withinMargin: margin as a [0.0,0.5) fraction of screen size.
//   - useAlign: whether to use alignment arguments (if FALSE, just get the mark
//     onscreen).
//   - xalign: horizontal alignment of mark within visible area.
//   - yalign: vertical alignment of mark within visible area.
//
// The function returns the following values:
//
//   - ok: TRUE if scrolling occurred.
func (textView *TextView) ScrollToIter(iter *TextIter, withinMargin float64, useAlign bool, xalign, yalign float64) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 C.gdouble      // out
	var _arg3 C.gboolean     // out
	var _arg4 C.gdouble      // out
	var _arg5 C.gdouble      // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gdouble(withinMargin)
	if useAlign {
		_arg3 = C.TRUE
	}
	_arg4 = C.gdouble(xalign)
	_arg5 = C.gdouble(yalign)

	_cret = C.gtk_text_view_scroll_to_iter(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(withinMargin)
	runtime.KeepAlive(useAlign)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ScrollToMark scrolls text_view so that mark is on the screen in the position
// indicated by xalign and yalign. An alignment of 0.0 indicates left or top,
// 1.0 indicates right or bottom, 0.5 means center. If use_align is FALSE,
// the text scrolls the minimal distance to get the mark onscreen, possibly
// not scrolling at all. The effective screen for purposes of this function is
// reduced by a margin of size within_margin.
//
// The function takes the following parameters:
//
//   - mark: TextMark.
//   - withinMargin: margin as a [0.0,0.5) fraction of screen size.
//   - useAlign: whether to use alignment arguments (if FALSE, just get the mark
//     onscreen).
//   - xalign: horizontal alignment of mark within visible area.
//   - yalign: vertical alignment of mark within visible area.
func (textView *TextView) ScrollToMark(mark *TextMark, withinMargin float64, useAlign bool, xalign, yalign float64) {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextMark // out
	var _arg2 C.gdouble      // out
	var _arg3 C.gboolean     // out
	var _arg4 C.gdouble      // out
	var _arg5 C.gdouble      // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextMark)(unsafe.Pointer(coreglib.InternObject(mark).Native()))
	_arg2 = C.gdouble(withinMargin)
	if useAlign {
		_arg3 = C.TRUE
	}
	_arg4 = C.gdouble(xalign)
	_arg5 = C.gdouble(yalign)

	C.gtk_text_view_scroll_to_mark(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(mark)
	runtime.KeepAlive(withinMargin)
	runtime.KeepAlive(useAlign)
	runtime.KeepAlive(xalign)
	runtime.KeepAlive(yalign)
}

// SetAcceptsTab sets the behavior of the text widget when the Tab key is
// pressed. If accepts_tab is TRUE, a tab character is inserted. If accepts_tab
// is FALSE the keyboard focus is moved to the next widget in the focus chain.
//
// The function takes the following parameters:
//
//   - acceptsTab: TRUE if pressing the Tab key should insert a tab character,
//     FALSE, if pressing the Tab key should move the keyboard focus.
func (textView *TextView) SetAcceptsTab(acceptsTab bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if acceptsTab {
		_arg1 = C.TRUE
	}

	C.gtk_text_view_set_accepts_tab(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(acceptsTab)
}

// SetBorderWindowSize sets the width of GTK_TEXT_WINDOW_LEFT or
// GTK_TEXT_WINDOW_RIGHT, or the height of GTK_TEXT_WINDOW_TOP or
// GTK_TEXT_WINDOW_BOTTOM. Automatically destroys the corresponding window
// if the size is set to 0, and creates the window if the size is set to
// non-zero. This function can only be used for the “border windows”,
// and it won’t work with GTK_TEXT_WINDOW_WIDGET, GTK_TEXT_WINDOW_TEXT,
// or GTK_TEXT_WINDOW_PRIVATE.
//
// The function takes the following parameters:
//
//   - typ: window to affect.
//   - size: width or height of the window.
func (textView *TextView) SetBorderWindowSize(typ TextWindowType, size int) {
	var _arg0 *C.GtkTextView      // out
	var _arg1 C.GtkTextWindowType // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextWindowType(typ)
	_arg2 = C.gint(size)

	C.gtk_text_view_set_border_window_size(_arg0, _arg1, _arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(size)
}

// SetBottomMargin sets the bottom margin for text in text_view.
//
// Note that this function is confusingly named. In CSS terms, the value set
// here is padding.
//
// The function takes the following parameters:
//
//   - bottomMargin: bottom margin in pixels.
func (textView *TextView) SetBottomMargin(bottomMargin int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(bottomMargin)

	C.gtk_text_view_set_bottom_margin(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(bottomMargin)
}

// SetBuffer sets buffer as the buffer being displayed by text_view. The
// previous buffer displayed by the text view is unreferenced, and a reference
// is added to buffer. If you owned a reference to buffer before passing it to
// this function, you must remove that reference yourself; TextView will not
// “adopt” it.
//
// The function takes the following parameters:
//
//   - buffer (optional): TextBuffer.
func (textView *TextView) SetBuffer(buffer *TextBuffer) {
	var _arg0 *C.GtkTextView   // out
	var _arg1 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if buffer != nil {
		_arg1 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))
	}

	C.gtk_text_view_set_buffer(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(buffer)
}

// SetCursorVisible toggles whether the insertion point should be displayed.
// A buffer with no editable text probably shouldn’t have a visible cursor,
// so you may want to turn the cursor off.
//
// Note that this property may be overridden by the
// Settings:gtk-keynave-use-caret settings.
//
// The function takes the following parameters:
//
//   - setting: whether to show the insertion cursor.
func (textView *TextView) SetCursorVisible(setting bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_text_view_set_cursor_visible(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(setting)
}

// SetEditable sets the default editability of the TextView. You can override
// this default setting with tags in the buffer, using the “editable” attribute
// of tags.
//
// The function takes the following parameters:
//
//   - setting: whether it’s editable.
func (textView *TextView) SetEditable(setting bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_text_view_set_editable(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(setting)
}

// SetIndent sets the default indentation for paragraphs in text_view. Tags in
// the buffer may override the default.
//
// The function takes the following parameters:
//
//   - indent: indentation in pixels.
func (textView *TextView) SetIndent(indent int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(indent)

	C.gtk_text_view_set_indent(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(indent)
}

// SetInputHints sets the TextView:input-hints property, which allows input
// methods to fine-tune their behaviour.
//
// The function takes the following parameters:
//
//   - hints: hints.
func (textView *TextView) SetInputHints(hints InputHints) {
	var _arg0 *C.GtkTextView  // out
	var _arg1 C.GtkInputHints // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkInputHints(hints)

	C.gtk_text_view_set_input_hints(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(hints)
}

// SetInputPurpose sets the TextView:input-purpose property which can be used by
// on-screen keyboards and other input methods to adjust their behaviour.
//
// The function takes the following parameters:
//
//   - purpose: purpose.
func (textView *TextView) SetInputPurpose(purpose InputPurpose) {
	var _arg0 *C.GtkTextView    // out
	var _arg1 C.GtkInputPurpose // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkInputPurpose(purpose)

	C.gtk_text_view_set_input_purpose(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(purpose)
}

// SetJustification sets the default justification of text in text_view. Tags in
// the view’s buffer may override the default.
//
// The function takes the following parameters:
//
//   - justification: justification.
func (textView *TextView) SetJustification(justification Justification) {
	var _arg0 *C.GtkTextView     // out
	var _arg1 C.GtkJustification // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkJustification(justification)

	C.gtk_text_view_set_justification(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(justification)
}

// SetLeftMargin sets the default left margin for text in text_view. Tags in the
// buffer may override the default.
//
// Note that this function is confusingly named. In CSS terms, the value set
// here is padding.
//
// The function takes the following parameters:
//
//   - leftMargin: left margin in pixels.
func (textView *TextView) SetLeftMargin(leftMargin int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(leftMargin)

	C.gtk_text_view_set_left_margin(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(leftMargin)
}

// SetMonospace sets the TextView:monospace property, which indicates that the
// text view should use monospace fonts.
//
// The function takes the following parameters:
//
//   - monospace: TRUE to request monospace styling.
func (textView *TextView) SetMonospace(monospace bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if monospace {
		_arg1 = C.TRUE
	}

	C.gtk_text_view_set_monospace(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(monospace)
}

// SetOverwrite changes the TextView overwrite mode.
//
// The function takes the following parameters:
//
//   - overwrite: TRUE to turn on overwrite mode, FALSE to turn it off.
func (textView *TextView) SetOverwrite(overwrite bool) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	if overwrite {
		_arg1 = C.TRUE
	}

	C.gtk_text_view_set_overwrite(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(overwrite)
}

// SetPixelsAboveLines sets the default number of blank pixels above paragraphs
// in text_view. Tags in the buffer for text_view may override the defaults.
//
// The function takes the following parameters:
//
//   - pixelsAboveLines pixels above paragraphs.
func (textView *TextView) SetPixelsAboveLines(pixelsAboveLines int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(pixelsAboveLines)

	C.gtk_text_view_set_pixels_above_lines(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(pixelsAboveLines)
}

// SetPixelsBelowLines sets the default number of pixels of blank space to
// put below paragraphs in text_view. May be overridden by tags applied to
// text_view’s buffer.
//
// The function takes the following parameters:
//
//   - pixelsBelowLines pixels below paragraphs.
func (textView *TextView) SetPixelsBelowLines(pixelsBelowLines int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(pixelsBelowLines)

	C.gtk_text_view_set_pixels_below_lines(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(pixelsBelowLines)
}

// SetPixelsInsideWrap sets the default number of pixels of blank space to leave
// between display/wrapped lines within a paragraph. May be overridden by tags
// in text_view’s buffer.
//
// The function takes the following parameters:
//
//   - pixelsInsideWrap: default number of pixels between wrapped lines.
func (textView *TextView) SetPixelsInsideWrap(pixelsInsideWrap int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(pixelsInsideWrap)

	C.gtk_text_view_set_pixels_inside_wrap(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(pixelsInsideWrap)
}

// SetRightMargin sets the default right margin for text in the text view.
// Tags in the buffer may override the default.
//
// Note that this function is confusingly named. In CSS terms, the value set
// here is padding.
//
// The function takes the following parameters:
//
//   - rightMargin: right margin in pixels.
func (textView *TextView) SetRightMargin(rightMargin int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(rightMargin)

	C.gtk_text_view_set_right_margin(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(rightMargin)
}

// SetTabs sets the default tab stops for paragraphs in text_view. Tags in the
// buffer may override the default.
//
// The function takes the following parameters:
//
//   - tabs as a TabArray.
func (textView *TextView) SetTabs(tabs *pango.TabArray) {
	var _arg0 *C.GtkTextView   // out
	var _arg1 *C.PangoTabArray // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.PangoTabArray)(gextras.StructNative(unsafe.Pointer(tabs)))

	C.gtk_text_view_set_tabs(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(tabs)
}

// SetTopMargin sets the top margin for text in text_view.
//
// Note that this function is confusingly named. In CSS terms, the value set
// here is padding.
//
// The function takes the following parameters:
//
//   - topMargin: top margin in pixels.
func (textView *TextView) SetTopMargin(topMargin int) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.gint(topMargin)

	C.gtk_text_view_set_top_margin(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(topMargin)
}

// SetWrapMode sets the line wrapping for the view.
//
// The function takes the following parameters:
//
//   - wrapMode: WrapMode.
func (textView *TextView) SetWrapMode(wrapMode WrapMode) {
	var _arg0 *C.GtkTextView // out
	var _arg1 C.GtkWrapMode  // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkWrapMode(wrapMode)

	C.gtk_text_view_set_wrap_mode(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(wrapMode)
}

// StartsDisplayLine determines whether iter is at the start of a display line.
// See gtk_text_view_forward_display_line() for an explanation of display lines
// vs. paragraphs.
//
// The function takes the following parameters:
//
//   - iter: TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter begins a wrapped line.
func (textView *TextView) StartsDisplayLine(iter *TextIter) bool {
	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_view_starts_display_line(_arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WindowToBufferCoords converts coordinates on the window identified by win to
// buffer coordinates, storing the result in (buffer_x,buffer_y).
//
// Note that you can’t convert coordinates for a nonexisting window (see
// gtk_text_view_set_border_window_size()).
//
// The function takes the following parameters:
//
//   - win except GTK_TEXT_WINDOW_PRIVATE.
//   - windowX: window x coordinate.
//   - windowY: window y coordinate.
//
// The function returns the following values:
//
//   - bufferX (optional): buffer x coordinate return location or NULL.
//   - bufferY (optional): buffer y coordinate return location or NULL.
func (textView *TextView) WindowToBufferCoords(win TextWindowType, windowX, windowY int) (bufferX, bufferY int) {
	var _arg0 *C.GtkTextView      // out
	var _arg1 C.GtkTextWindowType // out
	var _arg2 C.gint              // out
	var _arg3 C.gint              // out
	var _arg4 C.gint              // in
	var _arg5 C.gint              // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextWindowType(win)
	_arg2 = C.gint(windowX)
	_arg3 = C.gint(windowY)

	C.gtk_text_view_window_to_buffer_coords(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(win)
	runtime.KeepAlive(windowX)
	runtime.KeepAlive(windowY)

	var _bufferX int // out
	var _bufferY int // out

	_bufferX = int(_arg4)
	_bufferY = int(_arg5)

	return _bufferX, _bufferY
}

// Backspace class handler for the TextView::backspace keybinding signal.
func (textView *TextView) backspace() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.backspace

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_backspace(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// copyClipboard class handler for the Textview::copy-clipboard keybinding
// signal.
func (textView *TextView) copyClipboard() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.copy_clipboard

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_copy_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// cutClipboard class handler for the TextView::cut-clipboard keybinding signal.
func (textView *TextView) cutClipboard() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.cut_clipboard

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_cut_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// deleteFromCursor class handler for the TextView::delete-from-cursor
// keybinding signal.
//
// The function takes the following parameters:
//
//   - typ
//   - count
func (textView *TextView) deleteFromCursor(typ DeleteType, count int) {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.delete_from_cursor

	var _arg0 *C.GtkTextView  // out
	var _arg1 C.GtkDeleteType // out
	var _arg2 C.gint          // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkDeleteType(typ)
	_arg2 = C.gint(count)

	C._gotk4_gtk3_TextView_virtual_delete_from_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(count)
}

// drawLayer: draw_layer vfunc is called before and after the text view
// is drawing its own text. Applications can override this vfunc in a
// subclass to draw customized content underneath or above the text. In the
// GTK_TEXT_VIEW_LAYER_BELOW_TEXT and GTK_TEXT_VIEW_LAYER_ABOVE_TEXT the drawing
// is done in the buffer coordinate space, but the older (deprecated) layers
// GTK_TEXT_VIEW_LAYER_BELOW and GTK_TEXT_VIEW_LAYER_ABOVE work in viewport
// coordinates, which makes them unnecessarily hard to use. Since: 3.14.
//
// The function takes the following parameters:
//
//   - layer
//   - cr
func (textView *TextView) drawLayer(layer TextViewLayer, cr *cairo.Context) {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.draw_layer

	var _arg0 *C.GtkTextView     // out
	var _arg1 C.GtkTextViewLayer // out
	var _arg2 *C.cairo_t         // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextViewLayer(layer)
	_arg2 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	C._gotk4_gtk3_TextView_virtual_draw_layer(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(layer)
	runtime.KeepAlive(cr)
}

// extendSelection class handler for the TextView::extend-selection signal.
// Since 3.16.
//
// The function takes the following parameters:
//
//   - granularity
//   - location
//   - start
//   - end
func (textView *TextView) extendSelection(granularity TextExtendSelection, location, start, end *TextIter) bool {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.extend_selection

	var _arg0 *C.GtkTextView           // out
	var _arg1 C.GtkTextExtendSelection // out
	var _arg2 *C.GtkTextIter           // out
	var _arg3 *C.GtkTextIter           // out
	var _arg4 *C.GtkTextIter           // out
	var _cret C.gboolean               // in

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkTextExtendSelection(granularity)
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(location)))
	_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg4 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C._gotk4_gtk3_TextView_virtual_extend_selection(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(granularity)
	runtime.KeepAlive(location)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// insertAtCursor class handler for the TextView::insert-at-cursor keybinding
// signal.
func (textView *TextView) insertAtCursor(str string) {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.insert_at_cursor

	var _arg0 *C.GtkTextView // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))

	C._gotk4_gtk3_TextView_virtual_insert_at_cursor(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(str)
}

func (textView *TextView) insertEmoji() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.insert_emoji

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_insert_emoji(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// moveCursor class handler for the TextView::move-cursor keybinding signal.
//
// The function takes the following parameters:
//
//   - step
//   - count
//   - extendSelection
func (textView *TextView) moveCursor(step MovementStep, count int, extendSelection bool) {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkTextView    // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _arg3 C.gboolean        // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)
	if extendSelection {
		_arg3 = C.TRUE
	}

	C._gotk4_gtk3_TextView_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)
	runtime.KeepAlive(extendSelection)
}

// pasteClipboard class handler for the TextView::paste-clipboard keybinding
// signal.
func (textView *TextView) pasteClipboard() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.paste_clipboard

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_paste_clipboard(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// populatePopup class handler for the TextView::populate-popup signal.
func (textView *TextView) populatePopup(popup Widgetter) {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.populate_popup

	var _arg0 *C.GtkTextView // out
	var _arg1 *C.GtkWidget   // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(popup).Native()))

	C._gotk4_gtk3_TextView_virtual_populate_popup(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(textView)
	runtime.KeepAlive(popup)
}

// setAnchor class handler for the TextView::set-anchor keybinding signal.
func (textView *TextView) setAnchor() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.set_anchor

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_set_anchor(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// toggleOverwrite class handler for the TextView::toggle-overwrite keybinding
// signal.
func (textView *TextView) toggleOverwrite() {
	gclass := (*C.GtkTextViewClass)(coreglib.PeekParentClass(textView))
	fnarg := gclass.toggle_overwrite

	var _arg0 *C.GtkTextView // out

	_arg0 = (*C.GtkTextView)(unsafe.Pointer(coreglib.InternObject(textView).Native()))

	C._gotk4_gtk3_TextView_virtual_toggle_overwrite(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(textView)
}

// TextViewAccessibleOverrides contains methods that are overridable.
type TextViewAccessibleOverrides struct {
}

func defaultTextViewAccessibleOverrides(v *TextViewAccessible) TextViewAccessibleOverrides {
	return TextViewAccessibleOverrides{}
}

type TextViewAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	*coreglib.Object
	atk.EditableText
	atk.StreamableContent
	atk.Text
}

var (
	_ coreglib.Objector = (*TextViewAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TextViewAccessible, *TextViewAccessibleClass, TextViewAccessibleOverrides](
		GTypeTextViewAccessible,
		initTextViewAccessibleClass,
		wrapTextViewAccessible,
		defaultTextViewAccessibleOverrides,
	)
}

func initTextViewAccessibleClass(gclass unsafe.Pointer, overrides TextViewAccessibleOverrides, classInitFunc func(*TextViewAccessibleClass)) {
	if classInitFunc != nil {
		class := (*TextViewAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTextViewAccessible(obj *coreglib.Object) *TextViewAccessible {
	return &TextViewAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Object: obj,
		EditableText: atk.EditableText{
			Object: obj,
		},
		StreamableContent: atk.StreamableContent{
			Object: obj,
		},
		Text: atk.Text{
			Object: obj,
		},
	}
}

func marshalTextViewAccessible(p uintptr) (interface{}, error) {
	return wrapTextViewAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ThemingEngineOverrides contains methods that are overridable.
type ThemingEngineOverrides struct {
	// RenderActivity renders an area displaying activity, such as in Spinner,
	// or ProgressBar.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderActivity func(cr *cairo.Context, x, y, width, height float64)
	// RenderArrow renders an arrow pointing to a certain direction.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - angle
	//   - x
	//   - y
	//   - size
	RenderArrow func(cr *cairo.Context, angle, x, y, size float64)
	// RenderBackground renders the background area of a widget region.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderBackground func(cr *cairo.Context, x, y, width, height float64)
	// RenderCheck renders a checkmark, as in CheckButton.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderCheck func(cr *cairo.Context, x, y, width, height float64)
	// RenderExpander renders an element what will expose/expand part of the UI,
	// as in Expander.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderExpander func(cr *cairo.Context, x, y, width, height float64)
	// RenderExtension renders a extension to a box, usually a notebook tab.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	//   - gapSide
	RenderExtension func(cr *cairo.Context, x, y, width, height float64, gapSide PositionType)
	// RenderFocus renders the focus indicator.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderFocus func(cr *cairo.Context, x, y, width, height float64)
	// RenderFrame renders the frame around a widget area.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderFrame func(cr *cairo.Context, x, y, width, height float64)
	// RenderFrameGap renders the frame around a widget area with a gap in it.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	//   - gapSide
	//   - xy0Gap
	//   - xy1Gap
	RenderFrameGap func(cr *cairo.Context, x, y, width, height float64, gapSide PositionType, xy0Gap, xy1Gap float64)
	// RenderHandle renders a handle to drag UI elements, as in Paned.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderHandle func(cr *cairo.Context, x, y, width, height float64)
	// RenderIcon renders an icon given as a Pixbuf.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - pixbuf
	//   - x
	//   - y
	RenderIcon func(cr *cairo.Context, pixbuf *gdkpixbuf.Pixbuf, x, y float64)
	// RenderIconSurface renders an icon given as a #cairo_surface_t.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - surface
	//   - x
	//   - y
	RenderIconSurface func(cr *cairo.Context, surface *cairo.Surface, x, y float64)
	// RenderLayout renders a Layout.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - layout
	RenderLayout func(cr *cairo.Context, x, y float64, layout *pango.Layout)
	// RenderLine renders a line between two points.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x0
	//   - y0
	//   - x1
	//   - y1
	RenderLine func(cr *cairo.Context, x0, y0, x1, y1 float64)
	// RenderOption renders an option, as in RadioButton.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	RenderOption func(cr *cairo.Context, x, y, width, height float64)
	// RenderSlider renders a slider control, as in Scale.
	//
	// The function takes the following parameters:
	//
	//   - cr
	//   - x
	//   - y
	//   - width
	//   - height
	//   - orientation
	RenderSlider func(cr *cairo.Context, x, y, width, height float64, orientation Orientation)
}

func defaultThemingEngineOverrides(v *ThemingEngine) ThemingEngineOverrides {
	return ThemingEngineOverrides{
		RenderActivity:    v.renderActivity,
		RenderArrow:       v.renderArrow,
		RenderBackground:  v.renderBackground,
		RenderCheck:       v.renderCheck,
		RenderExpander:    v.renderExpander,
		RenderExtension:   v.renderExtension,
		RenderFocus:       v.renderFocus,
		RenderFrame:       v.renderFrame,
		RenderFrameGap:    v.renderFrameGap,
		RenderHandle:      v.renderHandle,
		RenderIcon:        v.renderIcon,
		RenderIconSurface: v.renderIconSurface,
		RenderLayout:      v.renderLayout,
		RenderLine:        v.renderLine,
		RenderOption:      v.renderOption,
		RenderSlider:      v.renderSlider,
	}
}

// ThemingEngine was the object used for rendering themed content in GTK+
// widgets. It used to allow overriding GTK+'s default implementation of
// rendering functions by allowing engines to be loaded as modules.
//
// ThemingEngine has been deprecated in GTK+ 3.14 and will be ignored for
// rendering. The advancements in CSS theming are good enough to allow themers
// to achieve their goals without the need to modify source code.
type ThemingEngine struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*ThemingEngine)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ThemingEngine, *ThemingEngineClass, ThemingEngineOverrides](
		GTypeThemingEngine,
		initThemingEngineClass,
		wrapThemingEngine,
		defaultThemingEngineOverrides,
	)
}

func initThemingEngineClass(gclass unsafe.Pointer, overrides ThemingEngineOverrides, classInitFunc func(*ThemingEngineClass)) {
	pclass := (*C.GtkThemingEngineClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeThemingEngine))))

	if overrides.RenderActivity != nil {
		pclass.render_activity = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_activity)
	}

	if overrides.RenderArrow != nil {
		pclass.render_arrow = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_arrow)
	}

	if overrides.RenderBackground != nil {
		pclass.render_background = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_background)
	}

	if overrides.RenderCheck != nil {
		pclass.render_check = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_check)
	}

	if overrides.RenderExpander != nil {
		pclass.render_expander = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_expander)
	}

	if overrides.RenderExtension != nil {
		pclass.render_extension = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_extension)
	}

	if overrides.RenderFocus != nil {
		pclass.render_focus = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_focus)
	}

	if overrides.RenderFrame != nil {
		pclass.render_frame = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_frame)
	}

	if overrides.RenderFrameGap != nil {
		pclass.render_frame_gap = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_frame_gap)
	}

	if overrides.RenderHandle != nil {
		pclass.render_handle = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_handle)
	}

	if overrides.RenderIcon != nil {
		pclass.render_icon = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_icon)
	}

	if overrides.RenderIconSurface != nil {
		pclass.render_icon_surface = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_icon_surface)
	}

	if overrides.RenderLayout != nil {
		pclass.render_layout = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_layout)
	}

	if overrides.RenderLine != nil {
		pclass.render_line = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_line)
	}

	if overrides.RenderOption != nil {
		pclass.render_option = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_option)
	}

	if overrides.RenderSlider != nil {
		pclass.render_slider = (*[0]byte)(C._gotk4_gtk3_ThemingEngineClass_render_slider)
	}

	if classInitFunc != nil {
		class := (*ThemingEngineClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapThemingEngine(obj *coreglib.Object) *ThemingEngine {
	return &ThemingEngine{
		Object: obj,
	}
}

func marshalThemingEngine(p uintptr) (interface{}, error) {
	return wrapThemingEngine(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// BackgroundColor gets the background color for a given state.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the background color.
func (engine *ThemingEngine) BackgroundColor(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GdkRGBA           // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_background_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Border gets the border for a given state as a Border.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the border for.
//
// The function returns the following values:
//
//   - border: return value for the border settings.
func (engine *ThemingEngine) Border(state StateFlags) *Border {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GtkBorder         // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_border(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _border *Border // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _border
}

// BorderColor gets the border color for a given state.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the border color.
func (engine *ThemingEngine) BorderColor(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GdkRGBA           // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_border_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Color gets the foreground color for a given state.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the color for.
//
// The function returns the following values:
//
//   - color: return value for the foreground color.
func (engine *ThemingEngine) Color(state StateFlags) *gdk.RGBA {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GdkRGBA           // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _color *gdk.RGBA // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _color
}

// Direction returns the widget direction used for rendering.
//
// Deprecated: Use gtk_theming_engine_get_state() and check for
// K_STATE_FLAG_DIR_LTR and K_STATE_FLAG_DIR_RTL instead.
//
// The function returns the following values:
//
//   - textDirection: widget direction.
func (engine *ThemingEngine) Direction() TextDirection {
	var _arg0 *C.GtkThemingEngine // out
	var _cret C.GtkTextDirection  // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))

	_cret = C.gtk_theming_engine_get_direction(_arg0)
	runtime.KeepAlive(engine)

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// Font returns the font description for a given state.
//
// Deprecated: Use gtk_theming_engine_get().
//
// The function takes the following parameters:
//
//   - state to retrieve the font for.
//
// The function returns the following values:
//
//   - fontDescription for the given state. This object is owned by GTK+ and
//     should not be freed.
func (engine *ThemingEngine) Font(state StateFlags) *pango.FontDescription {
	var _arg0 *C.GtkThemingEngine     // out
	var _arg1 C.GtkStateFlags         // out
	var _cret *C.PangoFontDescription // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	_cret = C.gtk_theming_engine_get_font(_arg0, _arg1)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _fontDescription *pango.FontDescription // out

	_fontDescription = (*pango.FontDescription)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _fontDescription
}

// JunctionSides returns the widget direction used for rendering.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - junctionSides: widget direction.
func (engine *ThemingEngine) JunctionSides() JunctionSides {
	var _arg0 *C.GtkThemingEngine // out
	var _cret C.GtkJunctionSides  // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))

	_cret = C.gtk_theming_engine_get_junction_sides(_arg0)
	runtime.KeepAlive(engine)

	var _junctionSides JunctionSides // out

	_junctionSides = JunctionSides(_cret)

	return _junctionSides
}

// Margin gets the margin for a given state as a Border.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the border for.
//
// The function returns the following values:
//
//   - margin: return value for the margin settings.
func (engine *ThemingEngine) Margin(state StateFlags) *Border {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GtkBorder         // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_margin(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _margin *Border // out

	_margin = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _margin
}

// Padding gets the padding for a given state as a Border.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - state to retrieve the padding for.
//
// The function returns the following values:
//
//   - padding: return value for the padding settings.
func (engine *ThemingEngine) Padding(state StateFlags) *Border {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateFlags     // out
	var _arg2 C.GtkBorder         // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_padding(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _padding *Border // out

	_padding = (*Border)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _padding
}

// Path returns the widget path used for style matching.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - widgetPath: WidgetPath.
func (engine *ThemingEngine) Path() *WidgetPath {
	var _arg0 *C.GtkThemingEngine // out
	var _cret *C.GtkWidgetPath    // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))

	_cret = C.gtk_theming_engine_get_path(_arg0)
	runtime.KeepAlive(engine)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_widget_path_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// Property gets a property value as retrieved from the style settings that
// apply to the currently rendered element.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - property name.
//   - state to retrieve the value for.
//
// The function returns the following values:
//
//   - value: return location for the property value, you must free this memory
//     using g_value_unset() once you are done with it.
func (engine *ThemingEngine) Property(property string, state StateFlags) coreglib.Value {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.gchar            // out
	var _arg2 C.GtkStateFlags     // out
	var _arg3 C.GValue            // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(property)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkStateFlags(state)

	C.gtk_theming_engine_get_property(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(property)
	runtime.KeepAlive(state)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg3)))
	runtime.SetFinalizer(_value, func(v *coreglib.Value) {
		C.g_value_unset((*C.GValue)(unsafe.Pointer(v.Native())))
	})

	return _value
}

// Screen returns the Screen to which engine currently rendering to.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - screen (optional) or NULL.
func (engine *ThemingEngine) Screen() *gdk.Screen {
	var _arg0 *C.GtkThemingEngine // out
	var _cret *C.GdkScreen        // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))

	_cret = C.gtk_theming_engine_get_screen(_arg0)
	runtime.KeepAlive(engine)

	var _screen *gdk.Screen // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_screen = &gdk.Screen{
				Object: obj,
			}
		}
	}

	return _screen
}

// State returns the state used when rendering.
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - stateFlags: state flags.
func (engine *ThemingEngine) State() StateFlags {
	var _arg0 *C.GtkThemingEngine // out
	var _cret C.GtkStateFlags     // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))

	_cret = C.gtk_theming_engine_get_state(_arg0)
	runtime.KeepAlive(engine)

	var _stateFlags StateFlags // out

	_stateFlags = StateFlags(_cret)

	return _stateFlags
}

// StyleProperty gets the value for a widget style property.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - propertyName: name of the widget style property.
//
// The function returns the following values:
//
//   - value: return location for the property value, free with g_value_unset()
//     after use.
func (engine *ThemingEngine) StyleProperty(propertyName string) coreglib.Value {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.gchar            // out
	var _arg2 C.GValue            // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_theming_engine_get_style_property(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(propertyName)

	var _value coreglib.Value // out

	_value = *coreglib.ValueFromNative(unsafe.Pointer((&_arg2)))

	return _value
}

// HasClass returns TRUE if the currently rendered contents have defined the
// given class name.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - styleClass class name to look up.
//
// The function returns the following values:
//
//   - ok: TRUE if engine has class_name defined.
func (engine *ThemingEngine) HasClass(styleClass string) bool {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.gchar            // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(styleClass)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_theming_engine_has_class(_arg0, _arg1)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(styleClass)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasRegion returns TRUE if the currently rendered contents have the region
// defined. If flags_return is not NULL, it is set to the flags affecting the
// region.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - styleRegion: region name.
//
// The function returns the following values:
//
//   - flags (optional): return location for region flags.
//   - ok: TRUE if region is defined.
func (engine *ThemingEngine) HasRegion(styleRegion string) (RegionFlags, bool) {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.gchar            // out
	var _arg2 C.GtkRegionFlags    // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(styleRegion)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_theming_engine_has_region(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(styleRegion)

	var _flags RegionFlags // out
	var _ok bool           // out

	_flags = RegionFlags(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _flags, _ok
}

// LookupColor looks up and resolves a color name in the current style’s color
// map.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - colorName: color name to lookup.
//
// The function returns the following values:
//
//   - color: return location for the looked up color.
//   - ok: TRUE if color_name was found and resolved, FALSE otherwise.
func (engine *ThemingEngine) LookupColor(colorName string) (*gdk.RGBA, bool) {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.gchar            // out
	var _arg2 C.GdkRGBA           // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(colorName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_theming_engine_lookup_color(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(colorName)

	var _color *gdk.RGBA // out
	var _ok bool         // out

	_color = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _color, _ok
}

// StateIsRunning returns TRUE if there is a transition animation running for
// the current region (see gtk_style_context_push_animatable_region()).
//
// If progress is not NULL, the animation progress will be returned there,
// 0.0 means the state is closest to being FALSE, while 1.0 means it’s closest
// to being TRUE. This means transition animations will run from 0 to 1 when
// state is being set to TRUE and from 1 to 0 when it’s being set to FALSE.
//
// Deprecated: Always returns FALSE.
//
// The function takes the following parameters:
//
//   - state: widget state.
//
// The function returns the following values:
//
//   - progress: return location for the transition progress.
//   - ok: TRUE if there is a running transition animation for state.
func (engine *ThemingEngine) StateIsRunning(state StateType) (float64, bool) {
	var _arg0 *C.GtkThemingEngine // out
	var _arg1 C.GtkStateType      // out
	var _arg2 C.gdouble           // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = C.GtkStateType(state)

	_cret = C.gtk_theming_engine_state_is_running(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(state)

	var _progress float64 // out
	var _ok bool          // out

	_progress = float64(_arg2)
	if _cret != 0 {
		_ok = true
	}

	return _progress, _ok
}

// renderActivity renders an area displaying activity, such as in Spinner,
// or ProgressBar.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderActivity(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_activity

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_activity(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderArrow renders an arrow pointing to a certain direction.
//
// The function takes the following parameters:
//
//   - cr
//   - angle
//   - x
//   - y
//   - size
func (engine *ThemingEngine) renderArrow(cr *cairo.Context, angle, x, y, size float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_arrow

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(angle)
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)
	_arg5 = C.gdouble(size)

	C._gotk4_gtk3_ThemingEngine_virtual_render_arrow(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(angle)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(size)
}

// renderBackground renders the background area of a widget region.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderBackground(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_background

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_background(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderCheck renders a checkmark, as in CheckButton.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderCheck(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_check

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_check(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderExpander renders an element what will expose/expand part of the UI,
// as in Expander.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderExpander(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_expander

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_expander(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderExtension renders a extension to a box, usually a notebook tab.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
//   - gapSide
func (engine *ThemingEngine) renderExtension(cr *cairo.Context, x, y, width, height float64, gapSide PositionType) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_extension

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out
	var _arg6 C.GtkPositionType   // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)
	_arg6 = C.GtkPositionType(gapSide)

	C._gotk4_gtk3_ThemingEngine_virtual_render_extension(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
}

// renderFocus renders the focus indicator.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderFocus(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_focus

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_focus(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderFrame renders the frame around a widget area.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderFrame(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_frame

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_frame(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderFrameGap renders the frame around a widget area with a gap in it.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
//   - gapSide
//   - xy0Gap
//   - xy1Gap
func (engine *ThemingEngine) renderFrameGap(cr *cairo.Context, x, y, width, height float64, gapSide PositionType, xy0Gap, xy1Gap float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_frame_gap

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out
	var _arg6 C.GtkPositionType   // out
	var _arg7 C.gdouble           // out
	var _arg8 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)
	_arg6 = C.GtkPositionType(gapSide)
	_arg7 = C.gdouble(xy0Gap)
	_arg8 = C.gdouble(xy1Gap)

	C._gotk4_gtk3_ThemingEngine_virtual_render_frame_gap(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(gapSide)
	runtime.KeepAlive(xy0Gap)
	runtime.KeepAlive(xy1Gap)
}

// renderHandle renders a handle to drag UI elements, as in Paned.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderHandle(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_handle

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_handle(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderIcon renders an icon given as a Pixbuf.
//
// The function takes the following parameters:
//
//   - cr
//   - pixbuf
//   - x
//   - y
func (engine *ThemingEngine) renderIcon(cr *cairo.Context, pixbuf *gdkpixbuf.Pixbuf, x, y float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_icon

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 *C.GdkPixbuf        // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)

	C._gotk4_gtk3_ThemingEngine_virtual_render_icon(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(pixbuf)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// renderIconSurface renders an icon given as a #cairo_surface_t.
//
// The function takes the following parameters:
//
//   - cr
//   - surface
//   - x
//   - y
func (engine *ThemingEngine) renderIconSurface(cr *cairo.Context, surface *cairo.Surface, x, y float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_icon_surface

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 *C.cairo_surface_t  // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = (*C.cairo_surface_t)(unsafe.Pointer(surface.Native()))
	_arg3 = C.gdouble(x)
	_arg4 = C.gdouble(y)

	C._gotk4_gtk3_ThemingEngine_virtual_render_icon_surface(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(surface)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// renderLayout renders a Layout.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - layout
func (engine *ThemingEngine) renderLayout(cr *cairo.Context, x, y float64, layout *pango.Layout) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_layout

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 *C.PangoLayout      // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = (*C.PangoLayout)(unsafe.Pointer(coreglib.InternObject(layout).Native()))

	C._gotk4_gtk3_ThemingEngine_virtual_render_layout(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(layout)
}

// renderLine renders a line between two points.
//
// The function takes the following parameters:
//
//   - cr
//   - x0
//   - y0
//   - x1
//   - y1
func (engine *ThemingEngine) renderLine(cr *cairo.Context, x0, y0, x1, y1 float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_line

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x0)
	_arg3 = C.gdouble(y0)
	_arg4 = C.gdouble(x1)
	_arg5 = C.gdouble(y1)

	C._gotk4_gtk3_ThemingEngine_virtual_render_line(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x0)
	runtime.KeepAlive(y0)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(y1)
}

// renderOption renders an option, as in RadioButton.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
func (engine *ThemingEngine) renderOption(cr *cairo.Context, x, y, width, height float64) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_option

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)

	C._gotk4_gtk3_ThemingEngine_virtual_render_option(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// renderSlider renders a slider control, as in Scale.
//
// The function takes the following parameters:
//
//   - cr
//   - x
//   - y
//   - width
//   - height
//   - orientation
func (engine *ThemingEngine) renderSlider(cr *cairo.Context, x, y, width, height float64, orientation Orientation) {
	gclass := (*C.GtkThemingEngineClass)(coreglib.PeekParentClass(engine))
	fnarg := gclass.render_slider

	var _arg0 *C.GtkThemingEngine // out
	var _arg1 *C.cairo_t          // out
	var _arg2 C.gdouble           // out
	var _arg3 C.gdouble           // out
	var _arg4 C.gdouble           // out
	var _arg5 C.gdouble           // out
	var _arg6 C.GtkOrientation    // out

	_arg0 = (*C.GtkThemingEngine)(unsafe.Pointer(coreglib.InternObject(engine).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))
	_arg2 = C.gdouble(x)
	_arg3 = C.gdouble(y)
	_arg4 = C.gdouble(width)
	_arg5 = C.gdouble(height)
	_arg6 = C.GtkOrientation(orientation)

	C._gotk4_gtk3_ThemingEngine_virtual_render_slider(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(engine)
	runtime.KeepAlive(cr)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(orientation)
}

// ThemingEngineLoad loads and initializes a theming engine module from the
// standard directories.
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - name: theme engine name to load.
//
// The function returns the following values:
//
//   - themingEngine (optional): theming engine, or NULL if the engine name
//     doesn’t exist.
func ThemingEngineLoad(name string) *ThemingEngine {
	var _arg1 *C.gchar            // out
	var _cret *C.GtkThemingEngine // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_theming_engine_load(_arg1)
	runtime.KeepAlive(name)

	var _themingEngine *ThemingEngine // out

	if _cret != nil {
		_themingEngine = wrapThemingEngine(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _themingEngine
}

// ToggleActionOverrides contains methods that are overridable.
type ToggleActionOverrides struct {
	// Toggled emits the “toggled” signal on the toggle action.
	//
	// Deprecated: since version 3.10.
	Toggled func()
}

func defaultToggleActionOverrides(v *ToggleAction) ToggleActionOverrides {
	return ToggleActionOverrides{
		Toggled: v.toggled,
	}
}

// ToggleAction corresponds roughly to a CheckMenuItem. It has an “active” state
// specifying whether the action has been checked or not.
type ToggleAction struct {
	_ [0]func() // equal guard
	Action
}

var (
	_ coreglib.Objector = (*ToggleAction)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToggleAction, *ToggleActionClass, ToggleActionOverrides](
		GTypeToggleAction,
		initToggleActionClass,
		wrapToggleAction,
		defaultToggleActionOverrides,
	)
}

func initToggleActionClass(gclass unsafe.Pointer, overrides ToggleActionOverrides, classInitFunc func(*ToggleActionClass)) {
	pclass := (*C.GtkToggleActionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToggleAction))))

	if overrides.Toggled != nil {
		pclass.toggled = (*[0]byte)(C._gotk4_gtk3_ToggleActionClass_toggled)
	}

	if classInitFunc != nil {
		class := (*ToggleActionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToggleAction(obj *coreglib.Object) *ToggleAction {
	return &ToggleAction{
		Action: Action{
			Object: obj,
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalToggleAction(p uintptr) (interface{}, error) {
	return wrapToggleAction(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectToggled: should be connected if you wish to perform an action whenever
// the ToggleAction state is changed.
func (action *ToggleAction) ConnectToggled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(action, "toggled", false, unsafe.Pointer(C._gotk4_gtk3_ToggleAction_ConnectToggled), f)
}

// NewToggleAction creates a new ToggleAction object. To add the
// action to a ActionGroup and set the accelerator for the action, call
// gtk_action_group_add_action_with_accel().
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - name: unique name for the action.
//   - label (optional) displayed in menu items and on buttons, or NULL.
//   - tooltip (optional) for the action, or NULL.
//   - stockId (optional): stock icon to display in widgets representing the
//     action, or NULL.
//
// The function returns the following values:
//
//   - toggleAction: new ToggleAction.
func NewToggleAction(name, label, tooltip, stockId string) *ToggleAction {
	var _arg1 *C.gchar           // out
	var _arg2 *C.gchar           // out
	var _arg3 *C.gchar           // out
	var _arg4 *C.gchar           // out
	var _cret *C.GtkToggleAction // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if tooltip != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(tooltip)))
		defer C.free(unsafe.Pointer(_arg3))
	}
	if stockId != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg4))
	}

	_cret = C.gtk_toggle_action_new(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(name)
	runtime.KeepAlive(label)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)

	var _toggleAction *ToggleAction // out

	_toggleAction = wrapToggleAction(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _toggleAction
}

// Active returns the checked state of the toggle action.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: checked state of the toggle action.
func (action *ToggleAction) Active() bool {
	var _arg0 *C.GtkToggleAction // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_toggle_action_get_active(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DrawAsRadio returns whether the action should have proxies like a radio
// action.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - ok: whether the action should have proxies like a radio action.
func (action *ToggleAction) DrawAsRadio() bool {
	var _arg0 *C.GtkToggleAction // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	_cret = C.gtk_toggle_action_get_draw_as_radio(_arg0)
	runtime.KeepAlive(action)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActive sets the checked state on the toggle action.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - isActive: whether the action should be checked or not.
func (action *ToggleAction) SetActive(isActive bool) {
	var _arg0 *C.GtkToggleAction // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if isActive {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_action_set_active(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(isActive)
}

// SetDrawAsRadio sets whether the action should have proxies like a radio
// action.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - drawAsRadio: whether the action should have proxies like a radio action.
func (action *ToggleAction) SetDrawAsRadio(drawAsRadio bool) {
	var _arg0 *C.GtkToggleAction // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	if drawAsRadio {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_action_set_draw_as_radio(_arg0, _arg1)
	runtime.KeepAlive(action)
	runtime.KeepAlive(drawAsRadio)
}

// Toggled emits the “toggled” signal on the toggle action.
//
// Deprecated: since version 3.10.
func (action *ToggleAction) Toggled() {
	var _arg0 *C.GtkToggleAction // out

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C.gtk_toggle_action_toggled(_arg0)
	runtime.KeepAlive(action)
}

// Toggled emits the “toggled” signal on the toggle action.
//
// Deprecated: since version 3.10.
func (action *ToggleAction) toggled() {
	gclass := (*C.GtkToggleActionClass)(coreglib.PeekParentClass(action))
	fnarg := gclass.toggled

	var _arg0 *C.GtkToggleAction // out

	_arg0 = (*C.GtkToggleAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C._gotk4_gtk3_ToggleAction_virtual_toggled(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(action)
}

// ToggleButtonOverrides contains methods that are overridable.
type ToggleButtonOverrides struct {
	// Toggled emits the ToggleButton::toggled signal on the ToggleButton.
	// There is no good reason for an application ever to call this function.
	Toggled func()
}

func defaultToggleButtonOverrides(v *ToggleButton) ToggleButtonOverrides {
	return ToggleButtonOverrides{
		Toggled: v.toggled,
	}
}

// ToggleButton is a Button which will remain “pressed-in” when clicked.
// Clicking again will cause the toggle button to return to its normal state.
//
// A toggle button is created by calling either gtk_toggle_button_new() or
// gtk_toggle_button_new_with_label(). If using the former, it is advisable to
// pack a widget, (such as a Label and/or a Image), into the toggle button’s
// container. (See Button for more information).
//
// The state of a ToggleButton can be set specifically
// using gtk_toggle_button_set_active(), and retrieved using
// gtk_toggle_button_get_active().
//
// To simply switch the state of a toggle button, use
// gtk_toggle_button_toggled().
//
// # CSS nodes
//
// GtkToggleButton has a single CSS node with name button. To differentiate it
// from a plain Button, it gets the .toggle style class.
//
// Creating two ToggleButton widgets.
//
//	static void output_state (GtkToggleButton *source, gpointer user_data) {
//	  printf ("Active: d\n", gtk_toggle_button_get_active (source));
//	}
//
//	void make_toggles (void) {
//	  GtkWidget *window, *toggle1, *toggle2;
//	  GtkWidget *box;
//	  const char *text;
//
//	  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	  box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
//
//	  text = "Hi, I’m a toggle button.";
//	  toggle1 = gtk_toggle_button_new_with_label (text);
//
//	  // Makes this toggle button invisible
//	  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1),
//	                              TRUE);
//
//	  g_signal_connect (toggle1, "toggled",
//	                    G_CALLBACK (output_state),
//	                    NULL);
//	  gtk_container_add (GTK_CONTAINER (box), toggle1);
//
//	  text = "Hi, I’m a toggle button.";
//	  toggle2 = gtk_toggle_button_new_with_label (text);
//	  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2),
//	                              FALSE);
//	  g_signal_connect (toggle2, "toggled",
//	                    G_CALLBACK (output_state),
//	                    NULL);
//	  gtk_container_add (GTK_CONTAINER (box), toggle2);
//
//	  gtk_container_add (GTK_CONTAINER (window), box);
//	  gtk_widget_show_all (window);
//	}.
type ToggleButton struct {
	_ [0]func() // equal guard
	Button
}

var (
	_ Binner            = (*ToggleButton)(nil)
	_ coreglib.Objector = (*ToggleButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToggleButton, *ToggleButtonClass, ToggleButtonOverrides](
		GTypeToggleButton,
		initToggleButtonClass,
		wrapToggleButton,
		defaultToggleButtonOverrides,
	)
}

func initToggleButtonClass(gclass unsafe.Pointer, overrides ToggleButtonOverrides, classInitFunc func(*ToggleButtonClass)) {
	pclass := (*C.GtkToggleButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToggleButton))))

	if overrides.Toggled != nil {
		pclass.toggled = (*[0]byte)(C._gotk4_gtk3_ToggleButtonClass_toggled)
	}

	if classInitFunc != nil {
		class := (*ToggleButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToggleButton(obj *coreglib.Object) *ToggleButton {
	return &ToggleButton{
		Button: Button{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Activatable: Activatable{
				Object: obj,
			},
		},
	}
}

func marshalToggleButton(p uintptr) (interface{}, error) {
	return wrapToggleButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectToggled: should be connected if you wish to perform an action whenever
// the ToggleButton's state is changed.
func (toggleButton *ToggleButton) ConnectToggled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toggleButton, "toggled", false, unsafe.Pointer(C._gotk4_gtk3_ToggleButton_ConnectToggled), f)
}

// NewToggleButton creates a new toggle button. A widget should be packed into
// the button, as in gtk_button_new().
//
// The function returns the following values:
//
//   - toggleButton: new toggle button.
func NewToggleButton() *ToggleButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_toggle_button_new()

	var _toggleButton *ToggleButton // out

	_toggleButton = wrapToggleButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toggleButton
}

// NewToggleButtonWithLabel creates a new toggle button with a text label.
//
// The function takes the following parameters:
//
//   - label: string containing the message to be placed in the toggle button.
//
// The function returns the following values:
//
//   - toggleButton: new toggle button.
func NewToggleButtonWithLabel(label string) *ToggleButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_toggle_button_new_with_label(_arg1)
	runtime.KeepAlive(label)

	var _toggleButton *ToggleButton // out

	_toggleButton = wrapToggleButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toggleButton
}

// NewToggleButtonWithMnemonic creates a new ToggleButton containing a label.
// The label will be created using gtk_label_new_with_mnemonic(), so underscores
// in label indicate the mnemonic for the button.
//
// The function takes the following parameters:
//
//   - label: text of the button, with an underscore in front of the mnemonic
//     character.
//
// The function returns the following values:
//
//   - toggleButton: new ToggleButton.
func NewToggleButtonWithMnemonic(label string) *ToggleButton {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_toggle_button_new_with_mnemonic(_arg1)
	runtime.KeepAlive(label)

	var _toggleButton *ToggleButton // out

	_toggleButton = wrapToggleButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toggleButton
}

// Active queries a ToggleButton and returns its current state. Returns TRUE if
// the toggle button is pressed in and FALSE if it is raised.
//
// The function returns the following values:
//
//   - ok: #gboolean value.
func (toggleButton *ToggleButton) Active() bool {
	var _arg0 *C.GtkToggleButton // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))

	_cret = C.gtk_toggle_button_get_active(_arg0)
	runtime.KeepAlive(toggleButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Inconsistent gets the value set by gtk_toggle_button_set_inconsistent().
//
// The function returns the following values:
//
//   - ok: TRUE if the button is displayed as inconsistent, FALSE otherwise.
func (toggleButton *ToggleButton) Inconsistent() bool {
	var _arg0 *C.GtkToggleButton // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))

	_cret = C.gtk_toggle_button_get_inconsistent(_arg0)
	runtime.KeepAlive(toggleButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Mode retrieves whether the button is displayed as a separate indicator and
// label. See gtk_toggle_button_set_mode().
//
// The function returns the following values:
//
//   - ok: TRUE if the togglebutton is drawn as a separate indicator and label.
func (toggleButton *ToggleButton) Mode() bool {
	var _arg0 *C.GtkToggleButton // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))

	_cret = C.gtk_toggle_button_get_mode(_arg0)
	runtime.KeepAlive(toggleButton)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActive sets the status of the toggle button. Set to TRUE if you want
// the GtkToggleButton to be “pressed in”, and FALSE to raise it. This action
// causes the ToggleButton::toggled signal and the Button::clicked signal to be
// emitted.
//
// The function takes the following parameters:
//
//   - isActive: TRUE or FALSE.
func (toggleButton *ToggleButton) SetActive(isActive bool) {
	var _arg0 *C.GtkToggleButton // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))
	if isActive {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_button_set_active(_arg0, _arg1)
	runtime.KeepAlive(toggleButton)
	runtime.KeepAlive(isActive)
}

// SetInconsistent: if the user has selected a range of elements (such as
// some text or spreadsheet cells) that are affected by a toggle button,
// and the current values in that range are inconsistent, you may want to
// display the toggle in an “in between” state. This function turns on “in
// between” display. Normally you would turn off the inconsistent state again
// if the user toggles the toggle button. This has to be done manually,
// gtk_toggle_button_set_inconsistent() only affects visual appearance,
// it doesn’t affect the semantics of the button.
//
// The function takes the following parameters:
//
//   - setting: TRUE if state is inconsistent.
func (toggleButton *ToggleButton) SetInconsistent(setting bool) {
	var _arg0 *C.GtkToggleButton // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_button_set_inconsistent(_arg0, _arg1)
	runtime.KeepAlive(toggleButton)
	runtime.KeepAlive(setting)
}

// SetMode sets whether the button is displayed as a separate indicator and
// label. You can call this function on a checkbutton or a radiobutton with
// draw_indicator = FALSE to make the button look like a normal button.
//
// This can be used to create linked strip of buttons that work like a
// StackSwitcher.
//
// This function only affects instances of classes like CheckButton and
// RadioButton that derive from ToggleButton, not instances of ToggleButton
// itself.
//
// The function takes the following parameters:
//
//   - drawIndicator: if TRUE, draw the button as a separate indicator and
//     label; if FALSE, draw the button like a normal button.
func (toggleButton *ToggleButton) SetMode(drawIndicator bool) {
	var _arg0 *C.GtkToggleButton // out
	var _arg1 C.gboolean         // out

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))
	if drawIndicator {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_button_set_mode(_arg0, _arg1)
	runtime.KeepAlive(toggleButton)
	runtime.KeepAlive(drawIndicator)
}

// Toggled emits the ToggleButton::toggled signal on the ToggleButton. There is
// no good reason for an application ever to call this function.
func (toggleButton *ToggleButton) Toggled() {
	var _arg0 *C.GtkToggleButton // out

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))

	C.gtk_toggle_button_toggled(_arg0)
	runtime.KeepAlive(toggleButton)
}

// Toggled emits the ToggleButton::toggled signal on the ToggleButton. There is
// no good reason for an application ever to call this function.
func (toggleButton *ToggleButton) toggled() {
	gclass := (*C.GtkToggleButtonClass)(coreglib.PeekParentClass(toggleButton))
	fnarg := gclass.toggled

	var _arg0 *C.GtkToggleButton // out

	_arg0 = (*C.GtkToggleButton)(unsafe.Pointer(coreglib.InternObject(toggleButton).Native()))

	C._gotk4_gtk3_ToggleButton_virtual_toggled(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(toggleButton)
}

// ToggleButtonAccessibleOverrides contains methods that are overridable.
type ToggleButtonAccessibleOverrides struct {
}

func defaultToggleButtonAccessibleOverrides(v *ToggleButtonAccessible) ToggleButtonAccessibleOverrides {
	return ToggleButtonAccessibleOverrides{}
}

type ToggleButtonAccessible struct {
	_ [0]func() // equal guard
	ButtonAccessible
}

var (
	_ coreglib.Objector = (*ToggleButtonAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToggleButtonAccessible, *ToggleButtonAccessibleClass, ToggleButtonAccessibleOverrides](
		GTypeToggleButtonAccessible,
		initToggleButtonAccessibleClass,
		wrapToggleButtonAccessible,
		defaultToggleButtonAccessibleOverrides,
	)
}

func initToggleButtonAccessibleClass(gclass unsafe.Pointer, overrides ToggleButtonAccessibleOverrides, classInitFunc func(*ToggleButtonAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ToggleButtonAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToggleButtonAccessible(obj *coreglib.Object) *ToggleButtonAccessible {
	return &ToggleButtonAccessible{
		ButtonAccessible: ButtonAccessible{
			ContainerAccessible: ContainerAccessible{
				WidgetAccessible: WidgetAccessible{
					Accessible: Accessible{
						AtkObject: atk.AtkObject{
							Object: obj,
						},
					},
					Component: atk.Component{
						Object: obj,
					},
				},
			},
			Object: obj,
			Action: atk.Action{
				Object: obj,
			},
			Image: atk.Image{
				Object: obj,
			},
		},
	}
}

func marshalToggleButtonAccessible(p uintptr) (interface{}, error) {
	return wrapToggleButtonAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ToggleToolButtonOverrides contains methods that are overridable.
type ToggleToolButtonOverrides struct {
	// Toggled: signal emitted whenever the toggle tool button changes state.
	Toggled func()
}

func defaultToggleToolButtonOverrides(v *ToggleToolButton) ToggleToolButtonOverrides {
	return ToggleToolButtonOverrides{
		Toggled: v.toggled,
	}
}

// ToggleToolButton is a ToolItem that contains a toggle button.
//
// Use gtk_toggle_tool_button_new() to create a new GtkToggleToolButton.
//
// # CSS nodes
//
// GtkToggleToolButton has a single CSS node with name togglebutton.
type ToggleToolButton struct {
	_ [0]func() // equal guard
	ToolButton
}

var (
	_ coreglib.Objector = (*ToggleToolButton)(nil)
	_ Binner            = (*ToggleToolButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToggleToolButton, *ToggleToolButtonClass, ToggleToolButtonOverrides](
		GTypeToggleToolButton,
		initToggleToolButtonClass,
		wrapToggleToolButton,
		defaultToggleToolButtonOverrides,
	)
}

func initToggleToolButtonClass(gclass unsafe.Pointer, overrides ToggleToolButtonOverrides, classInitFunc func(*ToggleToolButtonClass)) {
	pclass := (*C.GtkToggleToolButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToggleToolButton))))

	if overrides.Toggled != nil {
		pclass.toggled = (*[0]byte)(C._gotk4_gtk3_ToggleToolButtonClass_toggled)
	}

	if classInitFunc != nil {
		class := (*ToggleToolButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToggleToolButton(obj *coreglib.Object) *ToggleToolButton {
	return &ToggleToolButton{
		ToolButton: ToolButton{
			ToolItem: ToolItem{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Activatable: Activatable{
					Object: obj,
				},
			},
			Object: obj,
			Actionable: Actionable{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalToggleToolButton(p uintptr) (interface{}, error) {
	return wrapToggleToolButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectToggled is emitted whenever the toggle tool button changes state.
func (button *ToggleToolButton) ConnectToggled(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "toggled", false, unsafe.Pointer(C._gotk4_gtk3_ToggleToolButton_ConnectToggled), f)
}

// NewToggleToolButton returns a new ToggleToolButton.
//
// The function returns the following values:
//
//   - toggleToolButton: newly created ToggleToolButton.
func NewToggleToolButton() *ToggleToolButton {
	var _cret *C.GtkToolItem // in

	_cret = C.gtk_toggle_tool_button_new()

	var _toggleToolButton *ToggleToolButton // out

	_toggleToolButton = wrapToggleToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toggleToolButton
}

// NewToggleToolButtonFromStock creates a new ToggleToolButton containing the
// image and text from a stock item. Some stock ids have preprocessor macros
// like K_STOCK_OK and K_STOCK_APPLY.
//
// It is an error if stock_id is not a name of a stock item.
//
// Deprecated: Use gtk_toggle_tool_button_new() instead.
//
// The function takes the following parameters:
//
//   - stockId: name of the stock item.
//
// The function returns the following values:
//
//   - toggleToolButton: new ToggleToolButton.
func NewToggleToolButtonFromStock(stockId string) *ToggleToolButton {
	var _arg1 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_toggle_tool_button_new_from_stock(_arg1)
	runtime.KeepAlive(stockId)

	var _toggleToolButton *ToggleToolButton // out

	_toggleToolButton = wrapToggleToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toggleToolButton
}

// Active queries a ToggleToolButton and returns its current state. Returns TRUE
// if the toggle button is pressed in and FALSE if it is raised.
//
// The function returns the following values:
//
//   - ok: TRUE if the toggle tool button is pressed in, FALSE if not.
func (button *ToggleToolButton) Active() bool {
	var _arg0 *C.GtkToggleToolButton // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkToggleToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_toggle_tool_button_get_active(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetActive sets the status of the toggle tool button. Set to TRUE if you want
// the GtkToggleButton to be “pressed in”, and FALSE to raise it. This action
// causes the toggled signal to be emitted.
//
// The function takes the following parameters:
//
//   - isActive: whether button should be active.
func (button *ToggleToolButton) SetActive(isActive bool) {
	var _arg0 *C.GtkToggleToolButton // out
	var _arg1 C.gboolean             // out

	_arg0 = (*C.GtkToggleToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if isActive {
		_arg1 = C.TRUE
	}

	C.gtk_toggle_tool_button_set_active(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(isActive)
}

// Toggled: signal emitted whenever the toggle tool button changes state.
func (button *ToggleToolButton) toggled() {
	gclass := (*C.GtkToggleToolButtonClass)(coreglib.PeekParentClass(button))
	fnarg := gclass.toggled

	var _arg0 *C.GtkToggleToolButton // out

	_arg0 = (*C.GtkToggleToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	C._gotk4_gtk3_ToggleToolButton_virtual_toggled(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(button)
}

// ToolButtonOverrides contains methods that are overridable.
type ToolButtonOverrides struct {
	// Clicked: signal emitted when the tool button is clicked with the mouse or
	// activated with the keyboard.
	Clicked func()
}

func defaultToolButtonOverrides(v *ToolButton) ToolButtonOverrides {
	return ToolButtonOverrides{
		Clicked: v.clicked,
	}
}

// ToolButton are ToolItems containing buttons.
//
// Use gtk_tool_button_new() to create a new ToolButton.
//
// The label of a ToolButton is determined by the properties
// ToolButton:label-widget, ToolButton:label, and ToolButton:stock-id. If
// ToolButton:label-widget is non-NULL, then that widget is used as the label.
// Otherwise, if ToolButton:label is non-NULL, that string is used as the label.
// Otherwise, if ToolButton:stock-id is non-NULL, the label is determined by the
// stock item. Otherwise, the button does not have a label.
//
// The icon of a ToolButton is determined by the properties
// ToolButton:icon-widget and ToolButton:stock-id. If ToolButton:icon-widget
// is non-NULL, then that widget is used as the icon. Otherwise, if
// ToolButton:stock-id is non-NULL, the icon is determined by the stock item.
// Otherwise, the button does not have a icon.
//
// # CSS nodes
//
// GtkToolButton has a single CSS node with name toolbutton.
type ToolButton struct {
	_ [0]func() // equal guard
	ToolItem

	*coreglib.Object
	Actionable
}

var (
	_ coreglib.Objector = (*ToolButton)(nil)
	_ Binner            = (*ToolButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToolButton, *ToolButtonClass, ToolButtonOverrides](
		GTypeToolButton,
		initToolButtonClass,
		wrapToolButton,
		defaultToolButtonOverrides,
	)
}

func initToolButtonClass(gclass unsafe.Pointer, overrides ToolButtonOverrides, classInitFunc func(*ToolButtonClass)) {
	pclass := (*C.GtkToolButtonClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToolButton))))

	if overrides.Clicked != nil {
		pclass.clicked = (*[0]byte)(C._gotk4_gtk3_ToolButtonClass_clicked)
	}

	if classInitFunc != nil {
		class := (*ToolButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToolButton(obj *coreglib.Object) *ToolButton {
	return &ToolButton{
		ToolItem: ToolItem{
			Bin: Bin{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
			},
			Object: obj,
			Activatable: Activatable{
				Object: obj,
			},
		},
		Object: obj,
		Actionable: Actionable{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
	}
}

func marshalToolButton(p uintptr) (interface{}, error) {
	return wrapToolButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectClicked: this signal is emitted when the tool button is clicked with
// the mouse or activated with the keyboard.
func (button *ToolButton) ConnectClicked(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(button, "clicked", false, unsafe.Pointer(C._gotk4_gtk3_ToolButton_ConnectClicked), f)
}

// NewToolButton creates a new ToolButton using icon_widget as contents and
// label as label.
//
// The function takes the following parameters:
//
//   - iconWidget (optional): widget that will be used as the button contents,
//     or NULL.
//   - label (optional): string that will be used as label, or NULL.
//
// The function returns the following values:
//
//   - toolButton: new ToolButton.
func NewToolButton(iconWidget Widgetter, label string) *ToolButton {
	var _arg1 *C.GtkWidget   // out
	var _arg2 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	if iconWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(iconWidget).Native()))
	}
	if label != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_tool_button_new(_arg1, _arg2)
	runtime.KeepAlive(iconWidget)
	runtime.KeepAlive(label)

	var _toolButton *ToolButton // out

	_toolButton = wrapToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolButton
}

// NewToolButtonFromStock creates a new ToolButton containing the image and text
// from a stock item. Some stock ids have preprocessor macros like K_STOCK_OK
// and K_STOCK_APPLY.
//
// It is an error if stock_id is not a name of a stock item.
//
// Deprecated: Use gtk_tool_button_new() together with
// gtk_image_new_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId: name of the stock item.
//
// The function returns the following values:
//
//   - toolButton: new ToolButton.
func NewToolButtonFromStock(stockId string) *ToolButton {
	var _arg1 *C.gchar       // out
	var _cret *C.GtkToolItem // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_tool_button_new_from_stock(_arg1)
	runtime.KeepAlive(stockId)

	var _toolButton *ToolButton // out

	_toolButton = wrapToolButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolButton
}

// IconName returns the name of the themed icon for the tool button, see
// gtk_tool_button_set_icon_name().
//
// The function returns the following values:
//
//   - utf8 (optional): icon name or NULL if the tool button has no themed icon.
func (button *ToolButton) IconName() string {
	var _arg0 *C.GtkToolButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_icon_name(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// IconWidget: return the widget used as icon widget on button. See
// gtk_tool_button_set_icon_widget().
//
// The function returns the following values:
//
//   - widget (optional) used as icon on button, or NULL.
func (button *ToolButton) IconWidget() Widgetter {
	var _arg0 *C.GtkToolButton // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_icon_widget(_arg0)
	runtime.KeepAlive(button)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Label returns the label used by the tool button, or NULL if the tool button
// doesn’t have a label. or uses a the label from a stock item. The returned
// string is owned by GTK+, and must not be modified or freed.
//
// The function returns the following values:
//
//   - utf8 (optional): label, or NULL.
func (button *ToolButton) Label() string {
	var _arg0 *C.GtkToolButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_label(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// LabelWidget returns the widget used as label on button. See
// gtk_tool_button_set_label_widget().
//
// The function returns the following values:
//
//   - widget (optional) used as label on button, or NULL.
func (button *ToolButton) LabelWidget() Widgetter {
	var _arg0 *C.GtkToolButton // out
	var _cret *C.GtkWidget     // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_label_widget(_arg0)
	runtime.KeepAlive(button)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// StockID returns the name of the stock item. See
// gtk_tool_button_set_stock_id(). The returned string is owned by GTK+ and must
// not be freed or modifed.
//
// Deprecated: Use gtk_tool_button_get_icon_name() instead.
//
// The function returns the following values:
//
//   - utf8: name of the stock item for button.
func (button *ToolButton) StockID() string {
	var _arg0 *C.GtkToolButton // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_stock_id(_arg0)
	runtime.KeepAlive(button)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// UseUnderline returns whether underscores in the label property
// are used as mnemonics on menu items on the overflow menu. See
// gtk_tool_button_set_use_underline().
//
// The function returns the following values:
//
//   - ok: TRUE if underscores in the label property are used as mnemonics on
//     menu items on the overflow menu.
func (button *ToolButton) UseUnderline() bool {
	var _arg0 *C.GtkToolButton // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))

	_cret = C.gtk_tool_button_get_use_underline(_arg0)
	runtime.KeepAlive(button)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetIconName sets the icon for the tool button from a named themed icon. See
// the docs for IconTheme for more details. The ToolButton:icon-name property
// only has an effect if not overridden by non-NULL ToolButton:label-widget,
// ToolButton:icon-widget and ToolButton:stock-id properties.
//
// The function takes the following parameters:
//
//   - iconName (optional): name of the themed icon.
func (button *ToolButton) SetIconName(iconName string) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_tool_button_set_icon_name(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(iconName)
}

// SetIconWidget sets icon as the widget used as icon on button. If icon_widget
// is NULL the icon is determined by the ToolButton:stock-id property. If the
// ToolButton:stock-id property is also NULL, button will not have an icon.
//
// The function takes the following parameters:
//
//   - iconWidget (optional): widget used as icon, or NULL.
func (button *ToolButton) SetIconWidget(iconWidget Widgetter) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if iconWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(iconWidget).Native()))
	}

	C.gtk_tool_button_set_icon_widget(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(iconWidget)
}

// SetLabel sets label as the label used for the tool button. The
// ToolButton:label property only has an effect if not overridden by a non-NULL
// ToolButton:label-widget property. If both the ToolButton:label-widget
// and ToolButton:label properties are NULL, the label is determined by the
// ToolButton:stock-id property. If the ToolButton:stock-id property is also
// NULL, button will not have a label.
//
// The function takes the following parameters:
//
//   - label (optional): string that will be used as label, or NULL.
func (button *ToolButton) SetLabel(label string) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if label != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_tool_button_set_label(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(label)
}

// SetLabelWidget sets label_widget as the widget that will be used as the
// label for button. If label_widget is NULL the ToolButton:label property is
// used as label. If ToolButton:label is also NULL, the label in the stock
// item determined by the ToolButton:stock-id property is used as label.
// If ToolButton:stock-id is also NULL, button does not have a label.
//
// The function takes the following parameters:
//
//   - labelWidget (optional): widget used as label, or NULL.
func (button *ToolButton) SetLabelWidget(labelWidget Widgetter) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 *C.GtkWidget     // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if labelWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(labelWidget).Native()))
	}

	C.gtk_tool_button_set_label_widget(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(labelWidget)
}

// SetStockID sets the name of the stock item. See
// gtk_tool_button_new_from_stock(). The stock_id property only has an effect if
// not overridden by non-NULL ToolButton:label-widget and ToolButton:icon-widget
// properties.
//
// Deprecated: Use gtk_tool_button_set_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId (optional): name of a stock item, or NULL.
func (button *ToolButton) SetStockID(stockId string) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if stockId != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_tool_button_set_stock_id(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(stockId)
}

// SetUseUnderline: if set, an underline in the label property indicates
// that the next character should be used for the mnemonic accelerator key
// in the overflow menu. For example, if the label property is “_Open” and
// use_underline is TRUE, the label on the tool button will be “Open” and the
// item on the overflow menu will have an underlined “O”.
//
// Labels shown on tool buttons never have mnemonics on them; this property only
// affects the menu item on the overflow menu.
//
// The function takes the following parameters:
//
//   - useUnderline: whether the button label has the form “_Open”.
func (button *ToolButton) SetUseUnderline(useUnderline bool) {
	var _arg0 *C.GtkToolButton // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(button).Native()))
	if useUnderline {
		_arg1 = C.TRUE
	}

	C.gtk_tool_button_set_use_underline(_arg0, _arg1)
	runtime.KeepAlive(button)
	runtime.KeepAlive(useUnderline)
}

// Clicked: signal emitted when the tool button is clicked with the mouse or
// activated with the keyboard.
func (toolItem *ToolButton) clicked() {
	gclass := (*C.GtkToolButtonClass)(coreglib.PeekParentClass(toolItem))
	fnarg := gclass.clicked

	var _arg0 *C.GtkToolButton // out

	_arg0 = (*C.GtkToolButton)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	C._gotk4_gtk3_ToolButton_virtual_clicked(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(toolItem)
}

// ToolItemOverrides contains methods that are overridable.
type ToolItemOverrides struct {
	// CreateMenuProxy: signal emitted when the toolbar needs information from
	// tool_item about whether the item should appear in the toolbar overflow
	// menu.
	CreateMenuProxy func() bool
	// ToolbarReconfigured emits the signal ToolItem::toolbar_reconfigured on
	// tool_item. Toolbar and other ToolShell implementations use this function
	// to notify children, when some aspect of their configuration changes.
	ToolbarReconfigured func()
}

func defaultToolItemOverrides(v *ToolItem) ToolItemOverrides {
	return ToolItemOverrides{
		CreateMenuProxy:     v.createMenuProxy,
		ToolbarReconfigured: v.toolbarReconfigured,
	}
}

// ToolItem are widgets that can appear on a toolbar. To create a toolbar
// item that contain something else than a button, use gtk_tool_item_new().
// Use gtk_container_add() to add a child widget to the tool item.
//
// For toolbar items that contain buttons, see the ToolButton, ToggleToolButton
// and RadioToolButton classes.
//
// See the Toolbar class for a description of the toolbar widget, and ToolShell
// for a description of the tool shell interface.
type ToolItem struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	Activatable
}

var (
	_ Binner            = (*ToolItem)(nil)
	_ coreglib.Objector = (*ToolItem)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToolItem, *ToolItemClass, ToolItemOverrides](
		GTypeToolItem,
		initToolItemClass,
		wrapToolItem,
		defaultToolItemOverrides,
	)
}

func initToolItemClass(gclass unsafe.Pointer, overrides ToolItemOverrides, classInitFunc func(*ToolItemClass)) {
	pclass := (*C.GtkToolItemClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToolItem))))

	if overrides.CreateMenuProxy != nil {
		pclass.create_menu_proxy = (*[0]byte)(C._gotk4_gtk3_ToolItemClass_create_menu_proxy)
	}

	if overrides.ToolbarReconfigured != nil {
		pclass.toolbar_reconfigured = (*[0]byte)(C._gotk4_gtk3_ToolItemClass_toolbar_reconfigured)
	}

	if classInitFunc != nil {
		class := (*ToolItemClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToolItem(obj *coreglib.Object) *ToolItem {
	return &ToolItem{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		Activatable: Activatable{
			Object: obj,
		},
	}
}

func marshalToolItem(p uintptr) (interface{}, error) {
	return wrapToolItem(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectCreateMenuProxy: this signal is emitted when the toolbar needs
// information from tool_item about whether the item should appear in the
// toolbar overflow menu. In response the tool item should either
//
// - call gtk_tool_item_set_proxy_menu_item() with a NULL pointer and return
// TRUE to indicate that the item should not appear in the overflow menu
//
// - call gtk_tool_item_set_proxy_menu_item() with a new menu item and return
// TRUE, or
//
// - return FALSE to indicate that the signal was not handled by the item.
// This means that the item will not appear in the overflow menu unless a later
// handler installs a menu item.
//
// The toolbar may cache the result of this signal. When the tool item changes
// how it will respond to this signal it must call gtk_tool_item_rebuild_menu()
// to invalidate the cache and ensure that the toolbar rebuilds its overflow
// menu.
func (toolItem *ToolItem) ConnectCreateMenuProxy(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolItem, "create-menu-proxy", false, unsafe.Pointer(C._gotk4_gtk3_ToolItem_ConnectCreateMenuProxy), f)
}

// ConnectToolbarReconfigured: this signal is emitted when some property of
// the toolbar that the item is a child of changes. For custom subclasses of
// ToolItem, the default handler of this signal use the functions
//
// - gtk_tool_shell_get_orientation()
//
// - gtk_tool_shell_get_style()
//
// - gtk_tool_shell_get_icon_size()
//
// - gtk_tool_shell_get_relief_style() to find out what the toolbar should look
// like and change themselves accordingly.
func (toolItem *ToolItem) ConnectToolbarReconfigured(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolItem, "toolbar-reconfigured", false, unsafe.Pointer(C._gotk4_gtk3_ToolItem_ConnectToolbarReconfigured), f)
}

// NewToolItem creates a new ToolItem.
//
// The function returns the following values:
//
//   - toolItem: new ToolItem.
func NewToolItem() *ToolItem {
	var _cret *C.GtkToolItem // in

	_cret = C.gtk_tool_item_new()

	var _toolItem *ToolItem // out

	_toolItem = wrapToolItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolItem
}

// EllipsizeMode returns the ellipsize mode used for tool_item. Custom
// subclasses of ToolItem should call this function to find out how text should
// be ellipsized.
//
// The function returns the following values:
//
//   - ellipsizeMode indicating how text in tool_item should be ellipsized.
func (toolItem *ToolItem) EllipsizeMode() pango.EllipsizeMode {
	var _arg0 *C.GtkToolItem       // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_ellipsize_mode(_arg0)
	runtime.KeepAlive(toolItem)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// Expand returns whether tool_item is allocated extra space. See
// gtk_tool_item_set_expand().
//
// The function returns the following values:
//
//   - ok: TRUE if tool_item is allocated extra space.
func (toolItem *ToolItem) Expand() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_expand(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Homogeneous returns whether tool_item is the same size as other homogeneous
// items. See gtk_tool_item_set_homogeneous().
//
// The function returns the following values:
//
//   - ok: TRUE if the item is the same size as other homogeneous items.
func (toolItem *ToolItem) Homogeneous() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_homogeneous(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IconSize returns the icon size used for tool_item. Custom subclasses of
// ToolItem should call this function to find out what size icons they should
// use.
//
// The function returns the following values:
//
//   - gint indicating the icon size used for tool_item.
func (toolItem *ToolItem) IconSize() int {
	var _arg0 *C.GtkToolItem // out
	var _cret C.GtkIconSize  // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_icon_size(_arg0)
	runtime.KeepAlive(toolItem)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IsImportant returns whether tool_item is considered important. See
// gtk_tool_item_set_is_important().
//
// The function returns the following values:
//
//   - ok: TRUE if tool_item is considered important.
func (toolItem *ToolItem) IsImportant() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_is_important(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Orientation returns the orientation used for tool_item. Custom subclasses of
// ToolItem should call this function to find out what size icons they should
// use.
//
// The function returns the following values:
//
//   - orientation indicating the orientation used for tool_item.
func (toolItem *ToolItem) Orientation() Orientation {
	var _arg0 *C.GtkToolItem   // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_orientation(_arg0)
	runtime.KeepAlive(toolItem)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// ProxyMenuItem: if menu_item_id matches the string passed to
// gtk_tool_item_set_proxy_menu_item() return the corresponding MenuItem.
//
// Custom subclasses of ToolItem should use this function to update their menu
// item when the ToolItem changes. That the menu_item_ids must match ensures
// that a ToolItem will not inadvertently change a menu item that they did not
// create.
//
// The function takes the following parameters:
//
//   - menuItemId: string used to identify the menu item.
//
// The function returns the following values:
//
//   - widget (optional) passed to gtk_tool_item_set_proxy_menu_item(), if the
//     menu_item_ids match.
func (toolItem *ToolItem) ProxyMenuItem(menuItemId string) Widgetter {
	var _arg0 *C.GtkToolItem // out
	var _arg1 *C.gchar       // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(menuItemId)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_tool_item_get_proxy_menu_item(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(menuItemId)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// ReliefStyle returns the relief style of tool_item. See
// gtk_button_set_relief(). Custom subclasses of ToolItem should call this
// function in the handler of the ToolItem::toolbar_reconfigured signal to find
// out the relief style of buttons.
//
// The function returns the following values:
//
//   - reliefStyle indicating the relief style used for tool_item.
func (toolItem *ToolItem) ReliefStyle() ReliefStyle {
	var _arg0 *C.GtkToolItem   // out
	var _cret C.GtkReliefStyle // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_relief_style(_arg0)
	runtime.KeepAlive(toolItem)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// TextAlignment returns the text alignment used for tool_item. Custom
// subclasses of ToolItem should call this function to find out how text should
// be aligned.
//
// The function returns the following values:
//
//   - gfloat indicating the horizontal text alignment used for tool_item.
func (toolItem *ToolItem) TextAlignment() float32 {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gfloat       // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_text_alignment(_arg0)
	runtime.KeepAlive(toolItem)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// TextOrientation returns the text orientation used for tool_item. Custom
// subclasses of ToolItem should call this function to find out how text should
// be orientated.
//
// The function returns the following values:
//
//   - orientation indicating the text orientation used for tool_item.
func (toolItem *ToolItem) TextOrientation() Orientation {
	var _arg0 *C.GtkToolItem   // out
	var _cret C.GtkOrientation // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_text_orientation(_arg0)
	runtime.KeepAlive(toolItem)

	var _orientation Orientation // out

	_orientation = Orientation(_cret)

	return _orientation
}

// TextSizeGroup returns the size group used for labels in tool_item. Custom
// subclasses of ToolItem should call this function and use the size group for
// labels.
//
// The function returns the following values:
//
//   - sizeGroup: SizeGroup.
func (toolItem *ToolItem) TextSizeGroup() *SizeGroup {
	var _arg0 *C.GtkToolItem  // out
	var _cret *C.GtkSizeGroup // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_text_size_group(_arg0)
	runtime.KeepAlive(toolItem)

	var _sizeGroup *SizeGroup // out

	_sizeGroup = wrapSizeGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _sizeGroup
}

// ToolbarStyle returns the toolbar style used for tool_item. Custom
// subclasses of ToolItem should call this function in the handler of the
// GtkToolItem::toolbar_reconfigured signal to find out in what style the
// toolbar is displayed and change themselves accordingly
//
// Possibilities are:
//
// - GTK_TOOLBAR_BOTH, meaning the tool item should show both an icon and a
// label, stacked vertically
//
// - GTK_TOOLBAR_ICONS, meaning the toolbar shows only icons
//
// - GTK_TOOLBAR_TEXT, meaning the tool item should only show text
//
// - GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show both an icon and
// a label, arranged horizontally.
//
// The function returns the following values:
//
//   - toolbarStyle indicating the toolbar style used for tool_item.
func (toolItem *ToolItem) ToolbarStyle() ToolbarStyle {
	var _arg0 *C.GtkToolItem    // out
	var _cret C.GtkToolbarStyle // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_toolbar_style(_arg0)
	runtime.KeepAlive(toolItem)

	var _toolbarStyle ToolbarStyle // out

	_toolbarStyle = ToolbarStyle(_cret)

	return _toolbarStyle
}

// UseDragWindow returns whether tool_item has a drag window. See
// gtk_tool_item_set_use_drag_window().
//
// The function returns the following values:
//
//   - ok: TRUE if tool_item uses a drag window.
func (toolItem *ToolItem) UseDragWindow() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_use_drag_window(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleHorizontal returns whether the tool_item is visible on toolbars that
// are docked horizontally.
//
// The function returns the following values:
//
//   - ok: TRUE if tool_item is visible on toolbars that are docked
//     horizontally.
func (toolItem *ToolItem) VisibleHorizontal() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_visible_horizontal(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VisibleVertical returns whether tool_item is visible when the toolbar is
// docked vertically. See gtk_tool_item_set_visible_vertical().
//
// The function returns the following values:
//
//   - ok: whether tool_item is visible when the toolbar is docked vertically.
func (toolItem *ToolItem) VisibleVertical() bool {
	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_get_visible_vertical(_arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RebuildMenu: calling this function signals to the toolbar that the overflow
// menu item for tool_item has changed. If the overflow menu is visible when
// this function it called, the menu will be rebuilt.
//
// The function must be called when the tool item changes what it will do in
// response to the ToolItem::create-menu-proxy signal.
func (toolItem *ToolItem) RebuildMenu() {
	var _arg0 *C.GtkToolItem // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	C.gtk_tool_item_rebuild_menu(_arg0)
	runtime.KeepAlive(toolItem)
}

// RetrieveProxyMenuItem returns the MenuItem that was last set by
// gtk_tool_item_set_proxy_menu_item(), ie. the MenuItem that is going to appear
// in the overflow menu.
//
// The function returns the following values:
//
//   - widget that is going to appear in the overflow menu for tool_item.
func (toolItem *ToolItem) RetrieveProxyMenuItem() Widgetter {
	var _arg0 *C.GtkToolItem // out
	var _cret *C.GtkWidget   // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C.gtk_tool_item_retrieve_proxy_menu_item(_arg0)
	runtime.KeepAlive(toolItem)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// SetExpand sets whether tool_item is allocated extra space when there is more
// room on the toolbar then needed for the items. The effect is that the item
// gets bigger when the toolbar gets bigger and smaller when the toolbar gets
// smaller.
//
// The function takes the following parameters:
//
//   - expand: whether tool_item is allocated extra space.
func (toolItem *ToolItem) SetExpand(expand bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if expand {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_expand(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(expand)
}

// SetHomogeneous sets whether tool_item is to be allocated the same size as
// other homogeneous items. The effect is that all homogeneous items will have
// the same width as the widest of the items.
//
// The function takes the following parameters:
//
//   - homogeneous: whether tool_item is the same size as other homogeneous
//     items.
func (toolItem *ToolItem) SetHomogeneous(homogeneous bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if homogeneous {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_homogeneous(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(homogeneous)
}

// SetIsImportant sets whether tool_item should be considered important.
// The ToolButton class uses this property to determine whether to show or hide
// its label when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ. The result is
// that only tool buttons with the “is_important” property set have labels,
// an effect known as “priority text”.
//
// The function takes the following parameters:
//
//   - isImportant: whether the tool item should be considered important.
func (toolItem *ToolItem) SetIsImportant(isImportant bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if isImportant {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_is_important(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(isImportant)
}

// SetProxyMenuItem sets the MenuItem used in the toolbar overflow menu.
// The menu_item_id is used to identify the caller of this function and should
// also be used with gtk_tool_item_get_proxy_menu_item().
//
// See also ToolItem::create-menu-proxy.
//
// The function takes the following parameters:
//
//   - menuItemId: string used to identify menu_item.
//   - menuItem (optional) to use in the overflow menu, or NULL.
func (toolItem *ToolItem) SetProxyMenuItem(menuItemId string, menuItem Widgetter) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 *C.gchar       // out
	var _arg2 *C.GtkWidget   // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(menuItemId)))
	defer C.free(unsafe.Pointer(_arg1))
	if menuItem != nil {
		_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(menuItem).Native()))
	}

	C.gtk_tool_item_set_proxy_menu_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(menuItemId)
	runtime.KeepAlive(menuItem)
}

// SetTooltipMarkup sets the markup text to be displayed as tooltip on the item.
// See gtk_widget_set_tooltip_markup().
//
// The function takes the following parameters:
//
//   - markup text to be used as tooltip for tool_item.
func (toolItem *ToolItem) SetTooltipMarkup(markup string) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_tool_item_set_tooltip_markup(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(markup)
}

// SetTooltipText sets the text to be displayed as tooltip on the item.
// See gtk_widget_set_tooltip_text().
//
// The function takes the following parameters:
//
//   - text to be used as tooltip for tool_item.
func (toolItem *ToolItem) SetTooltipText(text string) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 *C.gchar       // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_tool_item_set_tooltip_text(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(text)
}

// SetUseDragWindow sets whether tool_item has a drag window. When TRUE the
// toolitem can be used as a drag source through gtk_drag_source_set(). When
// tool_item has a drag window it will intercept all events, even those that
// would otherwise be sent to a child of tool_item.
//
// The function takes the following parameters:
//
//   - useDragWindow: whether tool_item has a drag window.
func (toolItem *ToolItem) SetUseDragWindow(useDragWindow bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if useDragWindow {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_use_drag_window(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(useDragWindow)
}

// SetVisibleHorizontal sets whether tool_item is visible when the toolbar is
// docked horizontally.
//
// The function takes the following parameters:
//
//   - visibleHorizontal: whether tool_item is visible when in horizontal mode.
func (toolItem *ToolItem) SetVisibleHorizontal(visibleHorizontal bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if visibleHorizontal {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_visible_horizontal(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(visibleHorizontal)
}

// SetVisibleVertical sets whether tool_item is visible when the toolbar is
// docked vertically. Some tool items, such as text entries, are too wide to be
// useful on a vertically docked toolbar. If visible_vertical is FALSE tool_item
// will not appear on toolbars that are docked vertically.
//
// The function takes the following parameters:
//
//   - visibleVertical: whether tool_item is visible when the toolbar is in
//     vertical mode.
func (toolItem *ToolItem) SetVisibleVertical(visibleVertical bool) {
	var _arg0 *C.GtkToolItem // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	if visibleVertical {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_set_visible_vertical(_arg0, _arg1)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(visibleVertical)
}

// ToolbarReconfigured emits the signal ToolItem::toolbar_reconfigured on
// tool_item. Toolbar and other ToolShell implementations use this function to
// notify children, when some aspect of their configuration changes.
func (toolItem *ToolItem) ToolbarReconfigured() {
	var _arg0 *C.GtkToolItem // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	C.gtk_tool_item_toolbar_reconfigured(_arg0)
	runtime.KeepAlive(toolItem)
}

// createMenuProxy: signal emitted when the toolbar needs information from
// tool_item about whether the item should appear in the toolbar overflow menu.
func (toolItem *ToolItem) createMenuProxy() bool {
	gclass := (*C.GtkToolItemClass)(coreglib.PeekParentClass(toolItem))
	fnarg := gclass.create_menu_proxy

	var _arg0 *C.GtkToolItem // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	_cret = C._gotk4_gtk3_ToolItem_virtual_create_menu_proxy(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(toolItem)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// toolbarReconfigured emits the signal ToolItem::toolbar_reconfigured on
// tool_item. Toolbar and other ToolShell implementations use this function to
// notify children, when some aspect of their configuration changes.
func (toolItem *ToolItem) toolbarReconfigured() {
	gclass := (*C.GtkToolItemClass)(coreglib.PeekParentClass(toolItem))
	fnarg := gclass.toolbar_reconfigured

	var _arg0 *C.GtkToolItem // out

	_arg0 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))

	C._gotk4_gtk3_ToolItem_virtual_toolbar_reconfigured(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(toolItem)
}

// ToolItemGroupOverrides contains methods that are overridable.
type ToolItemGroupOverrides struct {
}

func defaultToolItemGroupOverrides(v *ToolItemGroup) ToolItemGroupOverrides {
	return ToolItemGroupOverrides{}
}

// ToolItemGroup is used together with ToolPalette to add ToolItems to a palette
// like container with different categories and drag and drop support.
//
// # CSS nodes
//
// GtkToolItemGroup has a single CSS node named toolitemgroup.
type ToolItemGroup struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	atk.ImplementorIface
	coreglib.InitiallyUnowned
	Buildable
	ToolShell
	Widget
}

var (
	_ Containerer       = (*ToolItemGroup)(nil)
	_ coreglib.Objector = (*ToolItemGroup)(nil)
	_ Widgetter         = (*ToolItemGroup)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToolItemGroup, *ToolItemGroupClass, ToolItemGroupOverrides](
		GTypeToolItemGroup,
		initToolItemGroupClass,
		wrapToolItemGroup,
		defaultToolItemGroupOverrides,
	)
}

func initToolItemGroupClass(gclass unsafe.Pointer, overrides ToolItemGroupOverrides, classInitFunc func(*ToolItemGroupClass)) {
	if classInitFunc != nil {
		class := (*ToolItemGroupClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToolItemGroup(obj *coreglib.Object) *ToolItemGroup {
	return &ToolItemGroup{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		ImplementorIface: atk.ImplementorIface{
			Object: obj,
		},
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Buildable: Buildable{
			Object: obj,
		},
		ToolShell: ToolShell{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalToolItemGroup(p uintptr) (interface{}, error) {
	return wrapToolItemGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewToolItemGroup creates a new tool item group with label label.
//
// The function takes the following parameters:
//
//   - label of the new group.
//
// The function returns the following values:
//
//   - toolItemGroup: new ToolItemGroup.
func NewToolItemGroup(label string) *ToolItemGroup {
	var _arg1 *C.gchar     // out
	var _cret *C.GtkWidget // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_tool_item_group_new(_arg1)
	runtime.KeepAlive(label)

	var _toolItemGroup *ToolItemGroup // out

	_toolItemGroup = wrapToolItemGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolItemGroup
}

// Collapsed gets whether group is collapsed or expanded.
//
// The function returns the following values:
//
//   - ok: TRUE if group is collapsed, FALSE if it is expanded.
func (group *ToolItemGroup) Collapsed() bool {
	var _arg0 *C.GtkToolItemGroup // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_collapsed(_arg0)
	runtime.KeepAlive(group)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DropItem gets the tool item at position (x, y).
//
// The function takes the following parameters:
//
//   - x position.
//   - y position.
//
// The function returns the following values:
//
//   - toolItem at position (x, y).
func (group *ToolItemGroup) DropItem(x, y int) *ToolItem {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 C.gint              // out
	var _arg2 C.gint              // out
	var _cret *C.GtkToolItem      // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_tool_item_group_get_drop_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _toolItem *ToolItem // out

	_toolItem = wrapToolItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolItem
}

// Ellipsize gets the ellipsization mode of group.
//
// The function returns the following values:
//
//   - ellipsizeMode of group.
func (group *ToolItemGroup) Ellipsize() pango.EllipsizeMode {
	var _arg0 *C.GtkToolItemGroup  // out
	var _cret C.PangoEllipsizeMode // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_ellipsize(_arg0)
	runtime.KeepAlive(group)

	var _ellipsizeMode pango.EllipsizeMode // out

	_ellipsizeMode = pango.EllipsizeMode(_cret)

	return _ellipsizeMode
}

// HeaderRelief gets the relief mode of the header button of group.
//
// The function returns the following values:
//
//   - reliefStyle: ReliefStyle.
func (group *ToolItemGroup) HeaderRelief() ReliefStyle {
	var _arg0 *C.GtkToolItemGroup // out
	var _cret C.GtkReliefStyle    // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_header_relief(_arg0)
	runtime.KeepAlive(group)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// ItemPosition gets the position of item in group as index.
//
// The function takes the following parameters:
//
//   - item: ToolItem.
//
// The function returns the following values:
//
//   - gint: index of item in group or -1 if item is no child of group.
func (group *ToolItemGroup) ItemPosition(item *ToolItem) int {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 *C.GtkToolItem      // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))

	_cret = C.gtk_tool_item_group_get_item_position(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(item)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Label gets the label of group.
//
// The function returns the following values:
//
//   - utf8: label of group. The label is an internal string of group and must
//     not be modified. Note that NULL is returned if a custom label has been
//     set with gtk_tool_item_group_set_label_widget().
func (group *ToolItemGroup) Label() string {
	var _arg0 *C.GtkToolItemGroup // out
	var _cret *C.gchar            // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_label(_arg0)
	runtime.KeepAlive(group)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// LabelWidget gets the label widget of group. See
// gtk_tool_item_group_set_label_widget().
//
// The function returns the following values:
//
//   - widget: label widget of group.
func (group *ToolItemGroup) LabelWidget() Widgetter {
	var _arg0 *C.GtkToolItemGroup // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_label_widget(_arg0)
	runtime.KeepAlive(group)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// NItems gets the number of tool items in group.
//
// The function returns the following values:
//
//   - guint: number of tool items in group.
func (group *ToolItemGroup) NItems() uint {
	var _arg0 *C.GtkToolItemGroup // out
	var _cret C.guint             // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_item_group_get_n_items(_arg0)
	runtime.KeepAlive(group)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// NthItem gets the tool item at index in group.
//
// The function takes the following parameters:
//
//   - index: index.
//
// The function returns the following values:
//
//   - toolItem at index.
func (group *ToolItemGroup) NthItem(index uint) *ToolItem {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 C.guint             // out
	var _cret *C.GtkToolItem      // in

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = C.guint(index)

	_cret = C.gtk_tool_item_group_get_nth_item(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(index)

	var _toolItem *ToolItem // out

	_toolItem = wrapToolItem(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolItem
}

// Insert inserts item at position in the list of children of group.
//
// The function takes the following parameters:
//
//   - item to insert into group.
//   - position of item in group, starting with 0. The position -1 means end of
//     list.
func (group *ToolItemGroup) Insert(item *ToolItem, position int) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 *C.GtkToolItem      // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))
	_arg2 = C.gint(position)

	C.gtk_tool_item_group_insert(_arg0, _arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(item)
	runtime.KeepAlive(position)
}

// SetCollapsed sets whether the group should be collapsed or expanded.
//
// The function takes the following parameters:
//
//   - collapsed: whether the group should be collapsed or expanded.
func (group *ToolItemGroup) SetCollapsed(collapsed bool) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 C.gboolean          // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	if collapsed {
		_arg1 = C.TRUE
	}

	C.gtk_tool_item_group_set_collapsed(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(collapsed)
}

// SetEllipsize sets the ellipsization mode which should be used by labels in
// group.
//
// The function takes the following parameters:
//
//   - ellipsize labels in group should use.
func (group *ToolItemGroup) SetEllipsize(ellipsize pango.EllipsizeMode) {
	var _arg0 *C.GtkToolItemGroup  // out
	var _arg1 C.PangoEllipsizeMode // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = C.PangoEllipsizeMode(ellipsize)

	C.gtk_tool_item_group_set_ellipsize(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(ellipsize)
}

// SetHeaderRelief: set the button relief of the group header. See
// gtk_button_set_relief() for details.
//
// The function takes the following parameters:
//
//   - style: ReliefStyle.
func (group *ToolItemGroup) SetHeaderRelief(style ReliefStyle) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 C.GtkReliefStyle    // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = C.GtkReliefStyle(style)

	C.gtk_tool_item_group_set_header_relief(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(style)
}

// SetItemPosition sets the position of item in the list of children of group.
//
// The function takes the following parameters:
//
//   - item to move to a new position, should be a child of group.
//   - position: new position of item in group, starting with 0. The position -1
//     means end of list.
func (group *ToolItemGroup) SetItemPosition(item *ToolItem, position int) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 *C.GtkToolItem      // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))
	_arg2 = C.gint(position)

	C.gtk_tool_item_group_set_item_position(_arg0, _arg1, _arg2)
	runtime.KeepAlive(group)
	runtime.KeepAlive(item)
	runtime.KeepAlive(position)
}

// SetLabel sets the label of the tool item group. The label is displayed in the
// header of the group.
//
// The function takes the following parameters:
//
//   - label: new human-readable label of of the group.
func (group *ToolItemGroup) SetLabel(label string) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 *C.gchar            // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(label)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_tool_item_group_set_label(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(label)
}

// SetLabelWidget sets the label of the tool item group. The label widget is
// displayed in the header of the group, in place of the usual label.
//
// The function takes the following parameters:
//
//   - labelWidget: widget to be displayed in place of the usual label.
func (group *ToolItemGroup) SetLabelWidget(labelWidget Widgetter) {
	var _arg0 *C.GtkToolItemGroup // out
	var _arg1 *C.GtkWidget        // out

	_arg0 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(labelWidget).Native()))

	C.gtk_tool_item_group_set_label_widget(_arg0, _arg1)
	runtime.KeepAlive(group)
	runtime.KeepAlive(labelWidget)
}

// ToolPaletteOverrides contains methods that are overridable.
type ToolPaletteOverrides struct {
}

func defaultToolPaletteOverrides(v *ToolPalette) ToolPaletteOverrides {
	return ToolPaletteOverrides{}
}

// ToolPalette allows you to add ToolItems to a palette-like container with
// different categories and drag and drop support.
//
// A ToolPalette is created with a call to gtk_tool_palette_new().
//
// ToolItems cannot be added directly to a ToolPalette - instead they are
// added to a ToolItemGroup which can than be added to a ToolPalette. To add a
// ToolItemGroup to a ToolPalette, use gtk_container_add().
//
//	static void
//	passive_canvas_drag_data_received (GtkWidget        *widget,
//	                                   GdkDragContext   *context,
//	                                   gint              x,
//	                                   gint              y,
//	                                   GtkSelectionData *selection,
//	                                   guint             info,
//	                                   guint             time,
//	                                   gpointer          data)
//	{
//	  GtkWidget *palette;
//	  GtkWidget *item;
//
//	  // Get the dragged item
//	  palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context),
//	                                     GTK_TYPE_TOOL_PALETTE);
//	  if (palette != NULL)
//	    item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
//	                                           selection);
//
//	  // Do something with item
//	}
//
//	GtkWidget *target, palette;
//
//	palette = gtk_tool_palette_new ();
//	target = gtk_drawing_area_new ();
//
//	g_signal_connect (G_OBJECT (target), "drag-data-received",
//	                  G_CALLBACK (passive_canvas_drag_data_received), NULL);
//	gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette), target,
//	                                GTK_DEST_DEFAULT_ALL,
//	                                GTK_TOOL_PALETTE_DRAG_ITEMS,
//	                                GDK_ACTION_COPY);
//
// # CSS nodes
//
// GtkToolPalette has a single CSS node named toolpalette.
type ToolPalette struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Orientable
	Scrollable
}

var (
	_ Containerer       = (*ToolPalette)(nil)
	_ coreglib.Objector = (*ToolPalette)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToolPalette, *ToolPaletteClass, ToolPaletteOverrides](
		GTypeToolPalette,
		initToolPaletteClass,
		wrapToolPalette,
		defaultToolPaletteOverrides,
	)
}

func initToolPaletteClass(gclass unsafe.Pointer, overrides ToolPaletteOverrides, classInitFunc func(*ToolPaletteClass)) {
	if classInitFunc != nil {
		class := (*ToolPaletteClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToolPalette(obj *coreglib.Object) *ToolPalette {
	return &ToolPalette{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Orientable: Orientable{
			Object: obj,
		},
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalToolPalette(p uintptr) (interface{}, error) {
	return wrapToolPalette(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewToolPalette creates a new tool palette.
//
// The function returns the following values:
//
//   - toolPalette: new ToolPalette.
func NewToolPalette() *ToolPalette {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_tool_palette_new()

	var _toolPalette *ToolPalette // out

	_toolPalette = wrapToolPalette(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolPalette
}

// AddDragDest sets palette as drag source (see
// gtk_tool_palette_set_drag_source()) and sets widget as a drag destination for
// drags from palette. See gtk_drag_dest_set().
//
// The function takes the following parameters:
//
//   - widget which should be a drag destination for palette.
//   - flags that specify what actions GTK+ should take for drops on that
//     widget.
//   - targets which the widget should support.
//   - actions which the widget should suppport.
func (palette *ToolPalette) AddDragDest(widget Widgetter, flags DestDefaults, targets ToolPaletteDragTargets, actions gdk.DragAction) {
	var _arg0 *C.GtkToolPalette           // out
	var _arg1 *C.GtkWidget                // out
	var _arg2 C.GtkDestDefaults           // out
	var _arg3 C.GtkToolPaletteDragTargets // out
	var _arg4 C.GdkDragAction             // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg2 = C.GtkDestDefaults(flags)
	_arg3 = C.GtkToolPaletteDragTargets(targets)
	_arg4 = C.GdkDragAction(actions)

	C.gtk_tool_palette_add_drag_dest(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// DragItem: get the dragged item from the selection. This could be a ToolItem
// or a ToolItemGroup.
//
// The function takes the following parameters:
//
//   - selection: SelectionData.
//
// The function returns the following values:
//
//   - widget: dragged item in selection.
func (palette *ToolPalette) DragItem(selection *SelectionData) Widgetter {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkSelectionData // out
	var _cret *C.GtkWidget        // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selection)))

	_cret = C.gtk_tool_palette_get_drag_item(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(selection)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// DropGroup gets the group at position (x, y).
//
// The function takes the following parameters:
//
//   - x position.
//   - y position.
//
// The function returns the following values:
//
//   - toolItemGroup (optional) at position or NULL if there is no such group.
func (palette *ToolPalette) DropGroup(x, y int) *ToolItemGroup {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 C.gint              // out
	var _arg2 C.gint              // out
	var _cret *C.GtkToolItemGroup // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_tool_palette_get_drop_group(_arg0, _arg1, _arg2)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _toolItemGroup *ToolItemGroup // out

	if _cret != nil {
		_toolItemGroup = wrapToolItemGroup(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _toolItemGroup
}

// DropItem gets the item at position (x, y). See
// gtk_tool_palette_get_drop_group().
//
// The function takes the following parameters:
//
//   - x position.
//   - y position.
//
// The function returns the following values:
//
//   - toolItem (optional) at position or NULL if there is no such item.
func (palette *ToolPalette) DropItem(x, y int) *ToolItem {
	var _arg0 *C.GtkToolPalette // out
	var _arg1 C.gint            // out
	var _arg2 C.gint            // out
	var _cret *C.GtkToolItem    // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_tool_palette_get_drop_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _toolItem *ToolItem // out

	if _cret != nil {
		_toolItem = wrapToolItem(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _toolItem
}

// Exclusive gets whether group is exclusive or not. See
// gtk_tool_palette_set_exclusive().
//
// The function takes the following parameters:
//
//   - group which is a child of palette.
//
// The function returns the following values:
//
//   - ok: TRUE if group is exclusive.
func (palette *ToolPalette) Exclusive(group *ToolItemGroup) bool {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_palette_get_exclusive(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Expand gets whether group should be given extra space. See
// gtk_tool_palette_set_expand().
//
// The function takes the following parameters:
//
//   - group which is a child of palette.
//
// The function returns the following values:
//
//   - ok: TRUE if group should be given extra space, FALSE otherwise.
func (palette *ToolPalette) Expand(group *ToolItemGroup) bool {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_palette_get_expand(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// GroupPosition gets the position of group in palette as index. See
// gtk_tool_palette_set_group_position().
//
// The function takes the following parameters:
//
//   - group: ToolItemGroup.
//
// The function returns the following values:
//
//   - gint: index of group or -1 if group is not a child of palette.
func (palette *ToolPalette) GroupPosition(group *ToolItemGroup) int {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))

	_cret = C.gtk_tool_palette_get_group_position(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// HAdjustment gets the horizontal adjustment of the tool palette.
//
// Deprecated: Use gtk_scrollable_get_hadjustment().
//
// The function returns the following values:
//
//   - adjustment: horizontal adjustment of palette.
func (palette *ToolPalette) HAdjustment() *Adjustment {
	var _arg0 *C.GtkToolPalette // out
	var _cret *C.GtkAdjustment  // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	_cret = C.gtk_tool_palette_get_hadjustment(_arg0)
	runtime.KeepAlive(palette)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// IconSize gets the size of icons in the tool palette. See
// gtk_tool_palette_set_icon_size().
//
// The function returns the following values:
//
//   - gint of icons in the tool palette.
func (palette *ToolPalette) IconSize() int {
	var _arg0 *C.GtkToolPalette // out
	var _cret C.GtkIconSize     // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	_cret = C.gtk_tool_palette_get_icon_size(_arg0)
	runtime.KeepAlive(palette)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Style gets the style (icons, text or both) of items in the tool palette.
//
// The function returns the following values:
//
//   - toolbarStyle of items in the tool palette.
func (palette *ToolPalette) Style() ToolbarStyle {
	var _arg0 *C.GtkToolPalette // out
	var _cret C.GtkToolbarStyle // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	_cret = C.gtk_tool_palette_get_style(_arg0)
	runtime.KeepAlive(palette)

	var _toolbarStyle ToolbarStyle // out

	_toolbarStyle = ToolbarStyle(_cret)

	return _toolbarStyle
}

// VAdjustment gets the vertical adjustment of the tool palette.
//
// Deprecated: Use gtk_scrollable_get_vadjustment().
//
// The function returns the following values:
//
//   - adjustment: vertical adjustment of palette.
func (palette *ToolPalette) VAdjustment() *Adjustment {
	var _arg0 *C.GtkToolPalette // out
	var _cret *C.GtkAdjustment  // in

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	_cret = C.gtk_tool_palette_get_vadjustment(_arg0)
	runtime.KeepAlive(palette)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// SetDragSource sets the tool palette as a drag source. Enables all groups and
// items in the tool palette as drag sources on button 1 and button 3 press with
// copy and move actions. See gtk_drag_source_set().
//
// The function takes the following parameters:
//
//   - targets: ToolPaletteDragTargets which the widget should support.
func (palette *ToolPalette) SetDragSource(targets ToolPaletteDragTargets) {
	var _arg0 *C.GtkToolPalette           // out
	var _arg1 C.GtkToolPaletteDragTargets // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = C.GtkToolPaletteDragTargets(targets)

	C.gtk_tool_palette_set_drag_source(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(targets)
}

// SetExclusive sets whether the group should be exclusive or not. If an
// exclusive group is expanded all other groups are collapsed.
//
// The function takes the following parameters:
//
//   - group which is a child of palette.
//   - exclusive: whether the group should be exclusive or not.
func (palette *ToolPalette) SetExclusive(group *ToolItemGroup, exclusive bool) {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _arg2 C.gboolean          // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	if exclusive {
		_arg2 = C.TRUE
	}

	C.gtk_tool_palette_set_exclusive(_arg0, _arg1, _arg2)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)
	runtime.KeepAlive(exclusive)
}

// SetExpand sets whether the group should be given extra space.
//
// The function takes the following parameters:
//
//   - group which is a child of palette.
//   - expand: whether the group should be given extra space.
func (palette *ToolPalette) SetExpand(group *ToolItemGroup, expand bool) {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _arg2 C.gboolean          // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C.gtk_tool_palette_set_expand(_arg0, _arg1, _arg2)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)
	runtime.KeepAlive(expand)
}

// SetGroupPosition sets the position of the group as an index of the tool
// palette. If position is 0 the group will become the first child, if position
// is -1 it will become the last child.
//
// The function takes the following parameters:
//
//   - group which is a child of palette.
//   - position: new index for group.
func (palette *ToolPalette) SetGroupPosition(group *ToolItemGroup, position int) {
	var _arg0 *C.GtkToolPalette   // out
	var _arg1 *C.GtkToolItemGroup // out
	var _arg2 C.gint              // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = (*C.GtkToolItemGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	_arg2 = C.gint(position)

	C.gtk_tool_palette_set_group_position(_arg0, _arg1, _arg2)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(group)
	runtime.KeepAlive(position)
}

// SetIconSize sets the size of icons in the tool palette.
//
// The function takes the following parameters:
//
//   - iconSize that icons in the tool palette shall have.
func (palette *ToolPalette) SetIconSize(iconSize int) {
	var _arg0 *C.GtkToolPalette // out
	var _arg1 C.GtkIconSize     // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = C.GtkIconSize(iconSize)

	C.gtk_tool_palette_set_icon_size(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(iconSize)
}

// SetStyle sets the style (text, icons or both) of items in the tool palette.
//
// The function takes the following parameters:
//
//   - style that items in the tool palette shall have.
func (palette *ToolPalette) SetStyle(style ToolbarStyle) {
	var _arg0 *C.GtkToolPalette // out
	var _arg1 C.GtkToolbarStyle // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))
	_arg1 = C.GtkToolbarStyle(style)

	C.gtk_tool_palette_set_style(_arg0, _arg1)
	runtime.KeepAlive(palette)
	runtime.KeepAlive(style)
}

// UnsetIconSize unsets the tool palette icon size set with
// gtk_tool_palette_set_icon_size(), so that user preferences will be used to
// determine the icon size.
func (palette *ToolPalette) UnsetIconSize() {
	var _arg0 *C.GtkToolPalette // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	C.gtk_tool_palette_unset_icon_size(_arg0)
	runtime.KeepAlive(palette)
}

// UnsetStyle unsets a toolbar style set with gtk_tool_palette_set_style(),
// so that user preferences will be used to determine the toolbar style.
func (palette *ToolPalette) UnsetStyle() {
	var _arg0 *C.GtkToolPalette // out

	_arg0 = (*C.GtkToolPalette)(unsafe.Pointer(coreglib.InternObject(palette).Native()))

	C.gtk_tool_palette_unset_style(_arg0)
	runtime.KeepAlive(palette)
}

// ToolPaletteGetDragTargetGroup: get the target entry for a dragged
// ToolItemGroup.
//
// The function returns the following values:
//
//   - targetEntry for a dragged group.
func ToolPaletteGetDragTargetGroup() *TargetEntry {
	var _cret *C.GtkTargetEntry // in

	_cret = C.gtk_tool_palette_get_drag_target_group()

	var _targetEntry *TargetEntry // out

	_targetEntry = (*TargetEntry)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _targetEntry
}

// ToolPaletteGetDragTargetItem gets the target entry for a dragged ToolItem.
//
// The function returns the following values:
//
//   - targetEntry for a dragged item.
func ToolPaletteGetDragTargetItem() *TargetEntry {
	var _cret *C.GtkTargetEntry // in

	_cret = C.gtk_tool_palette_get_drag_target_item()

	var _targetEntry *TargetEntry // out

	_targetEntry = (*TargetEntry)(gextras.NewStructNative(unsafe.Pointer(_cret)))

	return _targetEntry
}

// ToolbarOverrides contains methods that are overridable.
type ToolbarOverrides struct {
	OrientationChanged func(orientation Orientation)
	// The function takes the following parameters:
	//
	//   - x
	//   - y
	//   - buttonNumber
	PopupContextMenu func(x, y, buttonNumber int) bool
	StyleChanged     func(style ToolbarStyle)
}

func defaultToolbarOverrides(v *Toolbar) ToolbarOverrides {
	return ToolbarOverrides{
		OrientationChanged: v.orientationChanged,
		PopupContextMenu:   v.popupContextMenu,
		StyleChanged:       v.styleChanged,
	}
}

// Toolbar: toolbar is created with a call to gtk_toolbar_new().
//
// A toolbar can contain instances of a subclass of ToolItem. To add a ToolItem
// to the a toolbar, use gtk_toolbar_insert(). To remove an item from the
// toolbar use gtk_container_remove(). To add a button to the toolbar, add an
// instance of ToolButton.
//
// Toolbar items can be visually grouped by adding instances of
// SeparatorToolItem to the toolbar. If the GtkToolbar child property “expand”
// is UE and the property SeparatorToolItem:draw is set to LSE, the effect is to
// force all following items to the end of the toolbar.
//
// By default, a toolbar can be shrunk, upon which it will add an arrow button
// to show an overflow menu offering access to any ToolItem child that has a
// proxy menu item. To disable this and request enough size for all children,
// call gtk_toolbar_set_show_arrow() to set Toolbar:show-arrow to FALSE.
//
// Creating a context menu for the toolbar can be done by connecting to the
// Toolbar::popup-context-menu signal.
//
// # CSS nodes
//
// GtkToolbar has a single CSS node with name toolbar.
type Toolbar struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	atk.ImplementorIface
	coreglib.InitiallyUnowned
	Buildable
	Orientable
	ToolShell
	Widget
}

var (
	_ Containerer       = (*Toolbar)(nil)
	_ coreglib.Objector = (*Toolbar)(nil)
	_ Widgetter         = (*Toolbar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Toolbar, *ToolbarClass, ToolbarOverrides](
		GTypeToolbar,
		initToolbarClass,
		wrapToolbar,
		defaultToolbarOverrides,
	)
}

func initToolbarClass(gclass unsafe.Pointer, overrides ToolbarOverrides, classInitFunc func(*ToolbarClass)) {
	pclass := (*C.GtkToolbarClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeToolbar))))

	if overrides.OrientationChanged != nil {
		pclass.orientation_changed = (*[0]byte)(C._gotk4_gtk3_ToolbarClass_orientation_changed)
	}

	if overrides.PopupContextMenu != nil {
		pclass.popup_context_menu = (*[0]byte)(C._gotk4_gtk3_ToolbarClass_popup_context_menu)
	}

	if overrides.StyleChanged != nil {
		pclass.style_changed = (*[0]byte)(C._gotk4_gtk3_ToolbarClass_style_changed)
	}

	if classInitFunc != nil {
		class := (*ToolbarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToolbar(obj *coreglib.Object) *Toolbar {
	return &Toolbar{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		ImplementorIface: atk.ImplementorIface{
			Object: obj,
		},
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Buildable: Buildable{
			Object: obj,
		},
		Orientable: Orientable{
			Object: obj,
		},
		ToolShell: ToolShell{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Widget: Widget{
			InitiallyUnowned: coreglib.InitiallyUnowned{
				Object: obj,
			},
			Object: obj,
			ImplementorIface: atk.ImplementorIface{
				Object: obj,
			},
			Buildable: Buildable{
				Object: obj,
			},
		},
	}
}

func marshalToolbar(p uintptr) (interface{}, error) {
	return wrapToolbar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectFocusHomeOrEnd: keybinding signal used internally by GTK+. This signal
// can't be used in application code.
func (toolbar *Toolbar) ConnectFocusHomeOrEnd(f func(focusHome bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolbar, "focus-home-or-end", false, unsafe.Pointer(C._gotk4_gtk3_Toolbar_ConnectFocusHomeOrEnd), f)
}

// ConnectOrientationChanged is emitted when the orientation of the toolbar
// changes.
func (toolbar *Toolbar) ConnectOrientationChanged(f func(orientation Orientation)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolbar, "orientation-changed", false, unsafe.Pointer(C._gotk4_gtk3_Toolbar_ConnectOrientationChanged), f)
}

// ConnectPopupContextMenu is emitted when the user right-clicks the toolbar or
// uses the keybinding to display a popup menu.
//
// Application developers should handle this signal if they want to display
// a context menu on the toolbar. The context-menu should appear at the
// coordinates given by x and y. The mouse button number is given by the button
// parameter. If the menu was popped up using the keybaord, button is -1.
func (toolbar *Toolbar) ConnectPopupContextMenu(f func(x, y, button int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolbar, "popup-context-menu", false, unsafe.Pointer(C._gotk4_gtk3_Toolbar_ConnectPopupContextMenu), f)
}

// ConnectStyleChanged is emitted when the style of the toolbar changes.
func (toolbar *Toolbar) ConnectStyleChanged(f func(style ToolbarStyle)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(toolbar, "style-changed", false, unsafe.Pointer(C._gotk4_gtk3_Toolbar_ConnectStyleChanged), f)
}

// NewToolbar creates a new toolbar.
//
// The function returns the following values:
//
//   - toolbar: newly-created toolbar.
func NewToolbar() *Toolbar {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_toolbar_new()

	var _toolbar *Toolbar // out

	_toolbar = wrapToolbar(coreglib.Take(unsafe.Pointer(_cret)))

	return _toolbar
}

// DropIndex returns the position corresponding to the indicated point on
// toolbar. This is useful when dragging items to the toolbar: this function
// returns the position a new item should be inserted.
//
// x and y are in toolbar coordinates.
//
// The function takes the following parameters:
//
//   - x coordinate of a point on the toolbar.
//   - y coordinate of a point on the toolbar.
//
// The function returns the following values:
//
//   - gint: position corresponding to the point (x, y) on the toolbar.
func (toolbar *Toolbar) DropIndex(x, y int) int {
	var _arg0 *C.GtkToolbar // out
	var _arg1 C.gint        // out
	var _arg2 C.gint        // out
	var _cret C.gint        // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_toolbar_get_drop_index(_arg0, _arg1, _arg2)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IconSize retrieves the icon size for the toolbar. See
// gtk_toolbar_set_icon_size().
//
// The function returns the following values:
//
//   - iconSize: current icon size for the icons on the toolbar.
func (toolbar *Toolbar) IconSize() IconSize {
	var _arg0 *C.GtkToolbar // out
	var _cret C.GtkIconSize // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	_cret = C.gtk_toolbar_get_icon_size(_arg0)
	runtime.KeepAlive(toolbar)

	var _iconSize IconSize // out

	_iconSize = IconSize(_cret)

	return _iconSize
}

// ItemIndex returns the position of item on the toolbar, starting from 0.
// It is an error if item is not a child of the toolbar.
//
// The function takes the following parameters:
//
//   - item that is a child of toolbar.
//
// The function returns the following values:
//
//   - gint: position of item on the toolbar.
func (toolbar *Toolbar) ItemIndex(item *ToolItem) int {
	var _arg0 *C.GtkToolbar  // out
	var _arg1 *C.GtkToolItem // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))

	_cret = C.gtk_toolbar_get_item_index(_arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(item)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NItems returns the number of items on the toolbar.
//
// The function returns the following values:
//
//   - gint: number of items on the toolbar.
func (toolbar *Toolbar) NItems() int {
	var _arg0 *C.GtkToolbar // out
	var _cret C.gint        // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	_cret = C.gtk_toolbar_get_n_items(_arg0)
	runtime.KeepAlive(toolbar)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// NthItem returns the n'th item on toolbar, or NULL if the toolbar does not
// contain an n'th item.
//
// The function takes the following parameters:
//
//   - n on the toolbar.
//
// The function returns the following values:
//
//   - toolItem (optional): n'th ToolItem on toolbar, or NULL if there isn’t an
//     n'th item.
func (toolbar *Toolbar) NthItem(n int) *ToolItem {
	var _arg0 *C.GtkToolbar  // out
	var _arg1 C.gint         // out
	var _cret *C.GtkToolItem // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.gint(n)

	_cret = C.gtk_toolbar_get_nth_item(_arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(n)

	var _toolItem *ToolItem // out

	if _cret != nil {
		_toolItem = wrapToolItem(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _toolItem
}

// ReliefStyle returns the relief style of buttons on toolbar. See
// gtk_button_set_relief().
//
// The function returns the following values:
//
//   - reliefStyle: relief style of buttons on toolbar.
func (toolbar *Toolbar) ReliefStyle() ReliefStyle {
	var _arg0 *C.GtkToolbar    // out
	var _cret C.GtkReliefStyle // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	_cret = C.gtk_toolbar_get_relief_style(_arg0)
	runtime.KeepAlive(toolbar)

	var _reliefStyle ReliefStyle // out

	_reliefStyle = ReliefStyle(_cret)

	return _reliefStyle
}

// ShowArrow returns whether the toolbar has an overflow menu. See
// gtk_toolbar_set_show_arrow().
//
// The function returns the following values:
//
//   - ok: TRUE if the toolbar has an overflow menu.
func (toolbar *Toolbar) ShowArrow() bool {
	var _arg0 *C.GtkToolbar // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	_cret = C.gtk_toolbar_get_show_arrow(_arg0)
	runtime.KeepAlive(toolbar)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Style retrieves whether the toolbar has text, icons, or both . See
// gtk_toolbar_set_style().
//
// The function returns the following values:
//
//   - toolbarStyle: current style of toolbar.
func (toolbar *Toolbar) Style() ToolbarStyle {
	var _arg0 *C.GtkToolbar     // out
	var _cret C.GtkToolbarStyle // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	_cret = C.gtk_toolbar_get_style(_arg0)
	runtime.KeepAlive(toolbar)

	var _toolbarStyle ToolbarStyle // out

	_toolbarStyle = ToolbarStyle(_cret)

	return _toolbarStyle
}

// Insert a ToolItem into the toolbar at position pos. If pos is 0 the item
// is prepended to the start of the toolbar. If pos is negative, the item is
// appended to the end of the toolbar.
//
// The function takes the following parameters:
//
//   - item: ToolItem.
//   - pos: position of the new item.
func (toolbar *Toolbar) Insert(item *ToolItem, pos int) {
	var _arg0 *C.GtkToolbar  // out
	var _arg1 *C.GtkToolItem // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(item).Native()))
	_arg2 = C.gint(pos)

	C.gtk_toolbar_insert(_arg0, _arg1, _arg2)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(item)
	runtime.KeepAlive(pos)
}

// SetDropHighlightItem highlights toolbar to give an idea of what it would
// look like if item was added to toolbar at the position indicated by index_.
// If item is NULL, highlighting is turned off. In that case index_ is ignored.
//
// The tool_item passed to this function must not be part of any widget
// hierarchy. When an item is set as drop highlight item it can not added to any
// widget hierarchy or used as highlight item for another toolbar.
//
// The function takes the following parameters:
//
//   - toolItem (optional) or NULL to turn of highlighting.
//   - index_: position on toolbar.
func (toolbar *Toolbar) SetDropHighlightItem(toolItem *ToolItem, index_ int) {
	var _arg0 *C.GtkToolbar  // out
	var _arg1 *C.GtkToolItem // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	if toolItem != nil {
		_arg1 = (*C.GtkToolItem)(unsafe.Pointer(coreglib.InternObject(toolItem).Native()))
	}
	_arg2 = C.gint(index_)

	C.gtk_toolbar_set_drop_highlight_item(_arg0, _arg1, _arg2)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(toolItem)
	runtime.KeepAlive(index_)
}

// SetIconSize: this function sets the size of stock icons in the toolbar.
// You can call it both before you add the icons and after they’ve been added.
// The size you set will override user preferences for the default icon size.
//
// This should only be used for special-purpose toolbars, normal application
// toolbars should respect the user preferences for the size of icons.
//
// The function takes the following parameters:
//
//   - iconSize that stock icons in the toolbar shall have.
func (toolbar *Toolbar) SetIconSize(iconSize IconSize) {
	var _arg0 *C.GtkToolbar // out
	var _arg1 C.GtkIconSize // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.GtkIconSize(iconSize)

	C.gtk_toolbar_set_icon_size(_arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(iconSize)
}

// SetShowArrow sets whether to show an overflow menu when toolbar
// isn’t allocated enough size to show all of its items. If TRUE,
// items which can’t fit in toolbar, and which have a proxy menu item set by
// gtk_tool_item_set_proxy_menu_item() or ToolItem::create-menu-proxy, will be
// available in an overflow menu, which can be opened by an added arrow button.
// If FALSE, toolbar will request enough size to fit all of its child items
// without any overflow.
//
// The function takes the following parameters:
//
//   - showArrow: whether to show an overflow menu.
func (toolbar *Toolbar) SetShowArrow(showArrow bool) {
	var _arg0 *C.GtkToolbar // out
	var _arg1 C.gboolean    // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	if showArrow {
		_arg1 = C.TRUE
	}

	C.gtk_toolbar_set_show_arrow(_arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(showArrow)
}

// SetStyle alters the view of toolbar to display either icons only, text only,
// or both.
//
// The function takes the following parameters:
//
//   - style: new style for toolbar.
func (toolbar *Toolbar) SetStyle(style ToolbarStyle) {
	var _arg0 *C.GtkToolbar     // out
	var _arg1 C.GtkToolbarStyle // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.GtkToolbarStyle(style)

	C.gtk_toolbar_set_style(_arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(style)
}

// UnsetIconSize unsets toolbar icon size set with gtk_toolbar_set_icon_size(),
// so that user preferences will be used to determine the icon size.
func (toolbar *Toolbar) UnsetIconSize() {
	var _arg0 *C.GtkToolbar // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	C.gtk_toolbar_unset_icon_size(_arg0)
	runtime.KeepAlive(toolbar)
}

// UnsetStyle unsets a toolbar style set with gtk_toolbar_set_style(), so that
// user preferences will be used to determine the toolbar style.
func (toolbar *Toolbar) UnsetStyle() {
	var _arg0 *C.GtkToolbar // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))

	C.gtk_toolbar_unset_style(_arg0)
	runtime.KeepAlive(toolbar)
}

func (toolbar *Toolbar) orientationChanged(orientation Orientation) {
	gclass := (*C.GtkToolbarClass)(coreglib.PeekParentClass(toolbar))
	fnarg := gclass.orientation_changed

	var _arg0 *C.GtkToolbar    // out
	var _arg1 C.GtkOrientation // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.GtkOrientation(orientation)

	C._gotk4_gtk3_Toolbar_virtual_orientation_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(orientation)
}

// The function takes the following parameters:
//
//   - x
//   - y
//   - buttonNumber
func (toolbar *Toolbar) popupContextMenu(x, y, buttonNumber int) bool {
	gclass := (*C.GtkToolbarClass)(coreglib.PeekParentClass(toolbar))
	fnarg := gclass.popup_context_menu

	var _arg0 *C.GtkToolbar // out
	var _arg1 C.gint        // out
	var _arg2 C.gint        // out
	var _arg3 C.gint        // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)
	_arg3 = C.gint(buttonNumber)

	_cret = C._gotk4_gtk3_Toolbar_virtual_popup_context_menu(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(buttonNumber)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (toolbar *Toolbar) styleChanged(style ToolbarStyle) {
	gclass := (*C.GtkToolbarClass)(coreglib.PeekParentClass(toolbar))
	fnarg := gclass.style_changed

	var _arg0 *C.GtkToolbar     // out
	var _arg1 C.GtkToolbarStyle // out

	_arg0 = (*C.GtkToolbar)(unsafe.Pointer(coreglib.InternObject(toolbar).Native()))
	_arg1 = C.GtkToolbarStyle(style)

	C._gotk4_gtk3_Toolbar_virtual_style_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(toolbar)
	runtime.KeepAlive(style)
}

// Tooltip: basic tooltips can be realized simply by using
// gtk_widget_set_tooltip_text() or gtk_widget_set_tooltip_markup() without any
// explicit tooltip object.
//
// When you need a tooltip with a little more fancy contents, like adding an
// image, or you want the tooltip to have different contents per TreeView row or
// cell, you will have to do a little more work:
//
// - Set the Widget:has-tooltip property to TRUE, this will make GTK+ monitor
// the widget for motion and related events which are needed to determine when
// and where to show a tooltip.
//
// - Connect to the Widget::query-tooltip signal. This signal will be emitted
// when a tooltip is supposed to be shown. One of the arguments passed to the
// signal handler is a GtkTooltip object. This is the object that we are about
// to display as a tooltip, and can be manipulated in your callback using
// functions like gtk_tooltip_set_icon(). There are functions for setting the
// tooltip’s markup, setting an image from a named icon, or even putting in a
// custom widget.
//
//	Return TRUE from your query-tooltip handler. This causes the tooltip to be
//	show. If you return FALSE, it will not be shown.
//
// In the probably rare case where you want to have even more control over the
// tooltip that is about to be shown, you can set your own Window which will be
// used as tooltip window. This works as follows:
//
// - Set Widget:has-tooltip and connect to Widget::query-tooltip as before.
// Use gtk_widget_set_tooltip_window() to set a Window created by you as tooltip
// window.
//
// - In the Widget::query-tooltip callback you can access your window using
// gtk_widget_get_tooltip_window() and manipulate as you wish. The semantics
// of the return value are exactly as before, return TRUE to show the window,
// FALSE to not show it.
type Tooltip struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*Tooltip)(nil)
)

func wrapTooltip(obj *coreglib.Object) *Tooltip {
	return &Tooltip{
		Object: obj,
	}
}

func marshalTooltip(p uintptr) (interface{}, error) {
	return wrapTooltip(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// SetCustom replaces the widget packed into the tooltip with custom_widget.
// custom_widget does not get destroyed when the tooltip goes away. By default
// a box with a Image and Label is embedded in the tooltip, which can be
// configured using gtk_tooltip_set_markup() and gtk_tooltip_set_icon().
//
// The function takes the following parameters:
//
//   - customWidget (optional) or NULL to unset the old custom widget.
func (tooltip *Tooltip) SetCustom(customWidget Widgetter) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.GtkWidget  // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if customWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(customWidget).Native()))
	}

	C.gtk_tooltip_set_custom(_arg0, _arg1)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(customWidget)
}

// SetIcon sets the icon of the tooltip (which is in front of the text) to be
// pixbuf. If pixbuf is NULL, the image will be hidden.
//
// The function takes the following parameters:
//
//   - pixbuf (optional) or NULL.
func (tooltip *Tooltip) SetIcon(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.GdkPixbuf  // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if pixbuf != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))
	}

	C.gtk_tooltip_set_icon(_arg0, _arg1)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(pixbuf)
}

// SetIconFromGIcon sets the icon of the tooltip (which is in front of the
// text) to be the icon indicated by gicon with the size indicated by size.
// If gicon is NULL, the image will be hidden.
//
// The function takes the following parameters:
//
//   - gicon (optional) representing the icon, or NULL.
//   - size: stock icon size (IconSize).
func (tooltip *Tooltip) SetIconFromGIcon(gicon gio.Iconner, size int) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.GIcon      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if gicon != nil {
		_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(gicon).Native()))
	}
	_arg2 = C.GtkIconSize(size)

	C.gtk_tooltip_set_icon_from_gicon(_arg0, _arg1, _arg2)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(gicon)
	runtime.KeepAlive(size)
}

// SetIconFromIconName sets the icon of the tooltip (which is in front of the
// text) to be the icon indicated by icon_name with the size indicated by size.
// If icon_name is NULL, the image will be hidden.
//
// The function takes the following parameters:
//
//   - iconName (optional): icon name, or NULL.
//   - size: stock icon size (IconSize).
func (tooltip *Tooltip) SetIconFromIconName(iconName string, size int) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GtkIconSize(size)

	C.gtk_tooltip_set_icon_from_icon_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(iconName)
	runtime.KeepAlive(size)
}

// SetIconFromStock sets the icon of the tooltip (which is in front of the text)
// to be the stock item indicated by stock_id with the size indicated by size.
// If stock_id is NULL, the image will be hidden.
//
// Deprecated: Use gtk_tooltip_set_icon_from_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId (optional): stock id, or NULL.
//   - size: stock icon size (IconSize).
func (tooltip *Tooltip) SetIconFromStock(stockId string, size int) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if stockId != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	_arg2 = C.GtkIconSize(size)

	C.gtk_tooltip_set_icon_from_stock(_arg0, _arg1, _arg2)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(size)
}

// SetMarkup sets the text of the tooltip to be markup, which is marked up with
// the [Pango text markup language][PangoMarkupFormat]. If markup is NULL,
// the label will be hidden.
//
// The function takes the following parameters:
//
//   - markup (optional) string (see [Pango markup format][PangoMarkupFormat])
//     or NULL.
func (tooltip *Tooltip) SetMarkup(markup string) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.gchar      // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if markup != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_tooltip_set_markup(_arg0, _arg1)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(markup)
}

// SetText sets the text of the tooltip to be text. If text is NULL, the label
// will be hidden. See also gtk_tooltip_set_markup().
//
// The function takes the following parameters:
//
//   - text (optional) string or NULL.
func (tooltip *Tooltip) SetText(text string) {
	var _arg0 *C.GtkTooltip // out
	var _arg1 *C.gchar      // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if text != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_tooltip_set_text(_arg0, _arg1)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(text)
}

// SetTipArea sets the area of the widget, where the contents of this tooltip
// apply, to be rect (in widget coordinates). This is especially useful for
// properly setting tooltips on TreeView rows and cells, IconViews, etc.
//
// For setting tooltips on TreeView, please refer to the convenience
// functions for this: gtk_tree_view_set_tooltip_row() and
// gtk_tree_view_set_tooltip_cell().
//
// The function takes the following parameters:
//
//   - rect: Rectangle.
func (tooltip *Tooltip) SetTipArea(rect *gdk.Rectangle) {
	var _arg0 *C.GtkTooltip   // out
	var _arg1 *C.GdkRectangle // out

	_arg0 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(rect)))

	C.gtk_tooltip_set_tip_area(_arg0, _arg1)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(rect)
}

// TooltipTriggerTooltipQuery triggers a new tooltip query on display, in order
// to update the current visible tooltip, or to show/hide the current tooltip.
// This function is useful to call when, for example, the state of the widget
// changed by a key press.
//
// The function takes the following parameters:
//
//   - display: Display.
func TooltipTriggerTooltipQuery(display *gdk.Display) {
	var _arg1 *C.GdkDisplay // out

	_arg1 = (*C.GdkDisplay)(unsafe.Pointer(coreglib.InternObject(display).Native()))

	C.gtk_tooltip_trigger_tooltip_query(_arg1)
	runtime.KeepAlive(display)
}

// ToplevelAccessibleOverrides contains methods that are overridable.
type ToplevelAccessibleOverrides struct {
}

func defaultToplevelAccessibleOverrides(v *ToplevelAccessible) ToplevelAccessibleOverrides {
	return ToplevelAccessibleOverrides{}
}

type ToplevelAccessible struct {
	_ [0]func() // equal guard
	atk.AtkObject
}

var (
	_ coreglib.Objector = (*ToplevelAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*ToplevelAccessible, *ToplevelAccessibleClass, ToplevelAccessibleOverrides](
		GTypeToplevelAccessible,
		initToplevelAccessibleClass,
		wrapToplevelAccessible,
		defaultToplevelAccessibleOverrides,
	)
}

func initToplevelAccessibleClass(gclass unsafe.Pointer, overrides ToplevelAccessibleOverrides, classInitFunc func(*ToplevelAccessibleClass)) {
	if classInitFunc != nil {
		class := (*ToplevelAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapToplevelAccessible(obj *coreglib.Object) *ToplevelAccessible {
	return &ToplevelAccessible{
		AtkObject: atk.AtkObject{
			Object: obj,
		},
	}
}

func marshalToplevelAccessible(p uintptr) (interface{}, error) {
	return wrapToplevelAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// The function returns the following values:
//
//   - list: list of children.
func (accessible *ToplevelAccessible) Children() []*Window {
	var _arg0 *C.GtkToplevelAccessible // out
	var _cret *C.GList                 // in

	_arg0 = (*C.GtkToplevelAccessible)(unsafe.Pointer(coreglib.InternObject(accessible).Native()))

	_cret = C.gtk_toplevel_accessible_get_children(_arg0)
	runtime.KeepAlive(accessible)

	var _list []*Window // out

	_list = make([]*Window, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkWindow)(v)
		var dst *Window // out
		dst = wrapWindow(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// TreeModelFilterOverrides contains methods that are overridable.
type TreeModelFilterOverrides struct {
	// The function takes the following parameters:
	//
	//   - childModel
	//   - iter
	//   - value
	//   - column
	Modify func(childModel TreeModeller, iter *TreeIter, value *coreglib.Value, column int)
	// The function takes the following parameters:
	//
	//   - childModel
	//   - iter
	Visible func(childModel TreeModeller, iter *TreeIter) bool
}

func defaultTreeModelFilterOverrides(v *TreeModelFilter) TreeModelFilterOverrides {
	return TreeModelFilterOverrides{
		Modify:  v.modify,
		Visible: v.visible,
	}
}

// TreeModelFilter is a tree model which wraps another tree model, and can do
// the following things:
//
// - Filter specific rows, based on data from a “visible column”, a column
// storing booleans indicating whether the row should be filtered or not,
// or based on the return value of a “visible function”, which gets a model,
// iter and user_data and returns a boolean indicating whether the row should be
// filtered or not.
//
// - Modify the “appearance” of the model, using a modify function. This is
// extremely powerful and allows for just changing some values and also for
// creating a completely different model based on the given child model.
//
// - Set a different root node, also known as a “virtual root”. You can pass in
// a TreePath indicating the root node for the filter at construction time.
//
// The basic API is similar to TreeModelSort. For an example on its usage,
// see the section on TreeModelSort.
//
// When using TreeModelFilter, it is important to realize that TreeModelFilter
// maintains an internal cache of all nodes which are visible in its clients.
// The cache is likely to be a subtree of the tree exposed by the child model.
// TreeModelFilter will not cache the entire child model when unnecessary
// to not compromise the caching mechanism that is exposed by the reference
// counting scheme. If the child model implements reference counting,
// unnecessary signals may not be emitted because of reference counting rule 3,
// see the TreeModel documentation. (Note that e.g. TreeStore does not implement
// reference counting and will always emit all signals, even when the receiving
// node is not visible).
//
// Because of this, limitations for possible visible functions do apply.
// In general, visible functions should only use data or properties from the
// node for which the visibility state must be determined, its siblings or
// its parents. Usually, having a dependency on the state of any child node
// is not possible, unless references are taken on these explicitly. When no
// such reference exists, no signals may be received for these child nodes (see
// reference couting rule number 3 in the TreeModel section).
//
// Determining the visibility state of a given node based on the state of its
// child nodes is a frequently occurring use case. Therefore, TreeModelFilter
// explicitly supports this. For example, when a node does not have any
// children, you might not want the node to be visible. As soon as the first
// row is added to the node’s child level (or the last row removed), the node’s
// visibility should be updated.
//
// This introduces a dependency from the node on its child nodes. In order
// to accommodate this, TreeModelFilter must make sure the necessary signals
// are received from the child model. This is achieved by building, for all
// nodes which are exposed as visible nodes to TreeModelFilter's clients,
// the child level (if any) and take a reference on the first node in this
// level. Furthermore, for every row-inserted, row-changed or row-deleted
// signal (also these which were not handled because the node was not cached),
// TreeModelFilter will check if the visibility state of any parent node has
// changed.
//
// Beware, however, that this explicit support is limited to these two cases.
// For example, if you want a node to be visible only if two nodes in a child’s
// child level (2 levels deeper) are visible, you are on your own. In this case,
// either rely on TreeStore to emit all signals because it does not implement
// reference counting, or for models that do implement reference counting,
// obtain references on these child levels yourself.
type TreeModelFilter struct {
	_ [0]func() // equal guard
	*coreglib.Object

	TreeDragSource
	TreeModel
}

var (
	_ coreglib.Objector = (*TreeModelFilter)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeModelFilter, *TreeModelFilterClass, TreeModelFilterOverrides](
		GTypeTreeModelFilter,
		initTreeModelFilterClass,
		wrapTreeModelFilter,
		defaultTreeModelFilterOverrides,
	)
}

func initTreeModelFilterClass(gclass unsafe.Pointer, overrides TreeModelFilterOverrides, classInitFunc func(*TreeModelFilterClass)) {
	pclass := (*C.GtkTreeModelFilterClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTreeModelFilter))))

	if overrides.Modify != nil {
		pclass.modify = (*[0]byte)(C._gotk4_gtk3_TreeModelFilterClass_modify)
	}

	if overrides.Visible != nil {
		pclass.visible = (*[0]byte)(C._gotk4_gtk3_TreeModelFilterClass_visible)
	}

	if classInitFunc != nil {
		class := (*TreeModelFilterClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeModelFilter(obj *coreglib.Object) *TreeModelFilter {
	return &TreeModelFilter{
		Object: obj,
		TreeDragSource: TreeDragSource{
			Object: obj,
		},
		TreeModel: TreeModel{
			Object: obj,
		},
	}
}

func marshalTreeModelFilter(p uintptr) (interface{}, error) {
	return wrapTreeModelFilter(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ClearCache: this function should almost never be called. It clears
// the filter of any cached iterators that haven’t been reffed with
// gtk_tree_model_ref_node(). This might be useful if the child model being
// filtered is static (and doesn’t change often) and there has been a lot of
// unreffed access to nodes. As a side effect of this function, all unreffed
// iters will be invalid.
func (filter *TreeModelFilter) ClearCache() {
	var _arg0 *C.GtkTreeModelFilter // out

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_tree_model_filter_clear_cache(_arg0)
	runtime.KeepAlive(filter)
}

// ConvertChildIterToIter sets filter_iter to point to the row in filter that
// corresponds to the row pointed at by child_iter. If filter_iter was not set,
// FALSE is returned.
//
// The function takes the following parameters:
//
//   - childIter: valid TreeIter pointing to a row on the child model.
//
// The function returns the following values:
//
//   - filterIter: uninitialized TreeIter.
//   - ok: TRUE, if filter_iter was set, i.e. if child_iter is a valid iterator
//     pointing to a visible row in child model.
func (filter *TreeModelFilter) ConvertChildIterToIter(childIter *TreeIter) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 C.GtkTreeIter         // in
	var _arg2 *C.GtkTreeIter        // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(childIter)))

	_cret = C.gtk_tree_model_filter_convert_child_iter_to_iter(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(childIter)

	var _filterIter *TreeIter // out
	var _ok bool              // out

	_filterIter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _filterIter, _ok
}

// ConvertChildPathToPath converts child_path to a path relative to filter.
// That is, child_path points to a path in the child model. The rerturned path
// will point to the same row in the filtered model. If child_path isn’t a valid
// path on the child model or points to a row which is not visible in filter,
// then NULL is returned.
//
// The function takes the following parameters:
//
//   - childPath to convert.
//
// The function returns the following values:
//
//   - treePath (optional): newly allocated TreePath, or NULL.
func (filter *TreeModelFilter) ConvertChildPathToPath(childPath *TreePath) *TreePath {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 *C.GtkTreePath        // out
	var _cret *C.GtkTreePath        // in

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(childPath)))

	_cret = C.gtk_tree_model_filter_convert_child_path_to_path(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(childPath)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// ConvertIterToChildIter sets child_iter to point to the row pointed to by
// filter_iter.
//
// The function takes the following parameters:
//
//   - filterIter: valid TreeIter pointing to a row on filter.
//
// The function returns the following values:
//
//   - childIter: uninitialized TreeIter.
func (filter *TreeModelFilter) ConvertIterToChildIter(filterIter *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 C.GtkTreeIter         // in
	var _arg2 *C.GtkTreeIter        // out

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(filterIter)))

	C.gtk_tree_model_filter_convert_iter_to_child_iter(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(filterIter)

	var _childIter *TreeIter // out

	_childIter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _childIter
}

// ConvertPathToChildPath converts filter_path to a path on the child model of
// filter. That is, filter_path points to a location in filter. The returned
// path will point to the same location in the model not being filtered.
// If filter_path does not point to a location in the child model, NULL is
// returned.
//
// The function takes the following parameters:
//
//   - filterPath to convert.
//
// The function returns the following values:
//
//   - treePath (optional): newly allocated TreePath, or NULL.
func (filter *TreeModelFilter) ConvertPathToChildPath(filterPath *TreePath) *TreePath {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 *C.GtkTreePath        // out
	var _cret *C.GtkTreePath        // in

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(filterPath)))

	_cret = C.gtk_tree_model_filter_convert_path_to_child_path(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(filterPath)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// Model returns a pointer to the child model of filter.
//
// The function returns the following values:
//
//   - treeModel: pointer to a TreeModel.
func (filter *TreeModelFilter) Model() *TreeModel {
	var _arg0 *C.GtkTreeModelFilter // out
	var _cret *C.GtkTreeModel       // in

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	_cret = C.gtk_tree_model_filter_get_model(_arg0)
	runtime.KeepAlive(filter)

	var _treeModel *TreeModel // out

	_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeModel
}

// Refilter emits ::row_changed for each row in the child model, which causes
// the filter to re-evaluate whether a row is visible or not.
func (filter *TreeModelFilter) Refilter() {
	var _arg0 *C.GtkTreeModelFilter // out

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))

	C.gtk_tree_model_filter_refilter(_arg0)
	runtime.KeepAlive(filter)
}

// SetModifyFunc: with the n_columns and types parameters, you give an array of
// column types for this model (which will be exposed to the parent model/view).
// The func, data and destroy parameters are for specifying the modify function.
// The modify function will get called for each data access, the goal of the
// modify function is to return the data which should be displayed at the
// location specified using the parameters of the modify function.
//
// Note that gtk_tree_model_filter_set_modify_func() can only be called once for
// a given filter model.
//
// The function takes the following parameters:
//
//   - types of the columns.
//   - fn: TreeModelFilterModifyFunc.
func (filter *TreeModelFilter) SetModifyFunc(types []coreglib.Type, fn TreeModelFilterModifyFunc) {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg2 *C.GType              // out
	var _arg1 C.gint
	var _arg3 C.GtkTreeModelFilterModifyFunc // out
	var _arg4 C.gpointer
	var _arg5 C.GDestroyNotify

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (C.gint)(len(types))
	_arg2 = (*C.GType)(C.calloc(C.size_t(len(types)), C.size_t(C.sizeof_GType)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GType)(_arg2), len(types))
		for i := range types {
			out[i] = C.GType(types[i])
		}
	}
	_arg3 = (*[0]byte)(C._gotk4_gtk3_TreeModelFilterModifyFunc)
	_arg4 = C.gpointer(gbox.Assign(fn))
	_arg5 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_tree_model_filter_set_modify_func(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(types)
	runtime.KeepAlive(fn)
}

// SetVisibleColumn sets column of the child_model to be the column where filter
// should look for visibility information. columns should be a column of type
// G_TYPE_BOOLEAN, where TRUE means that a row is visible, and FALSE if not.
//
// Note that gtk_tree_model_filter_set_visible_func() or
// gtk_tree_model_filter_set_visible_column() can only be called once for a
// given filter model.
//
// The function takes the following parameters:
//
//   - column which is the column containing the visible information.
func (filter *TreeModelFilter) SetVisibleColumn(column int) {
	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 C.gint                // out

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = C.gint(column)

	C.gtk_tree_model_filter_set_visible_column(_arg0, _arg1)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(column)
}

// SetVisibleFunc sets the visible function used when filtering the filter to be
// func. The function should return TRUE if the given row should be visible and
// FALSE otherwise.
//
// If the condition calculated by the function changes over time (e.g.
// because it depends on some global parameters), you must call
// gtk_tree_model_filter_refilter() to keep the visibility information of the
// model up-to-date.
//
// Note that func is called whenever a row is inserted, when it may still be
// empty. The visible function should therefore take special care of empty rows,
// like in the example below.
//
//	static gboolean
//	visible_func (GtkTreeModel *model,
//	              GtkTreeIter  *iter,
//	              gpointer      data)
//	{
//	  // Visible if row is non-empty and first column is “HI”
//	  gchar *str;
//	  gboolean visible = FALSE;
//
//	  gtk_tree_model_get (model, iter, 0, &str, -1);
//	  if (str && strcmp (str, "HI") == 0)
//	    visible = TRUE;
//	  g_free (str);
//
//	  return visible;
//	}
//
// Note that gtk_tree_model_filter_set_visible_func() or
// gtk_tree_model_filter_set_visible_column() can only be called once for a
// given filter model.
//
// The function takes the following parameters:
//
//   - fn the visible function.
func (filter *TreeModelFilter) SetVisibleFunc(fn TreeModelFilterVisibleFunc) {
	var _arg0 *C.GtkTreeModelFilter           // out
	var _arg1 C.GtkTreeModelFilterVisibleFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(filter).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeModelFilterVisibleFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_tree_model_filter_set_visible_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(filter)
	runtime.KeepAlive(fn)
}

// The function takes the following parameters:
//
//   - childModel
//   - iter
//   - value
//   - column
func (self *TreeModelFilter) modify(childModel TreeModeller, iter *TreeIter, value *coreglib.Value, column int) {
	gclass := (*C.GtkTreeModelFilterClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.modify

	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 *C.GtkTreeModel       // out
	var _arg2 *C.GtkTreeIter        // out
	var _arg3 *C.GValue             // out
	var _arg4 C.gint                // out

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(childModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))
	_arg4 = C.gint(column)

	C._gotk4_gtk3_TreeModelFilter_virtual_modify(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(self)
	runtime.KeepAlive(childModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(value)
	runtime.KeepAlive(column)
}

// The function takes the following parameters:
//
//   - childModel
//   - iter
func (self *TreeModelFilter) visible(childModel TreeModeller, iter *TreeIter) bool {
	gclass := (*C.GtkTreeModelFilterClass)(coreglib.PeekParentClass(self))
	fnarg := gclass.visible

	var _arg0 *C.GtkTreeModelFilter // out
	var _arg1 *C.GtkTreeModel       // out
	var _arg2 *C.GtkTreeIter        // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkTreeModelFilter)(unsafe.Pointer(coreglib.InternObject(self).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(childModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C._gotk4_gtk3_TreeModelFilter_virtual_visible(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(self)
	runtime.KeepAlive(childModel)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeModelSortOverrides contains methods that are overridable.
type TreeModelSortOverrides struct {
}

func defaultTreeModelSortOverrides(v *TreeModelSort) TreeModelSortOverrides {
	return TreeModelSortOverrides{}
}

// TreeModelSort is a model which implements the TreeSortable interface.
// It does not hold any data itself, but rather is created with a child model
// and proxies its data. It has identical column types to this child model, and
// the changes in the child are propagated. The primary purpose of this model
// is to provide a way to sort a different model without modifying it. Note that
// the sort function used by TreeModelSort is not guaranteed to be stable.
//
// The use of this is best demonstrated through an example. In the following
// sample code we create two TreeView widgets each with a view of the same data.
// As the model is wrapped here by a TreeModelSort, the two TreeViews can
// each sort their view of the data without affecting the other. By contrast,
// if we simply put the same model in each widget, then sorting the first would
// sort the second.
//
// Using a TreeModelSort
//
//	void
//	selection_changed (GtkTreeSelection *selection, gpointer data)
//	{
//	  GtkTreeModel *sort_model = NULL;
//	  GtkTreeModel *child_model;
//	  GtkTreeIter sort_iter;
//	  GtkTreeIter child_iter;
//	  char *some_data = NULL;
//	  char *modified_data;
//
//	  // Get the current selected row and the model.
//	  if (! gtk_tree_selection_get_selected (selection,
//	                                         &sort_model,
//	                                         &sort_iter))
//	    return;
//
//	  // Look up the current value on the selected row and get
//	  // a new value to change it to.
//	  gtk_tree_model_get (GTK_TREE_MODEL (sort_model), &sort_iter,
//	                      COLUMN_1, &some_data,
//	                      -1);
//
//	  modified_data = change_the_data (some_data);
//	  g_free (some_data);
//
//	  // Get an iterator on the child model, instead of the sort model.
//	  gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (sort_model),
//	                                                  &child_iter,
//	                                                  &sort_iter);
//
//	  // Get the child model and change the value of the row. In this
//	  // example, the child model is a GtkListStore. It could be any other
//	  // type of model, though.
//	  child_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
//	  gtk_list_store_set (GTK_LIST_STORE (child_model), &child_iter,
//	                      COLUMN_1, &modified_data,
//	                      -1);
//	  g_free (modified_data);
//	}.
type TreeModelSort struct {
	_ [0]func() // equal guard
	*coreglib.Object

	TreeDragSource
	TreeSortable
}

var (
	_ coreglib.Objector = (*TreeModelSort)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeModelSort, *TreeModelSortClass, TreeModelSortOverrides](
		GTypeTreeModelSort,
		initTreeModelSortClass,
		wrapTreeModelSort,
		defaultTreeModelSortOverrides,
	)
}

func initTreeModelSortClass(gclass unsafe.Pointer, overrides TreeModelSortOverrides, classInitFunc func(*TreeModelSortClass)) {
	if classInitFunc != nil {
		class := (*TreeModelSortClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeModelSort(obj *coreglib.Object) *TreeModelSort {
	return &TreeModelSort{
		Object: obj,
		TreeDragSource: TreeDragSource{
			Object: obj,
		},
		TreeSortable: TreeSortable{
			TreeModel: TreeModel{
				Object: obj,
			},
		},
	}
}

func marshalTreeModelSort(p uintptr) (interface{}, error) {
	return wrapTreeModelSort(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTreeModelSortWithModel creates a new TreeModelSort, with child_model as
// the child model.
//
// The function takes the following parameters:
//
//   - childModel: TreeModel.
//
// The function returns the following values:
//
//   - treeModelSort: new TreeModelSort.
func NewTreeModelSortWithModel(childModel TreeModeller) *TreeModelSort {
	var _arg1 *C.GtkTreeModel // out
	var _cret *C.GtkTreeModel // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(childModel).Native()))

	_cret = C.gtk_tree_model_sort_new_with_model(_arg1)
	runtime.KeepAlive(childModel)

	var _treeModelSort *TreeModelSort // out

	_treeModelSort = wrapTreeModelSort(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _treeModelSort
}

// ClearCache: this function should almost never be called. It clears the
// tree_model_sort of any cached iterators that haven’t been reffed with
// gtk_tree_model_ref_node(). This might be useful if the child model being
// sorted is static (and doesn’t change often) and there has been a lot of
// unreffed access to nodes. As a side effect of this function, all unreffed
// iters will be invalid.
func (treeModelSort *TreeModelSort) ClearCache() {
	var _arg0 *C.GtkTreeModelSort // out

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))

	C.gtk_tree_model_sort_clear_cache(_arg0)
	runtime.KeepAlive(treeModelSort)
}

// ConvertChildIterToIter sets sort_iter to point to the row in tree_model_sort
// that corresponds to the row pointed at by child_iter. If sort_iter was not
// set, FALSE is returned. Note: a boolean is only returned since 2.14.
//
// The function takes the following parameters:
//
//   - childIter: valid TreeIter pointing to a row on the child model.
//
// The function returns the following values:
//
//   - sortIter: uninitialized TreeIter.
//   - ok: TRUE, if sort_iter was set, i.e. if sort_iter is a valid iterator
//     pointer to a visible row in the child model.
func (treeModelSort *TreeModelSort) ConvertChildIterToIter(childIter *TreeIter) (*TreeIter, bool) {
	var _arg0 *C.GtkTreeModelSort // out
	var _arg1 C.GtkTreeIter       // in
	var _arg2 *C.GtkTreeIter      // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(childIter)))

	_cret = C.gtk_tree_model_sort_convert_child_iter_to_iter(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModelSort)
	runtime.KeepAlive(childIter)

	var _sortIter *TreeIter // out
	var _ok bool            // out

	_sortIter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _sortIter, _ok
}

// ConvertChildPathToPath converts child_path to a path relative to
// tree_model_sort. That is, child_path points to a path in the child model. The
// returned path will point to the same row in the sorted model. If child_path
// isn’t a valid path on the child model, then NULL is returned.
//
// The function takes the following parameters:
//
//   - childPath to convert.
//
// The function returns the following values:
//
//   - treePath (optional): newly allocated TreePath, or NULL.
func (treeModelSort *TreeModelSort) ConvertChildPathToPath(childPath *TreePath) *TreePath {
	var _arg0 *C.GtkTreeModelSort // out
	var _arg1 *C.GtkTreePath      // out
	var _cret *C.GtkTreePath      // in

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(childPath)))

	_cret = C.gtk_tree_model_sort_convert_child_path_to_path(_arg0, _arg1)
	runtime.KeepAlive(treeModelSort)
	runtime.KeepAlive(childPath)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// ConvertIterToChildIter sets child_iter to point to the row pointed to by
// sorted_iter.
//
// The function takes the following parameters:
//
//   - sortedIter: valid TreeIter pointing to a row on tree_model_sort.
//
// The function returns the following values:
//
//   - childIter: uninitialized TreeIter.
func (treeModelSort *TreeModelSort) ConvertIterToChildIter(sortedIter *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeModelSort // out
	var _arg1 C.GtkTreeIter       // in
	var _arg2 *C.GtkTreeIter      // out

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(sortedIter)))

	C.gtk_tree_model_sort_convert_iter_to_child_iter(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeModelSort)
	runtime.KeepAlive(sortedIter)

	var _childIter *TreeIter // out

	_childIter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _childIter
}

// ConvertPathToChildPath converts sorted_path to a path on the child
// model of tree_model_sort. That is, sorted_path points to a location in
// tree_model_sort. The returned path will point to the same location in the
// model not being sorted. If sorted_path does not point to a location in the
// child model, NULL is returned.
//
// The function takes the following parameters:
//
//   - sortedPath to convert.
//
// The function returns the following values:
//
//   - treePath (optional): newly allocated TreePath, or NULL.
func (treeModelSort *TreeModelSort) ConvertPathToChildPath(sortedPath *TreePath) *TreePath {
	var _arg0 *C.GtkTreeModelSort // out
	var _arg1 *C.GtkTreePath      // out
	var _cret *C.GtkTreePath      // in

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(sortedPath)))

	_cret = C.gtk_tree_model_sort_convert_path_to_child_path(_arg0, _arg1)
	runtime.KeepAlive(treeModelSort)
	runtime.KeepAlive(sortedPath)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// Model returns the model the TreeModelSort is sorting.
//
// The function returns the following values:
//
//   - treeModel: "child model" being sorted.
func (treeModel *TreeModelSort) Model() *TreeModel {
	var _arg0 *C.GtkTreeModelSort // out
	var _cret *C.GtkTreeModel     // in

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))

	_cret = C.gtk_tree_model_sort_get_model(_arg0)
	runtime.KeepAlive(treeModel)

	var _treeModel *TreeModel // out

	_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeModel
}

// IterIsValid: > This function is slow. Only use it for debugging and/or
// testing > purposes.
//
// Checks if the given iter is a valid iter for this TreeModelSort.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE if the iter is valid, FALSE if the iter is invalid.
func (treeModelSort *TreeModelSort) IterIsValid(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeModelSort // out
	var _arg1 *C.GtkTreeIter      // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_model_sort_iter_is_valid(_arg0, _arg1)
	runtime.KeepAlive(treeModelSort)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ResetDefaultSortFunc: this resets the default sort function to be in the
// “unsorted” state. That is, it is in the same order as the child model.
// It will re-sort the model to be in the same order as the child model only if
// the TreeModelSort is in “unsorted” state.
func (treeModelSort *TreeModelSort) ResetDefaultSortFunc() {
	var _arg0 *C.GtkTreeModelSort // out

	_arg0 = (*C.GtkTreeModelSort)(unsafe.Pointer(coreglib.InternObject(treeModelSort).Native()))

	C.gtk_tree_model_sort_reset_default_sort_func(_arg0)
	runtime.KeepAlive(treeModelSort)
}

// TreeSelectionOverrides contains methods that are overridable.
type TreeSelectionOverrides struct {
	// Changed: signal emitted whenever the selection has (possibly) changed.
	Changed func()
}

func defaultTreeSelectionOverrides(v *TreeSelection) TreeSelectionOverrides {
	return TreeSelectionOverrides{
		Changed: v.changed,
	}
}

// TreeSelection object is a helper object to manage the selection for a
// TreeView widget. The TreeSelection object is automatically created when a new
// TreeView widget is created, and cannot exist independently of this widget.
// The primary reason the TreeSelection objects exists is for cleanliness of
// code and API. That is, there is no conceptual reason all these functions
// could not be methods on the TreeView widget instead of a separate function.
//
// The TreeSelection object is gotten from a TreeView by calling
// gtk_tree_view_get_selection(). It can be manipulated to check the selection
// status of the tree, as well as select and deselect individual rows. Selection
// is done completely view side. As a result, multiple views of the same model
// can have completely different selections. Additionally, you cannot change the
// selection of a row on the model that is not currently displayed by the view
// without expanding its parents first.
//
// One of the important things to remember when monitoring the selection of a
// view is that the TreeSelection::changed signal is mostly a hint. That is,
// it may only emit one signal when a range of rows is selected. Additionally,
// it may on occasion emit a TreeSelection::changed signal when nothing has
// happened (mostly as a result of programmers calling select_row on an already
// selected row).
type TreeSelection struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*TreeSelection)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeSelection, *TreeSelectionClass, TreeSelectionOverrides](
		GTypeTreeSelection,
		initTreeSelectionClass,
		wrapTreeSelection,
		defaultTreeSelectionOverrides,
	)
}

func initTreeSelectionClass(gclass unsafe.Pointer, overrides TreeSelectionOverrides, classInitFunc func(*TreeSelectionClass)) {
	pclass := (*C.GtkTreeSelectionClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTreeSelection))))

	if overrides.Changed != nil {
		pclass.changed = (*[0]byte)(C._gotk4_gtk3_TreeSelectionClass_changed)
	}

	if classInitFunc != nil {
		class := (*TreeSelectionClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeSelection(obj *coreglib.Object) *TreeSelection {
	return &TreeSelection{
		Object: obj,
	}
}

func marshalTreeSelection(p uintptr) (interface{}, error) {
	return wrapTreeSelection(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectChanged is emitted whenever the selection has (possibly) changed.
// Please note that this signal is mostly a hint. It may only be emitted once
// when a range of rows are selected, and it may occasionally be emitted when
// nothing has happened.
func (selection *TreeSelection) ConnectChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(selection, "changed", false, unsafe.Pointer(C._gotk4_gtk3_TreeSelection_ConnectChanged), f)
}

// CountSelectedRows returns the number of rows that have been selected in tree.
//
// The function returns the following values:
//
//   - gint: number of rows selected.
func (selection *TreeSelection) CountSelectedRows() int {
	var _arg0 *C.GtkTreeSelection // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	_cret = C.gtk_tree_selection_count_selected_rows(_arg0)
	runtime.KeepAlive(selection)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Mode gets the selection mode for selection. See
// gtk_tree_selection_set_mode().
//
// The function returns the following values:
//
//   - selectionMode: current selection mode.
func (selection *TreeSelection) Mode() SelectionMode {
	var _arg0 *C.GtkTreeSelection // out
	var _cret C.GtkSelectionMode  // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	_cret = C.gtk_tree_selection_get_mode(_arg0)
	runtime.KeepAlive(selection)

	var _selectionMode SelectionMode // out

	_selectionMode = SelectionMode(_cret)

	return _selectionMode
}

// Selected sets iter to the currently selected node, if selection is set to
// GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE.
//
// The iter argument may be NULL if you just want to test if selection has any
// selected nodes.
//
// The model argument is filled with the current model as a convenience.
//
// This function will not work with GTK_SELECTION_MULTIPLE. See
// gtk_tree_selection_get_selected_rows() instead.
//
// The function returns the following values:
//
//   - model (optional): model.
//   - iter (optional): iterator for the selected row.
//   - ok: TRUE, if there is a selected node.
func (selection *TreeSelection) Selected() (*TreeModel, *TreeIter, bool) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreeModel     // in
	var _arg2 C.GtkTreeIter       // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	_cret = C.gtk_tree_selection_get_selected(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(selection)

	var _model *TreeModel // out
	var _iter *TreeIter   // out
	var _ok bool          // out

	if _arg1 != nil {
		_model = wrapTreeModel(coreglib.Take(unsafe.Pointer(_arg1)))
	}
	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _model, _iter, _ok
}

// SelectedRows creates a list of path of all selected rows.
//
// Additionally, if you are planning on modifying the model after calling
// this function, you may want to convert the returned list into a list of
// TreeRowReferences.
//
// To do this, you can use gtk_tree_row_reference_new().
//
// To free the return value, use:
//
//	g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);.
//
// The function returns the following values:
//
//   - model (optional): pointer to set to the TreeModel, or NULL.
//   - list: selected paths.
func (selection *TreeSelection) SelectedRows() (*TreeModel, []*TreePath) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreeModel     // in
	var _cret *C.GList            // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	_cret = C.gtk_tree_selection_get_selected_rows(_arg0, &_arg1)
	runtime.KeepAlive(selection)

	var _model *TreeModel // out
	var _list []*TreePath // out

	if _arg1 != nil {
		_model = wrapTreeModel(coreglib.Take(unsafe.Pointer(_arg1)))
	}
	_list = make([]*TreePath, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTreePath)(v)
		var dst *TreePath // out
		dst = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _model, _list
}

// TreeView returns the tree view associated with selection.
//
// The function returns the following values:
//
//   - treeView: TreeView.
func (selection *TreeSelection) TreeView() *TreeView {
	var _arg0 *C.GtkTreeSelection // out
	var _cret *C.GtkTreeView      // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	_cret = C.gtk_tree_selection_get_tree_view(_arg0)
	runtime.KeepAlive(selection)

	var _treeView *TreeView // out

	_treeView = wrapTreeView(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeView
}

// IterIsSelected returns TRUE if the row at iter is currently selected.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE, if iter is selected.
func (selection *TreeSelection) IterIsSelected(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreeIter      // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_selection_iter_is_selected(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// PathIsSelected returns TRUE if the row pointed to by path is currently
// selected. If path does not point to a valid location, FALSE is returned.
//
// The function takes the following parameters:
//
//   - path to check selection on.
//
// The function returns the following values:
//
//   - ok: TRUE if path is selected.
func (selection *TreeSelection) PathIsSelected(path *TreePath) bool {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreePath      // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_selection_path_is_selected(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SelectAll selects all the nodes. selection must be set to
// K_SELECTION_MULTIPLE mode.
func (selection *TreeSelection) SelectAll() {
	var _arg0 *C.GtkTreeSelection // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	C.gtk_tree_selection_select_all(_arg0)
	runtime.KeepAlive(selection)
}

// SelectIter selects the specified iterator.
//
// The function takes the following parameters:
//
//   - iter to be selected.
func (selection *TreeSelection) SelectIter(iter *TreeIter) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreeIter      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_selection_select_iter(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(iter)
}

// SelectPath: select the row at path.
//
// The function takes the following parameters:
//
//   - path to be selected.
func (selection *TreeSelection) SelectPath(path *TreePath) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreePath      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_selection_select_path(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(path)
}

// SelectRange selects a range of nodes, determined by start_path and end_path
// inclusive. selection must be set to K_SELECTION_MULTIPLE mode.
//
// The function takes the following parameters:
//
//   - startPath: initial node of the range.
//   - endPath: final node of the range.
func (selection *TreeSelection) SelectRange(startPath, endPath *TreePath) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkTreePath      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(startPath)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(endPath)))

	C.gtk_tree_selection_select_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(startPath)
	runtime.KeepAlive(endPath)
}

// SelectedForEach calls a function for each selected node. Note that you
// cannot modify the tree or selection from within this function. As a result,
// gtk_tree_selection_get_selected_rows() might be more useful.
//
// The function takes the following parameters:
//
//   - fn: function to call for each selected node.
func (selection *TreeSelection) SelectedForEach(fn TreeSelectionForEachFunc) {
	var _arg0 *C.GtkTreeSelection           // out
	var _arg1 C.GtkTreeSelectionForeachFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeSelectionForEachFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_tree_selection_selected_foreach(_arg0, _arg1, _arg2)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(fn)
}

// SetMode sets the selection mode of the selection. If the previous type was
// K_SELECTION_MULTIPLE, then the anchor is kept selected, if it was previously
// selected.
//
// The function takes the following parameters:
//
//   - typ: selection mode.
func (selection *TreeSelection) SetMode(typ SelectionMode) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 C.GtkSelectionMode  // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = C.GtkSelectionMode(typ)

	C.gtk_tree_selection_set_mode(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(typ)
}

// SetSelectFunction sets the selection function.
//
// If set, this function is called before any node is selected or unselected,
// giving some control over which nodes are selected. The select function should
// return TRUE if the state of the node may be toggled, and FALSE if the state
// of the node should be left unchanged.
//
// The function takes the following parameters:
//
//   - fn (optional): selection function. May be NULL.
func (selection *TreeSelection) SetSelectFunction(fn TreeSelectionFunc) {
	var _arg0 *C.GtkTreeSelection    // out
	var _arg1 C.GtkTreeSelectionFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	if fn != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeSelectionFunc)
		_arg2 = C.gpointer(gbox.Assign(fn))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_selection_set_select_function(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(fn)
}

// UnselectAll unselects all the nodes.
func (selection *TreeSelection) UnselectAll() {
	var _arg0 *C.GtkTreeSelection // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	C.gtk_tree_selection_unselect_all(_arg0)
	runtime.KeepAlive(selection)
}

// UnselectIter unselects the specified iterator.
//
// The function takes the following parameters:
//
//   - iter to be unselected.
func (selection *TreeSelection) UnselectIter(iter *TreeIter) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreeIter      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_tree_selection_unselect_iter(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(iter)
}

// UnselectPath unselects the row at path.
//
// The function takes the following parameters:
//
//   - path to be unselected.
func (selection *TreeSelection) UnselectPath(path *TreePath) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreePath      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_selection_unselect_path(_arg0, _arg1)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(path)
}

// UnselectRange unselects a range of nodes, determined by start_path and
// end_path inclusive.
//
// The function takes the following parameters:
//
//   - startPath: initial node of the range.
//   - endPath: initial node of the range.
func (selection *TreeSelection) UnselectRange(startPath, endPath *TreePath) {
	var _arg0 *C.GtkTreeSelection // out
	var _arg1 *C.GtkTreePath      // out
	var _arg2 *C.GtkTreePath      // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(startPath)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(endPath)))

	C.gtk_tree_selection_unselect_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(selection)
	runtime.KeepAlive(startPath)
	runtime.KeepAlive(endPath)
}

// Changed: signal emitted whenever the selection has (possibly) changed.
func (selection *TreeSelection) changed() {
	gclass := (*C.GtkTreeSelectionClass)(coreglib.PeekParentClass(selection))
	fnarg := gclass.changed

	var _arg0 *C.GtkTreeSelection // out

	_arg0 = (*C.GtkTreeSelection)(unsafe.Pointer(coreglib.InternObject(selection).Native()))

	C._gotk4_gtk3_TreeSelection_virtual_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(selection)
}

// TreeStoreOverrides contains methods that are overridable.
type TreeStoreOverrides struct {
}

func defaultTreeStoreOverrides(v *TreeStore) TreeStoreOverrides {
	return TreeStoreOverrides{}
}

// TreeStore object is a list model for use with a TreeView widget.
// It implements the TreeModel interface, and consequentially, can use all of
// the methods available there. It also implements the TreeSortable interface so
// it can be sorted by the view. Finally, it also implements the tree [drag and
// drop][gtk3-GtkTreeView-drag-and-drop] interfaces.
//
// # GtkTreeStore as GtkBuildable
//
// The GtkTreeStore implementation of the Buildable interface allows to specify
// the model columns with a <columns> element that may contain multiple <column>
// elements, each specifying one model column. The “type” attribute specifies
// the data type for the column.
//
// An example of a UI Definition fragment for a tree store:
//
//	<object class="GtkTreeStore">
//	  <columns>
//	    <column type="gchararray"/>
//	    <column type="gchararray"/>
//	    <column type="gint"/>
//	  </columns>
//	</object>.
type TreeStore struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
	TreeDragDest
	TreeDragSource
	TreeSortable
}

var (
	_ coreglib.Objector = (*TreeStore)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeStore, *TreeStoreClass, TreeStoreOverrides](
		GTypeTreeStore,
		initTreeStoreClass,
		wrapTreeStore,
		defaultTreeStoreOverrides,
	)
}

func initTreeStoreClass(gclass unsafe.Pointer, overrides TreeStoreOverrides, classInitFunc func(*TreeStoreClass)) {
	if classInitFunc != nil {
		class := (*TreeStoreClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeStore(obj *coreglib.Object) *TreeStore {
	return &TreeStore{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
		TreeDragDest: TreeDragDest{
			Object: obj,
		},
		TreeDragSource: TreeDragSource{
			Object: obj,
		},
		TreeSortable: TreeSortable{
			TreeModel: TreeModel{
				Object: obj,
			},
		},
	}
}

func marshalTreeStore(p uintptr) (interface{}, error) {
	return wrapTreeStore(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewTreeStore: non vararg creation function. Used primarily by language
// bindings.
//
// The function takes the following parameters:
//
//   - types: array of #GType types for the columns, from first to last.
//
// The function returns the following values:
//
//   - treeStore: new TreeStore.
func NewTreeStore(types []coreglib.Type) *TreeStore {
	var _arg2 *C.GType // out
	var _arg1 C.gint
	var _cret *C.GtkTreeStore // in

	_arg1 = (C.gint)(len(types))
	_arg2 = (*C.GType)(C.calloc(C.size_t(len(types)), C.size_t(C.sizeof_GType)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GType)(_arg2), len(types))
		for i := range types {
			out[i] = C.GType(types[i])
		}
	}

	_cret = C.gtk_tree_store_newv(_arg1, _arg2)
	runtime.KeepAlive(types)

	var _treeStore *TreeStore // out

	_treeStore = wrapTreeStore(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _treeStore
}

// Append appends a new row to tree_store. If parent is non-NULL, then it will
// append the new row after the last child of parent, otherwise it will append
// a row to the top level. iter will be changed to point to this new row.
// The row will be empty after this function is called. To fill in values,
// you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the appended row.
func (treeStore *TreeStore) Append(parent *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}

	C.gtk_tree_store_append(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// Clear removes all rows from tree_store.
func (treeStore *TreeStore) Clear() {
	var _arg0 *C.GtkTreeStore // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))

	C.gtk_tree_store_clear(_arg0)
	runtime.KeepAlive(treeStore)
}

// Insert creates a new row at position. If parent is non-NULL, then the row
// will be made a child of parent. Otherwise, the row will be created at the
// toplevel. If position is -1 or is larger than the number of rows at that
// level, then the new row will be inserted to the end of the list. iter will be
// changed to point to this new row. The row will be empty after this function
// is called. To fill in values, you need to call gtk_tree_store_set() or
// gtk_tree_store_set_value().
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//   - position to insert the new row, or -1 for last.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (treeStore *TreeStore) Insert(parent *TreeIter, position int) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gint          // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	_arg3 = C.gint(position)

	C.gtk_tree_store_insert(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(position)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertAfter inserts a new row after sibling. If sibling is NULL, then the
// row will be prepended to parent ’s children. If parent and sibling are NULL,
// then the row will be prepended to the toplevel. If both sibling and parent
// are set, then parent must be the parent of sibling. When sibling is set,
// parent is optional.
//
// iter will be changed to point to this new row. The row will be empty
// after this function is called. To fill in values, you need to call
// gtk_tree_store_set() or gtk_tree_store_set_value().
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//   - sibling (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (treeStore *TreeStore) InsertAfter(parent, sibling *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	if sibling != nil {
		_arg3 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(sibling)))
	}

	C.gtk_tree_store_insert_after(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(sibling)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertBefore inserts a new row before sibling. If sibling is NULL, then the
// row will be appended to parent ’s children. If parent and sibling are NULL,
// then the row will be appended to the toplevel. If both sibling and parent
// are set, then parent must be the parent of sibling. When sibling is set,
// parent is optional.
//
// iter will be changed to point to this new row. The row will be empty
// after this function is called. To fill in values, you need to call
// gtk_tree_store_set() or gtk_tree_store_set_value().
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//   - sibling (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the new row.
func (treeStore *TreeStore) InsertBefore(parent, sibling *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	if sibling != nil {
		_arg3 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(sibling)))
	}

	C.gtk_tree_store_insert_before(_arg0, &_arg1, _arg2, _arg3)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(sibling)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// InsertWithValues: variant of gtk_tree_store_insert_with_values() which takes
// the columns and values as two arrays, instead of varargs. This function is
// mainly intended for language bindings.
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//   - position to insert the new row, or -1 for last.
//   - columns: array of column numbers.
//   - values: array of GValues.
//
// The function returns the following values:
//
//   - iter (optional): unset TreeIter to set the new row, or NULL.
func (treeStore *TreeStore) InsertWithValues(parent *TreeIter, position int, columns []int, values []coreglib.Value) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out
	var _arg3 C.gint          // out
	var _arg4 *C.gint         // out
	var _arg6 C.gint
	var _arg5 *C.GValue // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}
	_arg3 = C.gint(position)
	_arg6 = (C.gint)(len(columns))
	_arg4 = (*C.gint)(C.calloc(C.size_t(len(columns)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg4))
	{
		out := unsafe.Slice((*C.gint)(_arg4), len(columns))
		for i := range columns {
			out[i] = C.gint(columns[i])
		}
	}
	_arg6 = (C.gint)(len(values))
	_arg5 = (*C.GValue)(C.calloc(C.size_t(len(values)), C.size_t(C.sizeof_GValue)))
	defer C.free(unsafe.Pointer(_arg5))
	{
		out := unsafe.Slice((*C.GValue)(_arg5), len(values))
		for i := range values {
			out[i] = *(*C.GValue)(unsafe.Pointer((&values[i]).Native()))
		}
	}

	C.gtk_tree_store_insert_with_valuesv(_arg0, &_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)
	runtime.KeepAlive(position)
	runtime.KeepAlive(columns)
	runtime.KeepAlive(values)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// IsAncestor returns TRUE if iter is an ancestor of descendant. That is,
// iter is the parent (or grandparent or great-grandparent) of descendant.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter.
//   - descendant: valid TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE, if iter is an ancestor of descendant.
func (treeStore *TreeStore) IsAncestor(iter, descendant *TreeIter) bool {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(descendant)))

	_cret = C.gtk_tree_store_is_ancestor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(descendant)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterDepth returns the depth of iter. This will be 0 for anything on the root
// level, 1 for anything down a level, etc.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter.
//
// The function returns the following values:
//
//   - gint: depth of iter.
func (treeStore *TreeStore) IterDepth(iter *TreeIter) int {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gint          // in

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_store_iter_depth(_arg0, _arg1)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IterIsValid: WARNING: This function is slow. Only use it for debugging and/or
// testing purposes.
//
// Checks if the given iter is a valid iter for this TreeStore.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE if the iter is valid, FALSE if the iter is invalid.
func (treeStore *TreeStore) IterIsValid(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_store_iter_is_valid(_arg0, _arg1)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MoveAfter moves iter in tree_store to the position after position. iter and
// position should be in the same level. Note that this function only works with
// unsorted stores. If position is NULL, iter will be moved to the start of the
// level.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//   - position (optional): TreeIter.
func (treeStore *TreeStore) MoveAfter(iter, position *TreeIter) {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if position != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(position)))
	}

	C.gtk_tree_store_move_after(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(position)
}

// MoveBefore moves iter in tree_store to the position before position. iter and
// position should be in the same level. Note that this function only works with
// unsorted stores. If position is NULL, iter will be moved to the end of the
// level.
//
// The function takes the following parameters:
//
//   - iter: TreeIter.
//   - position (optional) or NULL.
func (treeStore *TreeStore) MoveBefore(iter, position *TreeIter) {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if position != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(position)))
	}

	C.gtk_tree_store_move_before(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(position)
}

// Prepend prepends a new row to tree_store. If parent is non-NULL, then it
// will prepend the new row before the first child of parent, otherwise it will
// prepend a row to the top level. iter will be changed to point to this new
// row. The row will be empty after this function is called. To fill in values,
// you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
//
// The function takes the following parameters:
//
//   - parent (optional): valid TreeIter, or NULL.
//
// The function returns the following values:
//
//   - iter: unset TreeIter to set to the prepended row.
func (treeStore *TreeStore) Prepend(parent *TreeIter) *TreeIter {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 C.GtkTreeIter   // in
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	if parent != nil {
		_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(parent)))
	}

	C.gtk_tree_store_prepend(_arg0, &_arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(parent)

	var _iter *TreeIter // out

	_iter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _iter
}

// Remove removes iter from tree_store. After being removed, iter is set to the
// next valid row at that level, or invalidated if it previously pointed to the
// last one.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter.
//
// The function returns the following values:
//
//   - ok: TRUE if iter is still valid, FALSE if not.
func (treeStore *TreeStore) Remove(iter *TreeIter) bool {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_store_remove(_arg0, _arg1)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetColumnTypes: this function is meant primarily for #GObjects that inherit
// from TreeStore, and should only be used when constructing a new TreeStore.
// It will not function after a row has been added, or a method on the TreeModel
// interface is called.
//
// The function takes the following parameters:
//
//   - types: array of #GType types, one for each column.
func (treeStore *TreeStore) SetColumnTypes(types []coreglib.Type) {
	var _arg0 *C.GtkTreeStore // out
	var _arg2 *C.GType        // out
	var _arg1 C.gint

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (C.gint)(len(types))
	_arg2 = (*C.GType)(C.calloc(C.size_t(len(types)), C.size_t(C.sizeof_GType)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GType)(_arg2), len(types))
		for i := range types {
			out[i] = C.GType(types[i])
		}
	}

	C.gtk_tree_store_set_column_types(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(types)
}

// SetValue sets the data in the cell specified by iter and column. The type of
// value must be convertible to the type of the column.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter for the row being modified.
//   - column number to modify.
//   - value: new value for the cell.
func (treeStore *TreeStore) SetValue(iter *TreeIter, column int, value *coreglib.Value) {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 C.gint          // out
	var _arg3 *C.GValue       // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = C.gint(column)
	_arg3 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_tree_store_set_value(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(column)
	runtime.KeepAlive(value)
}

// Set: variant of gtk_tree_store_set_valist() which takes the columns and
// values as two arrays, instead of varargs. This function is mainly intended
// for language bindings or in case the number of columns to change is not known
// until run-time.
//
// The function takes the following parameters:
//
//   - iter: valid TreeIter for the row being modified.
//   - columns: array of column numbers.
//   - values: array of GValues.
func (treeStore *TreeStore) Set(iter *TreeIter, columns []int, values []coreglib.Value) {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.gint         // out
	var _arg4 C.gint
	var _arg3 *C.GValue // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg4 = (C.gint)(len(columns))
	_arg2 = (*C.gint)(C.calloc(C.size_t(len(columns)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.gint)(_arg2), len(columns))
		for i := range columns {
			out[i] = C.gint(columns[i])
		}
	}
	_arg4 = (C.gint)(len(values))
	_arg3 = (*C.GValue)(C.calloc(C.size_t(len(values)), C.size_t(C.sizeof_GValue)))
	defer C.free(unsafe.Pointer(_arg3))
	{
		out := unsafe.Slice((*C.GValue)(_arg3), len(values))
		for i := range values {
			out[i] = *(*C.GValue)(unsafe.Pointer((&values[i]).Native()))
		}
	}

	C.gtk_tree_store_set_valuesv(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(columns)
	runtime.KeepAlive(values)
}

// Swap swaps a and b in the same level of tree_store. Note that this function
// only works with unsorted stores.
//
// The function takes the following parameters:
//
//   - a: TreeIter.
//   - b: another TreeIter.
func (treeStore *TreeStore) Swap(a, b *TreeIter) {
	var _arg0 *C.GtkTreeStore // out
	var _arg1 *C.GtkTreeIter  // out
	var _arg2 *C.GtkTreeIter  // out

	_arg0 = (*C.GtkTreeStore)(unsafe.Pointer(coreglib.InternObject(treeStore).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(a)))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(b)))

	C.gtk_tree_store_swap(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeStore)
	runtime.KeepAlive(a)
	runtime.KeepAlive(b)
}

// TreeViewOverrides contains methods that are overridable.
type TreeViewOverrides struct {
	ColumnsChanged func()
	CursorChanged  func()
	// The function takes the following parameters:
	//
	//   - logical
	//   - expand
	//   - openAll
	ExpandCollapseCursorRow func(logical, expand, openAll bool) bool
	// The function takes the following parameters:
	//
	//   - step
	//   - count
	MoveCursor func(step MovementStep, count int) bool
	// RowActivated activates the cell determined by path and column.
	//
	// The function takes the following parameters:
	//
	//   - path to be activated.
	//   - column to be activated.
	RowActivated func(path *TreePath, column *TreeViewColumn)
	// The function takes the following parameters:
	//
	//   - iter
	//   - path
	RowCollapsed func(iter *TreeIter, path *TreePath)
	// The function takes the following parameters:
	//
	//   - iter
	//   - path
	RowExpanded            func(iter *TreeIter, path *TreePath)
	SelectAll              func() bool
	SelectCursorParent     func() bool
	SelectCursorRow        func(startEditing bool) bool
	StartInteractiveSearch func() bool
	// The function takes the following parameters:
	//
	//   - iter
	//   - path
	TestCollapseRow func(iter *TreeIter, path *TreePath) bool
	// The function takes the following parameters:
	//
	//   - iter
	//   - path
	TestExpandRow   func(iter *TreeIter, path *TreePath) bool
	ToggleCursorRow func() bool
	UnselectAll     func() bool
}

func defaultTreeViewOverrides(v *TreeView) TreeViewOverrides {
	return TreeViewOverrides{
		ColumnsChanged:          v.columnsChanged,
		CursorChanged:           v.cursorChanged,
		ExpandCollapseCursorRow: v.expandCollapseCursorRow,
		MoveCursor:              v.moveCursor,
		RowActivated:            v.rowActivated,
		RowCollapsed:            v.rowCollapsed,
		RowExpanded:             v.rowExpanded,
		SelectAll:               v.selectAll,
		SelectCursorParent:      v.selectCursorParent,
		SelectCursorRow:         v.selectCursorRow,
		StartInteractiveSearch:  v.startInteractiveSearch,
		TestCollapseRow:         v.testCollapseRow,
		TestExpandRow:           v.testExpandRow,
		ToggleCursorRow:         v.toggleCursorRow,
		UnselectAll:             v.unselectAll,
	}
}

// TreeView: widget that displays any object that implements the TreeModel
// interface.
//
// Please refer to the tree widget conceptual overview (TreeWidget.html) for an
// overview of all the objects and data types related to the tree widget and how
// they work together.
//
// Several different coordinate systems are exposed in the GtkTreeView API.
// These are:
//
// ! (tree-view-coordinates.png)
//
// Coordinate systems in GtkTreeView API:
//
// - Widget coordinates: Coordinates relative to the widget (usually
// widget->window).
//
// - Bin window coordinates: Coordinates relative to the window that GtkTreeView
// renders to.
//
// - Tree coordinates: Coordinates relative to the entire scrollable area of
// GtkTreeView. These coordinates start at (0, 0) for row 0 of the tree.
//
// Several functions are available for converting between the different
// coordinate systems. The most common translations are between widget and
// bin window coordinates and between bin window and tree coordinates. For the
// former you can use gtk_tree_view_convert_widget_to_bin_window_coords() (and
// vice versa), for the latter gtk_tree_view_convert_bin_window_to_tree_coords()
// (and vice versa).
//
// # GtkTreeView as GtkBuildable
//
// The GtkTreeView implementation of the GtkBuildable interface accepts
// TreeViewColumn objects as <child> elements and exposes the internal
// TreeSelection in UI definitions.
//
// An example of a UI definition fragment with GtkTreeView:
//
//	treeview.view
//	├── header
//	│   ├── <column header>
//	┊   ┊
//	│   ╰── <column header>
//	│
//	╰── [rubberband]
//
// GtkTreeView has a main CSS node with name treeview and style class .view.
// It has a subnode with name header, which is the parent for all the column
// header widgets' CSS nodes. For rubberband selection, a subnode with name
// rubberband is used.
type TreeView struct {
	_ [0]func() // equal guard
	Container

	*coreglib.Object
	Scrollable
}

var (
	_ Containerer       = (*TreeView)(nil)
	_ coreglib.Objector = (*TreeView)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeView, *TreeViewClass, TreeViewOverrides](
		GTypeTreeView,
		initTreeViewClass,
		wrapTreeView,
		defaultTreeViewOverrides,
	)
}

func initTreeViewClass(gclass unsafe.Pointer, overrides TreeViewOverrides, classInitFunc func(*TreeViewClass)) {
	pclass := (*C.GtkTreeViewClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTreeView))))

	if overrides.ColumnsChanged != nil {
		pclass.columns_changed = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_columns_changed)
	}

	if overrides.CursorChanged != nil {
		pclass.cursor_changed = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_cursor_changed)
	}

	if overrides.ExpandCollapseCursorRow != nil {
		pclass.expand_collapse_cursor_row = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_expand_collapse_cursor_row)
	}

	if overrides.MoveCursor != nil {
		pclass.move_cursor = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_move_cursor)
	}

	if overrides.RowActivated != nil {
		pclass.row_activated = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_row_activated)
	}

	if overrides.RowCollapsed != nil {
		pclass.row_collapsed = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_row_collapsed)
	}

	if overrides.RowExpanded != nil {
		pclass.row_expanded = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_row_expanded)
	}

	if overrides.SelectAll != nil {
		pclass.select_all = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_select_all)
	}

	if overrides.SelectCursorParent != nil {
		pclass.select_cursor_parent = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_select_cursor_parent)
	}

	if overrides.SelectCursorRow != nil {
		pclass.select_cursor_row = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_select_cursor_row)
	}

	if overrides.StartInteractiveSearch != nil {
		pclass.start_interactive_search = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_start_interactive_search)
	}

	if overrides.TestCollapseRow != nil {
		pclass.test_collapse_row = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_test_collapse_row)
	}

	if overrides.TestExpandRow != nil {
		pclass.test_expand_row = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_test_expand_row)
	}

	if overrides.ToggleCursorRow != nil {
		pclass.toggle_cursor_row = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_toggle_cursor_row)
	}

	if overrides.UnselectAll != nil {
		pclass.unselect_all = (*[0]byte)(C._gotk4_gtk3_TreeViewClass_unselect_all)
	}

	if classInitFunc != nil {
		class := (*TreeViewClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeView(obj *coreglib.Object) *TreeView {
	return &TreeView{
		Container: Container{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
		},
		Object: obj,
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalTreeView(p uintptr) (interface{}, error) {
	return wrapTreeView(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectColumnsChanged: number of columns of the treeview has changed.
func (treeView *TreeView) ConnectColumnsChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "columns-changed", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectColumnsChanged), f)
}

// ConnectCursorChanged: position of the cursor (focused cell) has changed.
func (treeView *TreeView) ConnectCursorChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "cursor-changed", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectCursorChanged), f)
}

func (treeView *TreeView) ConnectExpandCollapseCursorRow(f func(object, p0, p1 bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "expand-collapse-cursor-row", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectExpandCollapseCursorRow), f)
}

// ConnectMoveCursor signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user presses one of the cursor keys.
//
// Applications should not connect to it, but may emit it with
// g_signal_emit_by_name() if they need to control the cursor
// programmatically. In contrast to gtk_tree_view_set_cursor()
// and gtk_tree_view_set_cursor_on_cell() when moving horizontally
// TreeView::move-cursor does not reset the current selection.
func (treeView *TreeView) ConnectMoveCursor(f func(step MovementStep, direction int) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "move-cursor", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectMoveCursor), f)
}

// ConnectRowActivated: "row-activated" signal is emitted when the method
// gtk_tree_view_row_activated() is called, when the user double clicks a
// treeview row with the "activate-on-single-click" property set to FALSE,
// or when the user single clicks a row when the "activate-on-single-click"
// property set to TRUE. It is also emitted when a non-editable row is selected
// and one of the keys: Space, Shift+Space, Return or Enter is pressed.
//
// For selection handling refer to the tree widget conceptual overview
// (TreeWidget.html) as well as TreeSelection.
func (treeView *TreeView) ConnectRowActivated(f func(path *TreePath, column *TreeViewColumn)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "row-activated", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectRowActivated), f)
}

// ConnectRowCollapsed: given row has been collapsed (child nodes are hidden).
func (treeView *TreeView) ConnectRowCollapsed(f func(iter *TreeIter, path *TreePath)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "row-collapsed", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectRowCollapsed), f)
}

// ConnectRowExpanded: given row has been expanded (child nodes are shown).
func (treeView *TreeView) ConnectRowExpanded(f func(iter *TreeIter, path *TreePath)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "row-expanded", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectRowExpanded), f)
}

func (treeView *TreeView) ConnectSelectAll(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "select-all", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectSelectAll), f)
}

func (treeView *TreeView) ConnectSelectCursorParent(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "select-cursor-parent", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectSelectCursorParent), f)
}

func (treeView *TreeView) ConnectSelectCursorRow(f func(object bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "select-cursor-row", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectSelectCursorRow), f)
}

func (treeView *TreeView) ConnectStartInteractiveSearch(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "start-interactive-search", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectStartInteractiveSearch), f)
}

// ConnectTestCollapseRow: given row is about to be collapsed (hide its
// children nodes). Use this signal if you need to control the collapsibility of
// individual rows.
func (treeView *TreeView) ConnectTestCollapseRow(f func(iter *TreeIter, path *TreePath) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "test-collapse-row", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectTestCollapseRow), f)
}

// ConnectTestExpandRow: given row is about to be expanded (show its children
// nodes). Use this signal if you need to control the expandability of
// individual rows.
func (treeView *TreeView) ConnectTestExpandRow(f func(iter *TreeIter, path *TreePath) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "test-expand-row", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectTestExpandRow), f)
}

func (treeView *TreeView) ConnectToggleCursorRow(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "toggle-cursor-row", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectToggleCursorRow), f)
}

func (treeView *TreeView) ConnectUnselectAll(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeView, "unselect-all", false, unsafe.Pointer(C._gotk4_gtk3_TreeView_ConnectUnselectAll), f)
}

// NewTreeView creates a new TreeView widget.
//
// The function returns the following values:
//
//   - treeView: newly created TreeView widget.
func NewTreeView() *TreeView {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_tree_view_new()

	var _treeView *TreeView // out

	_treeView = wrapTreeView(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeView
}

// NewTreeViewWithModel creates a new TreeView widget with the model initialized
// to model.
//
// The function takes the following parameters:
//
//   - model: model.
//
// The function returns the following values:
//
//   - treeView: newly created TreeView widget.
func NewTreeViewWithModel(model TreeModeller) *TreeView {
	var _arg1 *C.GtkTreeModel // out
	var _cret *C.GtkWidget    // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))

	_cret = C.gtk_tree_view_new_with_model(_arg1)
	runtime.KeepAlive(model)

	var _treeView *TreeView // out

	_treeView = wrapTreeView(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeView
}

// AppendColumn appends column to the list of columns. If tree_view has
// “fixed_height” mode enabled, then column must have its “sizing” property set
// to be GTK_TREE_VIEW_COLUMN_FIXED.
//
// The function takes the following parameters:
//
//   - column to add.
//
// The function returns the following values:
//
//   - gint: number of columns in tree_view after appending.
func (treeView *TreeView) AppendColumn(column *TreeViewColumn) int {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))

	_cret = C.gtk_tree_view_append_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// CollapseAll: recursively collapses all visible, expanded nodes in tree_view.
func (treeView *TreeView) CollapseAll() {
	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_collapse_all(_arg0)
	runtime.KeepAlive(treeView)
}

// CollapseRow collapses a row (hides its child rows, if they exist).
//
// The function takes the following parameters:
//
//   - path to a row in the tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if the row was collapsed.
func (treeView *TreeView) CollapseRow(path *TreePath) bool {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_view_collapse_row(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ColumnsAutosize resizes all columns to their optimal width. Only works after
// the treeview has been realized.
func (treeView *TreeView) ColumnsAutosize() {
	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_columns_autosize(_arg0)
	runtime.KeepAlive(treeView)
}

// ConvertBinWindowToTreeCoords converts bin_window coordinates to coordinates
// for the tree (the full scrollable area of the tree).
//
// The function takes the following parameters:
//
//   - bx: x coordinate relative to bin_window.
//   - by: y coordinate relative to bin_window.
//
// The function returns the following values:
//
//   - tx: return location for tree X coordinate.
//   - ty: return location for tree Y coordinate.
func (treeView *TreeView) ConvertBinWindowToTreeCoords(bx, by int) (tx, ty int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(bx)
	_arg2 = C.gint(by)

	C.gtk_tree_view_convert_bin_window_to_tree_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(bx)
	runtime.KeepAlive(by)

	var _tx int // out
	var _ty int // out

	_tx = int(_arg3)
	_ty = int(_arg4)

	return _tx, _ty
}

// ConvertBinWindowToWidgetCoords converts bin_window coordinates (see
// gtk_tree_view_get_bin_window()) to widget relative coordinates.
//
// The function takes the following parameters:
//
//   - bx: bin_window X coordinate.
//   - by: bin_window Y coordinate.
//
// The function returns the following values:
//
//   - wx: return location for widget X coordinate.
//   - wy: return location for widget Y coordinate.
func (treeView *TreeView) ConvertBinWindowToWidgetCoords(bx, by int) (wx, wy int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(bx)
	_arg2 = C.gint(by)

	C.gtk_tree_view_convert_bin_window_to_widget_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(bx)
	runtime.KeepAlive(by)

	var _wx int // out
	var _wy int // out

	_wx = int(_arg3)
	_wy = int(_arg4)

	return _wx, _wy
}

// ConvertTreeToBinWindowCoords converts tree coordinates (coordinates in full
// scrollable area of the tree) to bin_window coordinates.
//
// The function takes the following parameters:
//
//   - tx: tree X coordinate.
//   - ty: tree Y coordinate.
//
// The function returns the following values:
//
//   - bx: return location for X coordinate relative to bin_window.
//   - by: return location for Y coordinate relative to bin_window.
func (treeView *TreeView) ConvertTreeToBinWindowCoords(tx, ty int) (bx, by int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(tx)
	_arg2 = C.gint(ty)

	C.gtk_tree_view_convert_tree_to_bin_window_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(tx)
	runtime.KeepAlive(ty)

	var _bx int // out
	var _by int // out

	_bx = int(_arg3)
	_by = int(_arg4)

	return _bx, _by
}

// ConvertTreeToWidgetCoords converts tree coordinates (coordinates in full
// scrollable area of the tree) to widget coordinates.
//
// The function takes the following parameters:
//
//   - tx: x coordinate relative to the tree.
//   - ty: y coordinate relative to the tree.
//
// The function returns the following values:
//
//   - wx: return location for widget X coordinate.
//   - wy: return location for widget Y coordinate.
func (treeView *TreeView) ConvertTreeToWidgetCoords(tx, ty int) (wx, wy int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(tx)
	_arg2 = C.gint(ty)

	C.gtk_tree_view_convert_tree_to_widget_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(tx)
	runtime.KeepAlive(ty)

	var _wx int // out
	var _wy int // out

	_wx = int(_arg3)
	_wy = int(_arg4)

	return _wx, _wy
}

// ConvertWidgetToBinWindowCoords converts widget coordinates to coordinates for
// the bin_window (see gtk_tree_view_get_bin_window()).
//
// The function takes the following parameters:
//
//   - wx: x coordinate relative to the widget.
//   - wy: y coordinate relative to the widget.
//
// The function returns the following values:
//
//   - bx: return location for bin_window X coordinate.
//   - by: return location for bin_window Y coordinate.
func (treeView *TreeView) ConvertWidgetToBinWindowCoords(wx, wy int) (bx, by int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(wx)
	_arg2 = C.gint(wy)

	C.gtk_tree_view_convert_widget_to_bin_window_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(wx)
	runtime.KeepAlive(wy)

	var _bx int // out
	var _by int // out

	_bx = int(_arg3)
	_by = int(_arg4)

	return _bx, _by
}

// ConvertWidgetToTreeCoords converts widget coordinates to coordinates for the
// tree (the full scrollable area of the tree).
//
// The function takes the following parameters:
//
//   - wx: x coordinate relative to the widget.
//   - wy: y coordinate relative to the widget.
//
// The function returns the following values:
//
//   - tx: return location for tree X coordinate.
//   - ty: return location for tree Y coordinate.
func (treeView *TreeView) ConvertWidgetToTreeCoords(wx, wy int) (tx, ty int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out
	var _arg3 C.gint         // in
	var _arg4 C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(wx)
	_arg2 = C.gint(wy)

	C.gtk_tree_view_convert_widget_to_tree_coords(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(wx)
	runtime.KeepAlive(wy)

	var _tx int // out
	var _ty int // out

	_tx = int(_arg3)
	_ty = int(_arg4)

	return _tx, _ty
}

// CreateRowDragIcon creates a #cairo_surface_t representation of the row at
// path. This image is used for a drag icon.
//
// The function takes the following parameters:
//
//   - path in tree_view.
//
// The function returns the following values:
//
//   - surface: newly-allocated surface of the drag icon.
func (treeView *TreeView) CreateRowDragIcon(path *TreePath) *cairo.Surface {
	var _arg0 *C.GtkTreeView     // out
	var _arg1 *C.GtkTreePath     // out
	var _cret *C.cairo_surface_t // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_view_create_row_drag_icon(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)

	var _surface *cairo.Surface // out

	_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
		C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
	})

	return _surface
}

// EnableModelDragDest turns tree_view into a drop destination for automatic
// DND. Calling this method sets TreeView:reorderable to FALSE.
//
// The function takes the following parameters:
//
//   - targets: table of targets that the drag will support.
//   - actions: bitmask of possible actions for a drag from this widget.
func (treeView *TreeView) EnableModelDragDest(targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkTreeView    // out
	var _arg1 *C.GtkTargetEntry // out
	var _arg2 C.gint
	var _arg3 C.GdkDragAction // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg2 = (C.gint)(len(targets))
	_arg1 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg1), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg3 = C.GdkDragAction(actions)

	C.gtk_tree_view_enable_model_drag_dest(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// EnableModelDragSource turns tree_view into a drag source for automatic DND.
// Calling this method sets TreeView:reorderable to FALSE.
//
// The function takes the following parameters:
//
//   - startButtonMask: mask of allowed buttons to start drag.
//   - targets: table of targets that the drag will support.
//   - actions: bitmask of possible actions for a drag from this widget.
func (treeView *TreeView) EnableModelDragSource(startButtonMask gdk.ModifierType, targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkTreeView    // out
	var _arg1 C.GdkModifierType // out
	var _arg2 *C.GtkTargetEntry // out
	var _arg3 C.gint
	var _arg4 C.GdkDragAction // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.GdkModifierType(startButtonMask)
	_arg3 = (C.gint)(len(targets))
	_arg2 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg2), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg4 = C.GdkDragAction(actions)

	C.gtk_tree_view_enable_model_drag_source(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(startButtonMask)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// ExpandAll: recursively expands all nodes in the tree_view.
func (treeView *TreeView) ExpandAll() {
	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_expand_all(_arg0)
	runtime.KeepAlive(treeView)
}

// ExpandRow opens the row so its children are visible.
//
// The function takes the following parameters:
//
//   - path to a row.
//   - openAll: whether to recursively expand, or just expand immediate
//     children.
//
// The function returns the following values:
//
//   - ok: TRUE if the row existed and had children.
func (treeView *TreeView) ExpandRow(path *TreePath, openAll bool) bool {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreePath // out
	var _arg2 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if openAll {
		_arg2 = C.TRUE
	}

	_cret = C.gtk_tree_view_expand_row(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(openAll)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ExpandToPath expands the row at path. This will also expand all parent rows
// of path as necessary.
//
// The function takes the following parameters:
//
//   - path to a row.
func (treeView *TreeView) ExpandToPath(path *TreePath) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_view_expand_to_path(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
}

// ActivateOnSingleClick gets the setting set by
// gtk_tree_view_set_activate_on_single_click().
//
// The function returns the following values:
//
//   - ok: TRUE if row-activated will be emitted on a single click.
func (treeView *TreeView) ActivateOnSingleClick() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_activate_on_single_click(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackgroundArea fills the bounding rectangle in bin_window coordinates for
// the cell at the row specified by path and the column specified by column.
// If path is NULL, or points to a node not found in the tree, the y and
// height fields of the rectangle will be filled with 0. If column is NULL,
// the x and width fields will be filled with 0. The returned rectangle is
// equivalent to the background_area passed to gtk_cell_renderer_render().
// These background areas tile to cover the entire bin window. Contrast with the
// cell_area, returned by gtk_tree_view_get_cell_area(), which returns only the
// cell itself, excluding surrounding borders and the tree expander area.
//
// The function takes the following parameters:
//
//   - path (optional) for the row, or NULL to get only horizontal coordinates.
//   - column (optional) for the column, or NULL to get only vertical
//     coordiantes.
//
// The function returns the following values:
//
//   - rect: rectangle to fill with cell background rect.
func (treeView *TreeView) BackgroundArea(path *TreePath, column *TreeViewColumn) *gdk.Rectangle {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out
	var _arg3 C.GdkRectangle       // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	if column != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	}

	C.gtk_tree_view_get_background_area(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)

	var _rect *gdk.Rectangle // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))

	return _rect
}

// BinWindow returns the window that tree_view renders to. This is used
// primarily to compare to event->window to confirm that the event on tree_view
// is on the right window.
//
// The function returns the following values:
//
//   - window (optional) or NULL when tree_view hasn’t been realized yet.
func (treeView *TreeView) BinWindow() gdk.Windower {
	var _arg0 *C.GtkTreeView // out
	var _cret *C.GdkWindow   // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_bin_window(_arg0)
	runtime.KeepAlive(treeView)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

// CellArea fills the bounding rectangle in bin_window coordinates for the
// cell at the row specified by path and the column specified by column.
// If path is NULL, or points to a path not currently displayed, the y and
// height fields of the rectangle will be filled with 0. If column is NULL,
// the x and width fields will be filled with 0. The sum of all cell rects
// does not cover the entire tree; there are extra pixels in between rows,
// for example. The returned rectangle is equivalent to the cell_area passed
// to gtk_cell_renderer_render(). This function is only valid if tree_view is
// realized.
//
// The function takes the following parameters:
//
//   - path (optional) for the row, or NULL to get only horizontal coordinates.
//   - column (optional) for the column, or NULL to get only vertical
//     coordinates.
//
// The function returns the following values:
//
//   - rect: rectangle to fill with cell rect.
func (treeView *TreeView) CellArea(path *TreePath, column *TreeViewColumn) *gdk.Rectangle {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out
	var _arg3 C.GdkRectangle       // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	if column != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	}

	C.gtk_tree_view_get_cell_area(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)

	var _rect *gdk.Rectangle // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))

	return _rect
}

// Column gets the TreeViewColumn at the given position in the #tree_view.
//
// The function takes the following parameters:
//
//   - n of the column, counting from 0.
//
// The function returns the following values:
//
//   - treeViewColumn (optional) or NULL if the position is outside the range of
//     columns.
func (treeView *TreeView) Column(n int) *TreeViewColumn {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 C.gint               // out
	var _cret *C.GtkTreeViewColumn // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(n)

	_cret = C.gtk_tree_view_get_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(n)

	var _treeViewColumn *TreeViewColumn // out

	if _cret != nil {
		_treeViewColumn = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _treeViewColumn
}

// Columns returns a #GList of all the TreeViewColumn s currently in tree_view.
// The returned list must be freed with g_list_free ().
//
// The function returns the following values:
//
//   - list of TreeViewColumn s.
func (treeView *TreeView) Columns() []*TreeViewColumn {
	var _arg0 *C.GtkTreeView // out
	var _cret *C.GList       // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_columns(_arg0)
	runtime.KeepAlive(treeView)

	var _list []*TreeViewColumn // out

	_list = make([]*TreeViewColumn, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTreeViewColumn)(v)
		var dst *TreeViewColumn // out
		dst = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// Cursor fills in path and focus_column with the current path and focus column.
// If the cursor isn’t currently set, then *path will be NULL. If no column
// currently has focus, then *focus_column will be NULL.
//
// The returned TreePath must be freed with gtk_tree_path_free() when you are
// done with it.
//
// The function returns the following values:
//
//   - path (optional): pointer to be filled with the current cursor path,
//     or NULL.
//   - focusColumn (optional): a pointer to be filled with the current focus
//     column, or NULL.
func (treeView *TreeView) Cursor() (*TreePath, *TreeViewColumn) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // in
	var _arg2 *C.GtkTreeViewColumn // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_get_cursor(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(treeView)

	var _path *TreePath              // out
	var _focusColumn *TreeViewColumn // out

	if _arg1 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg2 != nil {
		_focusColumn = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_arg2)))
	}

	return _path, _focusColumn
}

// DestRowAtPos determines the destination row for a given position. drag_x
// and drag_y are expected to be in widget coordinates. This function is only
// meaningful if tree_view is realized. Therefore this function will always
// return FALSE if tree_view is not realized or does not have a model.
//
// The function takes the following parameters:
//
//   - dragX: position to determine the destination row for.
//   - dragY: position to determine the destination row for.
//
// The function returns the following values:
//
//   - path (optional): return location for the path of the highlighted row,
//     or NULL.
//   - pos (optional): return location for the drop position, or NULL.
//   - ok: whether there is a row at the given position, TRUE if this is indeed
//     the case.
func (treeView *TreeView) DestRowAtPos(dragX, dragY int) (*TreePath, TreeViewDropPosition, bool) {
	var _arg0 *C.GtkTreeView            // out
	var _arg1 C.gint                    // out
	var _arg2 C.gint                    // out
	var _arg3 *C.GtkTreePath            // in
	var _arg4 C.GtkTreeViewDropPosition // in
	var _cret C.gboolean                // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(dragX)
	_arg2 = C.gint(dragY)

	_cret = C.gtk_tree_view_get_dest_row_at_pos(_arg0, _arg1, _arg2, &_arg3, &_arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(dragX)
	runtime.KeepAlive(dragY)

	var _path *TreePath           // out
	var _pos TreeViewDropPosition // out
	var _ok bool                  // out

	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	_pos = TreeViewDropPosition(_arg4)
	if _cret != 0 {
		_ok = true
	}

	return _path, _pos, _ok
}

// DragDestRow gets information about the row that is highlighted for feedback.
//
// The function returns the following values:
//
//   - path (optional): return location for the path of the highlighted row,
//     or NULL.
//   - pos (optional): return location for the drop position, or NULL.
func (treeView *TreeView) DragDestRow() (*TreePath, TreeViewDropPosition) {
	var _arg0 *C.GtkTreeView            // out
	var _arg1 *C.GtkTreePath            // in
	var _arg2 C.GtkTreeViewDropPosition // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_get_drag_dest_row(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(treeView)

	var _path *TreePath           // out
	var _pos TreeViewDropPosition // out

	if _arg1 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	_pos = TreeViewDropPosition(_arg2)

	return _path, _pos
}

// EnableSearch returns whether or not the tree allows to start interactive
// searching by typing in text.
//
// The function returns the following values:
//
//   - ok: whether or not to let the user search interactively.
func (treeView *TreeView) EnableSearch() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_enable_search(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EnableTreeLines returns whether or not tree lines are drawn in tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if tree lines are drawn in tree_view, FALSE otherwise.
func (treeView *TreeView) EnableTreeLines() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_enable_tree_lines(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ExpanderColumn returns the column that is the current expander column.
// This column has the expander arrow drawn next to it.
//
// The function returns the following values:
//
//   - treeViewColumn: expander column.
func (treeView *TreeView) ExpanderColumn() *TreeViewColumn {
	var _arg0 *C.GtkTreeView       // out
	var _cret *C.GtkTreeViewColumn // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_expander_column(_arg0)
	runtime.KeepAlive(treeView)

	var _treeViewColumn *TreeViewColumn // out

	_treeViewColumn = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeViewColumn
}

// FixedHeightMode returns whether fixed height mode is turned on for tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if tree_view is in fixed height mode.
func (treeView *TreeView) FixedHeightMode() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_fixed_height_mode(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// GridLines returns which grid lines are enabled in tree_view.
//
// The function returns the following values:
//
//   - treeViewGridLines value indicating which grid lines are enabled.
func (treeView *TreeView) GridLines() TreeViewGridLines {
	var _arg0 *C.GtkTreeView         // out
	var _cret C.GtkTreeViewGridLines // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_grid_lines(_arg0)
	runtime.KeepAlive(treeView)

	var _treeViewGridLines TreeViewGridLines // out

	_treeViewGridLines = TreeViewGridLines(_cret)

	return _treeViewGridLines
}

// HAdjustment gets the Adjustment currently being used for the horizontal
// aspect.
//
// Deprecated: Use gtk_scrollable_get_hadjustment().
//
// The function returns the following values:
//
//   - adjustment object, or NULL if none is currently being used.
func (treeView *TreeView) HAdjustment() *Adjustment {
	var _arg0 *C.GtkTreeView   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_hadjustment(_arg0)
	runtime.KeepAlive(treeView)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// HeadersClickable returns whether all header columns are clickable.
//
// The function returns the following values:
//
//   - ok: TRUE if all header columns are clickable, otherwise FALSE.
func (treeView *TreeView) HeadersClickable() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_headers_clickable(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HeadersVisible returns TRUE if the headers on the tree_view are visible.
//
// The function returns the following values:
//
//   - ok: whether the headers are visible or not.
func (treeView *TreeView) HeadersVisible() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_headers_visible(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HoverExpand returns whether hover expansion mode is turned on for tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if tree_view is in hover expansion mode.
func (treeView *TreeView) HoverExpand() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_hover_expand(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HoverSelection returns whether hover selection mode is turned on for
// tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if tree_view is in hover selection mode.
func (treeView *TreeView) HoverSelection() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_hover_selection(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LevelIndentation returns the amount, in pixels, of extra indentation for
// child levels in tree_view.
//
// The function returns the following values:
//
//   - gint: amount of extra indentation for child levels in tree_view. A return
//     value of 0 means that this feature is disabled.
func (treeView *TreeView) LevelIndentation() int {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_level_indentation(_arg0)
	runtime.KeepAlive(treeView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Model returns the model the TreeView is based on. Returns NULL if the model
// is unset.
//
// The function returns the following values:
//
//   - treeModel (optional) or NULL if none is currently being used.
func (treeView *TreeView) Model() *TreeModel {
	var _arg0 *C.GtkTreeView  // out
	var _cret *C.GtkTreeModel // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_model(_arg0)
	runtime.KeepAlive(treeView)

	var _treeModel *TreeModel // out

	if _cret != nil {
		_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _treeModel
}

// NColumns queries the number of columns in the given tree_view.
//
// The function returns the following values:
//
//   - guint: number of columns in the tree_view.
func (treeView *TreeView) NColumns() uint {
	var _arg0 *C.GtkTreeView // out
	var _cret C.guint        // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_n_columns(_arg0)
	runtime.KeepAlive(treeView)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// PathAtPos finds the path at the point (x, y), relative to bin_window
// coordinates (please see gtk_tree_view_get_bin_window()). That is, x and y
// are relative to an events coordinates. x and y must come from an event on
// the tree_view only where event->window == gtk_tree_view_get_bin_window ().
// It is primarily for things like popup menus. If path is non-NULL, then it
// will be filled with the TreePath at that point. This path should be freed
// with gtk_tree_path_free(). If column is non-NULL, then it will be filled
// with the column at that point. cell_x and cell_y return the coordinates
// relative to the cell background (i.e. the background_area passed to
// gtk_cell_renderer_render()). This function is only meaningful if tree_view
// is realized. Therefore this function will always return FALSE if tree_view is
// not realized or does not have a model.
//
// For converting widget coordinates (eg. the ones
// you get from GtkWidget::query-tooltip), please see
// gtk_tree_view_convert_widget_to_bin_window_coords().
//
// The function takes the following parameters:
//
//   - x position to be identified (relative to bin_window).
//   - y position to be identified (relative to bin_window).
//
// The function returns the following values:
//
//   - path (optional): pointer to a TreePath pointer to be filled in, or NULL.
//   - column (optional): pointer to a TreeViewColumn pointer to be filled in,
//     or NULL.
//   - cellX (optional): pointer where the X coordinate relative to the cell can
//     be placed, or NULL.
//   - cellY (optional): pointer where the Y coordinate relative to the cell can
//     be placed, or NULL.
//   - ok: TRUE if a row exists at that coordinate.
func (treeView *TreeView) PathAtPos(x, y int) (path *TreePath, column *TreeViewColumn, cellX, cellY int, ok bool) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 C.gint               // out
	var _arg2 C.gint               // out
	var _arg3 *C.GtkTreePath       // in
	var _arg4 *C.GtkTreeViewColumn // in
	var _arg5 C.gint               // in
	var _arg6 C.gint               // in
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_tree_view_get_path_at_pos(_arg0, _arg1, _arg2, &_arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _path *TreePath         // out
	var _column *TreeViewColumn // out
	var _cellX int              // out
	var _cellY int              // out
	var _ok bool                // out

	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg4 != nil {
		_column = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_arg4)))
	}
	_cellX = int(_arg5)
	_cellY = int(_arg6)
	if _cret != 0 {
		_ok = true
	}

	return _path, _column, _cellX, _cellY, _ok
}

// Reorderable retrieves whether the user can reorder the tree via
// drag-and-drop. See gtk_tree_view_set_reorderable().
//
// The function returns the following values:
//
//   - ok: TRUE if the tree can be reordered.
func (treeView *TreeView) Reorderable() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_reorderable(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RubberBanding returns whether rubber banding is turned on for tree_view.
// If the selection mode is K_SELECTION_MULTIPLE, rubber banding will allow the
// user to select multiple rows by dragging the mouse.
//
// The function returns the following values:
//
//   - ok: TRUE if rubber banding in tree_view is enabled.
func (treeView *TreeView) RubberBanding() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_rubber_banding(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RulesHint gets the setting set by gtk_tree_view_set_rules_hint().
//
// Deprecated: since version 3.14.
//
// The function returns the following values:
//
//   - ok: TRUE if the hint is set.
func (treeView *TreeView) RulesHint() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_rules_hint(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SearchColumn gets the column searched on by the interactive search code.
//
// The function returns the following values:
//
//   - gint: column the interactive search code searches in.
func (treeView *TreeView) SearchColumn() int {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_search_column(_arg0)
	runtime.KeepAlive(treeView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SearchEntry returns the Entry which is currently in use as interactive search
// entry for tree_view. In case the built-in entry is being used, NULL will be
// returned.
//
// The function returns the following values:
//
//   - entry currently in use as search entry.
func (treeView *TreeView) SearchEntry() *Entry {
	var _arg0 *C.GtkTreeView // out
	var _cret *C.GtkEntry    // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_search_entry(_arg0)
	runtime.KeepAlive(treeView)

	var _entry *Entry // out

	_entry = wrapEntry(coreglib.Take(unsafe.Pointer(_cret)))

	return _entry
}

// Selection gets the TreeSelection associated with tree_view.
//
// The function returns the following values:
//
//   - treeSelection: TreeSelection object.
func (treeView *TreeView) Selection() *TreeSelection {
	var _arg0 *C.GtkTreeView      // out
	var _cret *C.GtkTreeSelection // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_selection(_arg0)
	runtime.KeepAlive(treeView)

	var _treeSelection *TreeSelection // out

	_treeSelection = wrapTreeSelection(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeSelection
}

// ShowExpanders returns whether or not expanders are drawn in tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if expanders are drawn in tree_view, FALSE otherwise.
func (treeView *TreeView) ShowExpanders() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_show_expanders(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TooltipColumn returns the column of tree_view’s model which is being used for
// displaying tooltips on tree_view’s rows.
//
// The function returns the following values:
//
//   - gint: index of the tooltip column that is currently being used, or -1 if
//     this is disabled.
func (treeView *TreeView) TooltipColumn() int {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_tooltip_column(_arg0)
	runtime.KeepAlive(treeView)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// VAdjustment gets the Adjustment currently being used for the vertical aspect.
//
// Deprecated: Use gtk_scrollable_get_vadjustment().
//
// The function returns the following values:
//
//   - adjustment object, or NULL if none is currently being used.
func (treeView *TreeView) VAdjustment() *Adjustment {
	var _arg0 *C.GtkTreeView   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_vadjustment(_arg0)
	runtime.KeepAlive(treeView)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// VisibleRange sets start_path and end_path to be the first and last visible
// path. Note that there may be invisible paths in between.
//
// The paths should be freed with gtk_tree_path_free() after use.
//
// The function returns the following values:
//
//   - startPath (optional): return location for start of region, or NULL.
//   - endPath (optional): return location for end of region, or NULL.
//   - ok: TRUE, if valid paths were placed in start_path and end_path.
func (treeView *TreeView) VisibleRange() (startPath, endPath *TreePath, ok bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreePath // in
	var _arg2 *C.GtkTreePath // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_get_visible_range(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(treeView)

	var _startPath *TreePath // out
	var _endPath *TreePath   // out
	var _ok bool             // out

	if _arg1 != nil {
		_startPath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg1)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_startPath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg2 != nil {
		_endPath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg2)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_endPath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _cret != 0 {
		_ok = true
	}

	return _startPath, _endPath, _ok
}

// VisibleRect fills visible_rect with the currently-visible region of
// the buffer, in tree coordinates. Convert to bin_window coordinates with
// gtk_tree_view_convert_tree_to_bin_window_coords(). Tree coordinates start at
// 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
//
// The function returns the following values:
//
//   - visibleRect: rectangle to fill.
func (treeView *TreeView) VisibleRect() *gdk.Rectangle {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.GdkRectangle // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_get_visible_rect(_arg0, &_arg1)
	runtime.KeepAlive(treeView)

	var _visibleRect *gdk.Rectangle // out

	_visibleRect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _visibleRect
}

// InsertColumn: this inserts the column into the tree_view at position.
// If position is -1, then the column is inserted at the end. If tree_view has
// “fixed_height” mode enabled, then column must have its “sizing” property set
// to be GTK_TREE_VIEW_COLUMN_FIXED.
//
// The function takes the following parameters:
//
//   - column to be inserted.
//   - position to insert column in.
//
// The function returns the following values:
//
//   - gint: number of columns in tree_view after insertion.
func (treeView *TreeView) InsertColumn(column *TreeViewColumn, position int) int {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreeViewColumn // out
	var _arg2 C.gint               // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	_arg2 = C.gint(position)

	_cret = C.gtk_tree_view_insert_column(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)
	runtime.KeepAlive(position)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// InsertColumnWithDataFunc: convenience function that inserts a new column
// into the TreeView with the given cell renderer and a TreeCellDataFunc to
// set cell renderer attributes (normally using data from the model). See also
// gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
// If tree_view has “fixed_height” mode enabled, then the new column will have
// its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
//
// The function takes the following parameters:
//
//   - position: position to insert, -1 for append.
//   - title: column title.
//   - cell renderer for column.
//   - fn: function to set attributes of cell renderer.
//
// The function returns the following values:
//
//   - gint: number of columns in the tree view post-insert.
func (treeView *TreeView) InsertColumnWithDataFunc(position int, title string, cell CellRendererer, fn TreeCellDataFunc) int {
	var _arg0 *C.GtkTreeView        // out
	var _arg1 C.gint                // out
	var _arg2 *C.gchar              // out
	var _arg3 *C.GtkCellRenderer    // out
	var _arg4 C.GtkTreeCellDataFunc // out
	var _arg5 C.gpointer
	var _arg6 C.GDestroyNotify
	var _cret C.gint // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(position)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	_arg4 = (*[0]byte)(C._gotk4_gtk3_TreeCellDataFunc)
	_arg5 = C.gpointer(gbox.Assign(fn))
	_arg6 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	_cret = C.gtk_tree_view_insert_column_with_data_func(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(position)
	runtime.KeepAlive(title)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(fn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// IsBlankAtPos: determine whether the point (x, y) in tree_view is blank, that
// is no cell content nor an expander arrow is drawn at the location. If so, the
// location can be considered as the background. You might wish to take special
// action on clicks on the background, such as clearing a current selection,
// having a custom context menu or starting rubber banding.
//
// The x and y coordinate that are provided must be relative to bin_window
// coordinates. That is, x and y must come from an event on tree_view where
// event->window == gtk_tree_view_get_bin_window ().
//
// For converting widget coordinates (eg. the ones
// you get from GtkWidget::query-tooltip), please see
// gtk_tree_view_convert_widget_to_bin_window_coords().
//
// The path, column, cell_x and cell_y arguments will be filled
// in likewise as for gtk_tree_view_get_path_at_pos(). Please see
// gtk_tree_view_get_path_at_pos() for more information.
//
// The function takes the following parameters:
//
//   - x position to be identified (relative to bin_window).
//   - y position to be identified (relative to bin_window).
//
// The function returns the following values:
//
//   - path (optional): pointer to a TreePath pointer to be filled in, or NULL.
//   - column (optional): pointer to a TreeViewColumn pointer to be filled in,
//     or NULL.
//   - cellX (optional): pointer where the X coordinate relative to the cell can
//     be placed, or NULL.
//   - cellY (optional): pointer where the Y coordinate relative to the cell can
//     be placed, or NULL.
//   - ok: TRUE if the area at the given coordinates is blank, FALSE otherwise.
func (treeView *TreeView) IsBlankAtPos(x, y int) (path *TreePath, column *TreeViewColumn, cellX, cellY int, ok bool) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 C.gint               // out
	var _arg2 C.gint               // out
	var _arg3 *C.GtkTreePath       // in
	var _arg4 *C.GtkTreeViewColumn // in
	var _arg5 C.gint               // in
	var _arg6 C.gint               // in
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	_cret = C.gtk_tree_view_is_blank_at_pos(_arg0, _arg1, _arg2, &_arg3, &_arg4, &_arg5, &_arg6)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _path *TreePath         // out
	var _column *TreeViewColumn // out
	var _cellX int              // out
	var _cellY int              // out
	var _ok bool                // out

	if _arg3 != nil {
		_path = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_arg3)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_path)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}
	if _arg4 != nil {
		_column = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_arg4)))
	}
	_cellX = int(_arg5)
	_cellY = int(_arg6)
	if _cret != 0 {
		_ok = true
	}

	return _path, _column, _cellX, _cellY, _ok
}

// IsRubberBandingActive returns whether a rubber banding operation is currently
// being done in tree_view.
//
// The function returns the following values:
//
//   - ok: TRUE if a rubber banding operation is currently being done in
//     tree_view.
func (treeView *TreeView) IsRubberBandingActive() bool {
	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C.gtk_tree_view_is_rubber_banding_active(_arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MapExpandedRows calls func on all expanded rows.
//
// The function takes the following parameters:
//
//   - fn: function to be called.
func (treeView *TreeView) MapExpandedRows(fn TreeViewMappingFunc) {
	var _arg0 *C.GtkTreeView           // out
	var _arg1 C.GtkTreeViewMappingFunc // out
	var _arg2 C.gpointer

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewMappingFunc)
	_arg2 = C.gpointer(gbox.Assign(fn))
	defer gbox.Delete(uintptr(_arg2))

	C.gtk_tree_view_map_expanded_rows(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(fn)
}

// MoveColumnAfter moves column to be after to base_column. If base_column is
// NULL, then column is placed in the first position.
//
// The function takes the following parameters:
//
//   - column to be moved.
//   - baseColumn (optional) to be moved relative to, or NULL.
func (treeView *TreeView) MoveColumnAfter(column, baseColumn *TreeViewColumn) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreeViewColumn // out
	var _arg2 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	if baseColumn != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(baseColumn).Native()))
	}

	C.gtk_tree_view_move_column_after(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)
	runtime.KeepAlive(baseColumn)
}

// RemoveColumn removes column from tree_view.
//
// The function takes the following parameters:
//
//   - column to remove.
//
// The function returns the following values:
//
//   - gint: number of columns in tree_view after removing.
func (treeView *TreeView) RemoveColumn(column *TreeViewColumn) int {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))

	_cret = C.gtk_tree_view_remove_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// RowActivated activates the cell determined by path and column.
//
// The function takes the following parameters:
//
//   - path to be activated.
//   - column to be activated.
func (treeView *TreeView) RowActivated(path *TreePath, column *TreeViewColumn) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))

	C.gtk_tree_view_row_activated(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)
}

// RowExpanded returns TRUE if the node pointed to by path is expanded in
// tree_view.
//
// The function takes the following parameters:
//
//   - path to test expansion state.
//
// The function returns the following values:
//
//   - ok: TRUE if #path is expanded.
func (treeView *TreeView) RowExpanded(path *TreePath) bool {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_view_row_expanded(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ScrollToCell moves the alignments of tree_view to the position specified
// by column and path. If column is NULL, then no horizontal scrolling occurs.
// Likewise, if path is NULL no vertical scrolling occurs. At a minimum, one of
// column or path need to be non-NULL. row_align determines where the row is
// placed, and col_align determines where column is placed. Both are expected to
// be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom
// alignment, 0.5 means center.
//
// If use_align is FALSE, then the alignment arguments are ignored, and the
// tree does the minimum amount of work to scroll the cell onto the screen.
// This means that the cell will be scrolled to the edge closest to its current
// position. If the cell is currently visible on the screen, nothing is done.
//
// This function only works if the model is set, and path is a valid row on the
// model. If the model changes before the tree_view is realized, the centered
// path will be modified to reflect this change.
//
// The function takes the following parameters:
//
//   - path (optional) of the row to move to, or NULL.
//   - column (optional) to move horizontally to, or NULL.
//   - useAlign: whether to use alignment arguments, or FALSE.
//   - rowAlign: vertical alignment of the row specified by path.
//   - colAlign: horizontal alignment of the column specified by column.
func (treeView *TreeView) ScrollToCell(path *TreePath, column *TreeViewColumn, useAlign bool, rowAlign, colAlign float32) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out
	var _arg3 C.gboolean           // out
	var _arg4 C.gfloat             // out
	var _arg5 C.gfloat             // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	if column != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	}
	if useAlign {
		_arg3 = C.TRUE
	}
	_arg4 = C.gfloat(rowAlign)
	_arg5 = C.gfloat(colAlign)

	C.gtk_tree_view_scroll_to_cell(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)
	runtime.KeepAlive(useAlign)
	runtime.KeepAlive(rowAlign)
	runtime.KeepAlive(colAlign)
}

// ScrollToPoint scrolls the tree view such that the top-left corner of the
// visible area is tree_x, tree_y, where tree_x and tree_y are specified in tree
// coordinates. The tree_view must be realized before this function is called.
// If it isn't, you probably want to be using gtk_tree_view_scroll_to_cell().
//
// If either tree_x or tree_y are -1, then that direction isn’t scrolled.
//
// The function takes the following parameters:
//
//   - treeX: x coordinate of new top-left pixel of visible area, or -1.
//   - treeY: y coordinate of new top-left pixel of visible area, or -1.
func (treeView *TreeView) ScrollToPoint(treeX, treeY int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out
	var _arg2 C.gint         // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(treeX)
	_arg2 = C.gint(treeY)

	C.gtk_tree_view_scroll_to_point(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(treeX)
	runtime.KeepAlive(treeY)
}

// SetActivateOnSingleClick: cause the TreeView::row-activated signal to be
// emitted on a single click instead of a double click.
//
// The function takes the following parameters:
//
//   - single: TRUE to emit row-activated on a single click.
func (treeView *TreeView) SetActivateOnSingleClick(single bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if single {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_activate_on_single_click(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(single)
}

// SetColumnDragFunction sets a user function for determining where a column may
// be dropped when dragged. This function is called on every column pair in turn
// at the beginning of a column drag to determine where a drop can take place.
// The arguments passed to func are: the tree_view, the TreeViewColumn being
// dragged, the two TreeViewColumn s determining the drop spot, and user_data.
// If either of the TreeViewColumn arguments for the drop spot are NULL,
// then they indicate an edge. If func is set to be NULL, then tree_view reverts
// to the default behavior of allowing all columns to be dropped everywhere.
//
// The function takes the following parameters:
//
//   - fn (optional): function to determine which columns are reorderable,
//     or NULL.
func (treeView *TreeView) SetColumnDragFunction(fn TreeViewColumnDropFunc) {
	var _arg0 *C.GtkTreeView              // out
	var _arg1 C.GtkTreeViewColumnDropFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if fn != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewColumnDropFunc)
		_arg2 = C.gpointer(gbox.Assign(fn))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_view_set_column_drag_function(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(fn)
}

// SetCursor sets the current keyboard focus to be at path, and selects it. This
// is useful when you want to focus the user’s attention on a particular row.
// If focus_column is not NULL, then focus is given to the column specified by
// it. Additionally, if focus_column is specified, and start_editing is TRUE,
// then editing should be started in the specified cell. This function is often
// followed by gtk_widget_grab_focus (tree_view) in order to give keyboard focus
// to the widget. Please note that editing can only happen when the widget is
// realized.
//
// If path is invalid for model, the current cursor (if any) will be unset and
// the function will return without failing.
//
// The function takes the following parameters:
//
//   - path: TreePath.
//   - focusColumn (optional) or NULL.
//   - startEditing: TRUE if the specified cell should start being edited.
func (treeView *TreeView) SetCursor(path *TreePath, focusColumn *TreeViewColumn, startEditing bool) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out
	var _arg3 C.gboolean           // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if focusColumn != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(focusColumn).Native()))
	}
	if startEditing {
		_arg3 = C.TRUE
	}

	C.gtk_tree_view_set_cursor(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(focusColumn)
	runtime.KeepAlive(startEditing)
}

// SetCursorOnCell sets the current keyboard focus to be at path, and
// selects it. This is useful when you want to focus the user’s attention
// on a particular row. If focus_column is not NULL, then focus is given to
// the column specified by it. If focus_column and focus_cell are not NULL,
// and focus_column contains 2 or more editable or activatable cells, then focus
// is given to the cell specified by focus_cell. Additionally, if focus_column
// is specified, and start_editing is TRUE, then editing should be started in
// the specified cell. This function is often followed by gtk_widget_grab_focus
// (tree_view) in order to give keyboard focus to the widget. Please note that
// editing can only happen when the widget is realized.
//
// If path is invalid for model, the current cursor (if any) will be unset and
// the function will return without failing.
//
// The function takes the following parameters:
//
//   - path: TreePath.
//   - focusColumn (optional) or NULL.
//   - focusCell (optional) or NULL.
//   - startEditing: TRUE if the specified cell should start being edited.
func (treeView *TreeView) SetCursorOnCell(path *TreePath, focusColumn *TreeViewColumn, focusCell CellRendererer, startEditing bool) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out
	var _arg3 *C.GtkCellRenderer   // out
	var _arg4 C.gboolean           // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	if focusColumn != nil {
		_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(focusColumn).Native()))
	}
	if focusCell != nil {
		_arg3 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(focusCell).Native()))
	}
	if startEditing {
		_arg4 = C.TRUE
	}

	C.gtk_tree_view_set_cursor_on_cell(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(focusColumn)
	runtime.KeepAlive(focusCell)
	runtime.KeepAlive(startEditing)
}

// SetDestroyCountFunc: this function should almost never be used. It is meant
// for private use by ATK for determining the number of visible children that
// are removed when the user collapses a row, or a row is deleted.
//
// Deprecated: Accessibility does not need the function anymore.
//
// The function takes the following parameters:
//
//   - fn (optional): function to be called when a view row is destroyed,
//     or NULL.
func (treeView *TreeView) SetDestroyCountFunc(fn TreeDestroyCountFunc) {
	var _arg0 *C.GtkTreeView            // out
	var _arg1 C.GtkTreeDestroyCountFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if fn != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeDestroyCountFunc)
		_arg2 = C.gpointer(gbox.Assign(fn))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_view_set_destroy_count_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(fn)
}

// SetDragDestRow sets the row that is highlighted for feedback. If path is
// NULL, an existing highlight is removed.
//
// The function takes the following parameters:
//
//   - path (optional) of the row to highlight, or NULL.
//   - pos specifies whether to drop before, after or into the row.
func (treeView *TreeView) SetDragDestRow(path *TreePath, pos TreeViewDropPosition) {
	var _arg0 *C.GtkTreeView            // out
	var _arg1 *C.GtkTreePath            // out
	var _arg2 C.GtkTreeViewDropPosition // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if path != nil {
		_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	_arg2 = C.GtkTreeViewDropPosition(pos)

	C.gtk_tree_view_set_drag_dest_row(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
}

// SetEnableSearch: if enable_search is set, then the user can type in text to
// search through the tree interactively (this is sometimes called "typeahead
// find").
//
// Note that even if this is FALSE, the user can still initiate a search using
// the “start-interactive-search” key binding.
//
// The function takes the following parameters:
//
//   - enableSearch: TRUE, if the user can search interactively.
func (treeView *TreeView) SetEnableSearch(enableSearch bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if enableSearch {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_enable_search(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(enableSearch)
}

// SetEnableTreeLines sets whether to draw lines interconnecting the expanders
// in tree_view. This does not have any visible effects for lists.
//
// The function takes the following parameters:
//
//   - enabled: TRUE to enable tree line drawing, FALSE otherwise.
func (treeView *TreeView) SetEnableTreeLines(enabled bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if enabled {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_enable_tree_lines(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(enabled)
}

// SetExpanderColumn sets the column to draw the expander arrow at. It must be
// in tree_view. If column is NULL, then the expander arrow is always at the
// first visible column.
//
// If you do not want expander arrow to appear in your tree, set the expander
// column to a hidden column.
//
// The function takes the following parameters:
//
//   - column (optional): NULL, or the column to draw the expander arrow at.
func (treeView *TreeView) SetExpanderColumn(column *TreeViewColumn) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if column != nil {
		_arg1 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	}

	C.gtk_tree_view_set_expander_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)
}

// SetFixedHeightMode enables or disables the fixed height mode of tree_view.
// Fixed height mode speeds up TreeView by assuming that all rows have the
// same height. Only enable this option if all rows are the same height and all
// columns are of type GTK_TREE_VIEW_COLUMN_FIXED.
//
// The function takes the following parameters:
//
//   - enable: TRUE to enable fixed height mode.
func (treeView *TreeView) SetFixedHeightMode(enable bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if enable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_fixed_height_mode(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(enable)
}

// SetGridLines sets which grid lines to draw in tree_view.
//
// The function takes the following parameters:
//
//   - gridLines value indicating which grid lines to enable.
func (treeView *TreeView) SetGridLines(gridLines TreeViewGridLines) {
	var _arg0 *C.GtkTreeView         // out
	var _arg1 C.GtkTreeViewGridLines // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.GtkTreeViewGridLines(gridLines)

	C.gtk_tree_view_set_grid_lines(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(gridLines)
}

// SetHAdjustment sets the Adjustment for the current horizontal aspect.
//
// Deprecated: Use gtk_scrollable_set_hadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional) to set, or NULL.
func (treeView *TreeView) SetHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkTreeView   // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_tree_view_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(adjustment)
}

// SetHeadersClickable: allow the column title buttons to be clicked.
//
// The function takes the following parameters:
//
//   - setting: TRUE if the columns are clickable.
func (treeView *TreeView) SetHeadersClickable(setting bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_headers_clickable(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(setting)
}

// SetHeadersVisible sets the visibility state of the headers.
//
// The function takes the following parameters:
//
//   - headersVisible: TRUE if the headers are visible.
func (treeView *TreeView) SetHeadersVisible(headersVisible bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if headersVisible {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_headers_visible(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(headersVisible)
}

// SetHoverExpand enables or disables the hover expansion mode of tree_view.
// Hover expansion makes rows expand or collapse if the pointer moves over them.
//
// The function takes the following parameters:
//
//   - expand: TRUE to enable hover selection mode.
func (treeView *TreeView) SetHoverExpand(expand bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if expand {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_hover_expand(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(expand)
}

// SetHoverSelection enables or disables the hover selection mode of tree_view.
// Hover selection makes the selected row follow the pointer. Currently,
// this works only for the selection modes GTK_SELECTION_SINGLE and
// GTK_SELECTION_BROWSE.
//
// The function takes the following parameters:
//
//   - hover: TRUE to enable hover selection mode.
func (treeView *TreeView) SetHoverSelection(hover bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if hover {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_hover_selection(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(hover)
}

// SetLevelIndentation sets the amount of extra indentation for child levels to
// use in tree_view in addition to the default indentation. The value should be
// specified in pixels, a value of 0 disables this feature and in this case only
// the default indentation will be used. This does not have any visible effects
// for lists.
//
// The function takes the following parameters:
//
//   - indentation: amount, in pixels, of extra indentation in tree_view.
func (treeView *TreeView) SetLevelIndentation(indentation int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(indentation)

	C.gtk_tree_view_set_level_indentation(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(indentation)
}

// SetModel sets the model for a TreeView. If the tree_view already has a model
// set, it will remove it before setting the new model. If model is NULL,
// then it will unset the old model.
//
// The function takes the following parameters:
//
//   - model (optional): model.
func (treeView *TreeView) SetModel(model TreeModeller) {
	var _arg0 *C.GtkTreeView  // out
	var _arg1 *C.GtkTreeModel // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if model != nil {
		_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	}

	C.gtk_tree_view_set_model(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(model)
}

// SetReorderable: this function is a convenience function to allow
// you to reorder models that support the TreeDragSourceIface and the
// TreeDragDestIface. Both TreeStore and ListStore support these. If reorderable
// is TRUE, then the user can reorder the model by dragging and dropping rows.
// The developer can listen to these changes by connecting to the model’s
// TreeModel::row-inserted and TreeModel::row-deleted signals. The reordering
// is implemented by setting up the tree view as a drag source and destination.
// Therefore, drag and drop can not be used in a reorderable view for any other
// purpose.
//
// This function does not give you any degree of control over the order -- any
// reordering is allowed. If more control is needed, you should probably handle
// drag and drop manually.
//
// The function takes the following parameters:
//
//   - reorderable: TRUE, if the tree can be reordered.
func (treeView *TreeView) SetReorderable(reorderable bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if reorderable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_reorderable(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(reorderable)
}

// SetRowSeparatorFunc sets the row separator function, which is used to
// determine whether a row should be drawn as a separator. If the row separator
// function is NULL, no separators are drawn. This is the default value.
//
// The function takes the following parameters:
//
//   - fn (optional): TreeViewRowSeparatorFunc.
func (treeView *TreeView) SetRowSeparatorFunc(fn TreeViewRowSeparatorFunc) {
	var _arg0 *C.GtkTreeView                // out
	var _arg1 C.GtkTreeViewRowSeparatorFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if fn != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewRowSeparatorFunc)
		_arg2 = C.gpointer(gbox.Assign(fn))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_view_set_row_separator_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(fn)
}

// SetRubberBanding enables or disables rubber banding in tree_view. If the
// selection mode is K_SELECTION_MULTIPLE, rubber banding will allow the user to
// select multiple rows by dragging the mouse.
//
// The function takes the following parameters:
//
//   - enable: TRUE to enable rubber banding.
func (treeView *TreeView) SetRubberBanding(enable bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if enable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_rubber_banding(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(enable)
}

// SetRulesHint sets a hint for the theme to draw even/odd rows in the tree_view
// with different colors, also known as "zebra striping".
//
// This function tells the GTK+ theme that the user interface for your
// application requires users to read across tree rows and associate cells with
// one another.
//
// Do not use it just because you prefer the appearance of the ruled tree;
// that’s a question for the theme. Some themes will draw tree rows in
// alternating colors even when rules are turned off, and users who prefer
// that appearance all the time can choose those themes. You should call this
// function only as a semantic hint to the theme engine that your tree makes
// alternating colors useful from a functional standpoint (since it has lots of
// columns, generally).
//
// Deprecated: since version 3.14.
//
// The function takes the following parameters:
//
//   - setting: TRUE if the tree requires reading across rows.
func (treeView *TreeView) SetRulesHint(setting bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_rules_hint(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(setting)
}

// SetSearchColumn sets column as the column where the interactive search code
// should search in for the current model.
//
// If the search column is set, users can use the “start-interactive-search” key
// binding to bring up search popup. The enable-search property controls whether
// simply typing text will also start an interactive search.
//
// Note that column refers to a column of the current model. The search column
// is reset to -1 when the model is changed.
//
// The function takes the following parameters:
//
//   - column of the model to search in, or -1 to disable searching.
func (treeView *TreeView) SetSearchColumn(column int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(column)

	C.gtk_tree_view_set_search_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)
}

// SetSearchEntry sets the entry which the interactive search code will use for
// this tree_view. This is useful when you want to provide a search entry in our
// interface at all time at a fixed position. Passing NULL for entry will make
// the interactive search code use the built-in popup entry again.
//
// The function takes the following parameters:
//
//   - entry (optional) the interactive search code of tree_view should use or
//     NULL.
func (treeView *TreeView) SetSearchEntry(entry *Entry) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkEntry    // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if entry != nil {
		_arg1 = (*C.GtkEntry)(unsafe.Pointer(coreglib.InternObject(entry).Native()))
	}

	C.gtk_tree_view_set_search_entry(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(entry)
}

// SetSearchEqualFunc sets the compare function for the interactive search
// capabilities; note that somewhat like strcmp() returning 0 for equality
// TreeViewSearchEqualFunc returns FALSE on matches.
//
// The function takes the following parameters:
//
//   - searchEqualFunc: compare function to use during the search.
func (treeView *TreeView) SetSearchEqualFunc(searchEqualFunc TreeViewSearchEqualFunc) {
	var _arg0 *C.GtkTreeView               // out
	var _arg1 C.GtkTreeViewSearchEqualFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewSearchEqualFunc)
	_arg2 = C.gpointer(gbox.Assign(searchEqualFunc))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	C.gtk_tree_view_set_search_equal_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(searchEqualFunc)
}

// SetSearchPositionFunc sets the function to use when positioning the search
// dialog.
//
// The function takes the following parameters:
//
//   - fn (optional): function to use to position the search dialog, or NULL to
//     use the default search position function.
func (treeView *TreeView) SetSearchPositionFunc(fn TreeViewSearchPositionFunc) {
	var _arg0 *C.GtkTreeView                  // out
	var _arg1 C.GtkTreeViewSearchPositionFunc // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if fn != nil {
		_arg1 = (*[0]byte)(C._gotk4_gtk3_TreeViewSearchPositionFunc)
		_arg2 = C.gpointer(gbox.Assign(fn))
		_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_view_set_search_position_func(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(fn)
}

// SetShowExpanders sets whether to draw and enable expanders and indent child
// rows in tree_view. When disabled there will be no expanders visible in trees
// and there will be no way to expand and collapse rows by default. Also note
// that hiding the expanders will disable the default indentation. You can set a
// custom indentation in this case using gtk_tree_view_set_level_indentation().
// This does not have any visible effects for lists.
//
// The function takes the following parameters:
//
//   - enabled: TRUE to enable expander drawing, FALSE otherwise.
func (treeView *TreeView) SetShowExpanders(enabled bool) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if enabled {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_set_show_expanders(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(enabled)
}

// SetTooltipCell sets the tip area of tooltip to the area path, column
// and cell have in common. For example if path is NULL and column is set,
// the tip area will be set to the full area covered by column. See also
// gtk_tooltip_set_tip_area().
//
// Note that if path is not specified and cell is set and part of a column
// containing the expander, the tooltip might not show and hide at the correct
// position. In such cases path must be set to the current node under the mouse
// cursor for this function to operate correctly.
//
// See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
//
// The function takes the following parameters:
//
//   - tooltip: Tooltip.
//   - path (optional) or NULL.
//   - column (optional) or NULL.
//   - cell (optional) or NULL.
func (treeView *TreeView) SetTooltipCell(tooltip *Tooltip, path *TreePath, column *TreeViewColumn, cell CellRendererer) {
	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTooltip        // out
	var _arg2 *C.GtkTreePath       // out
	var _arg3 *C.GtkTreeViewColumn // out
	var _arg4 *C.GtkCellRenderer   // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	if path != nil {
		_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	}
	if column != nil {
		_arg3 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))
	}
	if cell != nil {
		_arg4 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	}

	C.gtk_tree_view_set_tooltip_cell(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)
	runtime.KeepAlive(cell)
}

// SetTooltipColumn: if you only plan to have simple (text-only) tooltips
// on full rows, you can use this function to have TreeView handle these
// automatically for you. column should be set to the column in tree_view’s
// model containing the tooltip texts, or -1 to disable this feature.
//
// When enabled, Widget:has-tooltip will be set to TRUE and tree_view will
// connect a Widget::query-tooltip signal handler.
//
// Note that the signal handler sets the text with gtk_tooltip_set_markup(),
// so &, <, etc have to be escaped in the text.
//
// The function takes the following parameters:
//
//   - column: integer, which is a valid column number for tree_view’s model.
func (treeView *TreeView) SetTooltipColumn(column int) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.gint(column)

	C.gtk_tree_view_set_tooltip_column(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(column)
}

// SetTooltipRow sets the tip area of tooltip to be the area covered by the
// row at path. See also gtk_tree_view_set_tooltip_column() for a simpler
// alternative. See also gtk_tooltip_set_tip_area().
//
// The function takes the following parameters:
//
//   - tooltip: Tooltip.
//   - path: TreePath.
func (treeView *TreeView) SetTooltipRow(tooltip *Tooltip, path *TreePath) {
	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTooltip  // out
	var _arg2 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_view_set_tooltip_row(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(tooltip)
	runtime.KeepAlive(path)
}

// SetVAdjustment sets the Adjustment for the current vertical aspect.
//
// Deprecated: Use gtk_scrollable_set_vadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional) to set, or NULL.
func (treeView *TreeView) SetVAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkTreeView   // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_tree_view_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(adjustment)
}

// UnsetRowsDragDest undoes the effect of
// gtk_tree_view_enable_model_drag_dest(). Calling this method sets
// TreeView:reorderable to FALSE.
func (treeView *TreeView) UnsetRowsDragDest() {
	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_unset_rows_drag_dest(_arg0)
	runtime.KeepAlive(treeView)
}

// UnsetRowsDragSource undoes the effect of
// gtk_tree_view_enable_model_drag_source(). Calling this method sets
// TreeView:reorderable to FALSE.
func (treeView *TreeView) UnsetRowsDragSource() {
	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C.gtk_tree_view_unset_rows_drag_source(_arg0)
	runtime.KeepAlive(treeView)
}

func (treeView *TreeView) columnsChanged() {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.columns_changed

	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C._gotk4_gtk3_TreeView_virtual_columns_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)
}

func (treeView *TreeView) cursorChanged() {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.cursor_changed

	var _arg0 *C.GtkTreeView // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	C._gotk4_gtk3_TreeView_virtual_cursor_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)
}

// The function takes the following parameters:
//
//   - logical
//   - expand
//   - openAll
func (treeView *TreeView) expandCollapseCursorRow(logical, expand, openAll bool) bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.expand_collapse_cursor_row

	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out
	var _arg2 C.gboolean     // out
	var _arg3 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if logical {
		_arg1 = C.TRUE
	}
	if expand {
		_arg2 = C.TRUE
	}
	if openAll {
		_arg3 = C.TRUE
	}

	_cret = C._gotk4_gtk3_TreeView_virtual_expand_collapse_cursor_row(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(logical)
	runtime.KeepAlive(expand)
	runtime.KeepAlive(openAll)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - step
//   - count
func (treeView *TreeView) moveCursor(step MovementStep, count int) bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.move_cursor

	var _arg0 *C.GtkTreeView    // out
	var _arg1 C.GtkMovementStep // out
	var _arg2 C.gint            // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = C.GtkMovementStep(step)
	_arg2 = C.gint(count)

	_cret = C._gotk4_gtk3_TreeView_virtual_move_cursor(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(step)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// rowActivated activates the cell determined by path and column.
//
// The function takes the following parameters:
//
//   - path to be activated.
//   - column to be activated.
func (treeView *TreeView) rowActivated(path *TreePath, column *TreeViewColumn) {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.row_activated

	var _arg0 *C.GtkTreeView       // out
	var _arg1 *C.GtkTreePath       // out
	var _arg2 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg2 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(column).Native()))

	C._gotk4_gtk3_TreeView_virtual_row_activated(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(path)
	runtime.KeepAlive(column)
}

// The function takes the following parameters:
//
//   - iter
//   - path
func (treeView *TreeView) rowCollapsed(iter *TreeIter, path *TreePath) {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.row_collapsed

	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreeIter // out
	var _arg2 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C._gotk4_gtk3_TreeView_virtual_row_collapsed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(path)
}

// The function takes the following parameters:
//
//   - iter
//   - path
func (treeView *TreeView) rowExpanded(iter *TreeIter, path *TreePath) {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.row_expanded

	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreeIter // out
	var _arg2 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C._gotk4_gtk3_TreeView_virtual_row_expanded(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(path)
}

func (treeView *TreeView) selectAll() bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.select_all

	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C._gotk4_gtk3_TreeView_virtual_select_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (treeView *TreeView) selectCursorParent() bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.select_cursor_parent

	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C._gotk4_gtk3_TreeView_virtual_select_cursor_parent(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (treeView *TreeView) selectCursorRow(startEditing bool) bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.select_cursor_row

	var _arg0 *C.GtkTreeView // out
	var _arg1 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	if startEditing {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_TreeView_virtual_select_cursor_row(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(startEditing)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (treeView *TreeView) startInteractiveSearch() bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.start_interactive_search

	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C._gotk4_gtk3_TreeView_virtual_start_interactive_search(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - iter
//   - path
func (treeView *TreeView) testCollapseRow(iter *TreeIter, path *TreePath) bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.test_collapse_row

	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreeIter // out
	var _arg2 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_TreeView_virtual_test_collapse_row(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - iter
//   - path
func (treeView *TreeView) testExpandRow(iter *TreeIter, path *TreePath) bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.test_expand_row

	var _arg0 *C.GtkTreeView // out
	var _arg1 *C.GtkTreeIter // out
	var _arg2 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))
	_arg1 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C._gotk4_gtk3_TreeView_virtual_test_expand_row(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(treeView)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (treeView *TreeView) toggleCursorRow() bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.toggle_cursor_row

	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C._gotk4_gtk3_TreeView_virtual_toggle_cursor_row(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (treeView *TreeView) unselectAll() bool {
	gclass := (*C.GtkTreeViewClass)(coreglib.PeekParentClass(treeView))
	fnarg := gclass.unselect_all

	var _arg0 *C.GtkTreeView // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreeView)(unsafe.Pointer(coreglib.InternObject(treeView).Native()))

	_cret = C._gotk4_gtk3_TreeView_virtual_unselect_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeView)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeViewAccessibleOverrides contains methods that are overridable.
type TreeViewAccessibleOverrides struct {
}

func defaultTreeViewAccessibleOverrides(v *TreeViewAccessible) TreeViewAccessibleOverrides {
	return TreeViewAccessibleOverrides{}
}

type TreeViewAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	*coreglib.Object
	atk.Selection
	atk.Table
	CellAccessibleParent
}

var (
	_ coreglib.Objector = (*TreeViewAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeViewAccessible, *TreeViewAccessibleClass, TreeViewAccessibleOverrides](
		GTypeTreeViewAccessible,
		initTreeViewAccessibleClass,
		wrapTreeViewAccessible,
		defaultTreeViewAccessibleOverrides,
	)
}

func initTreeViewAccessibleClass(gclass unsafe.Pointer, overrides TreeViewAccessibleOverrides, classInitFunc func(*TreeViewAccessibleClass)) {
	if classInitFunc != nil {
		class := (*TreeViewAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeViewAccessible(obj *coreglib.Object) *TreeViewAccessible {
	return &TreeViewAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Object: obj,
		Selection: atk.Selection{
			Object: obj,
		},
		Table: atk.Table{
			Object: obj,
		},
		CellAccessibleParent: CellAccessibleParent{
			Object: obj,
		},
	}
}

func marshalTreeViewAccessible(p uintptr) (interface{}, error) {
	return wrapTreeViewAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// TreeViewColumnOverrides contains methods that are overridable.
type TreeViewColumnOverrides struct {
	// Clicked emits the “clicked” signal on the column. This function will only
	// work if tree_column is clickable.
	Clicked func()
}

func defaultTreeViewColumnOverrides(v *TreeViewColumn) TreeViewColumnOverrides {
	return TreeViewColumnOverrides{
		Clicked: v.clicked,
	}
}

// TreeViewColumn object represents a visible column in a TreeView widget.
// It allows to set properties of the column header, and functions as a holding
// pen for the cell renderers which determine how the data in the column is
// displayed.
//
// Please refer to the tree widget conceptual overview (TreeWidget.html) for an
// overview of all the objects and data types related to the tree widget and how
// they work together.
type TreeViewColumn struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned

	*coreglib.Object
	Buildable
	CellLayout
}

var (
	_ coreglib.Objector = (*TreeViewColumn)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*TreeViewColumn, *TreeViewColumnClass, TreeViewColumnOverrides](
		GTypeTreeViewColumn,
		initTreeViewColumnClass,
		wrapTreeViewColumn,
		defaultTreeViewColumnOverrides,
	)
}

func initTreeViewColumnClass(gclass unsafe.Pointer, overrides TreeViewColumnOverrides, classInitFunc func(*TreeViewColumnClass)) {
	pclass := (*C.GtkTreeViewColumnClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeTreeViewColumn))))

	if overrides.Clicked != nil {
		pclass.clicked = (*[0]byte)(C._gotk4_gtk3_TreeViewColumnClass_clicked)
	}

	if classInitFunc != nil {
		class := (*TreeViewColumnClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapTreeViewColumn(obj *coreglib.Object) *TreeViewColumn {
	return &TreeViewColumn{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
		CellLayout: CellLayout{
			Object: obj,
		},
	}
}

func marshalTreeViewColumn(p uintptr) (interface{}, error) {
	return wrapTreeViewColumn(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (treeColumn *TreeViewColumn) ConnectClicked(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(treeColumn, "clicked", false, unsafe.Pointer(C._gotk4_gtk3_TreeViewColumn_ConnectClicked), f)
}

// NewTreeViewColumn creates a new TreeViewColumn.
//
// The function returns the following values:
//
//   - treeViewColumn: newly created TreeViewColumn.
func NewTreeViewColumn() *TreeViewColumn {
	var _cret *C.GtkTreeViewColumn // in

	_cret = C.gtk_tree_view_column_new()

	var _treeViewColumn *TreeViewColumn // out

	_treeViewColumn = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeViewColumn
}

// NewTreeViewColumnWithArea creates a new TreeViewColumn using area to render
// its cells.
//
// The function takes the following parameters:
//
//   - area that the newly created column should use to layout cells.
//
// The function returns the following values:
//
//   - treeViewColumn: newly created TreeViewColumn.
func NewTreeViewColumnWithArea(area CellAreaer) *TreeViewColumn {
	var _arg1 *C.GtkCellArea       // out
	var _cret *C.GtkTreeViewColumn // in

	_arg1 = (*C.GtkCellArea)(unsafe.Pointer(coreglib.InternObject(area).Native()))

	_cret = C.gtk_tree_view_column_new_with_area(_arg1)
	runtime.KeepAlive(area)

	var _treeViewColumn *TreeViewColumn // out

	_treeViewColumn = wrapTreeViewColumn(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeViewColumn
}

// AddAttribute adds an attribute mapping to the list in tree_column. The column
// is the column of the model to get a value from, and the attribute is the
// parameter on cell_renderer to be set from the value. So for example if column
// 2 of the model contains strings, you could have the “text” attribute of a
// CellRendererText get its values from column 2.
//
// The function takes the following parameters:
//
//   - cellRenderer to set attributes on.
//   - attribute on the renderer.
//   - column position on the model to get the attribute from.
func (treeColumn *TreeViewColumn) AddAttribute(cellRenderer CellRendererer, attribute string, column int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out
	var _arg2 *C.gchar             // out
	var _arg3 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cellRenderer).Native()))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(attribute)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gint(column)

	C.gtk_tree_view_column_add_attribute(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cellRenderer)
	runtime.KeepAlive(attribute)
	runtime.KeepAlive(column)
}

// CellGetPosition obtains the horizontal position and size of a cell in a
// column. If the cell is not found in the column, start_pos and width are not
// changed and FALSE is returned.
//
// The function takes the following parameters:
//
//   - cellRenderer: CellRenderer.
//
// The function returns the following values:
//
//   - xOffset (optional): return location for the horizontal position of cell
//     within tree_column, may be NULL.
//   - width (optional): return location for the width of cell, may be NULL.
//   - ok: TRUE if cell belongs to tree_column.
func (treeColumn *TreeViewColumn) CellGetPosition(cellRenderer CellRendererer) (xOffset, width int, ok bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out
	var _arg2 C.gint               // in
	var _arg3 C.gint               // in
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cellRenderer).Native()))

	_cret = C.gtk_tree_view_column_cell_get_position(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cellRenderer)

	var _xOffset int // out
	var _width int   // out
	var _ok bool     // out

	_xOffset = int(_arg2)
	_width = int(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _xOffset, _width, _ok
}

// CellGetSize obtains the width and height needed to render the column. This is
// used primarily by the TreeView.
//
// The function takes the following parameters:
//
//   - cellArea (optional): area a cell in the column will be allocated,
//     or NULL.
//
// The function returns the following values:
//
//   - xOffset (optional): location to return x offset of a cell relative to
//     cell_area, or NULL.
//   - yOffset (optional): location to return y offset of a cell relative to
//     cell_area, or NULL.
//   - width (optional): location to return width needed to render a cell,
//     or NULL.
//   - height (optional): location to return height needed to render a cell,
//     or NULL.
func (treeColumn *TreeViewColumn) CellGetSize(cellArea *gdk.Rectangle) (xOffset, yOffset, width, height int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GdkRectangle      // out
	var _arg2 C.gint               // in
	var _arg3 C.gint               // in
	var _arg4 C.gint               // in
	var _arg5 C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if cellArea != nil {
		_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(cellArea)))
	}

	C.gtk_tree_view_column_cell_get_size(_arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cellArea)

	var _xOffset int // out
	var _yOffset int // out
	var _width int   // out
	var _height int  // out

	_xOffset = int(_arg2)
	_yOffset = int(_arg3)
	_width = int(_arg4)
	_height = int(_arg5)

	return _xOffset, _yOffset, _width, _height
}

// CellIsVisible returns TRUE if any of the cells packed into the tree_column
// are visible. For this to be meaningful, you must first initialize the cells
// with gtk_tree_view_column_cell_set_cell_data().
//
// The function returns the following values:
//
//   - ok: TRUE, if any of the cells packed into the tree_column are currently
//     visible.
func (treeColumn *TreeViewColumn) CellIsVisible() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_cell_is_visible(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CellSetCellData sets the cell renderer based on the tree_model and iter.
// That is, for every attribute mapping in tree_column, it will get a value from
// the set column on the iter, and use that value to set the attribute on the
// cell renderer. This is used primarily by the TreeView.
//
// The function takes the following parameters:
//
//   - treeModel to to get the cell renderers attributes from.
//   - iter to to get the cell renderer’s attributes from.
//   - isExpander: TRUE, if the row has children.
//   - isExpanded: TRUE, if the row has visible children.
func (treeColumn *TreeViewColumn) CellSetCellData(treeModel TreeModeller, iter *TreeIter, isExpander, isExpanded bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkTreeModel      // out
	var _arg2 *C.GtkTreeIter       // out
	var _arg3 C.gboolean           // out
	var _arg4 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(treeModel).Native()))
	_arg2 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if isExpander {
		_arg3 = C.TRUE
	}
	if isExpanded {
		_arg4 = C.TRUE
	}

	C.gtk_tree_view_column_cell_set_cell_data(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(treeModel)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(isExpander)
	runtime.KeepAlive(isExpanded)
}

// Clear unsets all the mappings on all renderers on the tree_column.
func (treeColumn *TreeViewColumn) Clear() {
	var _arg0 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	C.gtk_tree_view_column_clear(_arg0)
	runtime.KeepAlive(treeColumn)
}

// ClearAttributes clears all existing attributes previously set with
// gtk_tree_view_column_set_attributes().
//
// The function takes the following parameters:
//
//   - cellRenderer to clear the attribute mapping on.
func (treeColumn *TreeViewColumn) ClearAttributes(cellRenderer CellRendererer) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cellRenderer).Native()))

	C.gtk_tree_view_column_clear_attributes(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cellRenderer)
}

// Clicked emits the “clicked” signal on the column. This function will only
// work if tree_column is clickable.
func (treeColumn *TreeViewColumn) Clicked() {
	var _arg0 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	C.gtk_tree_view_column_clicked(_arg0)
	runtime.KeepAlive(treeColumn)
}

// FocusCell sets the current keyboard focus to be at cell, if the column
// contains 2 or more editable and activatable cells.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
func (treeColumn *TreeViewColumn) FocusCell(cell CellRendererer) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))

	C.gtk_tree_view_column_focus_cell(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cell)
}

// Alignment returns the current x alignment of tree_column. This value can
// range between 0.0 and 1.0.
//
// The function returns the following values:
//
//   - gfloat: current alignent of tree_column.
func (treeColumn *TreeViewColumn) Alignment() float32 {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gfloat             // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_alignment(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gfloat float32 // out

	_gfloat = float32(_cret)

	return _gfloat
}

// Button returns the button used in the treeview column header.
//
// The function returns the following values:
//
//   - widget: button for the column header.
func (treeColumn *TreeViewColumn) Button() Widgetter {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_button(_arg0)
	runtime.KeepAlive(treeColumn)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// Clickable returns TRUE if the user can click on the header for the column.
//
// The function returns the following values:
//
//   - ok: TRUE if user can click the column header.
func (treeColumn *TreeViewColumn) Clickable() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_clickable(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Expand returns TRUE if the column expands to fill available space.
//
// The function returns the following values:
//
//   - ok: TRUE if the column expands to fill available space.
func (treeColumn *TreeViewColumn) Expand() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_expand(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FixedWidth gets the fixed width of the column. This may not
// be the actual displayed width of the column; for that, use
// gtk_tree_view_column_get_width().
//
// The function returns the following values:
//
//   - gint: fixed width of the column.
func (treeColumn *TreeViewColumn) FixedWidth() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_fixed_width(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MaxWidth returns the maximum width in pixels of the tree_column, or -1 if no
// maximum width is set.
//
// The function returns the following values:
//
//   - gint: maximum width of the tree_column.
func (treeColumn *TreeViewColumn) MaxWidth() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_max_width(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MinWidth returns the minimum width in pixels of the tree_column, or -1 if no
// minimum width is set.
//
// The function returns the following values:
//
//   - gint: minimum width of the tree_column.
func (treeColumn *TreeViewColumn) MinWidth() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_min_width(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Reorderable returns TRUE if the tree_column can be reordered by the user.
//
// The function returns the following values:
//
//   - ok: TRUE if the tree_column can be reordered by the user.
func (treeColumn *TreeViewColumn) Reorderable() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_reorderable(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Resizable returns TRUE if the tree_column can be resized by the end user.
//
// The function returns the following values:
//
//   - ok: TRUE, if the tree_column can be resized.
func (treeColumn *TreeViewColumn) Resizable() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_resizable(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Sizing returns the current type of tree_column.
//
// The function returns the following values:
//
//   - treeViewColumnSizing: type of tree_column.
func (treeColumn *TreeViewColumn) Sizing() TreeViewColumnSizing {
	var _arg0 *C.GtkTreeViewColumn      // out
	var _cret C.GtkTreeViewColumnSizing // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_sizing(_arg0)
	runtime.KeepAlive(treeColumn)

	var _treeViewColumnSizing TreeViewColumnSizing // out

	_treeViewColumnSizing = TreeViewColumnSizing(_cret)

	return _treeViewColumnSizing
}

// SortColumnID gets the logical sort_column_id that the model
// sorts on when this column is selected for sorting. See
// gtk_tree_view_column_set_sort_column_id().
//
// The function returns the following values:
//
//   - gint: current sort_column_id for this column, or -1 if this column can’t
//     be used for sorting.
func (treeColumn *TreeViewColumn) SortColumnID() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_sort_column_id(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SortIndicator gets the value set by
// gtk_tree_view_column_set_sort_indicator().
//
// The function returns the following values:
//
//   - ok: whether the sort indicator arrow is displayed.
func (treeColumn *TreeViewColumn) SortIndicator() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_sort_indicator(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SortOrder gets the value set by gtk_tree_view_column_set_sort_order().
//
// The function returns the following values:
//
//   - sortType: sort order the sort indicator is indicating.
func (treeColumn *TreeViewColumn) SortOrder() SortType {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.GtkSortType        // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_sort_order(_arg0)
	runtime.KeepAlive(treeColumn)

	var _sortType SortType // out

	_sortType = SortType(_cret)

	return _sortType
}

// Spacing returns the spacing of tree_column.
//
// The function returns the following values:
//
//   - gint: spacing of tree_column.
func (treeColumn *TreeViewColumn) Spacing() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_spacing(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Title returns the title of the widget.
//
// The function returns the following values:
//
//   - utf8: title of the column. This string should not be modified or freed.
func (treeColumn *TreeViewColumn) Title() string {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret *C.gchar             // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_title(_arg0)
	runtime.KeepAlive(treeColumn)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// TreeView returns the TreeView wherein tree_column has been inserted.
// If column is currently not inserted in any tree view, NULL is returned.
//
// The function returns the following values:
//
//   - widget (optional): tree view wherein column has been inserted if any,
//     NULL otherwise.
func (treeColumn *TreeViewColumn) TreeView() Widgetter {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_tree_view(_arg0)
	runtime.KeepAlive(treeColumn)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Visible returns TRUE if tree_column is visible.
//
// The function returns the following values:
//
//   - ok: whether the column is visible or not. If it is visible, then the tree
//     will show the column.
func (treeColumn *TreeViewColumn) Visible() bool {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_visible(_arg0)
	runtime.KeepAlive(treeColumn)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Widget returns the Widget in the button on the column header. If a custom
// widget has not been set then NULL is returned.
//
// The function returns the following values:
//
//   - widget (optional) in the column header, or NULL.
func (treeColumn *TreeViewColumn) Widget() Widgetter {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret *C.GtkWidget         // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_widget(_arg0)
	runtime.KeepAlive(treeColumn)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Width returns the current size of tree_column in pixels.
//
// The function returns the following values:
//
//   - gint: current width of tree_column.
func (treeColumn *TreeViewColumn) Width() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_width(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// XOffset returns the current X offset of tree_column in pixels.
//
// The function returns the following values:
//
//   - gint: current X offset of tree_column.
func (treeColumn *TreeViewColumn) XOffset() int {
	var _arg0 *C.GtkTreeViewColumn // out
	var _cret C.gint               // in

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	_cret = C.gtk_tree_view_column_get_x_offset(_arg0)
	runtime.KeepAlive(treeColumn)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PackEnd adds the cell to end of the column. If expand is FALSE, then the cell
// is allocated no more space than it needs. Any unused space is divided evenly
// between cells for which expand is TRUE.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to tree_column.
func (treeColumn *TreeViewColumn) PackEnd(cell CellRendererer, expand bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out
	var _arg2 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C.gtk_tree_view_column_pack_end(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// PackStart packs the cell into the beginning of the column. If expand is
// FALSE, then the cell is allocated no more space than it needs. Any unused
// space is divided evenly between cells for which expand is TRUE.
//
// The function takes the following parameters:
//
//   - cell: CellRenderer.
//   - expand: TRUE if cell is to be given extra space allocated to tree_column.
func (treeColumn *TreeViewColumn) PackStart(cell CellRendererer, expand bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkCellRenderer   // out
	var _arg2 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cell).Native()))
	if expand {
		_arg2 = C.TRUE
	}

	C.gtk_tree_view_column_pack_start(_arg0, _arg1, _arg2)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cell)
	runtime.KeepAlive(expand)
}

// QueueResize flags the column, and the cell renderers added to this column,
// to have their sizes renegotiated.
func (treeColumn *TreeViewColumn) QueueResize() {
	var _arg0 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	C.gtk_tree_view_column_queue_resize(_arg0)
	runtime.KeepAlive(treeColumn)
}

// SetAlignment sets the alignment of the title or custom widget inside the
// column header. The alignment determines its location inside the button -- 0.0
// for left, 0.5 for center, 1.0 for right.
//
// The function takes the following parameters:
//
//   - xalign: alignment, which is between [0.0 and 1.0] inclusive.
func (treeColumn *TreeViewColumn) SetAlignment(xalign float32) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gfloat             // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gfloat(xalign)

	C.gtk_tree_view_column_set_alignment(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(xalign)
}

// SetCellDataFunc sets the TreeCellDataFunc to use for the column. This
// function is used instead of the standard attributes mapping for setting the
// column value, and should set the value of tree_column's cell renderer as
// appropriate. func may be NULL to remove an older one.
//
// The function takes the following parameters:
//
//   - cellRenderer: CellRenderer.
//   - fn (optional) to use.
func (treeColumn *TreeViewColumn) SetCellDataFunc(cellRenderer CellRendererer, fn TreeCellDataFunc) {
	var _arg0 *C.GtkTreeViewColumn  // out
	var _arg1 *C.GtkCellRenderer    // out
	var _arg2 C.GtkTreeCellDataFunc // out
	var _arg3 C.gpointer
	var _arg4 C.GDestroyNotify

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.GtkCellRenderer)(unsafe.Pointer(coreglib.InternObject(cellRenderer).Native()))
	if fn != nil {
		_arg2 = (*[0]byte)(C._gotk4_gtk3_TreeCellDataFunc)
		_arg3 = C.gpointer(gbox.Assign(fn))
		_arg4 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))
	}

	C.gtk_tree_view_column_set_cell_data_func(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(cellRenderer)
	runtime.KeepAlive(fn)
}

// SetClickable sets the header to be active if clickable is TRUE. When the
// header is active, then it can take keyboard focus, and can be clicked.
//
// The function takes the following parameters:
//
//   - clickable: TRUE if the header is active.
func (treeColumn *TreeViewColumn) SetClickable(clickable bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if clickable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_clickable(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(clickable)
}

// SetExpand sets the column to take available extra space. This space is shared
// equally amongst all columns that have the expand set to TRUE. If no column
// has this option set, then the last column gets all extra space. By default,
// every column is created with this FALSE.
//
// Along with “fixed-width”, the “expand” property changes when the column is
// resized by the user.
//
// The function takes the following parameters:
//
//   - expand: TRUE if the column should expand to fill available space.
func (treeColumn *TreeViewColumn) SetExpand(expand bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if expand {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_expand(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(expand)
}

// SetFixedWidth: if fixed_width is not -1, sets the fixed width of tree_column;
// otherwise unsets it. The effective value of fixed_width is clamped between
// the minimum and maximum width of the column; however, the value stored
// in the “fixed-width” property is not clamped. If the column sizing is
// K_TREE_VIEW_COLUMN_GROW_ONLY or K_TREE_VIEW_COLUMN_AUTOSIZE, setting a fixed
// width overrides the automatically calculated width. Note that fixed_width
// is only a hint to GTK+; the width actually allocated to the column may be
// greater or less than requested.
//
// Along with “expand”, the “fixed-width” property changes when the column is
// resized by the user.
//
// The function takes the following parameters:
//
//   - fixedWidth: new fixed width, in pixels, or -1.
func (treeColumn *TreeViewColumn) SetFixedWidth(fixedWidth int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gint(fixedWidth)

	C.gtk_tree_view_column_set_fixed_width(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(fixedWidth)
}

// SetMaxWidth sets the maximum width of the tree_column. If max_width is -1,
// then the maximum width is unset. Note, the column can actually be wider than
// max width if it’s the last column in a view. In this case, the column expands
// to fill any extra space.
//
// The function takes the following parameters:
//
//   - maxWidth: maximum width of the column in pixels, or -1.
func (treeColumn *TreeViewColumn) SetMaxWidth(maxWidth int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gint(maxWidth)

	C.gtk_tree_view_column_set_max_width(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(maxWidth)
}

// SetMinWidth sets the minimum width of the tree_column. If min_width is -1,
// then the minimum width is unset.
//
// The function takes the following parameters:
//
//   - minWidth: minimum width of the column in pixels, or -1.
func (treeColumn *TreeViewColumn) SetMinWidth(minWidth int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gint(minWidth)

	C.gtk_tree_view_column_set_min_width(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(minWidth)
}

// SetReorderable: if reorderable is TRUE, then the column can be reordered by
// the end user dragging the header.
//
// The function takes the following parameters:
//
//   - reorderable: TRUE, if the column can be reordered.
func (treeColumn *TreeViewColumn) SetReorderable(reorderable bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if reorderable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_reorderable(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(reorderable)
}

// SetResizable: if resizable is TRUE, then the user can explicitly resize the
// column by grabbing the outer edge of the column button. If resizable is TRUE
// and sizing mode of the column is K_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
// mode is changed to K_TREE_VIEW_COLUMN_GROW_ONLY.
//
// The function takes the following parameters:
//
//   - resizable: TRUE, if the column can be resized.
func (treeColumn *TreeViewColumn) SetResizable(resizable bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if resizable {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_resizable(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(resizable)
}

// SetSizing sets the growth behavior of tree_column to type.
//
// The function takes the following parameters:
//
//   - typ: TreeViewColumnSizing.
func (treeColumn *TreeViewColumn) SetSizing(typ TreeViewColumnSizing) {
	var _arg0 *C.GtkTreeViewColumn      // out
	var _arg1 C.GtkTreeViewColumnSizing // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.GtkTreeViewColumnSizing(typ)

	C.gtk_tree_view_column_set_sizing(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(typ)
}

// SetSortColumnID sets the logical sort_column_id that this column sorts on
// when this column is selected for sorting. Doing so makes the column header
// clickable.
//
// The function takes the following parameters:
//
//   - sortColumnId: sort_column_id of the model to sort on.
func (treeColumn *TreeViewColumn) SetSortColumnID(sortColumnId int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gint(sortColumnId)

	C.gtk_tree_view_column_set_sort_column_id(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(sortColumnId)
}

// SetSortIndicator: call this function with a setting of TRUE to display
// an arrow in the header button indicating the column is sorted. Call
// gtk_tree_view_column_set_sort_order() to change the direction of the arrow.
//
// The function takes the following parameters:
//
//   - setting: TRUE to display an indicator that the column is sorted.
func (treeColumn *TreeViewColumn) SetSortIndicator(setting bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_sort_indicator(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(setting)
}

// SetSortOrder changes the appearance of the sort indicator.
//
// This does not actually sort the model. Use
// gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
// support. This function is primarily for custom sorting behavior, and should
// be used in conjunction with gtk_tree_sortable_set_sort_column_id() to do
// that. For custom models, the mechanism will vary.
//
// The sort indicator changes direction to indicate normal sort or reverse sort.
// Note that you must have the sort indicator enabled to see anything when
// calling this function; see gtk_tree_view_column_set_sort_indicator().
//
// The function takes the following parameters:
//
//   - order: sort order that the sort indicator should indicate.
func (treeColumn *TreeViewColumn) SetSortOrder(order SortType) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.GtkSortType        // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.GtkSortType(order)

	C.gtk_tree_view_column_set_sort_order(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(order)
}

// SetSpacing sets the spacing field of tree_column, which is the number of
// pixels to place between cell renderers packed into it.
//
// The function takes the following parameters:
//
//   - spacing: distance between cell renderers in pixels.
func (treeColumn *TreeViewColumn) SetSpacing(spacing int) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gint               // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = C.gint(spacing)

	C.gtk_tree_view_column_set_spacing(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(spacing)
}

// SetTitle sets the title of the tree_column. If a custom widget has been set,
// then this value is ignored.
//
// The function takes the following parameters:
//
//   - title of the tree_column.
func (treeColumn *TreeViewColumn) SetTitle(title string) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.gchar             // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_tree_view_column_set_title(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(title)
}

// SetVisible sets the visibility of tree_column.
//
// The function takes the following parameters:
//
//   - visible: TRUE if the tree_column is visible.
func (treeColumn *TreeViewColumn) SetVisible(visible bool) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 C.gboolean           // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_tree_view_column_set_visible(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(visible)
}

// SetWidget sets the widget in the header to be widget. If widget is NULL,
// then the header button is set with a Label set to the title of tree_column.
//
// The function takes the following parameters:
//
//   - widget (optional): child Widget, or NULL.
func (treeColumn *TreeViewColumn) SetWidget(widget Widgetter) {
	var _arg0 *C.GtkTreeViewColumn // out
	var _arg1 *C.GtkWidget         // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))
	if widget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}

	C.gtk_tree_view_column_set_widget(_arg0, _arg1)
	runtime.KeepAlive(treeColumn)
	runtime.KeepAlive(widget)
}

// Clicked emits the “clicked” signal on the column. This function will only
// work if tree_column is clickable.
func (treeColumn *TreeViewColumn) clicked() {
	gclass := (*C.GtkTreeViewColumnClass)(coreglib.PeekParentClass(treeColumn))
	fnarg := gclass.clicked

	var _arg0 *C.GtkTreeViewColumn // out

	_arg0 = (*C.GtkTreeViewColumn)(unsafe.Pointer(coreglib.InternObject(treeColumn).Native()))

	C._gotk4_gtk3_TreeViewColumn_virtual_clicked(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(treeColumn)
}

// UIManagerOverrides contains methods that are overridable.
type UIManagerOverrides struct {
	ActionsChanged func()
	AddWidget      func(widget Widgetter)
	// The function takes the following parameters:
	//
	//   - action
	//   - proxy
	ConnectProxy func(action *Action, proxy Widgetter)
	// The function takes the following parameters:
	//
	//   - action
	//   - proxy
	DisconnectProxy func(action *Action, proxy Widgetter)
	// Action looks up an action by following a path. See
	// gtk_ui_manager_get_widget() for more information about paths.
	//
	// Deprecated: since version 3.10.
	//
	// The function takes the following parameters:
	//
	//   - path: path.
	//
	// The function returns the following values:
	//
	//   - action whose proxy widget is found by following the path, or NULL if
	//     no widget was found.
	Action func(path string) *Action
	// Widget looks up a widget by following a path. The path consists of the
	// names specified in the XML description of the UI. separated by “/”.
	// Elements which don’t have a name or action attribute in the XML (e.g.
	// <popup>) can be addressed by their XML element name (e.g. "popup").
	// The root element ("/ui") can be omitted in the path.
	//
	// Note that the widget found by following a path that ends in a <menu>;
	// element is the menuitem to which the menu is attached, not the menu it
	// manages.
	//
	// Also note that the widgets constructed by a ui manager are not tied to
	// the lifecycle of the ui manager. If you add the widgets returned by this
	// function to some container or explicitly ref them, they will survive the
	// destruction of the ui manager.
	//
	// Deprecated: since version 3.10.
	//
	// The function takes the following parameters:
	//
	//   - path: path.
	//
	// The function returns the following values:
	//
	//   - widget found by following the path, or NULL if no widget was found.
	Widget       func(path string) Widgetter
	PostActivate func(action *Action)
	PreActivate  func(action *Action)
}

func defaultUIManagerOverrides(v *UIManager) UIManagerOverrides {
	return UIManagerOverrides{
		ActionsChanged:  v.actionsChanged,
		AddWidget:       v.addWidget,
		ConnectProxy:    v.connectProxy,
		DisconnectProxy: v.disconnectProxy,
		Action:          v.action,
		Widget:          v.widget,
		PostActivate:    v.postActivate,
		PreActivate:     v.preActivate,
	}
}

// UIManager constructs a user interface (menus and toolbars) from one or more
// UI definitions, which reference actions from one or more action groups.
//
// > GtkUIManager is deprecated since GTK+ 3.10. To construct user interfaces
// > from XML definitions, you should use Builder, Model, et al. To > work with
// actions, use #GAction, Actionable et al. These newer classes > support richer
// functionality and integration with various desktop shells. > It should be
// possible to migrate most/all functionality from GtkUIManager.
//
// # UI Definitions
//
// The UI definitions are specified in an XML format which can be roughly
// described by the following DTD.
//
// > Do not confuse the GtkUIManager UI Definitions described here with > the
// similarly named [GtkBuilder UI Definitions][BUILDER-UI].
//
//	<!ELEMENT ui          (menubar|toolbar|popup|accelerator)* >
//	<!ELEMENT menubar     (menuitem|separator|placeholder|menu)* >
//	<!ELEMENT menu        (menuitem|separator|placeholder|menu)* >
//	<!ELEMENT popup       (menuitem|separator|placeholder|menu)* >
//	<!ELEMENT toolbar     (toolitem|separator|placeholder)* >
//	<!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
//	<!ELEMENT menuitem     EMPTY >
//	<!ELEMENT toolitem     (menu?) >
//	<!ELEMENT separator    EMPTY >
//	<!ELEMENT accelerator  EMPTY >
//	<!ATTLIST menubar      name                      PLIED
//	                       action                    PLIED >
//	<!ATTLIST toolbar      name                      PLIED
//	                       action                    PLIED >
//	<!ATTLIST popup        name                      PLIED
//	                       action                    PLIED
//	                       accelerators (true|false) PLIED >
//	<!ATTLIST placeholder  name                      PLIED
//	                       action                    PLIED >
//	<!ATTLIST separator    name                      PLIED
//	                       action                    PLIED
//	                       expand       (true|false) PLIED >
//	<!ATTLIST menu         name                      PLIED
//	                       action                    QUIRED
//	                       position     (top|bot)    PLIED >
//	<!ATTLIST menuitem     name                      PLIED
//	                       action                    QUIRED
//	                       position     (top|bot)    PLIED
//	                       always-show-image (true|false) PLIED >
//	<!ATTLIST toolitem     name                      PLIED
//	                       action                    QUIRED
//	                       position     (top|bot)    PLIED >
//	<!ATTLIST accelerator  name                      PLIED
//	                       action                    QUIRED >
//
// There are some additional restrictions beyond those specified in the DTD,
// e.g. every toolitem must have a toolbar in its anchestry and every menuitem
// must have a menubar or popup in its anchestry. Since a Parser is used to
// parse the UI description, it must not only be valid XML, but valid markup.
//
// If a name is not specified, it defaults to the action. If an action is not
// specified either, the element name is used. The name and action attributes
// must not contain “/” characters after parsing (since that would mess up path
// lookup) and must be usable as XML attributes when enclosed in doublequotes,
// thus they must not “"” characters or references to the &quot; entity.
//
// A UI definition #
//
//	<object class="GtkUIManager" id="uiman">
//	  <child>
//	    <object class="GtkActionGroup" id="actiongroup">
//	      <child>
//	        <object class="GtkAction" id="file">
//	          <property name="label">_File</property>
//	        </object>
//	      </child>
//	    </object>
//	  </child>
//	  <ui>
//	    <menubar name="menubar1">
//	      <menu action="file">
//	      </menu>
//	    </menubar>
//	  </ui>
//	</object>
//	<object class="GtkWindow" id="main-window">
//	  <child>
//	    <object class="GtkMenuBar" id="menubar1" constructor="uiman"/>
//	  </child>
//	</object>.
type UIManager struct {
	_ [0]func() // equal guard
	*coreglib.Object

	Buildable
}

var (
	_ coreglib.Objector = (*UIManager)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*UIManager, *UIManagerClass, UIManagerOverrides](
		GTypeUIManager,
		initUIManagerClass,
		wrapUIManager,
		defaultUIManagerOverrides,
	)
}

func initUIManagerClass(gclass unsafe.Pointer, overrides UIManagerOverrides, classInitFunc func(*UIManagerClass)) {
	pclass := (*C.GtkUIManagerClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeUIManager))))

	if overrides.ActionsChanged != nil {
		pclass.actions_changed = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_actions_changed)
	}

	if overrides.AddWidget != nil {
		pclass.add_widget = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_add_widget)
	}

	if overrides.ConnectProxy != nil {
		pclass.connect_proxy = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_connect_proxy)
	}

	if overrides.DisconnectProxy != nil {
		pclass.disconnect_proxy = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_disconnect_proxy)
	}

	if overrides.Action != nil {
		pclass.get_action = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_get_action)
	}

	if overrides.Widget != nil {
		pclass.get_widget = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_get_widget)
	}

	if overrides.PostActivate != nil {
		pclass.post_activate = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_post_activate)
	}

	if overrides.PreActivate != nil {
		pclass.pre_activate = (*[0]byte)(C._gotk4_gtk3_UIManagerClass_pre_activate)
	}

	if classInitFunc != nil {
		class := (*UIManagerClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapUIManager(obj *coreglib.Object) *UIManager {
	return &UIManager{
		Object: obj,
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalUIManager(p uintptr) (interface{}, error) {
	return wrapUIManager(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActionsChanged signal is emitted whenever the set of actions changes.
func (manager *UIManager) ConnectActionsChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "actions-changed", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectActionsChanged), f)
}

// ConnectAddWidget signal is emitted for each generated menubar and toolbar.
// It is not emitted for generated popup menus, which can be obtained by
// gtk_ui_manager_get_widget().
func (manager *UIManager) ConnectAddWidget(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "add-widget", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectAddWidget), f)
}

// ConnectConnectProxy signal is emitted after connecting a proxy to an action
// in the group.
//
// This is intended for simple customizations for which a custom action class
// would be too clumsy, e.g. showing tooltips for menuitems in the statusbar.
func (manager *UIManager) ConnectConnectProxy(f func(action *Action, proxy Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "connect-proxy", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectConnectProxy), f)
}

// ConnectDisconnectProxy signal is emitted after disconnecting a proxy from an
// action in the group.
func (manager *UIManager) ConnectDisconnectProxy(f func(action *Action, proxy Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "disconnect-proxy", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectDisconnectProxy), f)
}

// ConnectPostActivate signal is emitted just after the action is activated.
//
// This is intended for applications to get notification just after any action
// is activated.
func (manager *UIManager) ConnectPostActivate(f func(action *Action)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "post-activate", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectPostActivate), f)
}

// ConnectPreActivate signal is emitted just before the action is activated.
//
// This is intended for applications to get notification just before any action
// is activated.
func (manager *UIManager) ConnectPreActivate(f func(action *Action)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(manager, "pre-activate", false, unsafe.Pointer(C._gotk4_gtk3_UIManager_ConnectPreActivate), f)
}

// NewUIManager creates a new ui manager object.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - uiManager: new ui manager object.
func NewUIManager() *UIManager {
	var _cret *C.GtkUIManager // in

	_cret = C.gtk_ui_manager_new()

	var _uiManager *UIManager // out

	_uiManager = wrapUIManager(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _uiManager
}

// AddUi adds a UI element to the current contents of manager.
//
// If type is GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
// separator if such an element can be inserted at the place determined by path.
// Otherwise type must indicate an element that can be inserted at the place
// determined by path.
//
// If path points to a menuitem or toolitem, the new element will be inserted
// before or after this item, depending on top.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - mergeId: merge id for the merged UI, see gtk_ui_manager_new_merge_id().
//   - path: path.
//   - name for the added UI element.
//   - action (optional): name of the action to be proxied, or NULL to add a
//     separator.
//   - typ: type of UI element to add.
//   - top: if TRUE, the UI element is added before its siblings, otherwise it
//     is added after its siblings.
func (manager *UIManager) AddUi(mergeId uint, path, name, action string, typ UIManagerItemType, top bool) {
	var _arg0 *C.GtkUIManager        // out
	var _arg1 C.guint                // out
	var _arg2 *C.gchar               // out
	var _arg3 *C.gchar               // out
	var _arg4 *C.gchar               // out
	var _arg5 C.GtkUIManagerItemType // out
	var _arg6 C.gboolean             // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = C.guint(mergeId)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg3))
	if action != "" {
		_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(action)))
		defer C.free(unsafe.Pointer(_arg4))
	}
	_arg5 = C.GtkUIManagerItemType(typ)
	if top {
		_arg6 = C.TRUE
	}

	C.gtk_ui_manager_add_ui(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(mergeId)
	runtime.KeepAlive(path)
	runtime.KeepAlive(name)
	runtime.KeepAlive(action)
	runtime.KeepAlive(typ)
	runtime.KeepAlive(top)
}

// AddUiFromFile parses a file containing a [UI definition][XML-UI] and merges
// it with the current contents of manager.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - filename: name of the file to parse.
//
// The function returns the following values:
//
//   - guint: merge id for the merged UI. The merge id can be used to unmerge
//     the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return
//     value is 0.
func (manager *UIManager) AddUiFromFile(filename string) (uint, error) {
	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret C.guint         // in
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_ui_manager_add_ui_from_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(filename)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddUiFromResource parses a resource file containing a [UI definition][XML-UI]
// and merges it with the current contents of manager.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - resourcePath: resource path of the file to parse.
//
// The function returns the following values:
//
//   - guint: merge id for the merged UI. The merge id can be used to unmerge
//     the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return
//     value is 0.
func (manager *UIManager) AddUiFromResource(resourcePath string) (uint, error) {
	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret C.guint         // in
	var _cerr *C.GError       // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourcePath)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_ui_manager_add_ui_from_resource(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(resourcePath)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// AddUiFromString parses a string containing a [UI definition][XML-UI] and
// merges it with the current contents of manager. An enclosing <ui> element is
// added if it is missing.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - buffer: string to parse.
//
// The function returns the following values:
//
//   - guint: merge id for the merged UI. The merge id can be used to unmerge
//     the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return
//     value is 0.
func (manager *UIManager) AddUiFromString(buffer string) (uint, error) {
	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _arg2 C.gssize
	var _cret C.guint   // in
	var _cerr *C.GError // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg2 = (C.gssize)(len(buffer))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(buffer) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(buffer)), buffer)
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_ui_manager_add_ui_from_string(_arg0, _arg1, _arg2, &_cerr)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(buffer)

	var _guint uint  // out
	var _goerr error // out

	_guint = uint(_cret)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _guint, _goerr
}

// EnsureUpdate makes sure that all pending updates to the UI have been
// completed.
//
// This may occasionally be necessary, since UIManager updates the UI in an idle
// function. A typical example where this function is useful is to enforce that
// the menubar and toolbar have been added to the main window before showing it:
//
//	gtk_container_add (GTK_CONTAINER (window), vbox);
//	g_signal_connect (merge, "add-widget",
//	                  G_CALLBACK (add_widget), vbox);
//	gtk_ui_manager_add_ui_from_file (merge, "my-menus");
//	gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
//	gtk_ui_manager_ensure_update (merge);
//	gtk_widget_show (window);
//
// Deprecated: since version 3.10.
func (manager *UIManager) EnsureUpdate() {
	var _arg0 *C.GtkUIManager // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	C.gtk_ui_manager_ensure_update(_arg0)
	runtime.KeepAlive(manager)
}

// AccelGroup returns the AccelGroup associated with manager.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - accelGroup: AccelGroup.
func (manager *UIManager) AccelGroup() *AccelGroup {
	var _arg0 *C.GtkUIManager  // out
	var _cret *C.GtkAccelGroup // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_ui_manager_get_accel_group(_arg0)
	runtime.KeepAlive(manager)

	var _accelGroup *AccelGroup // out

	_accelGroup = wrapAccelGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _accelGroup
}

// Action looks up an action by following a path. See
// gtk_ui_manager_get_widget() for more information about paths.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - path: path.
//
// The function returns the following values:
//
//   - action whose proxy widget is found by following the path, or NULL if no
//     widget was found.
func (manager *UIManager) Action(path string) *Action {
	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret *C.GtkAction    // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_ui_manager_get_action(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(path)

	var _action *Action // out

	_action = wrapAction(coreglib.Take(unsafe.Pointer(_cret)))

	return _action
}

// ActionGroups returns the list of action groups associated with manager.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - list of action groups. The list is owned by GTK+ and should not be
//     modified.
func (manager *UIManager) ActionGroups() []*ActionGroup {
	var _arg0 *C.GtkUIManager // out
	var _cret *C.GList        // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_ui_manager_get_action_groups(_arg0)
	runtime.KeepAlive(manager)

	var _list []*ActionGroup // out

	_list = make([]*ActionGroup, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), false, func(v unsafe.Pointer) {
		src := (*C.GtkActionGroup)(v)
		var dst *ActionGroup // out
		dst = wrapActionGroup(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// AddTearoffs returns whether menus generated by this UIManager will have
// tearoff menu items.
//
// Deprecated: Tearoff menus are deprecated and should not be used in newly
// written code.
//
// The function returns the following values:
//
//   - ok: whether tearoff menu items are added.
func (manager *UIManager) AddTearoffs() bool {
	var _arg0 *C.GtkUIManager // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_ui_manager_get_add_tearoffs(_arg0)
	runtime.KeepAlive(manager)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Toplevels obtains a list of all toplevel widgets of the requested types.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - types specifies the types of toplevel widgets to include. Allowed types
//     are K_UI_MANAGER_MENUBAR, K_UI_MANAGER_TOOLBAR and K_UI_MANAGER_POPUP.
//
// The function returns the following values:
//
//   - sList: newly-allocated List of all toplevel widgets of the requested
//     types. Free the returned list with g_slist_free().
func (manager *UIManager) Toplevels(types UIManagerItemType) []Widgetter {
	var _arg0 *C.GtkUIManager        // out
	var _arg1 C.GtkUIManagerItemType // out
	var _cret *C.GSList              // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = C.GtkUIManagerItemType(types)

	_cret = C.gtk_ui_manager_get_toplevels(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(types)

	var _sList []Widgetter // out

	_sList = make([]Widgetter, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_sList = append(_sList, dst)
	})

	return _sList
}

// Ui creates a [UI definition][XML-UI] of the merged UI.
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - utf8: newly allocated string containing an XML representation of the
//     merged UI.
func (manager *UIManager) Ui() string {
	var _arg0 *C.GtkUIManager // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_ui_manager_get_ui(_arg0)
	runtime.KeepAlive(manager)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Widget looks up a widget by following a path. The path consists of the names
// specified in the XML description of the UI. separated by “/”. Elements
// which don’t have a name or action attribute in the XML (e.g. <popup>) can be
// addressed by their XML element name (e.g. "popup"). The root element ("/ui")
// can be omitted in the path.
//
// Note that the widget found by following a path that ends in a <menu>; element
// is the menuitem to which the menu is attached, not the menu it manages.
//
// Also note that the widgets constructed by a ui manager are not tied to the
// lifecycle of the ui manager. If you add the widgets returned by this function
// to some container or explicitly ref them, they will survive the destruction
// of the ui manager.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - path: path.
//
// The function returns the following values:
//
//   - widget found by following the path, or NULL if no widget was found.
func (manager *UIManager) Widget(path string) Widgetter {
	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_ui_manager_get_widget(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(path)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// InsertActionGroup inserts an action group into the list of action groups
// associated with manager. Actions in earlier groups hide actions with the same
// name in later groups.
//
// If pos is larger than the number of action groups in manager, or negative,
// action_group will be inserted at the end of the internal list.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - actionGroup: action group to be inserted.
//   - pos: position at which the group will be inserted.
func (manager *UIManager) InsertActionGroup(actionGroup *ActionGroup, pos int) {
	var _arg0 *C.GtkUIManager   // out
	var _arg1 *C.GtkActionGroup // out
	var _arg2 C.gint            // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))
	_arg2 = C.gint(pos)

	C.gtk_ui_manager_insert_action_group(_arg0, _arg1, _arg2)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(actionGroup)
	runtime.KeepAlive(pos)
}

// NewMergeID returns an unused merge id, suitable for use with
// gtk_ui_manager_add_ui().
//
// Deprecated: since version 3.10.
//
// The function returns the following values:
//
//   - guint: unused merge id.
func (manager *UIManager) NewMergeID() uint {
	var _arg0 *C.GtkUIManager // out
	var _cret C.guint         // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	_cret = C.gtk_ui_manager_new_merge_id(_arg0)
	runtime.KeepAlive(manager)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// RemoveActionGroup removes an action group from the list of action groups
// associated with manager.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - actionGroup: action group to be removed.
func (manager *UIManager) RemoveActionGroup(actionGroup *ActionGroup) {
	var _arg0 *C.GtkUIManager   // out
	var _arg1 *C.GtkActionGroup // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkActionGroup)(unsafe.Pointer(coreglib.InternObject(actionGroup).Native()))

	C.gtk_ui_manager_remove_action_group(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(actionGroup)
}

// RemoveUi unmerges the part of manager's content identified by merge_id.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - mergeId: merge id as returned by gtk_ui_manager_add_ui_from_string().
func (manager *UIManager) RemoveUi(mergeId uint) {
	var _arg0 *C.GtkUIManager // out
	var _arg1 C.guint         // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = C.guint(mergeId)

	C.gtk_ui_manager_remove_ui(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(mergeId)
}

// SetAddTearoffs sets the “add_tearoffs” property, which controls whether menus
// generated by this UIManager will have tearoff menu items.
//
// Note that this only affects regular menus. Generated popup menus never have
// tearoff menu items.
//
// Deprecated: Tearoff menus are deprecated and should not be used in newly
// written code.
//
// The function takes the following parameters:
//
//   - addTearoffs: whether tearoff menu items are added.
func (manager *UIManager) SetAddTearoffs(addTearoffs bool) {
	var _arg0 *C.GtkUIManager // out
	var _arg1 C.gboolean      // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	if addTearoffs {
		_arg1 = C.TRUE
	}

	C.gtk_ui_manager_set_add_tearoffs(_arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(addTearoffs)
}

func (manager *UIManager) actionsChanged() {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.actions_changed

	var _arg0 *C.GtkUIManager // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))

	C._gotk4_gtk3_UIManager_virtual_actions_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(manager)
}

func (manager *UIManager) addWidget(widget Widgetter) {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.add_widget

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.GtkWidget    // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_UIManager_virtual_add_widget(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(widget)
}

// The function takes the following parameters:
//
//   - action
//   - proxy
func (manager *UIManager) connectProxy(action *Action, proxy Widgetter) {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.connect_proxy

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.GtkAction    // out
	var _arg2 *C.GtkWidget    // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(proxy).Native()))

	C._gotk4_gtk3_UIManager_virtual_connect_proxy(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(action)
	runtime.KeepAlive(proxy)
}

// The function takes the following parameters:
//
//   - action
//   - proxy
func (manager *UIManager) disconnectProxy(action *Action, proxy Widgetter) {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.disconnect_proxy

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.GtkAction    // out
	var _arg2 *C.GtkWidget    // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(proxy).Native()))

	C._gotk4_gtk3_UIManager_virtual_disconnect_proxy(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(action)
	runtime.KeepAlive(proxy)
}

// Action looks up an action by following a path. See
// gtk_ui_manager_get_widget() for more information about paths.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - path: path.
//
// The function returns the following values:
//
//   - action whose proxy widget is found by following the path, or NULL if no
//     widget was found.
func (manager *UIManager) action(path string) *Action {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.get_action

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret *C.GtkAction    // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_UIManager_virtual_get_action(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(path)

	var _action *Action // out

	_action = wrapAction(coreglib.Take(unsafe.Pointer(_cret)))

	return _action
}

// Widget looks up a widget by following a path. The path consists of the names
// specified in the XML description of the UI. separated by “/”. Elements
// which don’t have a name or action attribute in the XML (e.g. <popup>) can be
// addressed by their XML element name (e.g. "popup"). The root element ("/ui")
// can be omitted in the path.
//
// Note that the widget found by following a path that ends in a <menu>; element
// is the menuitem to which the menu is attached, not the menu it manages.
//
// Also note that the widgets constructed by a ui manager are not tied to the
// lifecycle of the ui manager. If you add the widgets returned by this function
// to some container or explicitly ref them, they will survive the destruction
// of the ui manager.
//
// Deprecated: since version 3.10.
//
// The function takes the following parameters:
//
//   - path: path.
//
// The function returns the following values:
//
//   - widget found by following the path, or NULL if no widget was found.
func (manager *UIManager) widget(path string) Widgetter {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.get_widget

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.gchar        // out
	var _cret *C.GtkWidget    // in

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C._gotk4_gtk3_UIManager_virtual_get_widget(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(path)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

func (manager *UIManager) postActivate(action *Action) {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.post_activate

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.GtkAction    // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C._gotk4_gtk3_UIManager_virtual_post_activate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(action)
}

func (manager *UIManager) preActivate(action *Action) {
	gclass := (*C.GtkUIManagerClass)(coreglib.PeekParentClass(manager))
	fnarg := gclass.pre_activate

	var _arg0 *C.GtkUIManager // out
	var _arg1 *C.GtkAction    // out

	_arg0 = (*C.GtkUIManager)(unsafe.Pointer(coreglib.InternObject(manager).Native()))
	_arg1 = (*C.GtkAction)(unsafe.Pointer(coreglib.InternObject(action).Native()))

	C._gotk4_gtk3_UIManager_virtual_pre_activate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(manager)
	runtime.KeepAlive(action)
}

// VBoxOverrides contains methods that are overridable.
type VBoxOverrides struct {
}

func defaultVBoxOverrides(v *VBox) VBoxOverrides {
	return VBoxOverrides{}
}

// VBox is a container that organizes child widgets into a single column.
//
// Use the Box packing interface to determine the arrangement, spacing, height,
// and alignment of VBox children.
//
// All children are allocated the same width.
//
// GtkVBox has been deprecated. You can use Box with a Orientable:orientation
// set to GTK_ORIENTATION_VERTICAL instead when calling gtk_box_new(), which is
// a very quick and easy change.
//
// If you have derived your own classes from GtkVBox, you can change the
// inheritance to derive directly from Box, and set the Orientable:orientation
// property to GTK_ORIENTATION_VERTICAL in your instance init function, with a
// call like:
//
//	gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
//	                                GTK_ORIENTATION_VERTICAL);
//
// If you have a grid-like layout composed of nested boxes, and you don’t need
// first-child or last-child styling, the recommendation is to switch to Grid.
// For more information about migrating to Grid, see [Migrating from other
// containers to GtkGrid][gtk-migrating-GtkGrid].
type VBox struct {
	_ [0]func() // equal guard
	Box
}

var (
	_ Containerer       = (*VBox)(nil)
	_ coreglib.Objector = (*VBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VBox, *VBoxClass, VBoxOverrides](
		GTypeVBox,
		initVBoxClass,
		wrapVBox,
		defaultVBoxOverrides,
	)
}

func initVBoxClass(gclass unsafe.Pointer, overrides VBoxOverrides, classInitFunc func(*VBoxClass)) {
	if classInitFunc != nil {
		class := (*VBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVBox(obj *coreglib.Object) *VBox {
	return &VBox{
		Box: Box{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalVBox(p uintptr) (interface{}, error) {
	return wrapVBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVBox creates a new VBox.
//
// Deprecated: You should use gtk_box_new() with a GTK_ORIENTATION_VERTICAL
// Orientable:orientation instead.
//
// The function takes the following parameters:
//
//   - homogeneous: TRUE if all children are to be given equal space allotments.
//   - spacing: number of pixels to place by default between children.
//
// The function returns the following values:
//
//   - vBox: new VBox.
func NewVBox(homogeneous bool, spacing int) *VBox {
	var _arg1 C.gboolean   // out
	var _arg2 C.gint       // out
	var _cret *C.GtkWidget // in

	if homogeneous {
		_arg1 = C.TRUE
	}
	_arg2 = C.gint(spacing)

	_cret = C.gtk_vbox_new(_arg1, _arg2)
	runtime.KeepAlive(homogeneous)
	runtime.KeepAlive(spacing)

	var _vBox *VBox // out

	_vBox = wrapVBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _vBox
}

// VButtonBoxOverrides contains methods that are overridable.
type VButtonBoxOverrides struct {
}

func defaultVButtonBoxOverrides(v *VButtonBox) VButtonBoxOverrides {
	return VButtonBoxOverrides{}
}

type VButtonBox struct {
	_ [0]func() // equal guard
	ButtonBox
}

var (
	_ Containerer       = (*VButtonBox)(nil)
	_ coreglib.Objector = (*VButtonBox)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VButtonBox, *VButtonBoxClass, VButtonBoxOverrides](
		GTypeVButtonBox,
		initVButtonBoxClass,
		wrapVButtonBox,
		defaultVButtonBoxOverrides,
	)
}

func initVButtonBoxClass(gclass unsafe.Pointer, overrides VButtonBoxOverrides, classInitFunc func(*VButtonBoxClass)) {
	if classInitFunc != nil {
		class := (*VButtonBoxClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVButtonBox(obj *coreglib.Object) *VButtonBox {
	return &VButtonBox{
		ButtonBox: ButtonBox{
			Box: Box{
				Container: Container{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalVButtonBox(p uintptr) (interface{}, error) {
	return wrapVButtonBox(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVButtonBox creates a new vertical button box.
//
// Deprecated: Use gtk_button_box_new() with GTK_ORIENTATION_VERTICAL instead.
//
// The function returns the following values:
//
//   - vButtonBox: new button box Widget.
func NewVButtonBox() *VButtonBox {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_vbutton_box_new()

	var _vButtonBox *VButtonBox // out

	_vButtonBox = wrapVButtonBox(coreglib.Take(unsafe.Pointer(_cret)))

	return _vButtonBox
}

// VPanedOverrides contains methods that are overridable.
type VPanedOverrides struct {
}

func defaultVPanedOverrides(v *VPaned) VPanedOverrides {
	return VPanedOverrides{}
}

// VPaned widget is a container widget with two children arranged vertically.
// The division between the two panes is adjustable by the user by dragging a
// handle. See Paned for details.
//
// GtkVPaned has been deprecated, use Paned instead.
type VPaned struct {
	_ [0]func() // equal guard
	Paned
}

var (
	_ Containerer       = (*VPaned)(nil)
	_ coreglib.Objector = (*VPaned)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VPaned, *VPanedClass, VPanedOverrides](
		GTypeVPaned,
		initVPanedClass,
		wrapVPaned,
		defaultVPanedOverrides,
	)
}

func initVPanedClass(gclass unsafe.Pointer, overrides VPanedOverrides, classInitFunc func(*VPanedClass)) {
	if classInitFunc != nil {
		class := (*VPanedClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVPaned(obj *coreglib.Object) *VPaned {
	return &VPaned{
		Paned: Paned{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalVPaned(p uintptr) (interface{}, error) {
	return wrapVPaned(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVPaned: create a new VPaned
//
// Deprecated: Use gtk_paned_new() with GTK_ORIENTATION_VERTICAL instead.
//
// The function returns the following values:
//
//   - vPaned: new VPaned.
func NewVPaned() *VPaned {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_vpaned_new()

	var _vPaned *VPaned // out

	_vPaned = wrapVPaned(coreglib.Take(unsafe.Pointer(_cret)))

	return _vPaned
}

// VScaleOverrides contains methods that are overridable.
type VScaleOverrides struct {
}

func defaultVScaleOverrides(v *VScale) VScaleOverrides {
	return VScaleOverrides{}
}

// VScale widget is used to allow the user to select a value using a vertical
// slider. To create one, use gtk_hscale_new_with_range().
//
// The position to show the current value, and the number of decimal places
// shown can be set using the parent Scale class’s functions.
//
// GtkVScale has been deprecated, use Scale instead.
type VScale struct {
	_ [0]func() // equal guard
	Scale
}

var (
	_ Ranger = (*VScale)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VScale, *VScaleClass, VScaleOverrides](
		GTypeVScale,
		initVScaleClass,
		wrapVScale,
		defaultVScaleOverrides,
	)
}

func initVScaleClass(gclass unsafe.Pointer, overrides VScaleOverrides, classInitFunc func(*VScaleClass)) {
	if classInitFunc != nil {
		class := (*VScaleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVScale(obj *coreglib.Object) *VScale {
	return &VScale{
		Scale: Scale{
			Range: Range{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalVScale(p uintptr) (interface{}, error) {
	return wrapVScale(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVScale creates a new VScale.
//
// Deprecated: Use gtk_scale_new() with GTK_ORIENTATION_VERTICAL instead.
//
// The function takes the following parameters:
//
//   - adjustment which sets the range of the scale.
//
// The function returns the following values:
//
//   - vScale: new VScale.
func NewVScale(adjustment *Adjustment) *VScale {
	var _arg1 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))

	_cret = C.gtk_vscale_new(_arg1)
	runtime.KeepAlive(adjustment)

	var _vScale *VScale // out

	_vScale = wrapVScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _vScale
}

// NewVScaleWithRange creates a new vertical scale widget that lets the user
// input a number between min and max (including min and max) with the increment
// step. step must be nonzero; it’s the distance the slider moves when using the
// arrow keys to adjust the scale value.
//
// Note that the way in which the precision is derived works best if step is
// a power of ten. If the resulting precision is not suitable for your needs,
// use gtk_scale_set_digits() to correct it.
//
// Deprecated: Use gtk_scale_new_with_range() with GTK_ORIENTATION_VERTICAL
// instead.
//
// The function takes the following parameters:
//
//   - min: minimum value.
//   - max: maximum value.
//   - step increment (tick size) used with keyboard shortcuts.
//
// The function returns the following values:
//
//   - vScale: new VScale.
func NewVScaleWithRange(min, max, step float64) *VScale {
	var _arg1 C.gdouble    // out
	var _arg2 C.gdouble    // out
	var _arg3 C.gdouble    // out
	var _cret *C.GtkWidget // in

	_arg1 = C.gdouble(min)
	_arg2 = C.gdouble(max)
	_arg3 = C.gdouble(step)

	_cret = C.gtk_vscale_new_with_range(_arg1, _arg2, _arg3)
	runtime.KeepAlive(min)
	runtime.KeepAlive(max)
	runtime.KeepAlive(step)

	var _vScale *VScale // out

	_vScale = wrapVScale(coreglib.Take(unsafe.Pointer(_cret)))

	return _vScale
}

// VScrollbarOverrides contains methods that are overridable.
type VScrollbarOverrides struct {
}

func defaultVScrollbarOverrides(v *VScrollbar) VScrollbarOverrides {
	return VScrollbarOverrides{}
}

// VScrollbar widget is a widget arranged vertically creating a scrollbar.
// See Scrollbar for details on scrollbars. Adjustment pointers may be added to
// handle the adjustment of the scrollbar or it may be left NULL in which case
// one will be created for you. See Scrollbar for a description of what the
// fields in an adjustment represent for a scrollbar.
//
// GtkVScrollbar has been deprecated, use Scrollbar instead.
type VScrollbar struct {
	_ [0]func() // equal guard
	Scrollbar
}

var (
	_ Ranger = (*VScrollbar)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VScrollbar, *VScrollbarClass, VScrollbarOverrides](
		GTypeVScrollbar,
		initVScrollbarClass,
		wrapVScrollbar,
		defaultVScrollbarOverrides,
	)
}

func initVScrollbarClass(gclass unsafe.Pointer, overrides VScrollbarOverrides, classInitFunc func(*VScrollbarClass)) {
	if classInitFunc != nil {
		class := (*VScrollbarClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVScrollbar(obj *coreglib.Object) *VScrollbar {
	return &VScrollbar{
		Scrollbar: Scrollbar{
			Range: Range{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
				Object: obj,
				Orientable: Orientable{
					Object: obj,
				},
			},
		},
	}
}

func marshalVScrollbar(p uintptr) (interface{}, error) {
	return wrapVScrollbar(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVScrollbar creates a new vertical scrollbar.
//
// Deprecated: Use gtk_scrollbar_new() with GTK_ORIENTATION_VERTICAL instead.
//
// The function takes the following parameters:
//
//   - adjustment (optional) to use, or NULL to create a new adjustment.
//
// The function returns the following values:
//
//   - vScrollbar: new VScrollbar.
func NewVScrollbar(adjustment *Adjustment) *VScrollbar {
	var _arg1 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	_cret = C.gtk_vscrollbar_new(_arg1)
	runtime.KeepAlive(adjustment)

	var _vScrollbar *VScrollbar // out

	_vScrollbar = wrapVScrollbar(coreglib.Take(unsafe.Pointer(_cret)))

	return _vScrollbar
}

// VSeparatorOverrides contains methods that are overridable.
type VSeparatorOverrides struct {
}

func defaultVSeparatorOverrides(v *VSeparator) VSeparatorOverrides {
	return VSeparatorOverrides{}
}

// VSeparator widget is a vertical separator, used to group the widgets within
// a window. It displays a vertical line with a shadow to make it appear sunken
// into the interface.
//
// GtkVSeparator has been deprecated, use Separator instead.
type VSeparator struct {
	_ [0]func() // equal guard
	Separator
}

var (
	_ Widgetter         = (*VSeparator)(nil)
	_ coreglib.Objector = (*VSeparator)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VSeparator, *VSeparatorClass, VSeparatorOverrides](
		GTypeVSeparator,
		initVSeparatorClass,
		wrapVSeparator,
		defaultVSeparatorOverrides,
	)
}

func initVSeparatorClass(gclass unsafe.Pointer, overrides VSeparatorOverrides, classInitFunc func(*VSeparatorClass)) {
	if classInitFunc != nil {
		class := (*VSeparatorClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVSeparator(obj *coreglib.Object) *VSeparator {
	return &VSeparator{
		Separator: Separator{
			Widget: Widget{
				InitiallyUnowned: coreglib.InitiallyUnowned{
					Object: obj,
				},
				Object: obj,
				ImplementorIface: atk.ImplementorIface{
					Object: obj,
				},
				Buildable: Buildable{
					Object: obj,
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalVSeparator(p uintptr) (interface{}, error) {
	return wrapVSeparator(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVSeparator creates a new VSeparator.
//
// Deprecated: Use gtk_separator_new() with GTK_ORIENTATION_VERTICAL instead.
//
// The function returns the following values:
//
//   - vSeparator: new VSeparator.
func NewVSeparator() *VSeparator {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_vseparator_new()

	var _vSeparator *VSeparator // out

	_vSeparator = wrapVSeparator(coreglib.Take(unsafe.Pointer(_cret)))

	return _vSeparator
}

// ViewportOverrides contains methods that are overridable.
type ViewportOverrides struct {
}

func defaultViewportOverrides(v *Viewport) ViewportOverrides {
	return ViewportOverrides{}
}

// Viewport widget acts as an adaptor class, implementing scrollability for
// child widgets that lack their own scrolling capabilities. Use GtkViewport to
// scroll child widgets such as Grid, Box, and so on.
//
// If a widget has native scrolling abilities, such as TextView, TreeView or
// IconView, it can be added to a ScrolledWindow with gtk_container_add(). If a
// widget does not, you must first add the widget to a Viewport, then add the
// viewport to the scrolled window. gtk_container_add() does this automatically
// if a child that does not implement Scrollable is added to a ScrolledWindow,
// so you can ignore the presence of the viewport.
//
// The GtkViewport will start scrolling content only if allocated less than the
// child widget’s minimum size in a given orientation.
//
// # CSS nodes
//
// GtkViewport has a single CSS node with name viewport.
type Viewport struct {
	_ [0]func() // equal guard
	Bin

	*coreglib.Object
	Scrollable
}

var (
	_ Binner            = (*Viewport)(nil)
	_ coreglib.Objector = (*Viewport)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Viewport, *ViewportClass, ViewportOverrides](
		GTypeViewport,
		initViewportClass,
		wrapViewport,
		defaultViewportOverrides,
	)
}

func initViewportClass(gclass unsafe.Pointer, overrides ViewportOverrides, classInitFunc func(*ViewportClass)) {
	if classInitFunc != nil {
		class := (*ViewportClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapViewport(obj *coreglib.Object) *Viewport {
	return &Viewport{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
		Object: obj,
		Scrollable: Scrollable{
			Object: obj,
		},
	}
}

func marshalViewport(p uintptr) (interface{}, error) {
	return wrapViewport(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewViewport creates a new Viewport with the given adjustments, or with
// default adjustments if none are given.
//
// The function takes the following parameters:
//
//   - hadjustment (optional): horizontal adjustment.
//   - vadjustment (optional): vertical adjustment.
//
// The function returns the following values:
//
//   - viewport: new Viewport.
func NewViewport(hadjustment, vadjustment *Adjustment) *Viewport {
	var _arg1 *C.GtkAdjustment // out
	var _arg2 *C.GtkAdjustment // out
	var _cret *C.GtkWidget     // in

	if hadjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(hadjustment).Native()))
	}
	if vadjustment != nil {
		_arg2 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(vadjustment).Native()))
	}

	_cret = C.gtk_viewport_new(_arg1, _arg2)
	runtime.KeepAlive(hadjustment)
	runtime.KeepAlive(vadjustment)

	var _viewport *Viewport // out

	_viewport = wrapViewport(coreglib.Take(unsafe.Pointer(_cret)))

	return _viewport
}

// BinWindow gets the bin window of the Viewport.
//
// The function returns the following values:
//
//   - window: Window.
func (viewport *Viewport) BinWindow() gdk.Windower {
	var _arg0 *C.GtkViewport // out
	var _cret *C.GdkWindow   // in

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))

	_cret = C.gtk_viewport_get_bin_window(_arg0)
	runtime.KeepAlive(viewport)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// HAdjustment returns the horizontal adjustment of the viewport.
//
// Deprecated: Use gtk_scrollable_get_hadjustment().
//
// The function returns the following values:
//
//   - adjustment: horizontal adjustment of viewport.
func (viewport *Viewport) HAdjustment() *Adjustment {
	var _arg0 *C.GtkViewport   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))

	_cret = C.gtk_viewport_get_hadjustment(_arg0)
	runtime.KeepAlive(viewport)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// ShadowType gets the shadow type of the Viewport. See
// gtk_viewport_set_shadow_type().
//
// The function returns the following values:
//
//   - shadowType: shadow type.
func (viewport *Viewport) ShadowType() ShadowType {
	var _arg0 *C.GtkViewport  // out
	var _cret C.GtkShadowType // in

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))

	_cret = C.gtk_viewport_get_shadow_type(_arg0)
	runtime.KeepAlive(viewport)

	var _shadowType ShadowType // out

	_shadowType = ShadowType(_cret)

	return _shadowType
}

// VAdjustment returns the vertical adjustment of the viewport.
//
// Deprecated: Use gtk_scrollable_get_vadjustment().
//
// The function returns the following values:
//
//   - adjustment: vertical adjustment of viewport.
func (viewport *Viewport) VAdjustment() *Adjustment {
	var _arg0 *C.GtkViewport   // out
	var _cret *C.GtkAdjustment // in

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))

	_cret = C.gtk_viewport_get_vadjustment(_arg0)
	runtime.KeepAlive(viewport)

	var _adjustment *Adjustment // out

	_adjustment = wrapAdjustment(coreglib.Take(unsafe.Pointer(_cret)))

	return _adjustment
}

// ViewWindow gets the view window of the Viewport.
//
// The function returns the following values:
//
//   - window: Window.
func (viewport *Viewport) ViewWindow() gdk.Windower {
	var _arg0 *C.GtkViewport // out
	var _cret *C.GdkWindow   // in

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))

	_cret = C.gtk_viewport_get_view_window(_arg0)
	runtime.KeepAlive(viewport)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// SetHAdjustment sets the horizontal adjustment of the viewport.
//
// Deprecated: Use gtk_scrollable_set_hadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional): Adjustment.
func (viewport *Viewport) SetHAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkViewport   // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_viewport_set_hadjustment(_arg0, _arg1)
	runtime.KeepAlive(viewport)
	runtime.KeepAlive(adjustment)
}

// SetShadowType sets the shadow type of the viewport.
//
// The function takes the following parameters:
//
//   - typ: new shadow type.
func (viewport *Viewport) SetShadowType(typ ShadowType) {
	var _arg0 *C.GtkViewport  // out
	var _arg1 C.GtkShadowType // out

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))
	_arg1 = C.GtkShadowType(typ)

	C.gtk_viewport_set_shadow_type(_arg0, _arg1)
	runtime.KeepAlive(viewport)
	runtime.KeepAlive(typ)
}

// SetVAdjustment sets the vertical adjustment of the viewport.
//
// Deprecated: Use gtk_scrollable_set_vadjustment().
//
// The function takes the following parameters:
//
//   - adjustment (optional): Adjustment.
func (viewport *Viewport) SetVAdjustment(adjustment *Adjustment) {
	var _arg0 *C.GtkViewport   // out
	var _arg1 *C.GtkAdjustment // out

	_arg0 = (*C.GtkViewport)(unsafe.Pointer(coreglib.InternObject(viewport).Native()))
	if adjustment != nil {
		_arg1 = (*C.GtkAdjustment)(unsafe.Pointer(coreglib.InternObject(adjustment).Native()))
	}

	C.gtk_viewport_set_vadjustment(_arg0, _arg1)
	runtime.KeepAlive(viewport)
	runtime.KeepAlive(adjustment)
}

// VolumeButtonOverrides contains methods that are overridable.
type VolumeButtonOverrides struct {
}

func defaultVolumeButtonOverrides(v *VolumeButton) VolumeButtonOverrides {
	return VolumeButtonOverrides{}
}

// VolumeButton is a subclass of ScaleButton that has been tailored for use as a
// volume control widget with suitable icons, tooltips and accessible labels.
type VolumeButton struct {
	_ [0]func() // equal guard
	ScaleButton
}

var (
	_ coreglib.Objector = (*VolumeButton)(nil)
	_ Binner            = (*VolumeButton)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*VolumeButton, *VolumeButtonClass, VolumeButtonOverrides](
		GTypeVolumeButton,
		initVolumeButtonClass,
		wrapVolumeButton,
		defaultVolumeButtonOverrides,
	)
}

func initVolumeButtonClass(gclass unsafe.Pointer, overrides VolumeButtonOverrides, classInitFunc func(*VolumeButtonClass)) {
	if classInitFunc != nil {
		class := (*VolumeButtonClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapVolumeButton(obj *coreglib.Object) *VolumeButton {
	return &VolumeButton{
		ScaleButton: ScaleButton{
			Button: Button{
				Bin: Bin{
					Container: Container{
						Widget: Widget{
							InitiallyUnowned: coreglib.InitiallyUnowned{
								Object: obj,
							},
							Object: obj,
							ImplementorIface: atk.ImplementorIface{
								Object: obj,
							},
							Buildable: Buildable{
								Object: obj,
							},
						},
					},
				},
				Object: obj,
				Actionable: Actionable{
					Widget: Widget{
						InitiallyUnowned: coreglib.InitiallyUnowned{
							Object: obj,
						},
						Object: obj,
						ImplementorIface: atk.ImplementorIface{
							Object: obj,
						},
						Buildable: Buildable{
							Object: obj,
						},
					},
				},
				Activatable: Activatable{
					Object: obj,
				},
			},
			Object: obj,
			Orientable: Orientable{
				Object: obj,
			},
		},
	}
}

func marshalVolumeButton(p uintptr) (interface{}, error) {
	return wrapVolumeButton(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewVolumeButton creates a VolumeButton, with a range between 0.0 and 1.0,
// with a stepping of 0.02. Volume values can be obtained and modified using the
// functions from ScaleButton.
//
// The function returns the following values:
//
//   - volumeButton: new VolumeButton.
func NewVolumeButton() *VolumeButton {
	var _cret *C.GtkWidget // in

	_cret = C.gtk_volume_button_new()

	var _volumeButton *VolumeButton // out

	_volumeButton = wrapVolumeButton(coreglib.Take(unsafe.Pointer(_cret)))

	return _volumeButton
}

// WidgetOverrides contains methods that are overridable.
type WidgetOverrides struct {
	AdjustBaselineAllocation func(baseline *int)
	// The function takes the following parameters:
	//
	//   - minimumBaseline
	//   - naturalBaseline
	AdjustBaselineRequest func(minimumBaseline, naturalBaseline *int)
	// AdjustSizeAllocation: convert an initial size allocation assigned
	// by a Container using gtk_widget_size_allocate(), into an actual size
	// allocation to be used by the widget. adjust_size_allocation adjusts
	// to a child widget’s actual allocation from what a parent container
	// computed for the child. The adjusted allocation must be entirely within
	// the original allocation. In any custom implementation, chain up to the
	// default Widget implementation of this method, which applies the margin
	// and alignment properties of Widget. Chain up before performing your own
	// adjustments so your own adjustments remove more allocation after the
	// Widget base class has already removed margin and alignment. The natural
	// size passed in should be adjusted in the same way as the allocated size,
	// which allows adjustments to perform alignments or other changes based on
	// natural size.
	//
	// The function takes the following parameters:
	//
	//   - orientation
	//   - minimumSize
	//   - naturalSize
	//   - allocatedPos
	//   - allocatedSize
	AdjustSizeAllocation func(orientation Orientation, minimumSize, naturalSize, allocatedPos, allocatedSize *int)
	// AdjustSizeRequest: convert an initial size request from a widget's
	// SizeRequestMode virtual method implementations into a size request to be
	// used by parent containers in laying out the widget. adjust_size_request
	// adjusts from a child widget's original request to what a parent container
	// should use for layout. The for_size argument will be -1 if the request
	// should not be for a particular size in the opposing orientation,
	// i.e. if the request is not height-for-width or width-for-height.
	// If for_size is greater than -1, it is the proposed allocation in the
	// opposing orientation that we need the request for. Implementations of
	// adjust_size_request should chain up to the default implementation,
	// which applies Widget’s margin properties and imposes any values from
	// gtk_widget_set_size_request(). Chaining up should be last, after your
	// subclass adjusts the request, so Widget can apply constraints and add the
	// margin properly.
	//
	// The function takes the following parameters:
	//
	//   - orientation
	//   - minimumSize
	//   - naturalSize
	AdjustSizeRequest func(orientation Orientation, minimumSize, naturalSize *int)
	// ButtonPressEvent: signal will be emitted when a button (typically from a
	// mouse) is pressed.
	ButtonPressEvent func(event *gdk.EventButton) bool
	// ButtonReleaseEvent: signal will be emitted when a button (typically from
	// a mouse) is released.
	ButtonReleaseEvent func(event *gdk.EventButton) bool
	// CanActivateAccel determines whether an accelerator that activates
	// the signal identified by signal_id can currently be activated.
	// This is done by emitting the Widget::can-activate-accel signal on widget;
	// if the signal isn’t overridden by a handler or in a derived widget,
	// then the default check is that the widget must be sensitive, and the
	// widget and all its ancestors mapped.
	//
	// The function takes the following parameters:
	//
	//   - signalId: ID of a signal installed on widget.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if the accelerator can be activated.
	CanActivateAccel func(signalId uint) bool
	// CompositedChanged: signal emitted when the composited status of widgets
	// screen changes. See gdk_screen_is_composited().
	CompositedChanged func()
	// ConfigureEvent: signal will be emitted when the size, position or
	// stacking of the widget’s window has changed.
	ConfigureEvent func(event *gdk.EventConfigure) bool
	// DamageEvent: signal emitted when a redirected window belonging to widget
	// gets drawn into.
	DamageEvent func(event *gdk.EventExpose) bool
	// DeleteEvent: signal emitted if a user requests that a toplevel window is
	// closed.
	DeleteEvent func(event *gdk.EventAny) bool
	// Destroy destroys a widget.
	//
	// When a widget is destroyed all references it holds on other objects will
	// be released:
	//
	//   - if the widget is inside a container, it will be removed from its
	//     parent
	//   - if the widget is a container, all its children will be destroyed,
	//     recursively
	//   - if the widget is a top level, it will be removed from the list of top
	//     level widgets that GTK+ maintains internally
	//
	// It's expected that all references held on the widget will also be
	// released; you should connect to the Widget::destroy signal if you hold
	// a reference to widget and you wish to remove it when this function is
	// called. It is not necessary to do so if you are implementing a Container,
	// as you'll be able to use the ContainerClass.remove() virtual function for
	// that.
	//
	// It's important to notice that gtk_widget_destroy() will only cause
	// the widget to be finalized if no additional references, acquired using
	// g_object_ref(), are held on it. In case additional references are
	// in place, the widget will be in an "inert" state after calling this
	// function; widget will still point to valid memory, allowing you to
	// release the references you hold, but you may not query the widget's own
	// state.
	//
	// You should typically call this function on top level widgets, and rarely
	// on child widgets.
	//
	// See also: gtk_container_remove().
	Destroy func()
	// DestroyEvent: signal is emitted when a Window is destroyed.
	DestroyEvent func(event *gdk.EventAny) bool
	// DirectionChanged: signal emitted when the text direction of a widget
	// changes.
	DirectionChanged func(previousDirection TextDirection)
	// DragBegin: signal emitted on the drag source when a drag is started.
	DragBegin func(context *gdk.DragContext)
	// DragDataDelete: signal emitted on the drag source when a drag with the
	// action GDK_ACTION_MOVE is successfully completed.
	DragDataDelete func(context *gdk.DragContext)
	// DragDataGet: signal emitted on the drag source when the drop site
	// requests the data which is dragged.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - selectionData
	//   - info
	//   - time_
	DragDataGet func(context *gdk.DragContext, selectionData *SelectionData, info, time_ uint)
	// DragDataReceived: signal emitted on the drop site when the dragged data
	// has been received.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - x
	//   - y
	//   - selectionData
	//   - info
	//   - time_
	DragDataReceived func(context *gdk.DragContext, x, y int, selectionData *SelectionData, info, time_ uint)
	// DragDrop: signal emitted on the drop site when the user drops the data
	// onto the widget.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - x
	//   - y
	//   - time_
	DragDrop func(context *gdk.DragContext, x, y int, time_ uint) bool
	// DragEnd: signal emitted on the drag source when a drag is finished.
	DragEnd func(context *gdk.DragContext)
	// DragFailed: signal emitted on the drag source when a drag has failed.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - result
	DragFailed func(context *gdk.DragContext, result DragResult) bool
	// DragLeave: signal emitted on the drop site when the cursor leaves the
	// widget.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - time_
	DragLeave func(context *gdk.DragContext, time_ uint)
	// DragMotion: signal emitted on the drop site when the user moves the
	// cursor over the widget during a drag.
	//
	// The function takes the following parameters:
	//
	//   - context
	//   - x
	//   - y
	//   - time_
	DragMotion func(context *gdk.DragContext, x, y int, time_ uint) bool
	// Draw: signal emitted when a widget is supposed to render itself.
	Draw func(cr *cairo.Context) bool
	// EnterNotifyEvent: signal event will be emitted when the pointer enters
	// the widget’s window.
	EnterNotifyEvent func(event *gdk.EventCrossing) bool
	// Event: rarely-used function. This function is used to emit the event
	// signals on a widget (those signals should never be emitted without using
	// this function to do so). If you want to synthesize an event though, don’t
	// use this function; instead, use gtk_main_do_event() so the event will
	// behave as if it were in the event queue. Don’t synthesize expose events;
	// instead, use gdk_window_invalidate_rect() to invalidate a region of the
	// window.
	//
	// The function takes the following parameters:
	//
	//   - event: Event.
	//
	// The function returns the following values:
	//
	//   - ok: return from the event signal emission (TRUE if the event was
	//     handled).
	Event func(event *gdk.Event) bool
	Focus func(direction DirectionType) bool
	// FocusInEvent: signal emitted when the keyboard focus enters the widget’s
	// window.
	FocusInEvent func(event *gdk.EventFocus) bool
	// FocusOutEvent: signal emitted when the keyboard focus leaves the widget’s
	// window.
	FocusOutEvent func(event *gdk.EventFocus) bool
	// Accessible returns the accessible object that describes the widget to an
	// assistive technology.
	//
	// If accessibility support is not available, this Object instance may
	// be a no-op. Likewise, if no class-specific Object implementation is
	// available for the widget instance in question, it will inherit an
	// Object implementation from the first ancestor class for which such an
	// implementation is defined.
	//
	// The documentation of the ATK (http://developer.gnome.org/atk/stable/)
	// library contains more information about accessible objects and their
	// uses.
	//
	// The function returns the following values:
	//
	//   - object associated with widget.
	Accessible func() *atk.AtkObject
	// PreferredHeight retrieves a widget’s initial minimum and natural height.
	//
	// This call is specific to width-for-height requests.
	//
	// The returned request will be modified by the
	// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups
	// that have been applied. That is, the returned request is the one that
	// should be used for layout, not necessarily the one returned by the widget
	// itself.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location to store the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location to store the natural height,
	//     or NULL.
	PreferredHeight func() (minimumHeight, naturalHeight int)
	// PreferredHeightAndBaselineForWidth retrieves a widget’s minimum and
	// natural height and the corresponding baselines if it would be given the
	// specified width, or the default height if width is -1. The baselines may
	// be -1 which means that no baseline is requested for this widget.
	//
	// The returned request will be modified by
	// the GtkWidgetClass::adjust_size_request and
	// GtkWidgetClass::adjust_baseline_request virtual methods and by any
	// SizeGroups that have been applied. That is, the returned request is the
	// one that should be used for layout, not necessarily the one returned by
	// the widget itself.
	//
	// The function takes the following parameters:
	//
	//   - width which is available for allocation, or -1 if none.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location for storing the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location for storing the natural height,
	//     or NULL.
	//   - minimumBaseline (optional): location for storing the baseline for the
	//     minimum height, or NULL.
	//   - naturalBaseline (optional): location for storing the baseline for the
	//     natural height, or NULL.
	PreferredHeightAndBaselineForWidth func(width int) (minimumHeight, naturalHeight, minimumBaseline, naturalBaseline int)
	// PreferredHeightForWidth retrieves a widget’s minimum and natural height
	// if it would be given the specified width.
	//
	// The returned request will be modified by the
	// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups
	// that have been applied. That is, the returned request is the one that
	// should be used for layout, not necessarily the one returned by the widget
	// itself.
	//
	// The function takes the following parameters:
	//
	//   - width which is available for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumHeight (optional): location for storing the minimum height,
	//     or NULL.
	//   - naturalHeight (optional): location for storing the natural height,
	//     or NULL.
	PreferredHeightForWidth func(width int) (minimumHeight, naturalHeight int)
	// PreferredWidth retrieves a widget’s initial minimum and natural width.
	//
	// This call is specific to height-for-width requests.
	//
	// The returned request will be modified by the
	// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups
	// that have been applied. That is, the returned request is the one that
	// should be used for layout, not necessarily the one returned by the widget
	// itself.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location to store the minimum width,
	//     or NULL.
	//   - naturalWidth (optional): location to store the natural width,
	//     or NULL.
	PreferredWidth func() (minimumWidth, naturalWidth int)
	// PreferredWidthForHeight retrieves a widget’s minimum and natural width if
	// it would be given the specified height.
	//
	// The returned request will be modified by the
	// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups
	// that have been applied. That is, the returned request is the one that
	// should be used for layout, not necessarily the one returned by the widget
	// itself.
	//
	// The function takes the following parameters:
	//
	//   - height which is available for allocation.
	//
	// The function returns the following values:
	//
	//   - minimumWidth (optional): location for storing the minimum width,
	//     or NULL.
	//   - naturalWidth (optional): location for storing the natural width,
	//     or NULL.
	PreferredWidthForHeight func(height int) (minimumWidth, naturalWidth int)
	// RequestMode gets whether the widget prefers a height-for-width layout or
	// a width-for-height layout.
	//
	// Bin widgets generally propagate the preference of their child, container
	// widgets need to request something either in context of their children or
	// in context of their allocation capabilities.
	//
	// The function returns the following values:
	//
	//   - sizeRequestMode preferred by widget.
	RequestMode func() SizeRequestMode
	// GrabBrokenEvent: signal emitted when a pointer or keyboard grab on a
	// window belonging to widget gets broken.
	GrabBrokenEvent func(event *gdk.EventGrabBroken) bool
	// GrabFocus causes widget to have the keyboard focus for the Window it's
	// inside. widget must be a focusable widget, such as a Entry; something
	// like Frame won’t work.
	//
	// More precisely, it must have the GTK_CAN_FOCUS flag set. Use
	// gtk_widget_set_can_focus() to modify that flag.
	//
	// The widget also needs to be realized and mapped. This is indicated by the
	// related signals. Grabbing the focus immediately after creating the widget
	// will likely fail and cause critical warnings.
	GrabFocus func()
	// GrabNotify: signal emitted when a widget becomes shadowed by a GTK+ grab
	// (not a pointer or keyboard grab) on another widget, or when it becomes
	// unshadowed due to a grab being removed.
	GrabNotify func(wasGrabbed bool)
	// Hide reverses the effects of gtk_widget_show(), causing the widget to be
	// hidden (invisible to the user).
	Hide func()
	// HierarchyChanged: signal emitted when the anchored state of a widget
	// changes.
	HierarchyChanged func(previousToplevel Widgetter)
	// KeyPressEvent: signal emitted when a key is pressed.
	KeyPressEvent func(event *gdk.EventKey) bool
	// KeyReleaseEvent: signal is emitted when a key is released.
	KeyReleaseEvent func(event *gdk.EventKey) bool
	// KeynavFailed: this function should be called whenever keyboard
	// navigation within a single widget hits a boundary. The function
	// emits the Widget::keynav-failed signal on the widget and its return
	// value should be interpreted in a way similar to the return value of
	// gtk_widget_child_focus():
	//
	// When TRUE is returned, stay in the widget, the failed keyboard navigation
	// is OK and/or there is nowhere we can/should move the focus to.
	//
	// When FALSE is returned, the caller should continue with keyboard
	// navigation outside the widget, e.g. by calling gtk_widget_child_focus()
	// on the widget’s toplevel.
	//
	// The default ::keynav-failed handler returns FALSE for GTK_DIR_TAB_FORWARD
	// and GTK_DIR_TAB_BACKWARD. For the other values of DirectionType it
	// returns TRUE.
	//
	// Whenever the default handler returns TRUE, it also calls
	// gtk_widget_error_bell() to notify the user of the failed keyboard
	// navigation.
	//
	// A use case for providing an own implementation of ::keynav-failed (either
	// by connecting to it or by overriding it) would be a row of Entry widgets
	// where the user should be able to navigate the entire row with the cursor
	// keys, as e.g. known from user interfaces that require entering license
	// keys.
	//
	// The function takes the following parameters:
	//
	//   - direction of focus movement.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if stopping keyboard navigation is fine, FALSE if the
	//     emitting widget should try to handle the keyboard navigation attempt
	//     in its parent container(s).
	KeynavFailed func(direction DirectionType) bool
	// LeaveNotifyEvent will be emitted when the pointer leaves the widget’s
	// window.
	LeaveNotifyEvent func(event *gdk.EventCrossing) bool
	// Map: this function is only for use in widget implementations. Causes a
	// widget to be mapped if it isn’t already.
	Map func()
	// MapEvent: signal emitted when the widget’s window is mapped.
	MapEvent func(event *gdk.EventAny) bool
	// MnemonicActivate emits the Widget::mnemonic-activate signal.
	//
	// The function takes the following parameters:
	//
	//   - groupCycling: TRUE if there are other widgets with the same mnemonic.
	//
	// The function returns the following values:
	//
	//   - ok: TRUE if the signal has been handled.
	MnemonicActivate func(groupCycling bool) bool
	// MotionNotifyEvent: signal emitted when the pointer moves over the
	// widget’s Window.
	MotionNotifyEvent func(event *gdk.EventMotion) bool
	// MoveFocus: signal emitted when a change of focus is requested.
	MoveFocus func(direction DirectionType)
	// ParentSet: signal emitted when a new parent has been set on a widget.
	ParentSet func(previousParent Widgetter)
	// PopupMenu: signal emitted whenever a widget should pop up a context menu.
	PopupMenu func() bool
	// PropertyNotifyEvent: signal will be emitted when a property on the
	// widget’s window has been changed or deleted.
	PropertyNotifyEvent func(event *gdk.EventProperty) bool
	ProximityInEvent    func(event *gdk.EventProximity) bool
	ProximityOutEvent   func(event *gdk.EventProximity) bool
	// QueryTooltip: signal emitted when “has-tooltip” is TRUE and the hover
	// timeout has expired with the cursor hovering “above” widget; or emitted
	// when widget got focus in keyboard mode.
	//
	// The function takes the following parameters:
	//
	//   - x
	//   - y
	//   - keyboardTooltip
	//   - tooltip
	QueryTooltip func(x, y int, keyboardTooltip bool, tooltip *Tooltip) bool
	// QueueDrawRegion invalidates the area of widget defined by region by
	// calling gdk_window_invalidate_region() on the widget’s window and all its
	// child windows. Once the main loop becomes idle (after the current batch
	// of events has been processed, roughly), the window will receive expose
	// events for the union of all regions that have been invalidated.
	//
	// Normally you would only use this function in widget implementations.
	// You might also use it to schedule a redraw of a DrawingArea or some
	// portion thereof.
	//
	// The function takes the following parameters:
	//
	//   - region to draw.
	QueueDrawRegion func(region *cairo.Region)
	// Realize creates the GDK (windowing system) resources associated with
	// a widget. For example, widget->window will be created when a widget is
	// realized. Normally realization happens implicitly; if you show a widget
	// and all its parent containers, then the widget will be realized and
	// mapped automatically.
	//
	// Realizing a widget requires all the widget’s parent widgets to be
	// realized; calling gtk_widget_realize() realizes the widget’s parents
	// in addition to widget itself. If a widget is not yet inside a toplevel
	// window when you realize it, bad things will happen.
	//
	// This function is primarily used in widget implementations, and isn’t
	// very useful otherwise. Many times when you think you might need it,
	// a better approach is to connect to a signal that will be called after
	// the widget is realized automatically, such as Widget::draw. Or simply
	// g_signal_connect () to the Widget::realize signal.
	Realize func()
	// ScreenChanged: signal emitted when the screen of a widget has changed.
	ScreenChanged func(previousScreen *gdk.Screen)
	// ScrollEvent: signal emitted when a button in the 4 to 7 range is pressed.
	ScrollEvent func(event *gdk.EventScroll) bool
	// SelectionClearEvent: signal will be emitted when the the widget’s window
	// has lost ownership of a selection.
	SelectionClearEvent func(event *gdk.EventSelection) bool
	// The function takes the following parameters:
	//
	//   - selectionData
	//   - info
	//   - time_
	SelectionGet         func(selectionData *SelectionData, info, time_ uint)
	SelectionNotifyEvent func(event *gdk.EventSelection) bool
	// The function takes the following parameters:
	//
	//   - selectionData
	//   - time_
	SelectionReceived func(selectionData *SelectionData, time_ uint)
	// SelectionRequestEvent: signal will be emitted when another client
	// requests ownership of the selection owned by the widget's window.
	SelectionRequestEvent func(event *gdk.EventSelection) bool
	// Show flags a widget to be displayed. Any widget that isn’t shown will not
	// appear on the screen. If you want to show all the widgets in a container,
	// it’s easier to call gtk_widget_show_all() on the container, instead of
	// individually showing the widgets.
	//
	// Remember that you have to show the containers containing a widget,
	// in addition to the widget itself, before it will appear onscreen.
	//
	// When a toplevel container is shown, it is immediately realized and
	// mapped; other shown widgets are realized and mapped when their toplevel
	// container is realized and mapped.
	Show func()
	// ShowAll: recursively shows a widget, and any child widgets (if the widget
	// is a container).
	ShowAll  func()
	ShowHelp func(helpType WidgetHelpType) bool
	// SizeAllocate: this function is only used by Container subclasses,
	// to assign a size and position to their child widgets.
	//
	// In this function, the allocation may be adjusted. It will be forced to
	// a 1x1 minimum size, and the adjust_size_allocation virtual method on the
	// child will be used to adjust the allocation. Standard adjustments include
	// removing the widget’s margins, and applying the widget’s Widget:halign
	// and Widget:valign properties.
	//
	// For baseline support in containers you need to use
	// gtk_widget_size_allocate_with_baseline() instead.
	//
	// The function takes the following parameters:
	//
	//   - allocation: position and size to be allocated to widget.
	SizeAllocate func(allocation *Allocation)
	// StateChanged: signal emitted when the widget state changes. Deprecated:
	// 3.0.
	StateChanged func(previousState StateType)
	// StateFlagsChanged: signal emitted when the widget state changes,
	// see gtk_widget_get_state_flags().
	StateFlagsChanged func(previousStateFlags StateFlags)
	// StyleSet: signal emitted when a new style has been set on a widget.
	// Deprecated: 3.0.
	StyleSet func(previousStyle *Style)
	// StyleUpdated: signal emitted when the GtkStyleContext of a widget is
	// changed.
	StyleUpdated func()
	// TouchEvent: signal emitted when a touch event happens.
	TouchEvent func(event *gdk.EventTouch) bool
	// Unmap: this function is only for use in widget implementations. Causes a
	// widget to be unmapped if it’s currently mapped.
	Unmap func()
	// UnmapEvent: signal will be emitted when the widget’s window is unmapped.
	UnmapEvent func(event *gdk.EventAny) bool
	// Unrealize: this function is only useful in widget implementations.
	// Causes a widget to be unrealized (frees all GDK resources associated with
	// the widget, such as widget->window).
	Unrealize func()
	// VisibilityNotifyEvent: signal emitted when the widget’s window is
	// obscured or unobscured.
	VisibilityNotifyEvent func(event *gdk.EventVisibility) bool
	// WindowStateEvent: signal emitted when the state of the toplevel window
	// associated to the widget changes.
	WindowStateEvent func(event *gdk.EventWindowState) bool
}

func defaultWidgetOverrides(v *Widget) WidgetOverrides {
	return WidgetOverrides{
		AdjustBaselineAllocation:           v.adjustBaselineAllocation,
		AdjustBaselineRequest:              v.adjustBaselineRequest,
		AdjustSizeAllocation:               v.adjustSizeAllocation,
		AdjustSizeRequest:                  v.adjustSizeRequest,
		ButtonPressEvent:                   v.buttonPressEvent,
		ButtonReleaseEvent:                 v.buttonReleaseEvent,
		CanActivateAccel:                   v.canActivateAccel,
		CompositedChanged:                  v.compositedChanged,
		ConfigureEvent:                     v.configureEvent,
		DamageEvent:                        v.damageEvent,
		DeleteEvent:                        v.deleteEvent,
		Destroy:                            v.destroy,
		DestroyEvent:                       v.destroyEvent,
		DirectionChanged:                   v.directionChanged,
		DragBegin:                          v.dragBegin,
		DragDataDelete:                     v.dragDataDelete,
		DragDataGet:                        v.dragDataGet,
		DragDataReceived:                   v.dragDataReceived,
		DragDrop:                           v.dragDrop,
		DragEnd:                            v.dragEnd,
		DragFailed:                         v.dragFailed,
		DragLeave:                          v.dragLeave,
		DragMotion:                         v.dragMotion,
		Draw:                               v.draw,
		EnterNotifyEvent:                   v.enterNotifyEvent,
		Event:                              v.event,
		Focus:                              v.focus,
		FocusInEvent:                       v.focusInEvent,
		FocusOutEvent:                      v.focusOutEvent,
		Accessible:                         v.accessible,
		PreferredHeight:                    v.preferredHeight,
		PreferredHeightAndBaselineForWidth: v.preferredHeightAndBaselineForWidth,
		PreferredHeightForWidth:            v.preferredHeightForWidth,
		PreferredWidth:                     v.preferredWidth,
		PreferredWidthForHeight:            v.preferredWidthForHeight,
		RequestMode:                        v.requestMode,
		GrabBrokenEvent:                    v.grabBrokenEvent,
		GrabFocus:                          v.grabFocus,
		GrabNotify:                         v.grabNotify,
		Hide:                               v.hide,
		HierarchyChanged:                   v.hierarchyChanged,
		KeyPressEvent:                      v.keyPressEvent,
		KeyReleaseEvent:                    v.keyReleaseEvent,
		KeynavFailed:                       v.keynavFailed,
		LeaveNotifyEvent:                   v.leaveNotifyEvent,
		Map:                                v._map,
		MapEvent:                           v.mapEvent,
		MnemonicActivate:                   v.mnemonicActivate,
		MotionNotifyEvent:                  v.motionNotifyEvent,
		MoveFocus:                          v.moveFocus,
		ParentSet:                          v.parentSet,
		PopupMenu:                          v.popupMenu,
		PropertyNotifyEvent:                v.propertyNotifyEvent,
		ProximityInEvent:                   v.proximityInEvent,
		ProximityOutEvent:                  v.proximityOutEvent,
		QueryTooltip:                       v.queryTooltip,
		QueueDrawRegion:                    v.queueDrawRegion,
		Realize:                            v.realize,
		ScreenChanged:                      v.screenChanged,
		ScrollEvent:                        v.scrollEvent,
		SelectionClearEvent:                v.selectionClearEvent,
		SelectionGet:                       v.selectionGet,
		SelectionNotifyEvent:               v.selectionNotifyEvent,
		SelectionReceived:                  v.selectionReceived,
		SelectionRequestEvent:              v.selectionRequestEvent,
		Show:                               v.show,
		ShowAll:                            v.showAll,
		ShowHelp:                           v.showHelp,
		SizeAllocate:                       v.sizeAllocate,
		StateChanged:                       v.stateChanged,
		StateFlagsChanged:                  v.stateFlagsChanged,
		StyleSet:                           v.styleSet,
		StyleUpdated:                       v.styleUpdated,
		TouchEvent:                         v.touchEvent,
		Unmap:                              v.unmap,
		UnmapEvent:                         v.unmapEvent,
		Unrealize:                          v.unrealize,
		VisibilityNotifyEvent:              v.visibilityNotifyEvent,
		WindowStateEvent:                   v.windowStateEvent,
	}
}

// Widget is the base class all widgets in GTK+ derive from. It manages the
// widget lifecycle, states and style.
//
// # Height-for-width Geometry Management
//
// GTK+ uses a height-for-width (and width-for-height) geometry management
// system. Height-for-width means that a widget can change how much vertical
// space it needs, depending on the amount of horizontal space that it is given
// (and similar for width-for-height). The most common example is a label that
// reflows to fill up the available width, wraps to fewer lines, and therefore
// needs less height.
//
// Height-for-width geometry management is implemented in GTK+ by way of five
// virtual methods:
//
// - WidgetClass.get_request_mode()
//
// - WidgetClass.get_preferred_width()
//
// - WidgetClass.get_preferred_height()
//
// - WidgetClass.get_preferred_height_for_width()
//
// - WidgetClass.get_preferred_width_for_height()
//
// - WidgetClass.get_preferred_height_and_baseline_for_width()
//
// There are some important things to keep in mind when implementing
// height-for-width and when using it in container implementations.
//
// The geometry management system will query a widget hierarchy in only one
// orientation at a time. When widgets are initially queried for their minimum
// sizes it is generally done in two initial passes in the SizeRequestMode
// chosen by the toplevel.
//
// For example, when queried in the normal GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
// mode: First, the default minimum and natural width for each widget in
// the interface will be computed using gtk_widget_get_preferred_width().
// Because the preferred widths for each container depend on the preferred
// widths of their children, this information propagates up the hierarchy, and
// finally a minimum and natural width is determined for the entire toplevel.
// Next, the toplevel will use the minimum width to query for the minimum height
// contextual to that width using gtk_widget_get_preferred_height_for_width(),
// which will also be a highly recursive operation. The minimum height for the
// minimum width is normally used to set the minimum size constraint on the
// toplevel (unless gtk_window_set_geometry_hints() is explicitly used instead).
//
// After the toplevel window has initially requested its size in both dimensions
// it can go on to allocate itself a reasonable size (or a size previously
// specified with gtk_window_set_default_size()). During the recursive
// allocation process it’s important to note that request cycles will be
// recursively executed while container widgets allocate their children.
// Each container widget, once allocated a size, will go on to first share the
// space in one orientation among its children and then request each child's
// height for its target allocated width or its width for allocated height,
// depending. In this way a Widget will typically be requested its size a
// number of times before actually being allocated a size. The size a widget
// is finally allocated can of course differ from the size it has requested.
// For this reason, Widget caches a small number of results to avoid re-querying
// for the same sizes in one allocation cycle.
//
// See [GtkContainer’s geometry management
// section][container-geometry-management] to learn more about how
// height-for-width allocations are performed by container widgets.
//
// If a widget does move content around to intelligently use up the allocated
// size then it must support the request in both SizeRequestModes even if the
// widget in question only trades sizes in a single orientation.
//
// For instance, a Label that does height-for-width word wrapping will not
// expect to have WidgetClass.get_preferred_height() called because that call
// is specific to a width-for-height request. In this case the label must return
// the height required for its own minimum possible width. By following this
// rule any widget that handles height-for-width or width-for-height requests
// will always be allocated at least enough space to fit its own content.
//
// Here are some examples of how a GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
// widget generally deals with width-for-height requests, for
// WidgetClass.get_preferred_height() it will do:
//
//	// the signal handler has the instance and user data swapped
//	// because of the swapped="yes" attribute in the template XML
//	static void
//	hello_button_clicked (FooWidget *self,
//	                      GtkButton *button)
//	{
//	  g_print ("Hello, world!\n");
//	}
//
//	static void
//	foo_widget_class_init (FooWidgetClass *klass)
//	{
//	  // ...
//	  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
//	                                               "/com/example/ui/foowidget.ui");
//	  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
//	}.
type Widget struct {
	_ [0]func() // equal guard
	coreglib.InitiallyUnowned

	*coreglib.Object
	atk.ImplementorIface
	Buildable
}

var (
	_ coreglib.Objector = (*Widget)(nil)
)

// Widgetter describes types inherited from class Widget.
//
// To get the original type, the caller must assert this to an interface or
// another type.
type Widgetter interface {
	coreglib.Objector
	baseWidget() *Widget
}

var _ Widgetter = (*Widget)(nil)

func init() {
	coreglib.RegisterClassInfo[*Widget, *WidgetClass, WidgetOverrides](
		GTypeWidget,
		initWidgetClass,
		wrapWidget,
		defaultWidgetOverrides,
	)
}

func initWidgetClass(gclass unsafe.Pointer, overrides WidgetOverrides, classInitFunc func(*WidgetClass)) {
	pclass := (*C.GtkWidgetClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeWidget))))

	if overrides.AdjustBaselineAllocation != nil {
		pclass.adjust_baseline_allocation = (*[0]byte)(C._gotk4_gtk3_WidgetClass_adjust_baseline_allocation)
	}

	if overrides.AdjustBaselineRequest != nil {
		pclass.adjust_baseline_request = (*[0]byte)(C._gotk4_gtk3_WidgetClass_adjust_baseline_request)
	}

	if overrides.AdjustSizeAllocation != nil {
		pclass.adjust_size_allocation = (*[0]byte)(C._gotk4_gtk3_WidgetClass_adjust_size_allocation)
	}

	if overrides.AdjustSizeRequest != nil {
		pclass.adjust_size_request = (*[0]byte)(C._gotk4_gtk3_WidgetClass_adjust_size_request)
	}

	if overrides.ButtonPressEvent != nil {
		pclass.button_press_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_button_press_event)
	}

	if overrides.ButtonReleaseEvent != nil {
		pclass.button_release_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_button_release_event)
	}

	if overrides.CanActivateAccel != nil {
		pclass.can_activate_accel = (*[0]byte)(C._gotk4_gtk3_WidgetClass_can_activate_accel)
	}

	if overrides.CompositedChanged != nil {
		pclass.composited_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_composited_changed)
	}

	if overrides.ConfigureEvent != nil {
		pclass.configure_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_configure_event)
	}

	if overrides.DamageEvent != nil {
		pclass.damage_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_damage_event)
	}

	if overrides.DeleteEvent != nil {
		pclass.delete_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_delete_event)
	}

	if overrides.Destroy != nil {
		pclass.destroy = (*[0]byte)(C._gotk4_gtk3_WidgetClass_destroy)
	}

	if overrides.DestroyEvent != nil {
		pclass.destroy_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_destroy_event)
	}

	if overrides.DirectionChanged != nil {
		pclass.direction_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_direction_changed)
	}

	if overrides.DragBegin != nil {
		pclass.drag_begin = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_begin)
	}

	if overrides.DragDataDelete != nil {
		pclass.drag_data_delete = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_data_delete)
	}

	if overrides.DragDataGet != nil {
		pclass.drag_data_get = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_data_get)
	}

	if overrides.DragDataReceived != nil {
		pclass.drag_data_received = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_data_received)
	}

	if overrides.DragDrop != nil {
		pclass.drag_drop = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_drop)
	}

	if overrides.DragEnd != nil {
		pclass.drag_end = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_end)
	}

	if overrides.DragFailed != nil {
		pclass.drag_failed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_failed)
	}

	if overrides.DragLeave != nil {
		pclass.drag_leave = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_leave)
	}

	if overrides.DragMotion != nil {
		pclass.drag_motion = (*[0]byte)(C._gotk4_gtk3_WidgetClass_drag_motion)
	}

	if overrides.Draw != nil {
		pclass.draw = (*[0]byte)(C._gotk4_gtk3_WidgetClass_draw)
	}

	if overrides.EnterNotifyEvent != nil {
		pclass.enter_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_enter_notify_event)
	}

	if overrides.Event != nil {
		pclass.event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_event)
	}

	if overrides.Focus != nil {
		pclass.focus = (*[0]byte)(C._gotk4_gtk3_WidgetClass_focus)
	}

	if overrides.FocusInEvent != nil {
		pclass.focus_in_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_focus_in_event)
	}

	if overrides.FocusOutEvent != nil {
		pclass.focus_out_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_focus_out_event)
	}

	if overrides.Accessible != nil {
		pclass.get_accessible = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_accessible)
	}

	if overrides.PreferredHeight != nil {
		pclass.get_preferred_height = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_preferred_height)
	}

	if overrides.PreferredHeightAndBaselineForWidth != nil {
		pclass.get_preferred_height_and_baseline_for_width = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_preferred_height_and_baseline_for_width)
	}

	if overrides.PreferredHeightForWidth != nil {
		pclass.get_preferred_height_for_width = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_preferred_height_for_width)
	}

	if overrides.PreferredWidth != nil {
		pclass.get_preferred_width = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_preferred_width)
	}

	if overrides.PreferredWidthForHeight != nil {
		pclass.get_preferred_width_for_height = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_preferred_width_for_height)
	}

	if overrides.RequestMode != nil {
		pclass.get_request_mode = (*[0]byte)(C._gotk4_gtk3_WidgetClass_get_request_mode)
	}

	if overrides.GrabBrokenEvent != nil {
		pclass.grab_broken_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_grab_broken_event)
	}

	if overrides.GrabFocus != nil {
		pclass.grab_focus = (*[0]byte)(C._gotk4_gtk3_WidgetClass_grab_focus)
	}

	if overrides.GrabNotify != nil {
		pclass.grab_notify = (*[0]byte)(C._gotk4_gtk3_WidgetClass_grab_notify)
	}

	if overrides.Hide != nil {
		pclass.hide = (*[0]byte)(C._gotk4_gtk3_WidgetClass_hide)
	}

	if overrides.HierarchyChanged != nil {
		pclass.hierarchy_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_hierarchy_changed)
	}

	if overrides.KeyPressEvent != nil {
		pclass.key_press_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_key_press_event)
	}

	if overrides.KeyReleaseEvent != nil {
		pclass.key_release_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_key_release_event)
	}

	if overrides.KeynavFailed != nil {
		pclass.keynav_failed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_keynav_failed)
	}

	if overrides.LeaveNotifyEvent != nil {
		pclass.leave_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_leave_notify_event)
	}

	if overrides.Map != nil {
		pclass._map = (*[0]byte)(C._gotk4_gtk3_WidgetClass_map)
	}

	if overrides.MapEvent != nil {
		pclass.map_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_map_event)
	}

	if overrides.MnemonicActivate != nil {
		pclass.mnemonic_activate = (*[0]byte)(C._gotk4_gtk3_WidgetClass_mnemonic_activate)
	}

	if overrides.MotionNotifyEvent != nil {
		pclass.motion_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_motion_notify_event)
	}

	if overrides.MoveFocus != nil {
		pclass.move_focus = (*[0]byte)(C._gotk4_gtk3_WidgetClass_move_focus)
	}

	if overrides.ParentSet != nil {
		pclass.parent_set = (*[0]byte)(C._gotk4_gtk3_WidgetClass_parent_set)
	}

	if overrides.PopupMenu != nil {
		pclass.popup_menu = (*[0]byte)(C._gotk4_gtk3_WidgetClass_popup_menu)
	}

	if overrides.PropertyNotifyEvent != nil {
		pclass.property_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_property_notify_event)
	}

	if overrides.ProximityInEvent != nil {
		pclass.proximity_in_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_proximity_in_event)
	}

	if overrides.ProximityOutEvent != nil {
		pclass.proximity_out_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_proximity_out_event)
	}

	if overrides.QueryTooltip != nil {
		pclass.query_tooltip = (*[0]byte)(C._gotk4_gtk3_WidgetClass_query_tooltip)
	}

	if overrides.QueueDrawRegion != nil {
		pclass.queue_draw_region = (*[0]byte)(C._gotk4_gtk3_WidgetClass_queue_draw_region)
	}

	if overrides.Realize != nil {
		pclass.realize = (*[0]byte)(C._gotk4_gtk3_WidgetClass_realize)
	}

	if overrides.ScreenChanged != nil {
		pclass.screen_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_screen_changed)
	}

	if overrides.ScrollEvent != nil {
		pclass.scroll_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_scroll_event)
	}

	if overrides.SelectionClearEvent != nil {
		pclass.selection_clear_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_selection_clear_event)
	}

	if overrides.SelectionGet != nil {
		pclass.selection_get = (*[0]byte)(C._gotk4_gtk3_WidgetClass_selection_get)
	}

	if overrides.SelectionNotifyEvent != nil {
		pclass.selection_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_selection_notify_event)
	}

	if overrides.SelectionReceived != nil {
		pclass.selection_received = (*[0]byte)(C._gotk4_gtk3_WidgetClass_selection_received)
	}

	if overrides.SelectionRequestEvent != nil {
		pclass.selection_request_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_selection_request_event)
	}

	if overrides.Show != nil {
		pclass.show = (*[0]byte)(C._gotk4_gtk3_WidgetClass_show)
	}

	if overrides.ShowAll != nil {
		pclass.show_all = (*[0]byte)(C._gotk4_gtk3_WidgetClass_show_all)
	}

	if overrides.ShowHelp != nil {
		pclass.show_help = (*[0]byte)(C._gotk4_gtk3_WidgetClass_show_help)
	}

	if overrides.SizeAllocate != nil {
		pclass.size_allocate = (*[0]byte)(C._gotk4_gtk3_WidgetClass_size_allocate)
	}

	if overrides.StateChanged != nil {
		pclass.state_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_state_changed)
	}

	if overrides.StateFlagsChanged != nil {
		pclass.state_flags_changed = (*[0]byte)(C._gotk4_gtk3_WidgetClass_state_flags_changed)
	}

	if overrides.StyleSet != nil {
		pclass.style_set = (*[0]byte)(C._gotk4_gtk3_WidgetClass_style_set)
	}

	if overrides.StyleUpdated != nil {
		pclass.style_updated = (*[0]byte)(C._gotk4_gtk3_WidgetClass_style_updated)
	}

	if overrides.TouchEvent != nil {
		pclass.touch_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_touch_event)
	}

	if overrides.Unmap != nil {
		pclass.unmap = (*[0]byte)(C._gotk4_gtk3_WidgetClass_unmap)
	}

	if overrides.UnmapEvent != nil {
		pclass.unmap_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_unmap_event)
	}

	if overrides.Unrealize != nil {
		pclass.unrealize = (*[0]byte)(C._gotk4_gtk3_WidgetClass_unrealize)
	}

	if overrides.VisibilityNotifyEvent != nil {
		pclass.visibility_notify_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_visibility_notify_event)
	}

	if overrides.WindowStateEvent != nil {
		pclass.window_state_event = (*[0]byte)(C._gotk4_gtk3_WidgetClass_window_state_event)
	}

	if classInitFunc != nil {
		class := (*WidgetClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapWidget(obj *coreglib.Object) *Widget {
	return &Widget{
		InitiallyUnowned: coreglib.InitiallyUnowned{
			Object: obj,
		},
		Object: obj,
		ImplementorIface: atk.ImplementorIface{
			Object: obj,
		},
		Buildable: Buildable{
			Object: obj,
		},
	}
}

func marshalWidget(p uintptr) (interface{}, error) {
	return wrapWidget(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

func (widget *Widget) baseWidget() *Widget {
	return widget
}

// BaseWidget returns the underlying base object.
func BaseWidget(obj Widgetter) *Widget {
	return obj.baseWidget()
}

func (widget *Widget) ConnectAccelClosuresChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "accel-closures-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectAccelClosuresChanged), f)
}

// ConnectButtonPressEvent signal will be emitted when a button (typically from
// a mouse) is pressed.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_BUTTON_PRESS_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectButtonPressEvent(f func(event *gdk.EventButton) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "button-press-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectButtonPressEvent), f)
}

// ConnectButtonReleaseEvent signal will be emitted when a button (typically
// from a mouse) is released.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_BUTTON_RELEASE_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectButtonReleaseEvent(f func(event *gdk.EventButton) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "button-release-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectButtonReleaseEvent), f)
}

// ConnectCanActivateAccel determines whether an accelerator that activates the
// signal identified by signal_id can currently be activated. This signal is
// present to allow applications and derived widgets to override the default
// Widget handling for determining whether an accelerator can be activated.
func (widget *Widget) ConnectCanActivateAccel(f func(signalId uint) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "can-activate-accel", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectCanActivateAccel), f)
}

// ConnectCompositedChanged signal is emitted when the composited status of
// widgets screen changes. See gdk_screen_is_composited().
func (widget *Widget) ConnectCompositedChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "composited-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectCompositedChanged), f)
}

// ConnectConfigureEvent signal will be emitted when the size, position or
// stacking of the widget's window has changed.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_STRUCTURE_MASK mask. GDK will enable this mask automatically for all
// new windows.
func (widget *Widget) ConnectConfigureEvent(f func(event *gdk.EventConfigure) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "configure-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectConfigureEvent), f)
}

// ConnectDamageEvent is emitted when a redirected window belonging to widget
// gets drawn into. The region/area members of the event shows what area of the
// redirected drawable was drawn into.
func (widget *Widget) ConnectDamageEvent(f func(event *gdk.EventExpose) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "damage-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDamageEvent), f)
}

// ConnectDeleteEvent signal is emitted if a user requests that a toplevel
// window is closed. The default handler for this signal destroys the window.
// Connecting gtk_widget_hide_on_delete() to this signal will cause the
// window to be hidden instead, so that it can later be shown again without
// reconstructing it.
func (widget *Widget) ConnectDeleteEvent(f func(event *gdk.Event) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "delete-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDeleteEvent), f)
}

// ConnectDestroy signals that all holders of a reference to the widget should
// release the reference that they hold. May result in finalization of the
// widget if all references are released.
//
// This signal is not suitable for saving widget state.
func (widget *Widget) ConnectDestroy(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "destroy", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDestroy), f)
}

// ConnectDestroyEvent signal is emitted when a Window is destroyed. You rarely
// get this signal, because most widgets disconnect themselves from their window
// before they destroy it, so no widget owns the window at destroy time.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_STRUCTURE_MASK mask. GDK will enable this mask automatically for all
// new windows.
func (widget *Widget) ConnectDestroyEvent(f func(event *gdk.Event) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "destroy-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDestroyEvent), f)
}

// ConnectDirectionChanged signal is emitted when the text direction of a widget
// changes.
func (widget *Widget) ConnectDirectionChanged(f func(previousDirection TextDirection)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "direction-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDirectionChanged), f)
}

// ConnectDragBegin signal is emitted on the drag source when a drag is started.
// A typical reason to connect to this signal is to set up a custom drag icon
// with e.g. gtk_drag_source_set_icon_pixbuf().
//
// Note that some widgets set up a drag icon in the default handler of this
// signal, so you may have to use g_signal_connect_after() to override what the
// default handler did.
func (widget *Widget) ConnectDragBegin(f func(context *gdk.DragContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-begin", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragBegin), f)
}

// ConnectDragDataDelete signal is emitted on the drag source when a drag with
// the action GDK_ACTION_MOVE is successfully completed. The signal handler is
// responsible for deleting the data that has been dropped. What "delete" means
// depends on the context of the drag operation.
func (widget *Widget) ConnectDragDataDelete(f func(context *gdk.DragContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-data-delete", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragDataDelete), f)
}

// ConnectDragDataGet signal is emitted on the drag source when the drop site
// requests the data which is dragged. It is the responsibility of the signal
// handler to fill data with the data in the format which is indicated by info.
// See gtk_selection_data_set() and gtk_selection_data_set_text().
func (widget *Widget) ConnectDragDataGet(f func(context *gdk.DragContext, data *SelectionData, info, time uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-data-get", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragDataGet), f)
}

// ConnectDragDataReceived signal is emitted on the drop site when the
// dragged data has been received. If the data was received in order to
// determine whether the drop will be accepted, the handler is expected to
// call gdk_drag_status() and not finish the drag. If the data was received in
// response to a Widget::drag-drop signal (and this is the last target to be
// received), the handler for this signal is expected to process the received
// data and then call gtk_drag_finish(), setting the success parameter depending
// on whether the data was processed successfully.
//
// Applications must create some means to determine why the signal was emitted
// and therefore whether to call gdk_drag_status() or gtk_drag_finish().
//
// The handler may inspect the selected action with
// gdk_drag_context_get_selected_action() before calling gtk_drag_finish(), e.g.
// to implement GDK_ACTION_ASK as shown in the following example:
//
//	void
//	drag_data_received (GtkWidget          *widget,
//	                    GdkDragContext     *context,
//	                    gint                x,
//	                    gint                y,
//	                    GtkSelectionData   *data,
//	                    guint               info,
//	                    guint               time)
//	{
//	  if ((data->length >= 0) && (data->format == 8))
//	    {
//	      GdkDragAction action;
//
//	      // handle data here
//
//	      action = gdk_drag_context_get_selected_action (context);
//	      if (action == GDK_ACTION_ASK)
//	        {
//	          GtkWidget *dialog;
//	          gint response;
//
//	          dialog = gtk_message_dialog_new (NULL,
//	                                           GTK_DIALOG_MODAL |
//	                                           GTK_DIALOG_DESTROY_WITH_PARENT,
//	                                           GTK_MESSAGE_INFO,
//	                                           GTK_BUTTONS_YES_NO,
//	                                           "Move the data ?\n");
//	          response = gtk_dialog_run (GTK_DIALOG (dialog));
//	          gtk_widget_destroy (dialog);
//
//	          if (response == GTK_RESPONSE_YES)
//	            action = GDK_ACTION_MOVE;
//	          else
//	            action = GDK_ACTION_COPY;
//	         }
//
//	      gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
//	    }
//	  else
//	    gtk_drag_finish (context, FALSE, FALSE, time);
//	 }.
func (widget *Widget) ConnectDragDataReceived(f func(context *gdk.DragContext, x, y int, data *SelectionData, info, time uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-data-received", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragDataReceived), f)
}

// ConnectDragDrop signal is emitted on the drop site when the user drops the
// data onto the widget. The signal handler must determine whether the cursor
// position is in a drop zone or not. If it is not in a drop zone, it returns
// FALSE and no further processing is necessary. Otherwise, the handler returns
// TRUE. In this case, the handler must ensure that gtk_drag_finish() is called
// to let the source know that the drop is done. The call to gtk_drag_finish()
// can be done either directly or in a Widget::drag-data-received handler which
// gets triggered by calling gtk_drag_get_data() to receive the data for one or
// more of the supported targets.
func (widget *Widget) ConnectDragDrop(f func(context *gdk.DragContext, x, y int, time uint) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-drop", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragDrop), f)
}

// ConnectDragEnd signal is emitted on the drag source when a drag is finished.
// A typical reason to connect to this signal is to undo things done in
// Widget::drag-begin.
func (widget *Widget) ConnectDragEnd(f func(context *gdk.DragContext)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-end", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragEnd), f)
}

// ConnectDragFailed signal is emitted on the drag source when a drag has
// failed. The signal handler may hook custom code to handle a failed DnD
// operation based on the type of error, it returns TRUE is the failure has been
// already handled (not showing the default "drag operation failed" animation),
// otherwise it returns FALSE.
func (widget *Widget) ConnectDragFailed(f func(context *gdk.DragContext, result DragResult) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-failed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragFailed), f)
}

// ConnectDragLeave signal is emitted on the drop site when the cursor leaves
// the widget. A typical reason to connect to this signal is to undo things done
// in Widget::drag-motion, e.g. undo highlighting with gtk_drag_unhighlight().
//
//	Likewise, the Widget::drag-leave signal is also emitted before the ::drag-drop signal, for instance to allow cleaning up of a preview item created in the Widget::drag-motion signal handler.
func (widget *Widget) ConnectDragLeave(f func(context *gdk.DragContext, time uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-leave", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragLeave), f)
}

// ConnectDragMotion signal is emitted on the drop site when the user moves
// the cursor over the widget during a drag. The signal handler must determine
// whether the cursor position is in a drop zone or not. If it is not in a drop
// zone, it returns FALSE and no further processing is necessary. Otherwise,
// the handler returns TRUE. In this case, the handler is responsible for
// providing the necessary information for displaying feedback to the user,
// by calling gdk_drag_status().
//
// If the decision whether the drop will be accepted or rejected can't
// be made based solely on the cursor position and the type of the data,
// the handler may inspect the dragged data by calling gtk_drag_get_data() and
// defer the gdk_drag_status() call to the Widget::drag-data-received handler.
// Note that you must pass K_DEST_DEFAULT_DROP, K_DEST_DEFAULT_MOTION or
// K_DEST_DEFAULT_ALL to gtk_drag_dest_set() when using the drag-motion signal
// that way.
//
// Also note that there is no drag-enter signal. The drag receiver has to keep
// track of whether he has received any drag-motion signals since the last
// Widget::drag-leave and if not, treat the drag-motion signal as an "enter"
// signal. Upon an "enter", the handler will typically highlight the drop site
// with gtk_drag_highlight().
//
//	static void
//	drag_motion (GtkWidget      *widget,
//	             GdkDragContext *context,
//	             gint            x,
//	             gint            y,
//	             guint           time)
//	{
//	  GdkAtom target;
//
//	  PrivateData *private_data = GET_PRIVATE_DATA (widget);
//
//	  if (!private_data->drag_highlight)
//	   {
//	     private_data->drag_highlight = 1;
//	     gtk_drag_highlight (widget);
//	   }
//
//	  target = gtk_drag_dest_find_target (widget, context, NULL);
//	  if (target == GDK_NONE)
//	    gdk_drag_status (context, 0, time);
//	  else
//	   {
//	     private_data->pending_status
//	        = gdk_drag_context_get_suggested_action (context);
//	     gtk_drag_get_data (widget, context, target, time);
//	   }
//
//	  return TRUE;
//	}
//
//	static void
//	drag_data_received (GtkWidget        *widget,
//	                    GdkDragContext   *context,
//	                    gint              x,
//	                    gint              y,
//	                    GtkSelectionData *selection_data,
//	                    guint             info,
//	                    guint             time)
//	{
//	  PrivateData *private_data = GET_PRIVATE_DATA (widget);
//
//	  if (private_data->suggested_action)
//	   {
//	     private_data->suggested_action = 0;
//
//	     // We are getting this data due to a request in drag_motion,
//	     // rather than due to a request in drag_drop, so we are just
//	     // supposed to call gdk_drag_status(), not actually paste in
//	     // the data.
//
//	     str = gtk_selection_data_get_text (selection_data);
//	     if (!data_is_acceptable (str))
//	       gdk_drag_status (context, 0, time);
//	     else
//	       gdk_drag_status (context,
//	                        private_data->suggested_action,
//	                        time);
//	   }
//	  else
//	   {
//	     // accept the drop
//	   }
//	}.
func (widget *Widget) ConnectDragMotion(f func(context *gdk.DragContext, x, y int, time uint) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "drag-motion", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDragMotion), f)
}

// ConnectDraw: this signal is emitted when a widget is supposed to
// render itself. The widget's top left corner must be painted at the
// origin of the passed in context and be sized to the values returned by
// gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height().
//
// Signal handlers connected to this signal can modify the cairo context passed
// as cr in any way they like and don't need to restore it. The signal emission
// takes care of calling cairo_save() before and cairo_restore() after invoking
// the handler.
//
// The signal handler will get a cr with a clip region already set to the
// widget's dirty region, i.e. to the area that needs repainting. Complicated
// widgets that want to avoid redrawing themselves completely can get the
// full extents of the clip region with gdk_cairo_get_clip_rectangle(),
// or they can get a finer-grained representation of the dirty region with
// cairo_copy_clip_rectangle_list().
func (widget *Widget) ConnectDraw(f func(cr *cairo.Context) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "draw", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectDraw), f)
}

// ConnectEnterNotifyEvent will be emitted when the pointer enters the widget's
// window.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_ENTER_NOTIFY_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectEnterNotifyEvent(f func(event *gdk.EventCrossing) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "enter-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectEnterNotifyEvent), f)
}

// ConnectEvent: GTK+ main loop will emit three signals for each GDK
// event delivered to a widget: one generic ::event signal, another,
// more specific, signal that matches the type of event delivered (e.g.
// Widget::key-press-event) and finally a generic Widget::event-after signal.
func (widget *Widget) ConnectEvent(f func(event *gdk.Event) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectEvent), f)
}

// ConnectEventAfter: after the emission of the Widget::event signal and
// (optionally) the second more specific signal, ::event-after will be emitted
// regardless of the previous two signals handlers return values.
func (widget *Widget) ConnectEventAfter(f func(event *gdk.Event)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "event-after", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectEventAfter), f)
}

func (widget *Widget) ConnectFocus(f func(direction DirectionType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "focus", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectFocus), f)
}

// ConnectFocusInEvent signal will be emitted when the keyboard focus enters the
// widget's window.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_FOCUS_CHANGE_MASK mask.
func (widget *Widget) ConnectFocusInEvent(f func(event *gdk.EventFocus) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "focus-in-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectFocusInEvent), f)
}

// ConnectFocusOutEvent signal will be emitted when the keyboard focus leaves
// the widget's window.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_FOCUS_CHANGE_MASK mask.
func (widget *Widget) ConnectFocusOutEvent(f func(event *gdk.EventFocus) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "focus-out-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectFocusOutEvent), f)
}

// ConnectGrabBrokenEvent is emitted when a pointer or keyboard grab on a window
// belonging to widget gets broken.
//
// On X11, this happens when the grab window becomes unviewable (i.e. it or one
// of its ancestors is unmapped), or if the same application grabs the pointer
// or keyboard again.
func (widget *Widget) ConnectGrabBrokenEvent(f func(event *gdk.EventGrabBroken) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "grab-broken-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectGrabBrokenEvent), f)
}

func (widget *Widget) ConnectGrabFocus(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "grab-focus", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectGrabFocus), f)
}

// ConnectGrabNotify signal is emitted when a widget becomes shadowed by a GTK+
// grab (not a pointer or keyboard grab) on another widget, or when it becomes
// unshadowed due to a grab being removed.
//
// A widget is shadowed by a gtk_grab_add() when the topmost grab widget in the
// grab stack of its window group is not its ancestor.
func (widget *Widget) ConnectGrabNotify(f func(wasGrabbed bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "grab-notify", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectGrabNotify), f)
}

// ConnectHide signal is emitted when widget is hidden, for example with
// gtk_widget_hide().
func (widget *Widget) ConnectHide(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "hide", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectHide), f)
}

// ConnectHierarchyChanged signal is emitted when the anchored state of a widget
// changes. A widget is “anchored” when its toplevel ancestor is a Window.
// This signal is emitted when a widget changes from un-anchored to anchored or
// vice-versa.
func (widget *Widget) ConnectHierarchyChanged(f func(previousToplevel Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "hierarchy-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectHierarchyChanged), f)
}

// ConnectKeyPressEvent signal is emitted when a key is pressed. The signal
// emission will reoccur at the key-repeat rate when the key is kept pressed.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_KEY_PRESS_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectKeyPressEvent(f func(event *gdk.EventKey) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "key-press-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectKeyPressEvent), f)
}

// ConnectKeyReleaseEvent signal is emitted when a key is released.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_KEY_RELEASE_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectKeyReleaseEvent(f func(event *gdk.EventKey) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "key-release-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectKeyReleaseEvent), f)
}

// ConnectKeynavFailed gets emitted if keyboard navigation fails. See
// gtk_widget_keynav_failed() for details.
func (widget *Widget) ConnectKeynavFailed(f func(direction DirectionType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "keynav-failed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectKeynavFailed), f)
}

// ConnectLeaveNotifyEvent will be emitted when the pointer leaves the widget's
// window.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_LEAVE_NOTIFY_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectLeaveNotifyEvent(f func(event *gdk.EventCrossing) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "leave-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectLeaveNotifyEvent), f)
}

// ConnectMap signal is emitted when widget is going to be mapped, that is when
// the widget is visible (which is controlled with gtk_widget_set_visible()) and
// all its parents up to the toplevel widget are also visible. Once the map has
// occurred, Widget::map-event will be emitted.
//
// The ::map signal can be used to determine whether a widget will be drawn,
// for instance it can resume an animation that was stopped during the emission
// of Widget::unmap.
func (widget *Widget) ConnectMap(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "map", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectMap), f)
}

// ConnectMapEvent signal will be emitted when the widget's window is mapped.
// A window is mapped when it becomes visible on the screen.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_STRUCTURE_MASK mask. GDK will enable this mask automatically for all
// new windows.
func (widget *Widget) ConnectMapEvent(f func(event *gdk.EventAny) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "map-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectMapEvent), f)
}

// ConnectMnemonicActivate: default handler for this signal activates widget if
// group_cycling is FALSE, or just makes widget grab focus if group_cycling is
// TRUE.
func (widget *Widget) ConnectMnemonicActivate(f func(groupCycling bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "mnemonic-activate", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectMnemonicActivate), f)
}

// ConnectMotionNotifyEvent signal is emitted when the pointer moves over the
// widget's Window.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_POINTER_MOTION_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectMotionNotifyEvent(f func(event *gdk.EventMotion) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "motion-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectMotionNotifyEvent), f)
}

func (widget *Widget) ConnectMoveFocus(f func(direction DirectionType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "move-focus", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectMoveFocus), f)
}

// ConnectParentSet signal is emitted when a new parent has been set on a
// widget.
func (widget *Widget) ConnectParentSet(f func(oldParent Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "parent-set", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectParentSet), f)
}

// ConnectPopupMenu: this signal gets emitted whenever a widget should
// pop up a context menu. This usually happens through the standard key
// binding mechanism; by pressing a certain key while a widget is focused,
// the user can cause the widget to pop up a menu. For example, the Entry
// widget creates a menu with clipboard commands. See the [Popup Menu Migration
// Checklist][checklist-popup-menu] for an example of how to use this signal.
func (widget *Widget) ConnectPopupMenu(f func() (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "popup-menu", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectPopupMenu), f)
}

// ConnectPropertyNotifyEvent signal will be emitted when a property on the
// widget's window has been changed or deleted.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_PROPERTY_CHANGE_MASK mask.
func (widget *Widget) ConnectPropertyNotifyEvent(f func(event *gdk.EventProperty) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "property-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectPropertyNotifyEvent), f)
}

// ConnectProximityInEvent: to receive this signal the Window associated to the
// widget needs to enable the K_PROXIMITY_IN_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectProximityInEvent(f func(event *gdk.EventProximity) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "proximity-in-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectProximityInEvent), f)
}

// ConnectProximityOutEvent: to receive this signal the Window associated to the
// widget needs to enable the K_PROXIMITY_OUT_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectProximityOutEvent(f func(event *gdk.EventProximity) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "proximity-out-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectProximityOutEvent), f)
}

// ConnectQueryTooltip is emitted when Widget:has-tooltip is TRUE and the hover
// timeout has expired with the cursor hovering "above" widget; or emitted when
// widget got focus in keyboard mode.
//
// Using the given coordinates, the signal handler should determine whether
// a tooltip should be shown for widget. If this is the case TRUE should be
// returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of
// x and y are undefined and should not be used.
//
// The signal handler is free to manipulate tooltip with the therefore destined
// function calls.
func (widget *Widget) ConnectQueryTooltip(f func(x, y int, keyboardMode bool, tooltip *Tooltip) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "query-tooltip", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectQueryTooltip), f)
}

// ConnectRealize signal is emitted when widget is associated with a Window,
// which means that gtk_widget_realize() has been called or the widget has been
// mapped (that is, it is going to be drawn).
func (widget *Widget) ConnectRealize(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "realize", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectRealize), f)
}

// ConnectScreenChanged signal gets emitted when the screen of a widget has
// changed.
func (widget *Widget) ConnectScreenChanged(f func(previousScreen *gdk.Screen)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "screen-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectScreenChanged), f)
}

// ConnectScrollEvent signal is emitted when a button in the 4 to 7 range is
// pressed. Wheel mice are usually configured to generate button press events
// for buttons 4 and 5 when the wheel is turned.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_SCROLL_MASK mask.
//
// This signal will be sent to the grab widget if there is one.
func (widget *Widget) ConnectScrollEvent(f func(event *gdk.EventScroll) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "scroll-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectScrollEvent), f)
}

// ConnectSelectionClearEvent signal will be emitted when the the widget's
// window has lost ownership of a selection.
func (widget *Widget) ConnectSelectionClearEvent(f func(event *gdk.EventSelection) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "selection-clear-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSelectionClearEvent), f)
}

func (widget *Widget) ConnectSelectionGet(f func(data *SelectionData, info, time uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "selection-get", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSelectionGet), f)
}

func (widget *Widget) ConnectSelectionNotifyEvent(f func(event *gdk.EventSelection) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "selection-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSelectionNotifyEvent), f)
}

func (widget *Widget) ConnectSelectionReceived(f func(data *SelectionData, time uint)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "selection-received", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSelectionReceived), f)
}

// ConnectSelectionRequestEvent signal will be emitted when another client
// requests ownership of the selection owned by the widget's window.
func (widget *Widget) ConnectSelectionRequestEvent(f func(event *gdk.EventSelection) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "selection-request-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSelectionRequestEvent), f)
}

// ConnectShow signal is emitted when widget is shown, for example with
// gtk_widget_show().
func (widget *Widget) ConnectShow(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "show", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectShow), f)
}

func (widget *Widget) ConnectShowHelp(f func(helpType WidgetHelpType) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "show-help", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectShowHelp), f)
}

func (widget *Widget) ConnectSizeAllocate(f func(allocation *Allocation)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "size-allocate", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectSizeAllocate), f)
}

// ConnectStateChanged signal is emitted when the widget state changes.
// See gtk_widget_get_state().
func (widget *Widget) ConnectStateChanged(f func(state StateType)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "state-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectStateChanged), f)
}

// ConnectStateFlagsChanged signal is emitted when the widget state changes,
// see gtk_widget_get_state_flags().
func (widget *Widget) ConnectStateFlagsChanged(f func(flags StateFlags)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "state-flags-changed", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectStateFlagsChanged), f)
}

// ConnectStyleSet signal is emitted when a new style has been set on a widget.
// Note that style-modifying functions like gtk_widget_modify_base() also cause
// this signal to be emitted.
//
// Note that this signal is emitted for changes to the deprecated Style.
// To track changes to the StyleContext associated with a widget, use the
// Widget::style-updated signal.
func (widget *Widget) ConnectStyleSet(f func(previousStyle *Style)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "style-set", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectStyleSet), f)
}

// ConnectStyleUpdated signal is a convenience signal that is emitted when
// the StyleContext::changed signal is emitted on the widget's associated
// StyleContext as returned by gtk_widget_get_style_context().
//
// Note that style-modifying functions like gtk_widget_override_color() also
// cause this signal to be emitted.
func (widget *Widget) ConnectStyleUpdated(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "style-updated", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectStyleUpdated), f)
}

func (widget *Widget) ConnectTouchEvent(f func(object *gdk.Event) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "touch-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectTouchEvent), f)
}

// ConnectUnmap signal is emitted when widget is going to be unmapped, which
// means that either it or any of its parents up to the toplevel widget have
// been set as hidden.
//
// As ::unmap indicates that a widget will not be shown any longer, it can be
// used to, for example, stop an animation on the widget.
func (widget *Widget) ConnectUnmap(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "unmap", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectUnmap), f)
}

// ConnectUnmapEvent signal will be emitted when the widget's window is
// unmapped. A window is unmapped when it becomes invisible on the screen.
//
// To receive this signal, the Window associated to the widget needs to enable
// the K_STRUCTURE_MASK mask. GDK will enable this mask automatically for all
// new windows.
func (widget *Widget) ConnectUnmapEvent(f func(event *gdk.EventAny) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "unmap-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectUnmapEvent), f)
}

// ConnectUnrealize signal is emitted when the Window associated with widget
// is destroyed, which means that gtk_widget_unrealize() has been called or the
// widget has been unmapped (that is, it is going to be hidden).
func (widget *Widget) ConnectUnrealize(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "unrealize", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectUnrealize), f)
}

// ConnectVisibilityNotifyEvent will be emitted when the widget's window is
// obscured or unobscured.
//
// To receive this signal the Window associated to the widget needs to enable
// the K_VISIBILITY_NOTIFY_MASK mask.
func (widget *Widget) ConnectVisibilityNotifyEvent(f func(event *gdk.EventVisibility) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "visibility-notify-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectVisibilityNotifyEvent), f)
}

// ConnectWindowStateEvent will be emitted when the state of the toplevel window
// associated to the widget changes.
//
// To receive this signal the Window associated to the widget needs to enable
// the K_STRUCTURE_MASK mask. GDK will enable this mask automatically for all
// new windows.
func (widget *Widget) ConnectWindowStateEvent(f func(event *gdk.EventWindowState) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(widget, "window-state-event", false, unsafe.Pointer(C._gotk4_gtk3_Widget_ConnectWindowStateEvent), f)
}

// Activate: for widgets that can be “activated” (buttons, menu items,
// etc.) this function activates them. Activation is what happens when you
// press Enter on a widget during key navigation. If widget isn't activatable,
// the function returns FALSE.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget was activatable.
func (widget *Widget) Activate() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_activate(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AddAccelerator installs an accelerator for this widget in accel_group
// that causes accel_signal to be emitted if the accelerator is activated.
// The accel_group needs to be added to the widget’s toplevel via
// gtk_window_add_accel_group(), and the signal must be of type G_SIGNAL_ACTION.
// Accelerators added through this function are not user changeable during
// runtime. If you want to support accelerators that can be changed by the
// user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or
// gtk_menu_item_set_accel_path() instead.
//
// The function takes the following parameters:
//
//   - accelSignal: widget signal to emit on accelerator activation.
//   - accelGroup: accel group for this widget, added to its toplevel.
//   - accelKey: GDK keyval of the accelerator.
//   - accelMods: modifier key combination of the accelerator.
//   - accelFlags: flag accelerators, e.g. GTK_ACCEL_VISIBLE.
func (widget *Widget) AddAccelerator(accelSignal string, accelGroup *AccelGroup, accelKey uint, accelMods gdk.ModifierType, accelFlags AccelFlags) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.gchar          // out
	var _arg2 *C.GtkAccelGroup  // out
	var _arg3 C.guint           // out
	var _arg4 C.GdkModifierType // out
	var _arg5 C.GtkAccelFlags   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelSignal)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg3 = C.guint(accelKey)
	_arg4 = C.GdkModifierType(accelMods)
	_arg5 = C.GtkAccelFlags(accelFlags)

	C.gtk_widget_add_accelerator(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(accelSignal)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)
	runtime.KeepAlive(accelFlags)
}

// AddDeviceEvents adds the device events in the bitfield events to the event
// mask for widget. See gtk_widget_set_device_events() for details.
//
// The function takes the following parameters:
//
//   - device: Device.
//   - events: event mask, see EventMask.
func (widget *Widget) AddDeviceEvents(device gdk.Devicer, events gdk.EventMask) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkDevice   // out
	var _arg2 C.GdkEventMask // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))
	_arg2 = C.GdkEventMask(events)

	C.gtk_widget_add_device_events(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)
	runtime.KeepAlive(events)
}

// AddEvents adds the events in the bitfield events to the event mask
// for widget. See gtk_widget_set_events() and the [input handling
// overview][event-masks] for details.
//
// The function takes the following parameters:
//
//   - events: event mask, see EventMask.
func (widget *Widget) AddEvents(events int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(events)

	C.gtk_widget_add_events(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(events)
}

// AddMnemonicLabel adds a widget to the list of mnemonic labels for this
// widget. (See gtk_widget_list_mnemonic_labels()). Note the list of mnemonic
// labels for the widget is cleared when the widget is destroyed, so the caller
// must make sure to update its internal state at this point as well, by using a
// connection to the Widget::destroy signal or a weak notifier.
//
// The function takes the following parameters:
//
//   - label that acts as a mnemonic label for widget.
func (widget *Widget) AddMnemonicLabel(label Widgetter) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	C.gtk_widget_add_mnemonic_label(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(label)
}

// AddTickCallback queues an animation frame update and adds a callback
// to be called before each frame. Until the tick callback is removed,
// it will be called frequently (usually at the frame rate of the output device
// or as quickly as the application can be repainted, whichever is slower).
// For this reason, is most suitable for handling graphics that change every
// frame or every few frames. The tick callback does not automatically imply a
// relayout or repaint. If you want a repaint or relayout, and aren’t changing
// widget properties that would trigger that (for example, changing the text
// of a Label), then you will have to call gtk_widget_queue_resize() or
// gtk_widget_queue_draw_area() yourself.
//
// gdk_frame_clock_get_frame_time() should generally be used for timing
// continuous animations and gdk_frame_timings_get_predicted_presentation_time()
// if you are trying to display isolated frames at particular times.
//
// This is a more convenient alternative to connecting directly to the
// FrameClock::update signal of FrameClock, since you don't have to worry about
// when a FrameClock is assigned to a widget.
//
// The function takes the following parameters:
//
//   - callback: function to call for updating animations.
//
// The function returns the following values:
//
//   - guint: id for the connection of this callback. Remove the callback by
//     passing it to gtk_widget_remove_tick_callback().
func (widget *Widget) AddTickCallback(callback TickCallback) uint {
	var _arg0 *C.GtkWidget      // out
	var _arg1 C.GtkTickCallback // out
	var _arg2 C.gpointer
	var _arg3 C.GDestroyNotify
	var _cret C.guint // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TickCallback)
	_arg2 = C.gpointer(gbox.Assign(callback))
	_arg3 = (C.GDestroyNotify)((*[0]byte)(C.callbackDelete))

	_cret = C.gtk_widget_add_tick_callback(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(callback)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// CanActivateAccel determines whether an accelerator that activates the
// signal identified by signal_id can currently be activated. This is done by
// emitting the Widget::can-activate-accel signal on widget; if the signal
// isn’t overridden by a handler or in a derived widget, then the default check
// is that the widget must be sensitive, and the widget and all its ancestors
// mapped.
//
// The function takes the following parameters:
//
//   - signalId: ID of a signal installed on widget.
//
// The function returns the following values:
//
//   - ok: TRUE if the accelerator can be activated.
func (widget *Widget) CanActivateAccel(signalId uint) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.guint      // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.guint(signalId)

	_cret = C.gtk_widget_can_activate_accel(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(signalId)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ChildFocus: this function is used by custom widget implementations; if you're
// writing an app, you’d use gtk_widget_grab_focus() to move the focus to a
// particular widget, and gtk_container_set_focus_chain() to change the focus
// tab order. So you may want to investigate those functions instead.
//
// gtk_widget_child_focus() is called by containers as the user moves around
// the window using keyboard shortcuts. direction indicates what kind of
// motion is taking place (up, down, left, right, tab forward, tab backward).
// gtk_widget_child_focus() emits the Widget::focus signal; widgets override
// the default handler for this signal in order to implement appropriate focus
// behavior.
//
// The default ::focus handler for a widget should return TRUE if moving
// in direction left the focus on a focusable location inside that widget,
// and FALSE if moving in direction moved the focus outside the widget.
// If returning TRUE, widgets normally call gtk_widget_grab_focus() to place the
// focus accordingly; if returning FALSE, they don’t modify the current focus
// location.
//
// The function takes the following parameters:
//
//   - direction of focus movement.
//
// The function returns the following values:
//
//   - ok: TRUE if focus ended up inside widget.
func (widget *Widget) ChildFocus(direction DirectionType) bool {
	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C.gtk_widget_child_focus(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ChildNotify emits a Widget::child-notify signal for the [child
// property][child-properties] child_property on widget.
//
// This is the analogue of g_object_notify() for child properties.
//
// Also see gtk_container_child_notify().
//
// The function takes the following parameters:
//
//   - childProperty: name of a child property installed on the class of
//     widget’s parent.
func (widget *Widget) ChildNotify(childProperty string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(childProperty)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_widget_child_notify(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(childProperty)
}

// ClassPath: same as gtk_widget_path(), but always uses the name of a widget’s
// type, never uses a custom name set with gtk_widget_set_name().
//
// Deprecated: Use gtk_widget_get_path() instead.
//
// The function returns the following values:
//
//   - pathLength (optional): location to store the length of the class path,
//     or NULL.
//   - path (optional): location to store the class path as an allocated string,
//     or NULL.
//   - pathReversed (optional): location to store the reverse class path as an
//     allocated string, or NULL.
func (widget *Widget) ClassPath() (pathLength uint, path, pathReversed string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.guint      // in
	var _arg2 *C.gchar     // in
	var _arg3 *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_class_path(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)

	var _pathLength uint     // out
	var _path string         // out
	var _pathReversed string // out

	_pathLength = uint(_arg1)
	if _arg2 != nil {
		_path = C.GoString((*C.gchar)(unsafe.Pointer(_arg2)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if _arg3 != nil {
		_pathReversed = C.GoString((*C.gchar)(unsafe.Pointer(_arg3)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	return _pathLength, _path, _pathReversed
}

// ComputeExpand computes whether a container should give this widget extra
// space when possible. Containers should check this, rather than looking at
// gtk_widget_get_hexpand() or gtk_widget_get_vexpand().
//
// This function already checks whether the widget is visible, so visibility
// does not need to be checked separately. Non-visible widgets are not expanded.
//
// The computed expand value uses either the expand setting explicitly set on
// the widget itself, or, if none has been explicitly set, the widget may expand
// if some of its children do.
//
// The function takes the following parameters:
//
//   - orientation: expand direction.
//
// The function returns the following values:
//
//   - ok: whether widget tree rooted here should be expanded.
func (widget *Widget) ComputeExpand(orientation Orientation) bool {
	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkOrientation // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkOrientation(orientation)

	_cret = C.gtk_widget_compute_expand(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(orientation)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CreatePangoContext creates a new Context with the appropriate font map,
// font options, font description, and base direction for drawing text for this
// widget. See also gtk_widget_get_pango_context().
//
// The function returns the following values:
//
//   - context: new Context.
func (widget *Widget) CreatePangoContext() *pango.Context {
	var _arg0 *C.GtkWidget    // out
	var _cret *C.PangoContext // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_create_pango_context(_arg0)
	runtime.KeepAlive(widget)

	var _context *pango.Context // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_context = &pango.Context{
			Object: obj,
		}
	}

	return _context
}

// CreatePangoLayout creates a new Layout with the appropriate font map,
// font description, and base direction for drawing text for this widget.
//
// If you keep a Layout created in this way around, you need to re-create
// it when the widget Context is replaced. This can be tracked by using the
// Widget::screen-changed signal on the widget.
//
// The function takes the following parameters:
//
//   - text (optional) to set on the layout (can be NULL).
//
// The function returns the following values:
//
//   - layout: new Layout.
func (widget *Widget) CreatePangoLayout(text string) *pango.Layout {
	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.gchar       // out
	var _cret *C.PangoLayout // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if text != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_widget_create_pango_layout(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(text)

	var _layout *pango.Layout // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_layout = &pango.Layout{
			Object: obj,
		}
	}

	return _layout
}

// Destroy destroys a widget.
//
// When a widget is destroyed all references it holds on other objects will be
// released:
//
//   - if the widget is inside a container, it will be removed from its parent
//   - if the widget is a container, all its children will be destroyed,
//     recursively
//   - if the widget is a top level, it will be removed from the list of top
//     level widgets that GTK+ maintains internally
//
// It's expected that all references held on the widget will also be released;
// you should connect to the Widget::destroy signal if you hold a reference
// to widget and you wish to remove it when this function is called. It is not
// necessary to do so if you are implementing a Container, as you'll be able to
// use the ContainerClass.remove() virtual function for that.
//
// It's important to notice that gtk_widget_destroy() will only cause the widget
// to be finalized if no additional references, acquired using g_object_ref(),
// are held on it. In case additional references are in place, the widget will
// be in an "inert" state after calling this function; widget will still point
// to valid memory, allowing you to release the references you hold, but you may
// not query the widget's own state.
//
// You should typically call this function on top level widgets, and rarely on
// child widgets.
//
// See also: gtk_container_remove().
func (widget *Widget) Destroy() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_destroy(_arg0)
	runtime.KeepAlive(widget)
}

// DeviceIsShadowed returns TRUE if device has been shadowed by a GTK+ device
// grab on another widget, so it would stop sending events to widget. This may
// be used in the Widget::grab-notify signal to check for specific devices.
// See gtk_device_grab_add().
//
// The function takes the following parameters:
//
//   - device: Device.
//
// The function returns the following values:
//
//   - ok: TRUE if there is an ongoing grab on device by another Widget than
//     widget.
func (widget *Widget) DeviceIsShadowed(device gdk.Devicer) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkDevice // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	_cret = C.gtk_widget_device_is_shadowed(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DragBegin: this function is equivalent to gtk_drag_begin_with_coordinates(),
// passing -1, -1 as coordinates.
//
// Deprecated: Use gtk_drag_begin_with_coordinates() instead.
//
// The function takes the following parameters:
//
//   - targets (data formats) in which the source can provide the data.
//   - actions: bitmask of the allowed drag actions for this drag.
//   - button the user clicked to start the drag.
//   - event (optional) that triggered the start of the drag, or NULL if none
//     can be obtained.
//
// The function returns the following values:
//
//   - dragContext: context for this drag.
func (widget *Widget) DragBegin(targets *TargetList, actions gdk.DragAction, button int, event *gdk.Event) *gdk.DragContext {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GtkTargetList  // out
	var _arg2 C.GdkDragAction   // out
	var _arg3 C.gint            // out
	var _arg4 *C.GdkEvent       // out
	var _cret *C.GdkDragContext // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(targets)))
	_arg2 = C.GdkDragAction(actions)
	_arg3 = C.gint(button)
	if event != nil {
		_arg4 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}

	_cret = C.gtk_drag_begin(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
	runtime.KeepAlive(button)
	runtime.KeepAlive(event)

	var _dragContext *gdk.DragContext // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_dragContext = &gdk.DragContext{
			Object: obj,
		}
	}

	return _dragContext
}

// DragBeginWithCoordinates initiates a drag on the source side. The function
// only needs to be used when the application is starting drags itself, and is
// not needed when gtk_drag_source_set() is used.
//
// The event is used to retrieve the timestamp that will be used internally
// to grab the pointer. If event is NULL, then GDK_CURRENT_TIME will be used.
// However, you should try to pass a real event in all cases, since that can be
// used to get information about the drag.
//
// Generally there are three cases when you want to start a drag by hand by
// calling this function:
//
// 1. During a Widget::button-press-event handler, if you want to start a drag
// immediately when the user presses the mouse button. Pass the event that you
// have in your Widget::button-press-event handler.
//
// 2. During a Widget::motion-notify-event handler, if you want to start a drag
// when the mouse moves past a certain threshold distance after a button-press.
// Pass the event that you have in your Widget::motion-notify-event handler.
//
// 3. During a timeout handler, if you want to start a drag after the mouse
// button is held down for some time. Try to save the last event that you
// got from the mouse, using gdk_event_copy(), and pass it to this function
// (remember to free the event with gdk_event_free() when you are done).
// If you really cannot pass a real event, pass NULL instead.
//
// The function takes the following parameters:
//
//   - targets (data formats) in which the source can provide the data.
//   - actions: bitmask of the allowed drag actions for this drag.
//   - button the user clicked to start the drag.
//   - event (optional) that triggered the start of the drag, or NULL if none
//     can be obtained.
//   - x: initial x coordinate to start dragging from, in the coordinate space
//     of widget. If -1 is passed, the coordinates are retrieved from event or
//     the current pointer position.
//   - y: initial y coordinate to start dragging from, in the coordinate space
//     of widget. If -1 is passed, the coordinates are retrieved from event or
//     the current pointer position.
//
// The function returns the following values:
//
//   - dragContext: context for this drag.
func (widget *Widget) DragBeginWithCoordinates(targets *TargetList, actions gdk.DragAction, button int, event *gdk.Event, x, y int) *gdk.DragContext {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GtkTargetList  // out
	var _arg2 C.GdkDragAction   // out
	var _arg3 C.gint            // out
	var _arg4 *C.GdkEvent       // out
	var _arg5 C.gint            // out
	var _arg6 C.gint            // out
	var _cret *C.GdkDragContext // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(targets)))
	_arg2 = C.GdkDragAction(actions)
	_arg3 = C.gint(button)
	if event != nil {
		_arg4 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))
	}
	_arg5 = C.gint(x)
	_arg6 = C.gint(y)

	_cret = C.gtk_drag_begin_with_coordinates(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
	runtime.KeepAlive(button)
	runtime.KeepAlive(event)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)

	var _dragContext *gdk.DragContext // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_dragContext = &gdk.DragContext{
			Object: obj,
		}
	}

	return _dragContext
}

// DragCheckThreshold checks to see if a mouse drag starting at (start_x,
// start_y) and ending at (current_x, current_y) has passed the GTK+ drag
// threshold, and thus should trigger the beginning of a drag-and-drop
// operation.
//
// The function takes the following parameters:
//
//   - startX: x coordinate of start of drag.
//   - startY: y coordinate of start of drag.
//   - currentX: current X coordinate.
//   - currentY: current Y coordinate.
//
// The function returns the following values:
//
//   - ok: TRUE if the drag threshold has been passed.
func (widget *Widget) DragCheckThreshold(startX, startY, currentX, currentY int) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out
	var _arg4 C.gint       // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(startX)
	_arg2 = C.gint(startY)
	_arg3 = C.gint(currentX)
	_arg4 = C.gint(currentY)

	_cret = C.gtk_drag_check_threshold(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(startX)
	runtime.KeepAlive(startY)
	runtime.KeepAlive(currentX)
	runtime.KeepAlive(currentY)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DragDestAddImageTargets: add the image targets supported by SelectionData to
// the target list of the drag destination. The targets are added with info = 0.
// If you need another value, use gtk_target_list_add_image_targets() and
// gtk_drag_dest_set_target_list().
func (widget *Widget) DragDestAddImageTargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_dest_add_image_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragDestAddTextTargets: add the text targets supported by SelectionData to
// the target list of the drag destination. The targets are added with info = 0.
// If you need another value, use gtk_target_list_add_text_targets() and
// gtk_drag_dest_set_target_list().
func (widget *Widget) DragDestAddTextTargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_dest_add_text_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragDestAddURITargets: add the URI targets supported by SelectionData to the
// target list of the drag destination. The targets are added with info = 0.
// If you need another value, use gtk_target_list_add_uri_targets() and
// gtk_drag_dest_set_target_list().
func (widget *Widget) DragDestAddURITargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_dest_add_uri_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragDestGetTargetList returns the list of targets this widget can accept from
// drag-and-drop.
//
// The function returns the following values:
//
//   - targetList (optional) or NULL if none.
func (widget *Widget) DragDestGetTargetList() *TargetList {
	var _arg0 *C.GtkWidget     // out
	var _cret *C.GtkTargetList // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_drag_dest_get_target_list(_arg0)
	runtime.KeepAlive(widget)

	var _targetList *TargetList // out

	if _cret != nil {
		_targetList = (*TargetList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.gtk_target_list_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_targetList)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_target_list_unref((*C.GtkTargetList)(intern.C))
			},
		)
	}

	return _targetList
}

// DragDestGetTrackMotion returns whether the widget has been configured to
// always emit Widget::drag-motion signals.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget always emits Widget::drag-motion events.
func (widget *Widget) DragDestGetTrackMotion() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_drag_dest_get_track_motion(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DragDestSet sets a widget as a potential drop destination, and adds default
// behaviors.
//
// The default behaviors listed in flags have an effect similar to installing
// default handlers for the widget’s drag-and-drop signals (Widget::drag-motion,
// Widget::drag-drop, ...). They all exist for convenience. When passing
// K_DEST_DEFAULT_ALL for instance it is sufficient to connect to the
// widget’s Widget::drag-data-received signal to get primitive, but consistent
// drag-and-drop support.
//
// Things become more complicated when you try to preview the dragged data,
// as described in the documentation for Widget::drag-motion. The default
// behaviors described by flags make some assumptions, that can conflict with
// your own signal handlers. For instance K_DEST_DEFAULT_DROP causes invokations
// of gdk_drag_status() in the context of Widget::drag-motion, and invokations
// of gtk_drag_finish() in Widget::drag-data-received. Especially the later is
// dramatic, when your own Widget::drag-motion handler calls gtk_drag_get_data()
// to inspect the dragged data.
//
// There’s no way to set a default action here, you can use the
// Widget::drag-motion callback for that. Here’s an example which selects the
// action to use depending on whether the control key is pressed or not:
//
//	static void
//	drag_motion (GtkWidget *widget,
//	             GdkDragContext *context,
//	             gint x,
//	             gint y,
//	             guint time)
//	{
//	  GdkModifierType mask;
//
//	  gdk_window_get_pointer (gtk_widget_get_window (widget),
//	                          NULL, NULL, &mask);
//	  if (mask & GDK_CONTROL_MASK)
//	    gdk_drag_status (context, GDK_ACTION_COPY, time);
//	  else
//	    gdk_drag_status (context, GDK_ACTION_MOVE, time);
//	}.
//
// The function takes the following parameters:
//
//   - flags: which types of default drag behavior to use.
//   - targets (optional): pointer to an array of TargetEntrys indicating
//     the drop types that this widget will accept, or NULL. Later you
//     can access the list with gtk_drag_dest_get_target_list() and
//     gtk_drag_dest_find_target().
//   - actions: bitmask of possible actions for a drop onto this widget.
func (widget *Widget) DragDestSet(flags DestDefaults, targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 C.GtkDestDefaults // out
	var _arg2 *C.GtkTargetEntry // out
	var _arg3 C.gint
	var _arg4 C.GdkDragAction // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDestDefaults(flags)
	_arg3 = (C.gint)(len(targets))
	_arg2 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg2), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg4 = C.GdkDragAction(actions)

	C.gtk_drag_dest_set(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// DragDestSetProxy sets this widget as a proxy for drops to another window.
//
// Deprecated: since version 3.22.
//
// The function takes the following parameters:
//
//   - proxyWindow: window to which to forward drag events.
//   - protocol: drag protocol which the proxy_window accepts (You can use
//     gdk_drag_get_protocol() to determine this).
//   - useCoordinates: if TRUE, send the same coordinates to the destination,
//     because it is an embedded subwindow.
func (widget *Widget) DragDestSetProxy(proxyWindow gdk.Windower, protocol gdk.DragProtocol, useCoordinates bool) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkWindow      // out
	var _arg2 C.GdkDragProtocol // out
	var _arg3 C.gboolean        // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(proxyWindow).Native()))
	_arg2 = C.GdkDragProtocol(protocol)
	if useCoordinates {
		_arg3 = C.TRUE
	}

	C.gtk_drag_dest_set_proxy(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(proxyWindow)
	runtime.KeepAlive(protocol)
	runtime.KeepAlive(useCoordinates)
}

// DragDestSetTargetList sets the target types that this widget can accept from
// drag-and-drop. The widget must first be made into a drag destination with
// gtk_drag_dest_set().
//
// The function takes the following parameters:
//
//   - targetList (optional): list of droppable targets, or NULL for none.
func (widget *Widget) DragDestSetTargetList(targetList *TargetList) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkTargetList // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if targetList != nil {
		_arg1 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(targetList)))
	}

	C.gtk_drag_dest_set_target_list(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(targetList)
}

// DragDestSetTrackMotion tells the widget to emit Widget::drag-motion
// and Widget::drag-leave events regardless of the targets and the
// GTK_DEST_DEFAULT_MOTION flag.
//
// This may be used when a widget wants to do generic actions regardless of the
// targets that the source offers.
//
// The function takes the following parameters:
//
//   - trackMotion: whether to accept all targets.
func (widget *Widget) DragDestSetTrackMotion(trackMotion bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if trackMotion {
		_arg1 = C.TRUE
	}

	C.gtk_drag_dest_set_track_motion(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(trackMotion)
}

// DragDestUnset clears information about a drop destination set with
// gtk_drag_dest_set(). The widget will no longer receive notification of drags.
func (widget *Widget) DragDestUnset() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_dest_unset(_arg0)
	runtime.KeepAlive(widget)
}

// DragHighlight highlights a widget as a currently hovered drop target. To end
// the highlight, call gtk_drag_unhighlight(). GTK+ calls this automatically if
// GTK_DEST_DEFAULT_HIGHLIGHT is set.
func (widget *Widget) DragHighlight() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_highlight(_arg0)
	runtime.KeepAlive(widget)
}

// DragSourceAddImageTargets: add the writable image targets
// supported by SelectionData to the target list of the drag source.
// The targets are added with info = 0. If you need another value, use
// gtk_target_list_add_image_targets() and gtk_drag_source_set_target_list().
func (widget *Widget) DragSourceAddImageTargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_source_add_image_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragSourceAddTextTargets: add the text targets supported by SelectionData
// to the target list of the drag source. The targets are added with info = 0.
// If you need another value, use gtk_target_list_add_text_targets() and
// gtk_drag_source_set_target_list().
func (widget *Widget) DragSourceAddTextTargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_source_add_text_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragSourceAddURITargets: add the URI targets supported by SelectionData to
// the target list of the drag source. The targets are added with info = 0.
// If you need another value, use gtk_target_list_add_uri_targets() and
// gtk_drag_source_set_target_list().
func (widget *Widget) DragSourceAddURITargets() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_source_add_uri_targets(_arg0)
	runtime.KeepAlive(widget)
}

// DragSourceGetTargetList gets the list of targets this widget can provide for
// drag-and-drop.
//
// The function returns the following values:
//
//   - targetList (optional) or NULL if none.
func (widget *Widget) DragSourceGetTargetList() *TargetList {
	var _arg0 *C.GtkWidget     // out
	var _cret *C.GtkTargetList // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_drag_source_get_target_list(_arg0)
	runtime.KeepAlive(widget)

	var _targetList *TargetList // out

	if _cret != nil {
		_targetList = (*TargetList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.gtk_target_list_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_targetList)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_target_list_unref((*C.GtkTargetList)(intern.C))
			},
		)
	}

	return _targetList
}

// DragSourceSet sets up a widget so that GTK+ will start a drag operation when
// the user clicks and drags on the widget. The widget must have a window.
//
// The function takes the following parameters:
//
//   - startButtonMask: bitmask of buttons that can start the drag.
//   - targets (optional): table of targets that the drag will support, may be
//     NULL.
//   - actions: bitmask of possible actions for a drag from this widget.
func (widget *Widget) DragSourceSet(startButtonMask gdk.ModifierType, targets []TargetEntry, actions gdk.DragAction) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 C.GdkModifierType // out
	var _arg2 *C.GtkTargetEntry // out
	var _arg3 C.gint
	var _arg4 C.GdkDragAction // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GdkModifierType(startButtonMask)
	_arg3 = (C.gint)(len(targets))
	_arg2 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg2))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg2), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}
	_arg4 = C.GdkDragAction(actions)

	C.gtk_drag_source_set(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(startButtonMask)
	runtime.KeepAlive(targets)
	runtime.KeepAlive(actions)
}

// DragSourceSetIconGIcon sets the icon that will be used for drags from a
// particular source to icon. See the docs for IconTheme for more details.
//
// The function takes the following parameters:
//
//   - icon: #GIcon.
func (widget *Widget) DragSourceSetIconGIcon(icon gio.Iconner) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GIcon     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GIcon)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	C.gtk_drag_source_set_icon_gicon(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(icon)
}

// DragSourceSetIconName sets the icon that will be used for drags from a
// particular source to a themed icon. See the docs for IconTheme for more
// details.
//
// The function takes the following parameters:
//
//   - iconName: name of icon to use.
func (widget *Widget) DragSourceSetIconName(iconName string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_drag_source_set_icon_name(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(iconName)
}

// DragSourceSetIconPixbuf sets the icon that will be used for drags from a
// particular widget from a Pixbuf. GTK+ retains a reference for pixbuf and will
// release it when it is no longer needed.
//
// The function takes the following parameters:
//
//   - pixbuf for the drag icon.
func (widget *Widget) DragSourceSetIconPixbuf(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkPixbuf // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C.gtk_drag_source_set_icon_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(pixbuf)
}

// DragSourceSetIconStock sets the icon that will be used for drags from a
// particular source to a stock icon.
//
// Deprecated: Use gtk_drag_source_set_icon_name() instead.
//
// The function takes the following parameters:
//
//   - stockId: ID of the stock icon to use.
func (widget *Widget) DragSourceSetIconStock(stockId string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_drag_source_set_icon_stock(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(stockId)
}

// DragSourceSetTargetList changes the target types that this widget offers
// for drag-and-drop. The widget must first be made into a drag source with
// gtk_drag_source_set().
//
// The function takes the following parameters:
//
//   - targetList (optional): list of draggable targets, or NULL for none.
func (widget *Widget) DragSourceSetTargetList(targetList *TargetList) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkTargetList // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if targetList != nil {
		_arg1 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(targetList)))
	}

	C.gtk_drag_source_set_target_list(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(targetList)
}

// DragSourceUnset undoes the effects of gtk_drag_source_set().
func (widget *Widget) DragSourceUnset() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_source_unset(_arg0)
	runtime.KeepAlive(widget)
}

// DragUnhighlight removes a highlight set by gtk_drag_highlight() from a
// widget.
func (widget *Widget) DragUnhighlight() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_drag_unhighlight(_arg0)
	runtime.KeepAlive(widget)
}

// Draw draws widget to cr. The top left corner of the widget will be drawn to
// the currently set origin point of cr.
//
// You should pass a cairo context as cr argument that is in an original
// state. Otherwise the resulting drawing is undefined. For example
// changing the operator using cairo_set_operator() or the line width
// using cairo_set_line_width() might have unwanted side effects. You may
// however change the context’s transform matrix - like with cairo_scale(),
// cairo_translate() or cairo_set_matrix() and clip region with cairo_clip()
// prior to calling this function. Also, it is fine to modify the context with
// cairo_save() and cairo_push_group() prior to calling this function.
//
// Note that special-purpose widgets may contain special code for rendering to
// the screen and might appear differently on screen and when rendered using
// gtk_widget_draw().
//
// The function takes the following parameters:
//
//   - cr: cairo context to draw to.
func (widget *Widget) Draw(cr *cairo.Context) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.cairo_t   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	C.gtk_widget_draw(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cr)
}

// EnsureStyle ensures that widget has a style (widget->style).
//
// Not a very useful function; most of the time, if you want the style,
// the widget is realized, and realized widgets are guaranteed to have a style
// already.
//
// Deprecated: Use StyleContext instead.
func (widget *Widget) EnsureStyle() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_ensure_style(_arg0)
	runtime.KeepAlive(widget)
}

// ErrorBell notifies the user about an input-related error on this widget.
// If the Settings:gtk-error-bell setting is TRUE, it calls gdk_window_beep(),
// otherwise it does nothing.
//
// Note that the effect of gdk_window_beep() can be configured in many ways,
// depending on the windowing backend and the desktop environment or window
// manager that is used.
func (widget *Widget) ErrorBell() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_error_bell(_arg0)
	runtime.KeepAlive(widget)
}

// Event: rarely-used function. This function is used to emit the event signals
// on a widget (those signals should never be emitted without using this
// function to do so). If you want to synthesize an event though, don’t use
// this function; instead, use gtk_main_do_event() so the event will behave
// as if it were in the event queue. Don’t synthesize expose events; instead,
// use gdk_window_invalidate_rect() to invalidate a region of the window.
//
// The function takes the following parameters:
//
//   - event: Event.
//
// The function returns the following values:
//
//   - ok: return from the event signal emission (TRUE if the event was
//     handled).
func (widget *Widget) Event(event *gdk.Event) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkEvent  // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_widget_event(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FreezeChildNotify stops emission of Widget::child-notify signals on widget.
// The signals are queued until gtk_widget_thaw_child_notify() is called on
// widget.
//
// This is the analogue of g_object_freeze_notify() for child properties.
func (widget *Widget) FreezeChildNotify() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_freeze_child_notify(_arg0)
	runtime.KeepAlive(widget)
}

// Accessible returns the accessible object that describes the widget to an
// assistive technology.
//
// If accessibility support is not available, this Object instance may be a
// no-op. Likewise, if no class-specific Object implementation is available for
// the widget instance in question, it will inherit an Object implementation
// from the first ancestor class for which such an implementation is defined.
//
// The documentation of the ATK (http://developer.gnome.org/atk/stable/) library
// contains more information about accessible objects and their uses.
//
// The function returns the following values:
//
//   - object associated with widget.
func (widget *Widget) Accessible() *atk.AtkObject {
	var _arg0 *C.GtkWidget // out
	var _cret *C.AtkObject // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_accessible(_arg0)
	runtime.KeepAlive(widget)

	var _object *atk.AtkObject // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_object = &atk.AtkObject{
			Object: obj,
		}
	}

	return _object
}

// ActionGroup retrieves the Group that was registered using prefix.
// The resulting Group may have been registered to widget or any Widget in its
// ancestry.
//
// If no action group was found matching prefix, then NULL is returned.
//
// The function takes the following parameters:
//
//   - prefix: “prefix” of the action group.
//
// The function returns the following values:
//
//   - actionGroup (optional) or NULL.
func (widget *Widget) ActionGroup(prefix string) *gio.ActionGroup {
	var _arg0 *C.GtkWidget    // out
	var _arg1 *C.gchar        // out
	var _cret *C.GActionGroup // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(prefix)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_widget_get_action_group(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(prefix)

	var _actionGroup *gio.ActionGroup // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_actionGroup = &gio.ActionGroup{
				Object: obj,
			}
		}
	}

	return _actionGroup
}

// AllocatedBaseline returns the baseline that has currently been allocated
// to widget. This function is intended to be used when implementing handlers
// for the Widget::draw function, and when allocating child widgets in
// Widget::size_allocate.
//
// The function returns the following values:
//
//   - gint: baseline of the widget, or -1 if none.
func (widget *Widget) AllocatedBaseline() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.int        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_allocated_baseline(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// AllocatedHeight returns the height that has currently been allocated to
// widget. This function is intended to be used when implementing handlers for
// the Widget::draw function.
//
// The function returns the following values:
//
//   - gint: height of the widget.
func (widget *Widget) AllocatedHeight() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.int        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_allocated_height(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// AllocatedSize retrieves the widget’s allocated size.
//
// This function returns the last values passed to
// gtk_widget_size_allocate_with_baseline(). The value differs from the
// size returned in gtk_widget_get_allocation() in that functions like
// gtk_widget_set_halign() can adjust the allocation, but not the value returned
// by this function.
//
// If a widget is not visible, its allocated size is 0.
//
// The function returns the following values:
//
//   - allocation: pointer to a Allocation to copy to.
//   - baseline (optional): pointer to an integer to copy to.
func (widget *Widget) AllocatedSize() (*Allocation, int) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkAllocation // in
	var _arg2 C.int           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_allocated_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _allocation *Allocation // out
	var _baseline int           // out

	_allocation = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	type _ = *Allocation
	type _ = *gdk.Rectangle
	_baseline = int(_arg2)

	return _allocation, _baseline
}

// AllocatedWidth returns the width that has currently been allocated to widget.
// This function is intended to be used when implementing handlers for the
// Widget::draw function.
//
// The function returns the following values:
//
//   - gint: width of the widget.
func (widget *Widget) AllocatedWidth() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.int        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_allocated_width(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Allocation retrieves the widget’s allocation.
//
// Note, when implementing a Container: a widget’s allocation will be its
// “adjusted” allocation, that is, the widget’s parent container typically calls
// gtk_widget_size_allocate() with an allocation, and that allocation is then
// adjusted (to handle margin and alignment for example) before assignment to
// the widget. gtk_widget_get_allocation() returns the adjusted allocation that
// was actually assigned to the widget. The adjusted allocation is guaranteed
// to be completely contained within the gtk_widget_size_allocate() allocation,
// however. So a Container is guaranteed that its children stay inside the
// assigned bounds, but not that they have exactly the bounds the container
// assigned. There is no way to get the original allocation assigned by
// gtk_widget_size_allocate(), since it isn’t stored; if a container
// implementation needs that information it will have to track it itself.
//
// The function returns the following values:
//
//   - allocation: pointer to a Allocation to copy to.
func (widget *Widget) Allocation() *Allocation {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkAllocation // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_allocation(_arg0, &_arg1)
	runtime.KeepAlive(widget)

	var _allocation *Allocation // out

	_allocation = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	return _allocation
}

// Ancestor gets the first ancestor of widget with type widget_type.
// For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first
// Box that’s an ancestor of widget. No reference will be added to the returned
// widget; it should not be unreferenced. See note about checking for a toplevel
// Window in the docs for gtk_widget_get_toplevel().
//
// Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor()
// considers widget to be an ancestor of itself.
//
// The function takes the following parameters:
//
//   - widgetType: ancestor type.
//
// The function returns the following values:
//
//   - ret (optional): ancestor widget, or NULL if not found.
func (widget *Widget) Ancestor(widgetType coreglib.Type) Widgetter {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.GType      // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GType(widgetType)

	_cret = C.gtk_widget_get_ancestor(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(widgetType)

	var _ret Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_ret = rv
		}
	}

	return _ret
}

// AppPaintable determines whether the application intends to draw on the widget
// in an Widget::draw handler.
//
// See gtk_widget_set_app_paintable().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is app paintable.
func (widget *Widget) AppPaintable() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_app_paintable(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CanDefault determines whether widget can be a default widget. See
// gtk_widget_set_can_default().
//
// The function returns the following values:
//
//   - ok: TRUE if widget can be a default widget, FALSE otherwise.
func (widget *Widget) CanDefault() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_can_default(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CanFocus determines whether widget can own the input focus. See
// gtk_widget_set_can_focus().
//
// The function returns the following values:
//
//   - ok: TRUE if widget can own the input focus, FALSE otherwise.
func (widget *Widget) CanFocus() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_can_focus(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ChildRequisition: this function is only for use in widget implementations.
// Obtains widget->requisition, unless someone has forced a particular geometry
// on the widget (e.g. with gtk_widget_set_size_request()), in which case it
// returns that geometry instead of the widget's requisition.
//
// This function differs from gtk_widget_size_request() in that it
// retrieves the last size request value from widget->requisition, while
// gtk_widget_size_request() actually calls the "size_request" method on widget
// to compute the size request and fill in widget->requisition, and only then
// returns widget->requisition.
//
// Because this function does not call the “size_request” method, it can only
// be used when you know that widget->requisition is up-to-date, that is,
// gtk_widget_size_request() has been called since the last time a resize was
// queued. In general, only container implementations have this information;
// applications should use gtk_widget_size_request().
//
// Deprecated: Use gtk_widget_get_preferred_size() instead.
//
// The function returns the following values:
//
//   - requisition to be filled in.
func (widget *Widget) ChildRequisition() *Requisition {
	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkRequisition // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_child_requisition(_arg0, &_arg1)
	runtime.KeepAlive(widget)

	var _requisition *Requisition // out

	_requisition = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _requisition
}

// ChildVisible gets the value set with gtk_widget_set_child_visible(). If you
// feel a need to use this function, your code probably needs reorganization.
//
// This function is only useful for container implementations and never should
// be called by an application.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is mapped with the parent.
func (widget *Widget) ChildVisible() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_child_visible(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Clip retrieves the widget’s clip area.
//
// The clip area is the area in which all of widget's drawing will happen.
// Other toolkits call it the bounding box.
//
// Historically, in GTK+ the clip area has been equal to the allocation
// retrieved via gtk_widget_get_allocation().
//
// The function returns the following values:
//
//   - clip: pointer to a Allocation to copy to.
func (widget *Widget) Clip() *Allocation {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkAllocation // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_clip(_arg0, &_arg1)
	runtime.KeepAlive(widget)

	var _clip *Allocation // out

	_clip = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	return _clip
}

// CompositeName obtains the composite name of a widget.
//
// Deprecated: Use gtk_widget_class_set_template(), or don’t use this API at
// all.
//
// The function returns the following values:
//
//   - utf8: composite name of widget, or NULL if widget is not a composite
//     child. The string should be freed when it is no longer needed.
func (widget *Widget) CompositeName() string {
	var _arg0 *C.GtkWidget // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_composite_name(_arg0)
	runtime.KeepAlive(widget)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// DeviceEnabled returns whether device can interact with widget and its
// children. See gtk_widget_set_device_enabled().
//
// The function takes the following parameters:
//
//   - device: Device.
//
// The function returns the following values:
//
//   - ok: TRUE is device is enabled for widget.
func (widget *Widget) DeviceEnabled(device gdk.Devicer) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkDevice // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	_cret = C.gtk_widget_get_device_enabled(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DeviceEvents returns the events mask for the widget corresponding to an
// specific device. These are the events that the widget will receive when
// device operates on it.
//
// The function takes the following parameters:
//
//   - device: Device.
//
// The function returns the following values:
//
//   - eventMask: device event mask for widget.
func (widget *Widget) DeviceEvents(device gdk.Devicer) gdk.EventMask {
	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkDevice   // out
	var _cret C.GdkEventMask // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	_cret = C.gtk_widget_get_device_events(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)

	var _eventMask gdk.EventMask // out

	_eventMask = gdk.EventMask(_cret)

	return _eventMask
}

// Direction gets the reading direction for a particular widget. See
// gtk_widget_set_direction().
//
// The function returns the following values:
//
//   - textDirection: reading direction for the widget.
func (widget *Widget) Direction() TextDirection {
	var _arg0 *C.GtkWidget       // out
	var _cret C.GtkTextDirection // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_direction(_arg0)
	runtime.KeepAlive(widget)

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// Display: get the Display for the toplevel window associated with this widget.
// This function can only be called after the widget has been added to a widget
// hierarchy with a Window at the top.
//
// In general, you should only create display specific resources when a widget
// has been realized, and you should free those resources when the widget is
// unrealized.
//
// The function returns the following values:
//
//   - display for the toplevel for this widget.
func (widget *Widget) Display() *gdk.Display {
	var _arg0 *C.GtkWidget  // out
	var _cret *C.GdkDisplay // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_display(_arg0)
	runtime.KeepAlive(widget)

	var _display *gdk.Display // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_display = &gdk.Display{
			Object: obj,
		}
	}

	return _display
}

// DoubleBuffered determines whether the widget is double buffered.
//
// See gtk_widget_set_double_buffered().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is double buffered.
func (widget *Widget) DoubleBuffered() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_double_buffered(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Events returns the event mask (see EventMask) for the widget. These are the
// events that the widget will receive.
//
// Note: Internally, the widget event mask will be the logical OR of the
// event mask set through gtk_widget_set_events() or gtk_widget_add_events(),
// and the event mask necessary to cater for every EventController created for
// the widget.
//
// The function returns the following values:
//
//   - gint: event mask for widget.
func (widget *Widget) Events() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_events(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// FocusOnClick returns whether the widget should grab focus when it is clicked
// with the mouse. See gtk_widget_set_focus_on_click().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget should grab focus when it is clicked with the
//     mouse.
func (widget *Widget) FocusOnClick() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_focus_on_click(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FontMap gets the font map that has been set with gtk_widget_set_font_map().
//
// The function returns the following values:
//
//   - fontMap (optional) or NULL.
func (widget *Widget) FontMap() pango.FontMapper {
	var _arg0 *C.GtkWidget    // out
	var _cret *C.PangoFontMap // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_font_map(_arg0)
	runtime.KeepAlive(widget)

	var _fontMap pango.FontMapper // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(pango.FontMapper)
				return ok
			})
			rv, ok := casted.(pango.FontMapper)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching pango.FontMapper")
			}
			_fontMap = rv
		}
	}

	return _fontMap
}

// FontOptions returns the #cairo_font_options_t used for Pango rendering.
// When not set, the defaults font options for the Screen will be used.
//
// The function returns the following values:
//
//   - fontOptions (optional) or NULL if not set.
func (widget *Widget) FontOptions() *cairo.FontOptions {
	var _arg0 *C.GtkWidget            // out
	var _cret *C.cairo_font_options_t // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_font_options(_arg0)
	runtime.KeepAlive(widget)

	var _fontOptions *cairo.FontOptions // out

	if _cret != nil {
		_fontOptions = (*cairo.FontOptions)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	}

	return _fontOptions
}

// FrameClock obtains the frame clock for a widget. The frame clock is a global
// “ticker” that can be used to drive animations and repaints. The most common
// reason to get the frame clock is to call gdk_frame_clock_get_frame_time(),
// in order to get a time to use for animating. For example you
// might record the start of the animation with an initial value from
// gdk_frame_clock_get_frame_time(), and then update the animation by calling
// gdk_frame_clock_get_frame_time() again during each repaint.
//
// gdk_frame_clock_request_phase() will result in a new frame on the clock,
// but won’t necessarily repaint any widgets. To repaint a widget, you have to
// use gtk_widget_queue_draw() which invalidates the widget (thus scheduling it
// to receive a draw on the next frame). gtk_widget_queue_draw() will also end
// up requesting a frame on the appropriate frame clock.
//
// A widget’s frame clock will not change while the widget is mapped.
// Reparenting a widget (which implies a temporary unmap) can change the
// widget’s frame clock.
//
// Unrealized widgets do not have a frame clock.
//
// The function returns the following values:
//
//   - frameClock (optional) NULL if widget is unrealized.
func (widget *Widget) FrameClock() gdk.FrameClocker {
	var _arg0 *C.GtkWidget     // out
	var _cret *C.GdkFrameClock // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_frame_clock(_arg0)
	runtime.KeepAlive(widget)

	var _frameClock gdk.FrameClocker // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.FrameClocker)
				return ok
			})
			rv, ok := casted.(gdk.FrameClocker)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.FrameClocker")
			}
			_frameClock = rv
		}
	}

	return _frameClock
}

// HAlign gets the value of the Widget:halign property.
//
// For backwards compatibility reasons this method will never return
// GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL.
// Baselines are not supported for horizontal alignment.
//
// The function returns the following values:
//
//   - align: horizontal alignment of widget.
func (widget *Widget) HAlign() Align {
	var _arg0 *C.GtkWidget // out
	var _cret C.GtkAlign   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_halign(_arg0)
	runtime.KeepAlive(widget)

	var _align Align // out

	_align = Align(_cret)

	return _align
}

// HasTooltip returns the current value of the has-tooltip property. See
// Widget:has-tooltip for more information.
//
// The function returns the following values:
//
//   - ok: current value of has-tooltip on widget.
func (widget *Widget) HasTooltip() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_has_tooltip(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasWindow determines whether widget has a Window of its own. See
// gtk_widget_set_has_window().
//
// The function returns the following values:
//
//   - ok: TRUE if widget has a window, FALSE otherwise.
func (widget *Widget) HasWindow() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_has_window(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HExpand gets whether the widget would like any available extra horizontal
// space. When a user resizes a Window, widgets with expand=TRUE generally
// receive the extra space. For example, a list or scrollable area or document
// in your window would often be set to expand.
//
// Containers should use gtk_widget_compute_expand() rather than this function,
// to see whether a widget, or any of its children, has the expand flag set.
// If any child of a widget wants to expand, the parent may ask to expand also.
//
// This function only looks at the widget’s own hexpand flag, rather than
// computing whether the entire widget tree rooted at this widget wants to
// expand.
//
// The function returns the following values:
//
//   - ok: whether hexpand flag is set.
func (widget *Widget) HExpand() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_hexpand(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HExpandSet gets whether gtk_widget_set_hexpand() has been used to explicitly
// set the expand flag on this widget.
//
// If hexpand is set, then it overrides any computed expand value based on child
// widgets. If hexpand is not set, then the expand value depends on whether any
// children of the widget would like to expand.
//
// There are few reasons to use this function, but it’s here for completeness
// and consistency.
//
// The function returns the following values:
//
//   - ok: whether hexpand has been explicitly set.
func (widget *Widget) HExpandSet() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_hexpand_set(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Mapped: whether the widget is mapped.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is mapped, FALSE otherwise.
func (widget *Widget) Mapped() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_mapped(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// MarginBottom gets the value of the Widget:margin-bottom property.
//
// The function returns the following values:
//
//   - gint: bottom margin of widget.
func (widget *Widget) MarginBottom() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_bottom(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarginEnd gets the value of the Widget:margin-end property.
//
// The function returns the following values:
//
//   - gint: end margin of widget.
func (widget *Widget) MarginEnd() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_end(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarginLeft gets the value of the Widget:margin-left property.
//
// Deprecated: Use gtk_widget_get_margin_start() instead.
//
// The function returns the following values:
//
//   - gint: left margin of widget.
func (widget *Widget) MarginLeft() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_left(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarginRight gets the value of the Widget:margin-right property.
//
// Deprecated: Use gtk_widget_get_margin_end() instead.
//
// The function returns the following values:
//
//   - gint: right margin of widget.
func (widget *Widget) MarginRight() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_right(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarginStart gets the value of the Widget:margin-start property.
//
// The function returns the following values:
//
//   - gint: start margin of widget.
func (widget *Widget) MarginStart() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_start(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// MarginTop gets the value of the Widget:margin-top property.
//
// The function returns the following values:
//
//   - gint: top margin of widget.
func (widget *Widget) MarginTop() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_margin_top(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ModifierMask returns the modifier mask the widget’s windowing system backend
// uses for a particular purpose.
//
// See gdk_keymap_get_modifier_mask().
//
// The function takes the following parameters:
//
//   - intent: use case for the modifier mask.
//
// The function returns the following values:
//
//   - modifierType: modifier mask used for intent.
func (widget *Widget) ModifierMask(intent gdk.ModifierIntent) gdk.ModifierType {
	var _arg0 *C.GtkWidget        // out
	var _arg1 C.GdkModifierIntent // out
	var _cret C.GdkModifierType   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GdkModifierIntent(intent)

	_cret = C.gtk_widget_get_modifier_mask(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(intent)

	var _modifierType gdk.ModifierType // out

	_modifierType = gdk.ModifierType(_cret)

	return _modifierType
}

// ModifierStyle returns the current modifier style for the widget.
// (As set by gtk_widget_modify_style().) If no style has previously set,
// a new RcStyle will be created with all values unset, and set as the modifier
// style for the widget. If you make changes to this rc style, you must call
// gtk_widget_modify_style(), passing in the returned rc style, to make sure
// that your changes take effect.
//
// Caution: passing the style back to gtk_widget_modify_style() will normally
// end up destroying it, because gtk_widget_modify_style() copies the passed-in
// style and sets the copy as the new modifier style, thus dropping any
// reference to the old modifier style. Add a reference to the modifier style if
// you want to keep it alive.
//
// Deprecated: Use StyleContext with a custom StyleProvider instead.
//
// The function returns the following values:
//
//   - rcStyle: modifier style for the widget. This rc style is owned by the
//     widget. If you want to keep a pointer to value this around, you must add
//     a refcount using g_object_ref().
func (widget *Widget) ModifierStyle() *RCStyle {
	var _arg0 *C.GtkWidget  // out
	var _cret *C.GtkRcStyle // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_modifier_style(_arg0)
	runtime.KeepAlive(widget)

	var _rcStyle *RCStyle // out

	_rcStyle = wrapRCStyle(coreglib.Take(unsafe.Pointer(_cret)))

	return _rcStyle
}

// Name retrieves the name of a widget. See gtk_widget_set_name() for the
// significance of widget names.
//
// The function returns the following values:
//
//   - utf8: name of the widget. This string is owned by GTK+ and should not be
//     modified or freed.
func (widget *Widget) Name() string {
	var _arg0 *C.GtkWidget // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_name(_arg0)
	runtime.KeepAlive(widget)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// NoShowAll returns the current value of the Widget:no-show-all property, which
// determines whether calls to gtk_widget_show_all() will affect this widget.
//
// The function returns the following values:
//
//   - ok: current value of the “no-show-all” property.
func (widget *Widget) NoShowAll() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_no_show_all(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Opacity fetches the requested opacity for this widget. See
// gtk_widget_set_opacity().
//
// The function returns the following values:
//
//   - gdouble: requested opacity for this widget.
func (widget *Widget) Opacity() float64 {
	var _arg0 *C.GtkWidget // out
	var _cret C.double     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_opacity(_arg0)
	runtime.KeepAlive(widget)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// PangoContext gets a Context with the appropriate font map, font description,
// and base direction for this widget. Unlike the context returned by
// gtk_widget_create_pango_context(), this context is owned by the widget (it
// can be used until the screen for the widget changes or the widget is removed
// from its toplevel), and will be updated to match any changes to the widget’s
// attributes. This can be tracked by using the Widget::screen-changed signal on
// the widget.
//
// The function returns the following values:
//
//   - context for the widget.
func (widget *Widget) PangoContext() *pango.Context {
	var _arg0 *C.GtkWidget    // out
	var _cret *C.PangoContext // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_pango_context(_arg0)
	runtime.KeepAlive(widget)

	var _context *pango.Context // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_context = &pango.Context{
			Object: obj,
		}
	}

	return _context
}

// Parent returns the parent container of widget.
//
// The function returns the following values:
//
//   - ret (optional): parent container of widget, or NULL.
func (widget *Widget) Parent() Widgetter {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_parent(_arg0)
	runtime.KeepAlive(widget)

	var _ret Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_ret = rv
		}
	}

	return _ret
}

// ParentWindow gets widget’s parent window, or NULL if it does not have one.
//
// The function returns the following values:
//
//   - window (optional): parent window of widget, or NULL if it does not have a
//     parent window.
func (widget *Widget) ParentWindow() gdk.Windower {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_parent_window(_arg0)
	runtime.KeepAlive(widget)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

// GetPath returns the WidgetPath representing widget, if the widget is not
// connected to a toplevel widget, a partial path will be created.
//
// The function returns the following values:
//
//   - widgetPath representing widget.
func (widget *Widget) GetPath() *WidgetPath {
	var _arg0 *C.GtkWidget     // out
	var _cret *C.GtkWidgetPath // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_path(_arg0)
	runtime.KeepAlive(widget)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_widget_path_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// Pointer obtains the location of the mouse pointer in widget coordinates.
// Widget coordinates are a bit odd; for historical reasons, they are
// defined as widget->window coordinates for widgets that return TRUE for
// gtk_widget_get_has_window(); and are relative to widget->allocation.x,
// widget->allocation.y otherwise.
//
// Deprecated: Use gdk_window_get_device_position() instead.
//
// The function returns the following values:
//
//   - x (optional): return location for the X coordinate, or NULL.
//   - y (optional): return location for the Y coordinate, or NULL.
func (widget *Widget) Pointer() (x, y int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_pointer(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _x int // out
	var _y int // out

	_x = int(_arg1)
	_y = int(_arg2)

	return _x, _y
}

// PreferredHeight retrieves a widget’s initial minimum and natural height.
//
// This call is specific to width-for-height requests.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (widget *Widget) PreferredHeight() (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_preferred_height(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg1)
	_naturalHeight = int(_arg2)

	return _minimumHeight, _naturalHeight
}

// PreferredHeightAndBaselineForWidth retrieves a widget’s minimum and natural
// height and the corresponding baselines if it would be given the specified
// width, or the default height if width is -1. The baselines may be -1 which
// means that no baseline is requested for this widget.
//
// The returned request will be modified by
// the GtkWidgetClass::adjust_size_request and
// GtkWidgetClass::adjust_baseline_request virtual methods and by any SizeGroups
// that have been applied. That is, the returned request is the one that should
// be used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - width which is available for allocation, or -1 if none.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum height,
//     or NULL.
//   - naturalHeight (optional): location for storing the natural height,
//     or NULL.
//   - minimumBaseline (optional): location for storing the baseline for the
//     minimum height, or NULL.
//   - naturalBaseline (optional): location for storing the baseline for the
//     natural height, or NULL.
func (widget *Widget) PreferredHeightAndBaselineForWidth(width int) (minimumHeight, naturalHeight, minimumBaseline, naturalBaseline int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in
	var _arg4 C.gint       // in
	var _arg5 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(width)

	C.gtk_widget_get_preferred_height_and_baseline_for_width(_arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int   // out
	var _naturalHeight int   // out
	var _minimumBaseline int // out
	var _naturalBaseline int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)
	_minimumBaseline = int(_arg4)
	_naturalBaseline = int(_arg5)

	return _minimumHeight, _naturalHeight, _minimumBaseline, _naturalBaseline
}

// PreferredHeightForWidth retrieves a widget’s minimum and natural height if it
// would be given the specified width.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - width which is available for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum height,
//     or NULL.
//   - naturalHeight (optional): location for storing the natural height,
//     or NULL.
func (widget *Widget) PreferredHeightForWidth(width int) (minimumHeight, naturalHeight int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(width)

	C.gtk_widget_get_preferred_height_for_width(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)

	return _minimumHeight, _naturalHeight
}

// PreferredSize retrieves the minimum and natural size of a widget, taking into
// account the widget’s preference for height-for-width management.
//
// This is used to retrieve a suitable size by container widgets which do not
// impose any restrictions on the child placement. It can be used to deduce
// toplevel window and menu sizes as well as child widgets in free-form
// containers such as GtkLayout.
//
// Handle with care. Note that the natural height of a height-for-width widget
// will generally be a smaller size than the minimum height, since the required
// height for the natural width is generally smaller than the required height
// for the minimum width.
//
// Use gtk_widget_get_preferred_height_and_baseline_for_width() if you want to
// support baseline alignment.
//
// The function returns the following values:
//
//   - minimumSize (optional): location for storing the minimum size, or NULL.
//   - naturalSize (optional): location for storing the natural size, or NULL.
func (widget *Widget) PreferredSize() (minimumSize, naturalSize *Requisition) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkRequisition // in
	var _arg2 C.GtkRequisition // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_preferred_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _minimumSize *Requisition // out
	var _naturalSize *Requisition // out

	_minimumSize = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	_naturalSize = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))

	return _minimumSize, _naturalSize
}

// PreferredWidth retrieves a widget’s initial minimum and natural width.
//
// This call is specific to height-for-width requests.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (widget *Widget) PreferredWidth() (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_preferred_width(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg1)
	_naturalWidth = int(_arg2)

	return _minimumWidth, _naturalWidth
}

// PreferredWidthForHeight retrieves a widget’s minimum and natural width if it
// would be given the specified height.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - height which is available for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location for storing the minimum width, or NULL.
//   - naturalWidth (optional): location for storing the natural width, or NULL.
func (widget *Widget) PreferredWidthForHeight(height int) (minimumWidth, naturalWidth int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(height)

	C.gtk_widget_get_preferred_width_for_height(_arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg2)
	_naturalWidth = int(_arg3)

	return _minimumWidth, _naturalWidth
}

// Realized determines whether widget is realized.
//
// The function returns the following values:
//
//   - ok: TRUE if widget is realized, FALSE otherwise.
func (widget *Widget) Realized() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_realized(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ReceivesDefault determines whether widget is always treated as the default
// widget within its toplevel when it has the focus, even if another widget is
// the default.
//
// See gtk_widget_set_receives_default().
//
// The function returns the following values:
//
//   - ok: TRUE if widget acts as the default widget when focused, FALSE
//     otherwise.
func (widget *Widget) ReceivesDefault() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_receives_default(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RequestMode gets whether the widget prefers a height-for-width layout or a
// width-for-height layout.
//
// Bin widgets generally propagate the preference of their child, container
// widgets need to request something either in context of their children or in
// context of their allocation capabilities.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by widget.
func (widget *Widget) RequestMode() SizeRequestMode {
	var _arg0 *C.GtkWidget         // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_request_mode(_arg0)
	runtime.KeepAlive(widget)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// Requisition retrieves the widget’s requisition.
//
// This function should only be used by widget implementations in order to
// figure whether the widget’s requisition has actually changed after some
// internal state change (so that they can call gtk_widget_queue_resize()
// instead of gtk_widget_queue_draw()).
//
// Normally, gtk_widget_size_request() should be used.
//
// Deprecated: The Requisition cache on the widget was removed, If you need to
// cache sizes across requests and allocations, add an explicit cache to the
// widget in question instead.
//
// The function returns the following values:
//
//   - requisition: pointer to a Requisition to copy to.
func (widget *Widget) Requisition() *Requisition {
	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkRequisition // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_requisition(_arg0, &_arg1)
	runtime.KeepAlive(widget)

	var _requisition *Requisition // out

	_requisition = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _requisition
}

// RootWindow: get the root window where this widget is located. This function
// can only be called after the widget has been added to a widget hierarchy with
// Window at the top.
//
// The root window is useful for such purposes as creating a popup Window
// associated with the window. In general, you should only create display
// specific resources when a widget has been realized, and you should free those
// resources when the widget is unrealized.
//
// Deprecated: Use gdk_screen_get_root_window() instead.
//
// The function returns the following values:
//
//   - window root window for the toplevel for this widget.
func (widget *Widget) RootWindow() gdk.Windower {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_root_window(_arg0)
	runtime.KeepAlive(widget)

	var _window gdk.Windower // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gdk.Windower is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(gdk.Windower)
			return ok
		})
		rv, ok := casted.(gdk.Windower)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
		}
		_window = rv
	}

	return _window
}

// ScaleFactor retrieves the internal scale factor that maps from window
// coordinates to the actual device pixels. On traditional systems this is 1,
// on high density outputs, it can be a higher value (typically 2).
//
// See gdk_window_get_scale_factor().
//
// The function returns the following values:
//
//   - gint: scale factor for widget.
func (widget *Widget) ScaleFactor() int {
	var _arg0 *C.GtkWidget // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_scale_factor(_arg0)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Screen: get the Screen from the toplevel window associated with this widget.
// This function can only be called after the widget has been added to a widget
// hierarchy with a Window at the top.
//
// In general, you should only create screen specific resources when a widget
// has been realized, and you should free those resources when the widget is
// unrealized.
//
// The function returns the following values:
//
//   - screen for the toplevel for this widget.
func (widget *Widget) Screen() *gdk.Screen {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GdkScreen // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_screen(_arg0)
	runtime.KeepAlive(widget)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// Sensitive returns the widget’s sensitivity (in the sense of returning the
// value that has been set using gtk_widget_set_sensitive()).
//
// The effective sensitivity of a widget is however determined by both its own
// and its parent widget’s sensitivity. See gtk_widget_is_sensitive().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is sensitive.
func (widget *Widget) Sensitive() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_sensitive(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Settings gets the settings object holding the settings used for this widget.
//
// Note that this function can only be called when the Widget is attached to a
// toplevel, since the settings object is specific to a particular Screen.
//
// The function returns the following values:
//
//   - settings: relevant Settings object.
func (widget *Widget) Settings() *Settings {
	var _arg0 *C.GtkWidget   // out
	var _cret *C.GtkSettings // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_settings(_arg0)
	runtime.KeepAlive(widget)

	var _settings *Settings // out

	_settings = wrapSettings(coreglib.Take(unsafe.Pointer(_cret)))

	return _settings
}

// GetSizeRequest gets the size request that was explicitly set for the
// widget using gtk_widget_set_size_request(). A value of -1 stored in width
// or height indicates that that dimension has not been set explicitly
// and the natural requisition of the widget will be used instead.
// See gtk_widget_set_size_request(). To get the size a widget will actually
// request, call gtk_widget_get_preferred_size() instead of this function.
//
// The function returns the following values:
//
//   - width (optional): return location for width, or NULL.
//   - height (optional): return location for height, or NULL.
func (widget *Widget) GetSizeRequest() (width, height int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_get_size_request(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _width int  // out
	var _height int // out

	_width = int(_arg1)
	_height = int(_arg2)

	return _width, _height
}

// State returns the widget’s state. See gtk_widget_set_state().
//
// Deprecated: Use gtk_widget_get_state_flags() instead.
//
// The function returns the following values:
//
//   - stateType: state of widget.
func (widget *Widget) State() StateType {
	var _arg0 *C.GtkWidget   // out
	var _cret C.GtkStateType // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_state(_arg0)
	runtime.KeepAlive(widget)

	var _stateType StateType // out

	_stateType = StateType(_cret)

	return _stateType
}

// StateFlags returns the widget state as a flag set. It is worth mentioning
// that the effective GTK_STATE_FLAG_INSENSITIVE state will be returned, that
// is, also based on parent insensitivity, even if widget itself is sensitive.
//
// Also note that if you are looking for a way to obtain the StateFlags to pass
// to a StyleContext method, you should look at gtk_style_context_get_state().
//
// The function returns the following values:
//
//   - stateFlags: state flags for widget.
func (widget *Widget) StateFlags() StateFlags {
	var _arg0 *C.GtkWidget    // out
	var _cret C.GtkStateFlags // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_state_flags(_arg0)
	runtime.KeepAlive(widget)

	var _stateFlags StateFlags // out

	_stateFlags = StateFlags(_cret)

	return _stateFlags
}

// Style: simply an accessor function that returns widget->style.
//
// Deprecated: Use StyleContext instead.
//
// The function returns the following values:
//
//   - style widget’s Style.
func (widget *Widget) Style() *Style {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GtkStyle  // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_style(_arg0)
	runtime.KeepAlive(widget)

	var _style *Style // out

	_style = wrapStyle(coreglib.Take(unsafe.Pointer(_cret)))

	return _style
}

// StyleContext returns the style context associated to widget. The returned
// object is guaranteed to be the same for the lifetime of widget.
//
// The function returns the following values:
//
//   - styleContext This memory is owned by widget and must not be freed.
func (widget *Widget) StyleContext() *StyleContext {
	var _arg0 *C.GtkWidget       // out
	var _cret *C.GtkStyleContext // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_style_context(_arg0)
	runtime.KeepAlive(widget)

	var _styleContext *StyleContext // out

	_styleContext = wrapStyleContext(coreglib.Take(unsafe.Pointer(_cret)))

	return _styleContext
}

// SupportMultidevice returns TRUE if widget is multiple pointer aware.
// See gtk_widget_set_support_multidevice() for more information.
//
// The function returns the following values:
//
//   - ok: TRUE if widget is multidevice aware.
func (widget *Widget) SupportMultidevice() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_support_multidevice(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TemplateChild: fetch an object build from the template XML for widget_type in
// this widget instance.
//
// This will only report children which were previously declared with
// gtk_widget_class_bind_template_child_full() or one of its variants.
//
// This function is only meant to be called for code which is private to the
// widget_type which declared the child and is meant for language bindings which
// cannot easily make use of the GObject structure offsets.
//
// The function takes the following parameters:
//
//   - widgetType to get a template child for.
//   - name: “id” of the child defined in the template XML.
//
// The function returns the following values:
//
//   - object built in the template XML with the id name.
func (widget *Widget) TemplateChild(widgetType coreglib.Type, name string) *coreglib.Object {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.GType      // out
	var _arg2 *C.gchar     // out
	var _cret *C.GObject   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GType(widgetType)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_widget_get_template_child(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(widgetType)
	runtime.KeepAlive(name)

	var _object *coreglib.Object // out

	_object = coreglib.Take(unsafe.Pointer(_cret))

	return _object
}

// TooltipMarkup gets the contents of the tooltip for widget.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. You should free the returned
//     string with g_free() when done.
func (widget *Widget) TooltipMarkup() string {
	var _arg0 *C.GtkWidget // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_tooltip_markup(_arg0)
	runtime.KeepAlive(widget)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// TooltipText gets the contents of the tooltip for widget.
//
// The function returns the following values:
//
//   - utf8 (optional): tooltip text, or NULL. You should free the returned
//     string with g_free() when done.
func (widget *Widget) TooltipText() string {
	var _arg0 *C.GtkWidget // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_tooltip_text(_arg0)
	runtime.KeepAlive(widget)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// TooltipWindow returns the Window of the current tooltip. This can be
// the GtkWindow created by default, or the custom tooltip window set using
// gtk_widget_set_tooltip_window().
//
// The function returns the following values:
//
//   - window of the current tooltip.
func (widget *Widget) TooltipWindow() *Window {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GtkWindow // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_tooltip_window(_arg0)
	runtime.KeepAlive(widget)

	var _window *Window // out

	_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _window
}

// Toplevel: this function returns the topmost widget in the container hierarchy
// widget is a part of. If widget has no parent widgets, it will be returned
// as the topmost widget. No reference will be added to the returned widget;
// it should not be unreferenced.
//
// Note the difference in behavior vs. gtk_widget_get_ancestor();
// gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) would return NULL if
// widget wasn’t inside a toplevel window, and if the window was inside a
// Window-derived widget which was in turn inside the toplevel Window. While the
// second case may seem unlikely, it actually happens when a Plug is embedded
// inside a Socket within the same application.
//
// To reliably find the toplevel Window, use gtk_widget_get_toplevel() and call
// GTK_IS_WINDOW() on the result. For instance, to get the title of a widget's
// toplevel window, one might use:
//
//	static const char *
//	get_widget_toplevel_title (GtkWidget *widget)
//	{
//	  GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
//	  if (GTK_IS_WINDOW (toplevel))
//	    {
//	      return gtk_window_get_title (GTK_WINDOW (toplevel));
//	    }
//
//	  return NULL;
//	}.
//
// The function returns the following values:
//
//   - ret: topmost ancestor of widget, or widget itself if there’s no ancestor.
func (widget *Widget) Toplevel() Widgetter {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_toplevel(_arg0)
	runtime.KeepAlive(widget)

	var _ret Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_ret = rv
	}

	return _ret
}

// VAlign gets the value of the Widget:valign property.
//
// For backwards compatibility reasons this method will never return
// GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL.
// If your widget want to support baseline aligned children it must use
// gtk_widget_get_valign_with_baseline(), or g_object_get (widget, "valign",
// &value, NULL), which will also report the true value.
//
// The function returns the following values:
//
//   - align: vertical alignment of widget, ignoring baseline alignment.
func (widget *Widget) VAlign() Align {
	var _arg0 *C.GtkWidget // out
	var _cret C.GtkAlign   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_valign(_arg0)
	runtime.KeepAlive(widget)

	var _align Align // out

	_align = Align(_cret)

	return _align
}

// VAlignWithBaseline gets the value of the Widget:valign property, including
// GTK_ALIGN_BASELINE.
//
// The function returns the following values:
//
//   - align: vertical alignment of widget.
func (widget *Widget) VAlignWithBaseline() Align {
	var _arg0 *C.GtkWidget // out
	var _cret C.GtkAlign   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_valign_with_baseline(_arg0)
	runtime.KeepAlive(widget)

	var _align Align // out

	_align = Align(_cret)

	return _align
}

// VExpand gets whether the widget would like any available extra vertical
// space.
//
// See gtk_widget_get_hexpand() for more detail.
//
// The function returns the following values:
//
//   - ok: whether vexpand flag is set.
func (widget *Widget) VExpand() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_vexpand(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// VExpandSet gets whether gtk_widget_set_vexpand() has been used to explicitly
// set the expand flag on this widget.
//
// See gtk_widget_get_hexpand_set() for more detail.
//
// The function returns the following values:
//
//   - ok: whether vexpand has been explicitly set.
func (widget *Widget) VExpandSet() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_vexpand_set(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Visible determines whether the widget is visible. If you want to take
// into account whether the widget’s parent is also marked as visible, use
// gtk_widget_is_visible() instead.
//
// This function does not check if the widget is obscured in any way.
//
// See gtk_widget_set_visible().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is visible.
func (widget *Widget) Visible() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_visible(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Visual gets the visual that will be used to render widget.
//
// The function returns the following values:
//
//   - visual for widget.
func (widget *Widget) Visual() *gdk.Visual {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GdkVisual // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_visual(_arg0)
	runtime.KeepAlive(widget)

	var _visual *gdk.Visual // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_visual = &gdk.Visual{
			Object: obj,
		}
	}

	return _visual
}

// Window returns the widget’s window if it is realized, NULL otherwise.
//
// The function returns the following values:
//
//   - window (optional) widget’s window.
func (widget *Widget) Window() gdk.Windower {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GdkWindow // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_get_window(_arg0)
	runtime.KeepAlive(widget)

	var _window gdk.Windower // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(gdk.Windower)
				return ok
			})
			rv, ok := casted.(gdk.Windower)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gdk.Windower")
			}
			_window = rv
		}
	}

	return _window
}

// GrabAdd makes widget the current grabbed widget.
//
// This means that interaction with other widgets in the same application is
// blocked and mouse as well as keyboard events are delivered to this widget.
//
// If widget is not sensitive, it is not set as the current grabbed widget and
// this function does nothing.
func (widget *Widget) GrabAdd() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_grab_add(_arg0)
	runtime.KeepAlive(widget)
}

// GrabDefault causes widget to become the default widget. widget must be
// able to be a default widget; typically you would ensure this yourself by
// calling gtk_widget_set_can_default() with a TRUE value. The default widget
// is activated when the user presses Enter in a window. Default widgets
// must be activatable, that is, gtk_widget_activate() should affect them.
// Note that Entry widgets require the “activates-default” property set to TRUE
// before they activate the default widget when Enter is pressed and the Entry
// is focused.
func (widget *Widget) GrabDefault() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_grab_default(_arg0)
	runtime.KeepAlive(widget)
}

// GrabFocus causes widget to have the keyboard focus for the Window it's
// inside. widget must be a focusable widget, such as a Entry; something like
// Frame won’t work.
//
// More precisely, it must have the GTK_CAN_FOCUS flag set. Use
// gtk_widget_set_can_focus() to modify that flag.
//
// The widget also needs to be realized and mapped. This is indicated by the
// related signals. Grabbing the focus immediately after creating the widget
// will likely fail and cause critical warnings.
func (widget *Widget) GrabFocus() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_grab_focus(_arg0)
	runtime.KeepAlive(widget)
}

// GrabRemove removes the grab from the given widget.
//
// You have to pair calls to gtk_grab_add() and gtk_grab_remove().
//
// If widget does not have the grab, this function does nothing.
func (widget *Widget) GrabRemove() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_grab_remove(_arg0)
	runtime.KeepAlive(widget)
}

// HasDefault determines whether widget is the current default widget within its
// toplevel. See gtk_widget_set_can_default().
//
// The function returns the following values:
//
//   - ok: TRUE if widget is the current default widget within its toplevel,
//     FALSE otherwise.
func (widget *Widget) HasDefault() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_default(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasFocus determines if the widget has the global input focus. See
// gtk_widget_is_focus() for the difference between having the global input
// focus, and only having the focus within a toplevel.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget has the global input focus.
func (widget *Widget) HasFocus() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_focus(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasGrab determines whether the widget is currently grabbing events, so it is
// the only widget receiving input events (keyboard and mouse).
//
// See also gtk_grab_add().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is in the grab_widgets stack.
func (widget *Widget) HasGrab() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_grab(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasRCStyle determines if the widget style has been looked up through the rc
// mechanism.
//
// Deprecated: Use StyleContext instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget has been looked up through the rc mechanism,
//     FALSE otherwise.
func (widget *Widget) HasRCStyle() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_rc_style(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasScreen checks whether there is a Screen is associated with this widget.
// All toplevel widgets have an associated screen, and all widgets added into a
// hierarchy with a toplevel window at the top.
//
// The function returns the following values:
//
//   - ok: TRUE if there is a Screen associated with the widget.
func (widget *Widget) HasScreen() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_screen(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasVisibleFocus determines if the widget should show a visible indication
// that it has the global input focus. This is a convenience function for
// use in ::draw handlers that takes into account whether focus indication
// should currently be shown in the toplevel window of widget. See
// gtk_window_get_focus_visible() for more information about focus indication.
//
// To find out if the widget has the global input focus, use
// gtk_widget_has_focus().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget should display a “focus rectangle”.
func (widget *Widget) HasVisibleFocus() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_has_visible_focus(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Hide reverses the effects of gtk_widget_show(), causing the widget to be
// hidden (invisible to the user).
func (widget *Widget) Hide() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_hide(_arg0)
	runtime.KeepAlive(widget)
}

// HideOnDelete: utility function; intended to be connected to the
// Widget::delete-event signal on a Window. The function calls gtk_widget_hide()
// on its argument, then returns TRUE. If connected to ::delete-event, the
// result is that clicking the close button for a window (on the window frame,
// top right corner usually) will hide but not destroy the window. By default,
// GTK+ destroys windows when ::delete-event is received.
//
// The function returns the following values:
//
//   - ok: TRUE.
func (widget *Widget) HideOnDelete() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_hide_on_delete(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InDestruction returns whether the widget is currently being destroyed.
// This information can sometimes be used to avoid doing unnecessary work.
//
// The function returns the following values:
//
//   - ok: TRUE if widget is being destroyed.
func (widget *Widget) InDestruction() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_in_destruction(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InitTemplate creates and initializes child widgets defined in templates.
// This function must be called in the instance initializer for any class which
// assigned itself a template using gtk_widget_class_set_template()
//
// It is important to call this function in the instance initializer of a Widget
// subclass and not in #GObject.constructed() or #GObject.constructor() for two
// reasons.
//
// One reason is that generally derived widgets will assume that parent class
// composite widgets have been created in their instance initializers.
//
// Another reason is that when calling g_object_new() on a widget with composite
// templates, it’s important to build the composite widgets before the construct
// properties are set. Properties passed to g_object_new() should take
// precedence over properties set in the private template XML.
func (widget *Widget) InitTemplate() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_init_template(_arg0)
	runtime.KeepAlive(widget)
}

// InputShapeCombineRegion sets an input shape for this widget’s GDK window.
// This allows for windows which react to mouse click in a nonrectangular
// region, see gdk_window_input_shape_combine_region() for more information.
//
// The function takes the following parameters:
//
//   - region (optional): shape to be added, or NULL to remove an existing
//     shape.
func (widget *Widget) InputShapeCombineRegion(region *cairo.Region) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.cairo_region_t // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if region != nil {
		_arg1 = (*C.cairo_region_t)(unsafe.Pointer(region.Native()))
	}

	C.gtk_widget_input_shape_combine_region(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(region)
}

// InsertActionGroup inserts group into widget. Children of widget that
// implement Actionable can then be associated with actions in group by setting
// their “action-name” to prefix.action-name.
//
// If group is NULL, a previously inserted group for name is removed from
// widget.
//
// The function takes the following parameters:
//
//   - name: prefix for actions in group.
//   - group (optional) or NULL.
func (widget *Widget) InsertActionGroup(name string, group gio.ActionGrouper) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 *C.gchar        // out
	var _arg2 *C.GActionGroup // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if group != nil {
		_arg2 = (*C.GActionGroup)(unsafe.Pointer(coreglib.InternObject(group).Native()))
	}

	C.gtk_widget_insert_action_group(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(name)
	runtime.KeepAlive(group)
}

// Intersect computes the intersection of a widget’s area and area, storing the
// intersection in intersection, and returns TRUE if there was an intersection.
// intersection may be NULL if you’re only interested in whether there was an
// intersection.
//
// The function takes the following parameters:
//
//   - area: rectangle.
//
// The function returns the following values:
//
//   - intersection (optional): rectangle to store intersection of widget and
//     area.
//   - ok: TRUE if there was an intersection.
func (widget *Widget) Intersect(area *gdk.Rectangle) (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 *C.GdkRectangle // out
	var _arg2 C.GdkRectangle  // in
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(area)))

	_cret = C.gtk_widget_intersect(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(area)

	var _intersection *gdk.Rectangle // out
	var _ok bool                     // out

	_intersection = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _intersection, _ok
}

// IsAncestor determines whether widget is somewhere inside ancestor, possibly
// with intermediate containers.
//
// The function takes the following parameters:
//
//   - ancestor: another Widget.
//
// The function returns the following values:
//
//   - ok: TRUE if ancestor contains widget as a child, grandchild, great
//     grandchild, etc.
func (widget *Widget) IsAncestor(ancestor Widgetter) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(ancestor).Native()))

	_cret = C.gtk_widget_is_ancestor(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(ancestor)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsComposited: whether widget can rely on having its alpha channel drawn
// correctly. On X11 this function returns whether a compositing manager is
// running for widget’s screen.
//
// Please note that the semantics of this call will change in the future if
// used on a widget that has a composited window in its hierarchy (as set by
// gdk_window_set_composited()).
//
// Deprecated: Use gdk_screen_is_composited() instead.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget can rely on its alpha channel being drawn
//     correctly.
func (widget *Widget) IsComposited() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_composited(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsDrawable determines whether widget can be drawn to. A widget can be drawn
// to if it is mapped and visible.
//
// The function returns the following values:
//
//   - ok: TRUE if widget is drawable, FALSE otherwise.
func (widget *Widget) IsDrawable() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_drawable(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsFocus determines if the widget is the focus widget within its toplevel.
// (This does not mean that the Widget:has-focus property is necessarily set;
// Widget:has-focus will only be set if the toplevel widget additionally has the
// global input focus.).
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is the focus widget.
func (widget *Widget) IsFocus() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_focus(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsSensitive returns the widget’s effective sensitivity, which means it is
// sensitive itself and also its parent widget is sensitive.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget is effectively sensitive.
func (widget *Widget) IsSensitive() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_sensitive(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsToplevel determines whether widget is a toplevel widget.
//
// Currently only Window and Invisible (and out-of-process Plugs) are toplevel
// widgets. Toplevel widgets have no parent widget.
//
// The function returns the following values:
//
//   - ok: TRUE if widget is a toplevel, FALSE otherwise.
func (widget *Widget) IsToplevel() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_toplevel(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsVisible determines whether the widget and all its parents are marked as
// visible.
//
// This function does not check if the widget is obscured in any way.
//
// See also gtk_widget_get_visible() and gtk_widget_set_visible().
//
// The function returns the following values:
//
//   - ok: TRUE if the widget and all its parents are visible.
func (widget *Widget) IsVisible() bool {
	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_is_visible(_arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// KeynavFailed: this function should be called whenever keyboard
// navigation within a single widget hits a boundary. The function emits the
// Widget::keynav-failed signal on the widget and its return value should be
// interpreted in a way similar to the return value of gtk_widget_child_focus():
//
// When TRUE is returned, stay in the widget, the failed keyboard navigation is
// OK and/or there is nowhere we can/should move the focus to.
//
// When FALSE is returned, the caller should continue with keyboard navigation
// outside the widget, e.g. by calling gtk_widget_child_focus() on the widget’s
// toplevel.
//
// The default ::keynav-failed handler returns FALSE for GTK_DIR_TAB_FORWARD and
// GTK_DIR_TAB_BACKWARD. For the other values of DirectionType it returns TRUE.
//
// Whenever the default handler returns TRUE, it also calls
// gtk_widget_error_bell() to notify the user of the failed keyboard navigation.
//
// A use case for providing an own implementation of ::keynav-failed (either by
// connecting to it or by overriding it) would be a row of Entry widgets where
// the user should be able to navigate the entire row with the cursor keys,
// as e.g. known from user interfaces that require entering license keys.
//
// The function takes the following parameters:
//
//   - direction of focus movement.
//
// The function returns the following values:
//
//   - ok: TRUE if stopping keyboard navigation is fine, FALSE if the emitting
//     widget should try to handle the keyboard navigation attempt in its parent
//     container(s).
func (widget *Widget) KeynavFailed(direction DirectionType) bool {
	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C.gtk_widget_keynav_failed(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ListActionPrefixes retrieves a NULL-terminated array of strings containing
// the prefixes of Group's available to widget.
//
// The function returns the following values:
//
//   - utf8s: NULL-terminated array of strings.
func (widget *Widget) ListActionPrefixes() []string {
	var _arg0 *C.GtkWidget // out
	var _cret **C.gchar    // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_list_action_prefixes(_arg0)
	runtime.KeepAlive(widget)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}

	return _utf8s
}

// ListMnemonicLabels returns a newly allocated list of the widgets, normally
// labels, for which this widget is the target of a mnemonic (see for example,
// gtk_label_set_mnemonic_widget()).
//
// The widgets in the list are not individually referenced. If you want
// to iterate through the list and perform actions involving callbacks
// that might destroy the widgets, you must call g_list_foreach (result,
// (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards.
//
// The function returns the following values:
//
//   - list of mnemonic labels; free this list with g_list_free() when you are
//     done with it.
func (widget *Widget) ListMnemonicLabels() []Widgetter {
	var _arg0 *C.GtkWidget // out
	var _cret *C.GList     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_list_mnemonic_labels(_arg0)
	runtime.KeepAlive(widget)

	var _list []Widgetter // out

	_list = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// Map: this function is only for use in widget implementations. Causes a widget
// to be mapped if it isn’t already.
func (widget *Widget) Map() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_map(_arg0)
	runtime.KeepAlive(widget)
}

// MnemonicActivate emits the Widget::mnemonic-activate signal.
//
// The function takes the following parameters:
//
//   - groupCycling: TRUE if there are other widgets with the same mnemonic.
//
// The function returns the following values:
//
//   - ok: TRUE if the signal has been handled.
func (widget *Widget) MnemonicActivate(groupCycling bool) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if groupCycling {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_widget_mnemonic_activate(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(groupCycling)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ModifyBase sets the base color for a widget in a particular state. All other
// style values are left untouched. The base color is the background color used
// along with the text color (see gtk_widget_modify_text()) for widgets such as
// Entry and TextView. See also gtk_widget_modify_style().
//
// > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag
// set) draw on their parent container’s window and thus may > not draw any
// background themselves. This is the case for e.g. > Label. > > To modify the
// background of such widgets, you have to set the > base color on their parent;
// if you want to set the background > of a rectangular area around a label, try
// placing the label in > a EventBox widget and setting the base color on that.
//
// Deprecated: Use gtk_widget_override_background_color() instead.
//
// The function takes the following parameters:
//
//   - state for which to set the base color.
//   - color (optional) to assign (does not need to be allocated), or NULL to
//     undo the effect of previous calls to of gtk_widget_modify_base().
func (widget *Widget) ModifyBase(state StateType, color *gdk.Color) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out
	var _arg2 *C.GdkColor    // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(state)
	if color != nil {
		_arg2 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_modify_base(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// ModifyBg sets the background color for a widget in a particular state.
//
// All other style values are left untouched. See also
// gtk_widget_modify_style().
//
// > Note that “no window” widgets (which have the GTK_NO_WINDOW > flag
// set) draw on their parent container’s window and thus may > not draw any
// background themselves. This is the case for e.g. > Label. > > To modify
// the background of such widgets, you have to set the > background color on
// their parent; if you want to set the background > of a rectangular area
// around a label, try placing the label in > a EventBox widget and setting the
// background color on that.
//
// Deprecated: Use gtk_widget_override_background_color() instead.
//
// The function takes the following parameters:
//
//   - state for which to set the background color.
//   - color (optional) to assign (does not need to be allocated), or NULL to
//     undo the effect of previous calls to of gtk_widget_modify_bg().
func (widget *Widget) ModifyBg(state StateType, color *gdk.Color) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out
	var _arg2 *C.GdkColor    // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(state)
	if color != nil {
		_arg2 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_modify_bg(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// ModifyCursor sets the cursor color to use in a widget, overriding the Widget
// cursor-color and secondary-cursor-color style properties.
//
// All other style values are left untouched. See also
// gtk_widget_modify_style().
//
// Deprecated: Use gtk_widget_override_cursor() instead.
//
// The function takes the following parameters:
//
//   - primary (optional): color to use for primary cursor (does not need
//     to be allocated), or NULL to undo the effect of previous calls to of
//     gtk_widget_modify_cursor().
//   - secondary (optional): color to use for secondary cursor (does not need
//     to be allocated), or NULL to undo the effect of previous calls to of
//     gtk_widget_modify_cursor().
func (widget *Widget) ModifyCursor(primary, secondary *gdk.Color) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkColor  // out
	var _arg2 *C.GdkColor  // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if primary != nil {
		_arg1 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(primary)))
	}
	if secondary != nil {
		_arg2 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(secondary)))
	}

	C.gtk_widget_modify_cursor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(primary)
	runtime.KeepAlive(secondary)
}

// ModifyFg sets the foreground color for a widget in a particular state.
//
// All other style values are left untouched. See also
// gtk_widget_modify_style().
//
// Deprecated: Use gtk_widget_override_color() instead.
//
// The function takes the following parameters:
//
//   - state for which to set the foreground color.
//   - color (optional) to assign (does not need to be allocated), or NULL to
//     undo the effect of previous calls to of gtk_widget_modify_fg().
func (widget *Widget) ModifyFg(state StateType, color *gdk.Color) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out
	var _arg2 *C.GdkColor    // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(state)
	if color != nil {
		_arg2 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_modify_fg(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// ModifyFont sets the font to use for a widget.
//
// All other style values are left untouched. See also
// gtk_widget_modify_style().
//
// Deprecated: Use gtk_widget_override_font() instead.
//
// The function takes the following parameters:
//
//   - fontDesc (optional): font description to use, or NULL to undo the effect
//     of previous calls to gtk_widget_modify_font().
func (widget *Widget) ModifyFont(fontDesc *pango.FontDescription) {
	var _arg0 *C.GtkWidget            // out
	var _arg1 *C.PangoFontDescription // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if fontDesc != nil {
		_arg1 = (*C.PangoFontDescription)(gextras.StructNative(unsafe.Pointer(fontDesc)))
	}

	C.gtk_widget_modify_font(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(fontDesc)
}

// ModifyStyle modifies style values on the widget.
//
// Modifications made using this technique take precedence over style values set
// via an RC file, however, they will be overridden if a style is explicitly set
// on the widget using gtk_widget_set_style(). The RcStyle-struct is designed
// so each field can either be set or unset, so it is possible, using this
// function, to modify some style values and leave the others unchanged.
//
// Note that modifications made with this function are not cumulative with
// previous calls to gtk_widget_modify_style() or with such functions as
// gtk_widget_modify_fg(). If you wish to retain previous values, you must
// first call gtk_widget_get_modifier_style(), make your modifications to the
// returned style, then call gtk_widget_modify_style() with that style. On the
// other hand, if you first call gtk_widget_modify_style(), subsequent calls to
// such functions gtk_widget_modify_fg() will have a cumulative effect with the
// initial modifications.
//
// Deprecated: Use StyleContext with a custom StyleProvider instead.
//
// The function takes the following parameters:
//
//   - style holding the style modifications.
func (widget *Widget) ModifyStyle(style *RCStyle) {
	var _arg0 *C.GtkWidget  // out
	var _arg1 *C.GtkRcStyle // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkRcStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))

	C.gtk_widget_modify_style(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(style)
}

// ModifyText sets the text color for a widget in a particular state.
//
// All other style values are left untouched. The text color is the foreground
// color used along with the base color (see gtk_widget_modify_base()) for
// widgets such as Entry and TextView. See also gtk_widget_modify_style().
//
// Deprecated: Use gtk_widget_override_color() instead.
//
// The function takes the following parameters:
//
//   - state for which to set the text color.
//   - color (optional) to assign (does not need to be allocated), or NULL to
//     undo the effect of previous calls to of gtk_widget_modify_text().
func (widget *Widget) ModifyText(state StateType, color *gdk.Color) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out
	var _arg2 *C.GdkColor    // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(state)
	if color != nil {
		_arg2 = (*C.GdkColor)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_modify_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// OverrideBackgroundColor sets the background color to use for a widget.
//
// All other style values are left untouched. See gtk_widget_override_color().
//
// Deprecated: This function is not useful in the context of CSS-based
// rendering. If you wish to change the way a widget renders its background you
// should use a custom CSS style, through an application-specific StyleProvider
// and a CSS style class. You can also override the default drawing of a widget
// through the Widget::draw signal, and use Cairo to draw a specific color,
// regardless of the CSS style.
//
// The function takes the following parameters:
//
//   - state for which to set the background color.
//   - color (optional) to assign, or NULL to undo the effect of previous calls
//     to gtk_widget_override_background_color().
func (widget *Widget) OverrideBackgroundColor(state StateFlags, color *gdk.RGBA) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkStateFlags // out
	var _arg2 *C.GdkRGBA      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateFlags(state)
	if color != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_override_background_color(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// OverrideColor sets the color to use for a widget.
//
// All other style values are left untouched.
//
// This function does not act recursively. Setting the color of a container does
// not affect its children. Note that some widgets that you may not think of as
// containers, for instance Buttons, are actually containers.
//
// This API is mostly meant as a quick way for applications to change a widget
// appearance. If you are developing a widgets library and intend this change
// to be themeable, it is better done by setting meaningful CSS classes in your
// widget/container implementation through gtk_style_context_add_class().
//
// This way, your widget library can install a CssProvider with the
// GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority in order to provide a default
// styling for those widgets that need so, and this theming may fully overridden
// by the user’s theme.
//
// Note that for complex widgets this may bring in undesired results
// (such as uniform background color everywhere), in these cases it is
// better to fully style such widgets through a CssProvider with the
// GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority.
//
// Deprecated: Use a custom style provider and style classes instead.
//
// The function takes the following parameters:
//
//   - state for which to set the color.
//   - color (optional) to assign, or NULL to undo the effect of previous calls
//     to gtk_widget_override_color().
func (widget *Widget) OverrideColor(state StateFlags, color *gdk.RGBA) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkStateFlags // out
	var _arg2 *C.GdkRGBA      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateFlags(state)
	if color != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_override_color(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
	runtime.KeepAlive(color)
}

// OverrideCursor sets the cursor color to use in a widget, overriding the
// cursor-color and secondary-cursor-color style properties. All other style
// values are left untouched. See also gtk_widget_modify_style().
//
// Note that the underlying properties have the Color type, so the alpha value
// in primary and secondary will be ignored.
//
// Deprecated: This function is not useful in the context of CSS-based
// rendering. If you wish to change the color used to render the primary
// and secondary cursors you should use a custom CSS style, through an
// application-specific StyleProvider and a CSS style class.
//
// The function takes the following parameters:
//
//   - cursor (optional): color to use for primary cursor (does not need
//     to be allocated), or NULL to undo the effect of previous calls to of
//     gtk_widget_override_cursor().
//   - secondaryCursor (optional): color to use for secondary cursor (does not
//     need to be allocated), or NULL to undo the effect of previous calls to of
//     gtk_widget_override_cursor().
func (widget *Widget) OverrideCursor(cursor, secondaryCursor *gdk.RGBA) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkRGBA   // out
	var _arg2 *C.GdkRGBA   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if cursor != nil {
		_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(cursor)))
	}
	if secondaryCursor != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(secondaryCursor)))
	}

	C.gtk_widget_override_cursor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cursor)
	runtime.KeepAlive(secondaryCursor)
}

// OverrideFont sets the font to use for a widget. All other style values are
// left untouched. See gtk_widget_override_color().
//
// Deprecated: This function is not useful in the context of CSS-based
// rendering. If you wish to change the font a widget uses to render its
// text you should use a custom CSS style, through an application-specific
// StyleProvider and a CSS style class.
//
// The function takes the following parameters:
//
//   - fontDesc (optional): font description to use, or NULL to undo the effect
//     of previous calls to gtk_widget_override_font().
func (widget *Widget) OverrideFont(fontDesc *pango.FontDescription) {
	var _arg0 *C.GtkWidget            // out
	var _arg1 *C.PangoFontDescription // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if fontDesc != nil {
		_arg1 = (*C.PangoFontDescription)(gextras.StructNative(unsafe.Pointer(fontDesc)))
	}

	C.gtk_widget_override_font(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(fontDesc)
}

// OverrideSymbolicColor sets a symbolic color for a widget.
//
// All other style values are left untouched. See gtk_widget_override_color()
// for overriding the foreground or background color.
//
// Deprecated: This function is not useful in the context of CSS-based
// rendering. If you wish to change the color used to render symbolic icons you
// should use a custom CSS style, through an application-specific StyleProvider
// and a CSS style class.
//
// The function takes the following parameters:
//
//   - name of the symbolic color to modify.
//   - color (optional) to assign (does not need to be allocated),
//     or NULL to undo the effect of previous calls to
//     gtk_widget_override_symbolic_color().
func (widget *Widget) OverrideSymbolicColor(name string, color *gdk.RGBA) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out
	var _arg2 *C.GdkRGBA   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if color != nil {
		_arg2 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))
	}

	C.gtk_widget_override_symbolic_color(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(name)
	runtime.KeepAlive(color)
}

// Path obtains the full path to widget. The path is simply the name of a
// widget and all its parents in the container hierarchy, separated by periods.
// The name of a widget comes from gtk_widget_get_name(). Paths are used to
// apply styles to a widget in gtkrc configuration files. Widget names are
// the type of the widget by default (e.g. “GtkButton”) or can be set to an
// application-specific value with gtk_widget_set_name(). By setting the name of
// a widget, you allow users or theme authors to apply styles to that specific
// widget in their gtkrc file. path_reversed_p fills in the path in reverse
// order, i.e. starting with widget’s name instead of starting with the name of
// widget’s outermost ancestor.
//
// Deprecated: Use gtk_widget_get_path() instead.
//
// The function returns the following values:
//
//   - pathLength (optional): location to store length of the path, or NULL.
//   - path (optional): location to store allocated path string, or NULL.
//   - pathReversed (optional): location to store allocated reverse path string,
//     or NULL.
func (widget *Widget) Path() (pathLength uint, path, pathReversed string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.guint      // in
	var _arg2 *C.gchar     // in
	var _arg3 *C.gchar     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_path(_arg0, &_arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)

	var _pathLength uint     // out
	var _path string         // out
	var _pathReversed string // out

	_pathLength = uint(_arg1)
	if _arg2 != nil {
		_path = C.GoString((*C.gchar)(unsafe.Pointer(_arg2)))
		defer C.free(unsafe.Pointer(_arg2))
	}
	if _arg3 != nil {
		_pathReversed = C.GoString((*C.gchar)(unsafe.Pointer(_arg3)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	return _pathLength, _path, _pathReversed
}

// QueueAllocate: this function is only for use in widget implementations.
//
// Flags the widget for a rerun of the GtkWidgetClass::size_allocate function.
// Use this function instead of gtk_widget_queue_resize() when the widget's size
// request didn't change but it wants to reposition its contents.
//
// An example user of this function is gtk_widget_set_halign().
func (widget *Widget) QueueAllocate() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_queue_allocate(_arg0)
	runtime.KeepAlive(widget)
}

// QueueComputeExpand: mark widget as needing to recompute its expand flags.
// Call this function when setting legacy expand child properties on the child
// of a container.
//
// See gtk_widget_compute_expand().
func (widget *Widget) QueueComputeExpand() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_queue_compute_expand(_arg0)
	runtime.KeepAlive(widget)
}

// QueueDraw: equivalent to calling gtk_widget_queue_draw_area() for the entire
// area of a widget.
func (widget *Widget) QueueDraw() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_queue_draw(_arg0)
	runtime.KeepAlive(widget)
}

// QueueDrawArea: convenience function that calls gtk_widget_queue_draw_region()
// on the region created from the given coordinates.
//
// The region here is specified in widget coordinates. Widget coordinates
// are a bit odd; for historical reasons, they are defined as widget->window
// coordinates for widgets that return TRUE for gtk_widget_get_has_window(),
// and are relative to widget->allocation.x, widget->allocation.y otherwise.
//
// width or height may be 0, in this case this function does nothing. Negative
// values for width and height are not allowed.
//
// The function takes the following parameters:
//
//   - x coordinate of upper-left corner of rectangle to redraw.
//   - y coordinate of upper-left corner of rectangle to redraw.
//   - width of region to draw.
//   - height of region to draw.
func (widget *Widget) QueueDrawArea(x, y, width, height int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out
	var _arg4 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)
	_arg3 = C.gint(width)
	_arg4 = C.gint(height)

	C.gtk_widget_queue_draw_area(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// QueueDrawRegion invalidates the area of widget defined by region by calling
// gdk_window_invalidate_region() on the widget’s window and all its child
// windows. Once the main loop becomes idle (after the current batch of events
// has been processed, roughly), the window will receive expose events for the
// union of all regions that have been invalidated.
//
// Normally you would only use this function in widget implementations.
// You might also use it to schedule a redraw of a DrawingArea or some portion
// thereof.
//
// The function takes the following parameters:
//
//   - region to draw.
func (widget *Widget) QueueDrawRegion(region *cairo.Region) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.cairo_region_t // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.cairo_region_t)(unsafe.Pointer(region.Native()))

	C.gtk_widget_queue_draw_region(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(region)
}

// QueueResize: this function is only for use in widget implementations. Flags a
// widget to have its size renegotiated; should be called when a widget for some
// reason has a new size request. For example, when you change the text in a
// Label, Label queues a resize to ensure there’s enough space for the new text.
//
// Note that you cannot call gtk_widget_queue_resize() on a widget from inside
// its implementation of the GtkWidgetClass::size_allocate virtual method.
// Calls to gtk_widget_queue_resize() from inside GtkWidgetClass::size_allocate
// will be silently ignored.
func (widget *Widget) QueueResize() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_queue_resize(_arg0)
	runtime.KeepAlive(widget)
}

// QueueResizeNoRedraw: this function works like gtk_widget_queue_resize(),
// except that the widget is not invalidated.
func (widget *Widget) QueueResizeNoRedraw() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_queue_resize_no_redraw(_arg0)
	runtime.KeepAlive(widget)
}

// Realize creates the GDK (windowing system) resources associated with
// a widget. For example, widget->window will be created when a widget is
// realized. Normally realization happens implicitly; if you show a widget
// and all its parent containers, then the widget will be realized and mapped
// automatically.
//
// Realizing a widget requires all the widget’s parent widgets to be realized;
// calling gtk_widget_realize() realizes the widget’s parents in addition to
// widget itself. If a widget is not yet inside a toplevel window when you
// realize it, bad things will happen.
//
// This function is primarily used in widget implementations, and isn’t very
// useful otherwise. Many times when you think you might need it, a better
// approach is to connect to a signal that will be called after the widget is
// realized automatically, such as Widget::draw. Or simply g_signal_connect ()
// to the Widget::realize signal.
func (widget *Widget) Realize() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_realize(_arg0)
	runtime.KeepAlive(widget)
}

// RegionIntersect computes the intersection of a widget’s area and
// region, returning the intersection. The result may be empty, use
// cairo_region_is_empty() to check.
//
// Deprecated: Use gtk_widget_get_allocation() and
// cairo_region_intersect_rectangle() to get the same behavior.
//
// The function takes the following parameters:
//
//   - region in the same coordinate system as widget->allocation. That is,
//     relative to widget->window for widgets which return FALSE from
//     gtk_widget_get_has_window(); relative to the parent window of
//     widget->window otherwise.
//
// The function returns the following values:
//
//   - ret: newly allocated region holding the intersection of widget and
//     region.
func (widget *Widget) RegionIntersect(region *cairo.Region) *cairo.Region {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.cairo_region_t // out
	var _cret *C.cairo_region_t // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.cairo_region_t)(unsafe.Pointer(region.Native()))

	_cret = C.gtk_widget_region_intersect(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(region)

	var _ret *cairo.Region // out

	{
		_pp := &struct{ p unsafe.Pointer }{unsafe.Pointer(_cret)}
		_ret = (*cairo.Region)(unsafe.Pointer(_pp))
	}
	runtime.SetFinalizer(_ret, func(v *cairo.Region) {
		C.cairo_region_destroy((*C.cairo_region_t)(unsafe.Pointer(v.Native())))
	})

	return _ret
}

// RegisterWindow registers a Window with the widget and sets it up so that
// the widget receives events for it. Call gtk_widget_unregister_window() when
// destroying the window.
//
// Before 3.8 you needed to call gdk_window_set_user_data() directly to set this
// up. This is now deprecated and you should use gtk_widget_register_window()
// instead. Old code will keep working as is, although some new features like
// transparency might not work perfectly.
//
// The function takes the following parameters:
//
//   - window: Window.
func (widget *Widget) RegisterWindow(window gdk.Windower) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkWindow // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_widget_register_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(window)
}

// RemoveAccelerator removes an accelerator from widget, previously installed
// with gtk_widget_add_accelerator().
//
// The function takes the following parameters:
//
//   - accelGroup: accel group for this widget.
//   - accelKey: GDK keyval of the accelerator.
//   - accelMods: modifier key combination of the accelerator.
//
// The function returns the following values:
//
//   - ok: whether an accelerator was installed and could be removed.
func (widget *Widget) RemoveAccelerator(accelGroup *AccelGroup, accelKey uint, accelMods gdk.ModifierType) bool {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GtkAccelGroup  // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	_arg2 = C.guint(accelKey)
	_arg3 = C.GdkModifierType(accelMods)

	_cret = C.gtk_widget_remove_accelerator(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(accelGroup)
	runtime.KeepAlive(accelKey)
	runtime.KeepAlive(accelMods)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RemoveMnemonicLabel removes a widget from the list of mnemonic labels for
// this widget. (See gtk_widget_list_mnemonic_labels()). The widget must have
// previously been added to the list with gtk_widget_add_mnemonic_label().
//
// The function takes the following parameters:
//
//   - label that was previously set as a mnemonic label for widget with
//     gtk_widget_add_mnemonic_label().
func (widget *Widget) RemoveMnemonicLabel(label Widgetter) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(label).Native()))

	C.gtk_widget_remove_mnemonic_label(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(label)
}

// RemoveTickCallback removes a tick callback previously registered with
// gtk_widget_add_tick_callback().
//
// The function takes the following parameters:
//
//   - id returned by gtk_widget_add_tick_callback().
func (widget *Widget) RemoveTickCallback(id uint) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.guint      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.guint(id)

	C.gtk_widget_remove_tick_callback(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(id)
}

// RenderIcon: convenience function that uses the theme settings for widget
// to look up stock_id and render it to a pixbuf. stock_id should be a stock
// icon ID such as K_STOCK_OPEN or K_STOCK_OK. size should be a size such as
// K_ICON_SIZE_MENU. detail should be a string that identifies the widget or
// code doing the rendering, so that theme engines can special-case rendering
// for that widget or code.
//
// The pixels in the returned Pixbuf are shared with the rest of the application
// and should not be modified. The pixbuf should be freed after use with
// g_object_unref().
//
// Deprecated: Use gtk_widget_render_icon_pixbuf() instead.
//
// The function takes the following parameters:
//
//   - stockId: stock ID.
//   - size: stock size (IconSize). A size of (GtkIconSize)-1 means render at
//     the size of the source and don’t scale (if there are multiple source
//     sizes, GTK+ picks one of the available sizes).
//   - detail (optional): render detail to pass to theme engine.
//
// The function returns the following values:
//
//   - pixbuf (optional): new pixbuf, or NULL if the stock ID wasn’t known.
func (widget *Widget) RenderIcon(stockId string, size int, detail string) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkWidget  // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out
	var _arg3 *C.gchar      // out
	var _cret *C.GdkPixbuf  // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkIconSize(size)
	if detail != "" {
		_arg3 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg3))
	}

	_cret = C.gtk_widget_render_icon(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(size)
	runtime.KeepAlive(detail)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// RenderIconPixbuf: convenience function that uses the theme engine and style
// settings for widget to look up stock_id and render it to a pixbuf. stock_id
// should be a stock icon ID such as K_STOCK_OPEN or K_STOCK_OK. size should be
// a size such as K_ICON_SIZE_MENU.
//
// The pixels in the returned Pixbuf are shared with the rest of the application
// and should not be modified. The pixbuf should be freed after use with
// g_object_unref().
//
// Deprecated: Use gtk_icon_theme_load_icon() instead.
//
// The function takes the following parameters:
//
//   - stockId: stock ID.
//   - size: stock size (IconSize). A size of (GtkIconSize)-1 means render at
//     the size of the source and don’t scale (if there are multiple source
//     sizes, GTK+ picks one of the available sizes).
//
// The function returns the following values:
//
//   - pixbuf (optional): new pixbuf, or NULL if the stock ID wasn’t known.
func (widget *Widget) RenderIconPixbuf(stockId string, size int) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkWidget  // out
	var _arg1 *C.gchar      // out
	var _arg2 C.GtkIconSize // out
	var _cret *C.GdkPixbuf  // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(stockId)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_widget_render_icon_pixbuf(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(stockId)
	runtime.KeepAlive(size)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// Reparent moves a widget from one Container to another, handling reference
// count issues to avoid destroying the widget.
//
// Deprecated: Use gtk_container_remove() and gtk_container_add().
//
// The function takes the following parameters:
//
//   - newParent to move the widget into.
func (widget *Widget) Reparent(newParent Widgetter) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(newParent).Native()))

	C.gtk_widget_reparent(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(newParent)
}

// ResetRCStyles: reset the styles of widget and all descendents, so when they
// are looked up again, they get the correct values for the currently loaded RC
// file settings.
//
// This function is not useful for applications.
//
// Deprecated: Use StyleContext instead, and gtk_widget_reset_style().
func (widget *Widget) ResetRCStyles() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_reset_rc_styles(_arg0)
	runtime.KeepAlive(widget)
}

// ResetStyle updates the style context of widget and all descendants by
// updating its widget path. Containers may want to use this on a child when
// reordering it in a way that a different style might apply to it. See also
// gtk_container_get_path_for_child().
func (widget *Widget) ResetStyle() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_reset_style(_arg0)
	runtime.KeepAlive(widget)
}

// SendExpose: very rarely-used function. This function is used to emit an
// expose event on a widget. This function is not normally used directly.
// The only time it is used is when propagating an expose event to a windowless
// child widget (gtk_widget_get_has_window() is FALSE), and that is normally
// done using gtk_container_propagate_draw().
//
// If you want to force an area of a window to be redrawn, use
// gdk_window_invalidate_rect() or gdk_window_invalidate_region().
// To cause the redraw to be done immediately, follow that call with a call to
// gdk_window_process_updates().
//
// Deprecated: Application and widget code should not handle expose events
// directly; invalidation should use the Widget API, and drawing should only
// happen inside Widget::draw implementations.
//
// The function takes the following parameters:
//
//   - event: expose Event.
//
// The function returns the following values:
//
//   - gint: return from the event signal emission (TRUE if the event was
//     handled).
func (widget *Widget) SendExpose(event *gdk.Event) int {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkEvent  // out
	var _cret C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_widget_send_expose(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SendFocusChange sends the focus change event to widget
//
// This function is not meant to be used by applications. The only time it
// should be used is when it is necessary for a Widget to assign focus to a
// widget that is semantically owned by the first widget even though it’s not a
// direct child - for instance, a search entry in a floating window similar to
// the quick search in TreeView.
//
// An example of its usage is:
//
//	GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
//
//	fevent->focus_change.type = GDK_FOCUS_CHANGE;
//	fevent->focus_change.in = TRUE;
//	fevent->focus_change.window = _gtk_widget_get_window (widget);
//	if (fevent->focus_change.window != NULL)
//	  g_object_ref (fevent->focus_change.window);
//
//	gtk_widget_send_focus_change (widget, fevent);
//
//	gdk_event_free (event);.
//
// The function takes the following parameters:
//
//   - event of type GDK_FOCUS_CHANGE.
//
// The function returns the following values:
//
//   - ok: return value from the event signal emission: TRUE if the event was
//     handled, and FALSE otherwise.
func (widget *Widget) SendFocusChange(event *gdk.Event) bool {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkEvent  // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_widget_send_focus_change(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetAccelPath: given an accelerator group, accel_group, and an accelerator
// path, accel_path, sets up an accelerator in accel_group so whenever the key
// binding that is defined for accel_path is pressed, widget will be activated.
// This removes any accelerators (for any accelerator group) installed by
// previous calls to gtk_widget_set_accel_path(). Associating accelerators with
// paths allows them to be modified by the user and the modifications to be
// saved for future use. (See gtk_accel_map_save().)
//
// This function is a low level function that would most likely be used by
// a menu creation system like UIManager. If you use UIManager, setting up
// accelerator paths will be done automatically.
//
// Even when you you aren’t using UIManager, if you only want to set up
// accelerators on menu items gtk_menu_item_set_accel_path() provides a somewhat
// more convenient interface.
//
// Note that accel_path string will be stored in a #GQuark. Therefore, if you
// pass a static string, you can save some memory by interning it first with
// g_intern_static_string().
//
// The function takes the following parameters:
//
//   - accelPath (optional): path used to look up the accelerator.
//   - accelGroup (optional): AccelGroup.
func (widget *Widget) SetAccelPath(accelPath string, accelGroup *AccelGroup) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.gchar         // out
	var _arg2 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if accelPath != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(accelPath)))
		defer C.free(unsafe.Pointer(_arg1))
	}
	if accelGroup != nil {
		_arg2 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))
	}

	C.gtk_widget_set_accel_path(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(accelPath)
	runtime.KeepAlive(accelGroup)
}

// SetAllocation sets the widget’s allocation. This should not be used directly,
// but from within a widget’s size_allocate method.
//
// The allocation set should be the “adjusted” or actual allocation. If you’re
// implementing a Container, you want to use gtk_widget_size_allocate() instead
// of gtk_widget_set_allocation(). The GtkWidgetClass::adjust_size_allocation
// virtual method adjusts the allocation inside gtk_widget_size_allocate() to
// create an adjusted allocation.
//
// The function takes the following parameters:
//
//   - allocation: pointer to a Allocation to copy from.
func (widget *Widget) SetAllocation(allocation *Allocation) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkAllocation // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	C.gtk_widget_set_allocation(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(allocation)
}

// SetAppPaintable sets whether the application intends to draw on the widget in
// an Widget::draw handler.
//
// This is a hint to the widget and does not affect the behavior of the GTK+
// core; many widgets ignore this flag entirely. For widgets that do pay
// attention to the flag, such as EventBox and Window, the effect is to suppress
// default themed drawing of the widget's background. (Children of the widget
// will still be drawn.) The application is then entirely responsible for
// drawing the widget background.
//
// Note that the background is still drawn when the widget is mapped.
//
// The function takes the following parameters:
//
//   - appPaintable: TRUE if the application will paint on the widget.
func (widget *Widget) SetAppPaintable(appPaintable bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if appPaintable {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_app_paintable(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(appPaintable)
}

// SetCanDefault specifies whether widget can be a default widget. See
// gtk_widget_grab_default() for details about the meaning of “default”.
//
// The function takes the following parameters:
//
//   - canDefault: whether or not widget can be a default widget.
func (widget *Widget) SetCanDefault(canDefault bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if canDefault {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_can_default(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(canDefault)
}

// SetCanFocus specifies whether widget can own the input focus. See
// gtk_widget_grab_focus() for actually setting the input focus on a widget.
//
// The function takes the following parameters:
//
//   - canFocus: whether or not widget can own the input focus.
func (widget *Widget) SetCanFocus(canFocus bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if canFocus {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_can_focus(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(canFocus)
}

// SetChildVisible sets whether widget should be mapped along with its when its
// parent is mapped and widget has been shown with gtk_widget_show().
//
// The child visibility can be set for widget before it is added to a container
// with gtk_widget_set_parent(), to avoid mapping children unnecessary before
// immediately unmapping them. However it will be reset to its default state of
// TRUE when the widget is removed from a container.
//
// Note that changing the child visibility of a widget does not queue a resize
// on the widget. Most of the time, the size of a widget is computed from all
// visible children, whether or not they are mapped. If this is not the case,
// the container can queue a resize itself.
//
// This function is only useful for container implementations and never should
// be called by an application.
//
// The function takes the following parameters:
//
//   - isVisible: if TRUE, widget should be mapped along with its parent.
func (widget *Widget) SetChildVisible(isVisible bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if isVisible {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_child_visible(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(isVisible)
}

// SetClip sets the widget’s clip. This must not be used directly,
// but from within a widget’s size_allocate method. It must be called after
// gtk_widget_set_allocation() (or after chaining up to the parent class),
// because that function resets the clip.
//
// The clip set should be the area that widget draws on. If widget is a
// Container, the area must contain all children's clips.
//
// If this function is not called by widget during a ::size-allocate handler,
// the clip will be set to widget's allocation.
//
// The function takes the following parameters:
//
//   - clip: pointer to a Allocation to copy from.
func (widget *Widget) SetClip(clip *Allocation) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkAllocation // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(clip)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	C.gtk_widget_set_clip(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(clip)
}

// SetCompositeName sets a widgets composite name. The widget must be a
// composite child of its parent; see gtk_widget_push_composite_child().
//
// Deprecated: Use gtk_widget_class_set_template(), or don’t use this API at
// all.
//
// The function takes the following parameters:
//
//   - name to set.
func (widget *Widget) SetCompositeName(name string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_widget_set_composite_name(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(name)
}

// SetDeviceEnabled enables or disables a Device to interact with widget and all
// its children.
//
// It does so by descending through the Window hierarchy and enabling the same
// mask that is has for core events (i.e. the one that gdk_window_get_events()
// returns).
//
// The function takes the following parameters:
//
//   - device: Device.
//   - enabled: whether to enable the device.
func (widget *Widget) SetDeviceEnabled(device gdk.Devicer, enabled bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkDevice // out
	var _arg2 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))
	if enabled {
		_arg2 = C.TRUE
	}

	C.gtk_widget_set_device_enabled(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)
	runtime.KeepAlive(enabled)
}

// SetDeviceEvents sets the device event mask (see EventMask) for a widget.
// The event mask determines which events a widget will receive from device.
// Keep in mind that different widgets have different default event masks,
// and by changing the event mask you may disrupt a widget’s functionality,
// so be careful. This function must be called while a widget is unrealized.
// Consider gtk_widget_add_device_events() for widgets that are already
// realized, or if you want to preserve the existing event mask. This
// function can’t be used with windowless widgets (which return FALSE from
// gtk_widget_get_has_window()); to get events on those widgets, place them
// inside a EventBox and receive events on the event box.
//
// The function takes the following parameters:
//
//   - device: Device.
//   - events: event mask.
func (widget *Widget) SetDeviceEvents(device gdk.Devicer, events gdk.EventMask) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkDevice   // out
	var _arg2 C.GdkEventMask // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))
	_arg2 = C.GdkEventMask(events)

	C.gtk_widget_set_device_events(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(device)
	runtime.KeepAlive(events)
}

// SetDirection sets the reading direction on a particular widget.
// This direction controls the primary direction for widgets containing text,
// and also the direction in which the children of a container are packed. The
// ability to set the direction is present in order so that correct localization
// into languages with right-to-left reading directions can be done. Generally,
// applications will let the default reading direction present, except for
// containers where the containers are arranged in an order that is explicitly
// visual rather than logical (such as buttons for text justification).
//
// If the direction is set to GTK_TEXT_DIR_NONE, then the value set by
// gtk_widget_set_default_direction() will be used.
//
// The function takes the following parameters:
//
//   - dir: new direction.
func (widget *Widget) SetDirection(dir TextDirection) {
	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkTextDirection // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkTextDirection(dir)

	C.gtk_widget_set_direction(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(dir)
}

// SetDoubleBuffered widgets are double buffered by default; you can use
// this function to turn off the buffering. “Double buffered” simply means
// that gdk_window_begin_draw_frame() and gdk_window_end_draw_frame()
// are called automatically around expose events sent to the widget.
// gdk_window_begin_draw_frame() diverts all drawing to a widget's window to
// an offscreen buffer, and gdk_window_end_draw_frame() draws the buffer to the
// screen. The result is that users see the window update in one smooth step,
// and don’t see individual graphics primitives being rendered.
//
// In very simple terms, double buffered widgets don’t flicker, so you would
// only use this function to turn off double buffering if you had special needs
// and really knew what you were doing.
//
// Note: if you turn off double-buffering, you have to handle expose events,
// since even the clearing to the background color or pixmap will not happen
// automatically (as it is done in gdk_window_begin_draw_frame()).
//
// In 3.10 GTK and GDK have been restructured for translucent drawing.
// Since then expose events for double-buffered widgets are culled into a
// single event to the toplevel GDK window. If you now unset double buffering,
// you will cause a separate rendering pass for every widget. This will likely
// cause rendering problems - in particular related to stacking - and usually
// increases rendering times significantly.
//
// Deprecated: This function does not work under non-X11 backends or with
// non-native windows. It should not be used in newly written code.
//
// The function takes the following parameters:
//
//   - doubleBuffered: TRUE to double-buffer a widget.
func (widget *Widget) SetDoubleBuffered(doubleBuffered bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if doubleBuffered {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_double_buffered(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(doubleBuffered)
}

// SetEvents sets the event mask (see EventMask) for a widget. The event mask
// determines which events a widget will receive. Keep in mind that different
// widgets have different default event masks, and by changing the event mask
// you may disrupt a widget’s functionality, so be careful. This function must
// be called while a widget is unrealized. Consider gtk_widget_add_events() for
// widgets that are already realized, or if you want to preserve the existing
// event mask. This function can’t be used with widgets that have no window.
// (See gtk_widget_get_has_window()). To get events on those widgets, place them
// inside a EventBox and receive events on the event box.
//
// The function takes the following parameters:
//
//   - events: event mask.
func (widget *Widget) SetEvents(events int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(events)

	C.gtk_widget_set_events(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(events)
}

// SetFocusOnClick sets whether the widget should grab focus when it is clicked
// with the mouse. Making mouse clicks not grab focus is useful in places like
// toolbars where you don’t want the keyboard focus removed from the main area
// of the application.
//
// The function takes the following parameters:
//
//   - focusOnClick: whether the widget should grab focus when clicked with the
//     mouse.
func (widget *Widget) SetFocusOnClick(focusOnClick bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if focusOnClick {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_focus_on_click(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(focusOnClick)
}

// SetFontMap sets the font map to use for Pango rendering. When not set,
// the widget will inherit the font map from its parent.
//
// The function takes the following parameters:
//
//   - fontMap (optional) or NULL to unset any previously set font map.
func (widget *Widget) SetFontMap(fontMap pango.FontMapper) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 *C.PangoFontMap // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if fontMap != nil {
		_arg1 = (*C.PangoFontMap)(unsafe.Pointer(coreglib.InternObject(fontMap).Native()))
	}

	C.gtk_widget_set_font_map(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(fontMap)
}

// SetFontOptions sets the #cairo_font_options_t used for Pango rendering in
// this widget. When not set, the default font options for the Screen will be
// used.
//
// The function takes the following parameters:
//
//   - options (optional) or NULL to unset any previously set default font
//     options.
func (widget *Widget) SetFontOptions(options *cairo.FontOptions) {
	var _arg0 *C.GtkWidget            // out
	var _arg1 *C.cairo_font_options_t // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if options != nil {
		_arg1 = (*C.cairo_font_options_t)(gextras.StructNative(unsafe.Pointer(options)))
	}

	C.gtk_widget_set_font_options(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(options)
}

// SetHAlign sets the horizontal alignment of widget. See the Widget:halign
// property.
//
// The function takes the following parameters:
//
//   - align: horizontal alignment.
func (widget *Widget) SetHAlign(align Align) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.GtkAlign   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkAlign(align)

	C.gtk_widget_set_halign(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(align)
}

// SetHasTooltip sets the has-tooltip property on widget to has_tooltip.
// See Widget:has-tooltip for more information.
//
// The function takes the following parameters:
//
//   - hasTooltip: whether or not widget has a tooltip.
func (widget *Widget) SetHasTooltip(hasTooltip bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if hasTooltip {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_has_tooltip(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(hasTooltip)
}

// SetHasWindow specifies whether widget has a Window of its own. Note that all
// realized widgets have a non-NULL “window” pointer (gtk_widget_get_window()
// never returns a NULL window when a widget is realized), but for many of
// them it’s actually the Window of one of its parent widgets. Widgets that do
// not create a window for themselves in Widget::realize must announce this by
// calling this function with has_window = FALSE.
//
// This function should only be called by widget implementations, and they
// should call it in their init() function.
//
// The function takes the following parameters:
//
//   - hasWindow: whether or not widget has a window.
func (widget *Widget) SetHasWindow(hasWindow bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if hasWindow {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_has_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(hasWindow)
}

// SetHExpand sets whether the widget would like any available extra horizontal
// space. When a user resizes a Window, widgets with expand=TRUE generally
// receive the extra space. For example, a list or scrollable area or document
// in your window would often be set to expand.
//
// Call this function to set the expand flag if you would like your widget to
// become larger horizontally when the window has extra room.
//
// By default, widgets automatically expand if any of their children want to
// expand. (To see if a widget will automatically expand given its current
// children and state, call gtk_widget_compute_expand(). A container can decide
// how the expandability of children affects the expansion of the container by
// overriding the compute_expand virtual method on Widget.).
//
// Setting hexpand explicitly with this function will override the automatic
// expand behavior.
//
// This function forces the widget to expand or not to expand, regardless of
// children. The override occurs because gtk_widget_set_hexpand() sets the
// hexpand-set property (see gtk_widget_set_hexpand_set()) which causes the
// widget’s hexpand value to be used, rather than looking at children and widget
// state.
//
// The function takes the following parameters:
//
//   - expand: whether to expand.
func (widget *Widget) SetHExpand(expand bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if expand {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_hexpand(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(expand)
}

// SetHExpandSet sets whether the hexpand flag (see gtk_widget_get_hexpand())
// will be used.
//
// The hexpand-set property will be set automatically when you call
// gtk_widget_set_hexpand() to set hexpand, so the most likely reason to use
// this function would be to unset an explicit expand flag.
//
// If hexpand is set, then it overrides any computed expand value based on child
// widgets. If hexpand is not set, then the expand value depends on whether any
// children of the widget would like to expand.
//
// There are few reasons to use this function, but it’s here for completeness
// and consistency.
//
// The function takes the following parameters:
//
//   - set: value for hexpand-set property.
func (widget *Widget) SetHExpandSet(set bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if set {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_hexpand_set(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(set)
}

// SetMapped marks the widget as being mapped.
//
// This function should only ever be called in a derived widget's “map” or
// “unmap” implementation.
//
// The function takes the following parameters:
//
//   - mapped: TRUE to mark the widget as mapped.
func (widget *Widget) SetMapped(mapped bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if mapped {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_mapped(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(mapped)
}

// SetMarginBottom sets the bottom margin of widget. See the
// Widget:margin-bottom property.
//
// The function takes the following parameters:
//
//   - margin: bottom margin.
func (widget *Widget) SetMarginBottom(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_bottom(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetMarginEnd sets the end margin of widget. See the Widget:margin-end
// property.
//
// The function takes the following parameters:
//
//   - margin: end margin.
func (widget *Widget) SetMarginEnd(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_end(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetMarginLeft sets the left margin of widget. See the Widget:margin-left
// property.
//
// Deprecated: Use gtk_widget_set_margin_start() instead.
//
// The function takes the following parameters:
//
//   - margin: left margin.
func (widget *Widget) SetMarginLeft(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_left(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetMarginRight sets the right margin of widget. See the Widget:margin-right
// property.
//
// Deprecated: Use gtk_widget_set_margin_end() instead.
//
// The function takes the following parameters:
//
//   - margin: right margin.
func (widget *Widget) SetMarginRight(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_right(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetMarginStart sets the start margin of widget. See the Widget:margin-start
// property.
//
// The function takes the following parameters:
//
//   - margin: start margin.
func (widget *Widget) SetMarginStart(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_start(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetMarginTop sets the top margin of widget. See the Widget:margin-top
// property.
//
// The function takes the following parameters:
//
//   - margin: top margin.
func (widget *Widget) SetMarginTop(margin int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(margin)

	C.gtk_widget_set_margin_top(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(margin)
}

// SetName widgets can be named, which allows you to refer to them from a CSS
// file. You can apply a style to widgets with a particular name in the CSS
// file. See the documentation for the CSS syntax (on the same page as the docs
// for StyleContext).
//
// Note that the CSS syntax has certain special characters to delimit and
// represent elements in a selector (period, #, >, *...), so using these will
// make your widget impossible to match by name. Any combination of alphanumeric
// symbols, dashes and underscores will suffice.
//
// The function takes the following parameters:
//
//   - name for the widget.
func (widget *Widget) SetName(name string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_widget_set_name(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(name)
}

// SetNoShowAll sets the Widget:no-show-all property, which determines whether
// calls to gtk_widget_show_all() will affect this widget.
//
// This is mostly for use in constructing widget hierarchies with externally
// controlled visibility, see UIManager.
//
// The function takes the following parameters:
//
//   - noShowAll: new value for the “no-show-all” property.
func (widget *Widget) SetNoShowAll(noShowAll bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if noShowAll {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_no_show_all(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(noShowAll)
}

// SetOpacity: request the widget to be rendered partially transparent,
// with opacity 0 being fully transparent and 1 fully opaque. (Opacity values
// are clamped to the [0,1] range.). This works on both toplevel widget,
// and child widgets, although there are some limitations:
//
// For toplevel widgets this depends on the capabilities of the windowing
// system. On X11 this has any effect only on X screens with a compositing
// manager running. See gtk_widget_is_composited(). On Windows it should work
// always, although setting a window’s opacity after the window has been shown
// causes it to flicker once on Windows.
//
// For child widgets it doesn’t work if any affected widget has a native window,
// or disables double buffering.
//
// The function takes the following parameters:
//
//   - opacity: desired opacity, between 0 and 1.
func (widget *Widget) SetOpacity(opacity float64) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.double     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.double(opacity)

	C.gtk_widget_set_opacity(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(opacity)
}

// SetParent: this function is useful only when implementing subclasses of
// Container. Sets the container as the parent of widget, and takes care of some
// details such as updating the state and style of the child to reflect its new
// location. The opposite function is gtk_widget_unparent().
//
// The function takes the following parameters:
//
//   - parent container.
func (widget *Widget) SetParent(parent Widgetter) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(parent).Native()))

	C.gtk_widget_set_parent(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(parent)
}

// SetParentWindow sets a non default parent window for widget.
//
// For Window classes, setting a parent_window effects whether the window is a
// toplevel window or can be embedded into other widgets.
//
// For Window classes, this needs to be called before the window is realized.
//
// The function takes the following parameters:
//
//   - parentWindow: new parent window.
func (widget *Widget) SetParentWindow(parentWindow gdk.Windower) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkWindow // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(parentWindow).Native()))

	C.gtk_widget_set_parent_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(parentWindow)
}

// SetRealized marks the widget as being realized. This function must only be
// called after all Windows for the widget have been created and registered.
//
// This function should only ever be called in a derived widget's “realize” or
// “unrealize” implementation.
//
// The function takes the following parameters:
//
//   - realized: TRUE to mark the widget as realized.
func (widget *Widget) SetRealized(realized bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if realized {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_realized(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(realized)
}

// SetReceivesDefault specifies whether widget will be treated as the default
// widget within its toplevel when it has the focus, even if another widget is
// the default.
//
// See gtk_widget_grab_default() for details about the meaning of “default”.
//
// The function takes the following parameters:
//
//   - receivesDefault: whether or not widget can be a default widget.
func (widget *Widget) SetReceivesDefault(receivesDefault bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if receivesDefault {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_receives_default(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(receivesDefault)
}

// SetRedrawOnAllocate sets whether the entire widget is queued for drawing
// when its size allocation changes. By default, this setting is TRUE and the
// entire widget is redrawn on every size change. If your widget leaves the
// upper left unchanged when made bigger, turning this setting off will improve
// performance.
//
// Note that for widgets where gtk_widget_get_has_window() is FALSE setting this
// flag to FALSE turns off all allocation on resizing: the widget will not even
// redraw if its position changes; this is to allow containers that don’t draw
// anything to avoid excess invalidations. If you set this flag on a widget
// with no window that does draw on widget->window, you are responsible for
// invalidating both the old and new allocation of the widget when the widget
// is moved and responsible for invalidating regions newly when the widget
// increases size.
//
// The function takes the following parameters:
//
//   - redrawOnAllocate: if TRUE, the entire widget will be redrawn when it is
//     allocated to a new size. Otherwise, only the new portion of the widget
//     will be redrawn.
func (widget *Widget) SetRedrawOnAllocate(redrawOnAllocate bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if redrawOnAllocate {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_redraw_on_allocate(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(redrawOnAllocate)
}

// SetSensitive sets the sensitivity of a widget. A widget is sensitive if the
// user can interact with it. Insensitive widgets are “grayed out” and the
// user can’t interact with them. Insensitive widgets are known as “inactive”,
// “disabled”, or “ghosted” in some other toolkits.
//
// The function takes the following parameters:
//
//   - sensitive: TRUE to make the widget sensitive.
func (widget *Widget) SetSensitive(sensitive bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if sensitive {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_sensitive(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(sensitive)
}

// SetSizeRequest sets the minimum size of a widget; that is, the widget’s size
// request will be at least width by height. You can use this function to force
// a widget to be larger than it normally would be.
//
// In most cases, gtk_window_set_default_size() is a better choice for toplevel
// windows than this function; setting the default size will still allow users
// to shrink the window. Setting the size request will force them to leave the
// window at least as large as the size request. When dealing with window sizes,
// gtk_window_set_geometry_hints() can be a useful function as well.
//
// Note the inherent danger of setting any fixed size - themes, translations
// into other languages, different fonts, and user action can all change
// the appropriate size for a given widget. So, it's basically impossible to
// hardcode a size that will always be correct.
//
// The size request of a widget is the smallest size a widget can accept while
// still functioning well and drawing itself correctly. However in some strange
// cases a widget may be allocated less than its requested size, and in many
// cases a widget may be allocated more space than it requested.
//
// If the size request in a given direction is -1 (unset), then the “natural”
// size request of the widget will be used instead.
//
// The size request set here does not include any margin from the Widget
// properties margin-left, margin-right, margin-top, and margin-bottom, but it
// does include pretty much all other padding or border properties set by any
// subclass of Widget.
//
// The function takes the following parameters:
//
//   - width widget should request, or -1 to unset.
//   - height widget should request, or -1 to unset.
func (widget *Widget) SetSizeRequest(width, height int) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_widget_set_size_request(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetState: this function is for use in widget implementations. Sets the state
// of a widget (insensitive, prelighted, etc.) Usually you should set the state
// using wrapper functions such as gtk_widget_set_sensitive().
//
// Deprecated: Use gtk_widget_set_state_flags() instead.
//
// The function takes the following parameters:
//
//   - state: new state for widget.
func (widget *Widget) SetState(state StateType) {
	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(state)

	C.gtk_widget_set_state(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(state)
}

// SetStateFlags: this function is for use in widget implementations. Turns on
// flag values in the current widget state (insensitive, prelighted, etc.).
//
// This function accepts the values GTK_STATE_FLAG_DIR_LTR and
// GTK_STATE_FLAG_DIR_RTL but ignores them. If you want to set the widget's
// direction, use gtk_widget_set_direction().
//
// It is worth mentioning that any other state than GTK_STATE_FLAG_INSENSITIVE,
// will be propagated down to all non-internal children if widget is a
// Container, while GTK_STATE_FLAG_INSENSITIVE itself will be propagated
// down to all Container children by different means than turning on the
// state flag down the hierarchy, both gtk_widget_get_state_flags() and
// gtk_widget_is_sensitive() will make use of these.
//
// The function takes the following parameters:
//
//   - flags: state flags to turn on.
//   - clear: whether to clear state before turning on flags.
func (widget *Widget) SetStateFlags(flags StateFlags, clear bool) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkStateFlags // out
	var _arg2 C.gboolean      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateFlags(flags)
	if clear {
		_arg2 = C.TRUE
	}

	C.gtk_widget_set_state_flags(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(clear)
}

// SetStyle: used to set the Style for a widget (widget->style). Since GTK 3,
// this function does nothing, the passed in style is ignored.
//
// Deprecated: Use StyleContext instead.
//
// The function takes the following parameters:
//
//   - style (optional) or NULL to remove the effect of a previous call to
//     gtk_widget_set_style() and go back to the default style.
func (widget *Widget) SetStyle(style *Style) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkStyle  // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if style != nil {
		_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	}

	C.gtk_widget_set_style(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(style)
}

// SetSupportMultidevice enables or disables multiple pointer awareness. If this
// setting is TRUE, widget will start receiving multiple, per device enter/leave
// events. Note that if custom Windows are created in Widget::realize,
// gdk_window_set_support_multidevice() will have to be called manually on them.
//
// The function takes the following parameters:
//
//   - supportMultidevice: TRUE to support input from multiple devices.
func (widget *Widget) SetSupportMultidevice(supportMultidevice bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if supportMultidevice {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_support_multidevice(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(supportMultidevice)
}

// SetTooltipMarkup sets markup as the contents of the tooltip, which is marked
// up with the [Pango text markup language][PangoMarkupFormat].
//
// This function will take care of setting Widget:has-tooltip to TRUE and of the
// default handler for the Widget::query-tooltip signal.
//
// See also the Widget:tooltip-markup property and gtk_tooltip_set_markup().
//
// The function takes the following parameters:
//
//   - markup (optional) contents of the tooltip for widget, or NULL.
func (widget *Widget) SetTooltipMarkup(markup string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if markup != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(markup)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_widget_set_tooltip_markup(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(markup)
}

// SetTooltipText sets text as the contents of the tooltip. This function will
// take care of setting Widget:has-tooltip to TRUE and of the default handler
// for the Widget::query-tooltip signal.
//
// See also the Widget:tooltip-text property and gtk_tooltip_set_text().
//
// The function takes the following parameters:
//
//   - text (optional) contents of the tooltip for widget.
func (widget *Widget) SetTooltipText(text string) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if text != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(text)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_widget_set_tooltip_text(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(text)
}

// SetTooltipWindow replaces the default window used for displaying tooltips
// with custom_window. GTK+ will take care of showing and hiding custom_window
// at the right moment, to behave likewise as the default tooltip window.
// If custom_window is NULL, the default tooltip window will be used.
//
// The function takes the following parameters:
//
//   - customWindow (optional) or NULL.
func (widget *Widget) SetTooltipWindow(customWindow *Window) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWindow // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if customWindow != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(customWindow).Native()))
	}

	C.gtk_widget_set_tooltip_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(customWindow)
}

// SetVAlign sets the vertical alignment of widget. See the Widget:valign
// property.
//
// The function takes the following parameters:
//
//   - align: vertical alignment.
func (widget *Widget) SetVAlign(align Align) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.GtkAlign   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkAlign(align)

	C.gtk_widget_set_valign(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(align)
}

// SetVExpand sets whether the widget would like any available extra vertical
// space.
//
// See gtk_widget_set_hexpand() for more detail.
//
// The function takes the following parameters:
//
//   - expand: whether to expand.
func (widget *Widget) SetVExpand(expand bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if expand {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_vexpand(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(expand)
}

// SetVExpandSet sets whether the vexpand flag (see gtk_widget_get_vexpand())
// will be used.
//
// See gtk_widget_set_hexpand_set() for more detail.
//
// The function takes the following parameters:
//
//   - set: value for vexpand-set property.
func (widget *Widget) SetVExpandSet(set bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if set {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_vexpand_set(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(set)
}

// SetVisible sets the visibility state of widget. Note that setting
// this to TRUE doesn’t mean the widget is actually viewable, see
// gtk_widget_get_visible().
//
// This function simply calls gtk_widget_show() or gtk_widget_hide() but is
// nicer to use when the visibility of the widget depends on some condition.
//
// The function takes the following parameters:
//
//   - visible: whether the widget should be shown or not.
func (widget *Widget) SetVisible(visible bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if visible {
		_arg1 = C.TRUE
	}

	C.gtk_widget_set_visible(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(visible)
}

// SetVisual sets the visual that should be used for by widget and its children
// for creating Windows. The visual must be on the same Screen as returned by
// gtk_widget_get_screen(), so handling the Widget::screen-changed signal is
// necessary.
//
// Setting a new visual will not cause widget to recreate its windows, so you
// should call this function before widget is realized.
//
// The function takes the following parameters:
//
//   - visual (optional) to be used or NULL to unset a previous one.
func (widget *Widget) SetVisual(visual *gdk.Visual) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkVisual // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if visual != nil {
		_arg1 = (*C.GdkVisual)(unsafe.Pointer(coreglib.InternObject(visual).Native()))
	}

	C.gtk_widget_set_visual(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(visual)
}

// SetWindow sets a widget’s window. This function should only be used in a
// widget’s Widget::realize implementation. The window passed is usually either
// new window created with gdk_window_new(), or the window of its parent widget
// as returned by gtk_widget_get_parent_window().
//
// Widgets must indicate whether they will create their own Window by calling
// gtk_widget_set_has_window(). This is usually done in the widget’s init()
// function.
//
// Note that this function does not add any reference to window.
//
// The function takes the following parameters:
//
//   - window: Window.
func (widget *Widget) SetWindow(window gdk.Windower) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkWindow // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	C.g_object_ref(C.gpointer(coreglib.InternObject(window).Native()))

	C.gtk_widget_set_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(window)
}

// ShapeCombineRegion sets a shape for this widget’s GDK window. This allows
// for transparent windows etc., see gdk_window_shape_combine_region() for more
// information.
//
// The function takes the following parameters:
//
//   - region (optional): shape to be added, or NULL to remove an existing
//     shape.
func (widget *Widget) ShapeCombineRegion(region *cairo.Region) {
	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.cairo_region_t // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if region != nil {
		_arg1 = (*C.cairo_region_t)(unsafe.Pointer(region.Native()))
	}

	C.gtk_widget_shape_combine_region(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(region)
}

// Show flags a widget to be displayed. Any widget that isn’t shown will not
// appear on the screen. If you want to show all the widgets in a container,
// it’s easier to call gtk_widget_show_all() on the container, instead of
// individually showing the widgets.
//
// Remember that you have to show the containers containing a widget,
// in addition to the widget itself, before it will appear onscreen.
//
// When a toplevel container is shown, it is immediately realized and mapped;
// other shown widgets are realized and mapped when their toplevel container is
// realized and mapped.
func (widget *Widget) Show() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_show(_arg0)
	runtime.KeepAlive(widget)
}

// ShowAll: recursively shows a widget, and any child widgets (if the widget is
// a container).
func (widget *Widget) ShowAll() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_show_all(_arg0)
	runtime.KeepAlive(widget)
}

// ShowNow shows a widget. If the widget is an unmapped toplevel widget (i.e.
// a Window that has not yet been shown), enter the main loop and wait for the
// window to actually be mapped. Be careful; because the main loop is running,
// anything can happen during this function.
func (widget *Widget) ShowNow() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_show_now(_arg0)
	runtime.KeepAlive(widget)
}

// SizeAllocate: this function is only used by Container subclasses, to assign a
// size and position to their child widgets.
//
// In this function, the allocation may be adjusted. It will be forced to a 1x1
// minimum size, and the adjust_size_allocation virtual method on the child will
// be used to adjust the allocation. Standard adjustments include removing the
// widget’s margins, and applying the widget’s Widget:halign and Widget:valign
// properties.
//
// For baseline support in containers you need to use
// gtk_widget_size_allocate_with_baseline() instead.
//
// The function takes the following parameters:
//
//   - allocation: position and size to be allocated to widget.
func (widget *Widget) SizeAllocate(allocation *Allocation) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkAllocation // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	C.gtk_widget_size_allocate(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(allocation)
}

// SizeAllocateWithBaseline: this function is only used by Container subclasses,
// to assign a size, position and (optionally) baseline to their child widgets.
//
// In this function, the allocation and baseline may be adjusted. It will be
// forced to a 1x1 minimum size, and the adjust_size_allocation virtual and
// adjust_baseline_allocation methods on the child will be used to adjust
// the allocation and baseline. Standard adjustments include removing the
// widget's margins, and applying the widget’s Widget:halign and Widget:valign
// properties.
//
// If the child widget does not have a valign of GTK_ALIGN_BASELINE the baseline
// argument is ignored and -1 is used instead.
//
// The function takes the following parameters:
//
//   - allocation: position and size to be allocated to widget.
//   - baseline of the child, or -1.
func (widget *Widget) SizeAllocateWithBaseline(allocation *Allocation, baseline int) {
	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkAllocation // out
	var _arg2 C.gint           // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle
	_arg2 = C.gint(baseline)

	C.gtk_widget_size_allocate_with_baseline(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(allocation)
	runtime.KeepAlive(baseline)
}

// SizeRequest: this function is typically used when implementing a Container
// subclass. Obtains the preferred size of a widget. The container uses this
// information to arrange its child widgets and decide what size allocations to
// give them with gtk_widget_size_allocate().
//
// You can also call this function from an application, with some caveats. Most
// notably, getting a size request requires the widget to be associated with a
// screen, because font information may be needed. Multihead-aware applications
// should keep this in mind.
//
// Also remember that the size request is not necessarily the size a widget will
// actually be allocated.
//
// Deprecated: Use gtk_widget_get_preferred_size() instead.
//
// The function returns the following values:
//
//   - requisition to be filled in.
func (widget *Widget) SizeRequest() *Requisition {
	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkRequisition // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_size_request(_arg0, &_arg1)
	runtime.KeepAlive(widget)

	var _requisition *Requisition // out

	_requisition = (*Requisition)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))

	return _requisition
}

// StyleAttach: this function attaches the widget’s Style to the widget's
// Window. It is a replacement for
//
//	widget->style = gtk_style_attach (widget->style, widget->window);
//
// and should only ever be called in a derived widget’s “realize” implementation
// which does not chain up to its parent class' “realize” implementation,
// because one of the parent classes (finally Widget) would attach the style
// itself.
//
// Deprecated: This step is unnecessary with StyleContext.
func (widget *Widget) StyleAttach() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_style_attach(_arg0)
	runtime.KeepAlive(widget)
}

// StyleGetProperty gets the value of a style property of widget.
//
// The function takes the following parameters:
//
//   - propertyName: name of a style property.
//   - value: location to return the property value.
func (widget *Widget) StyleGetProperty(propertyName string, value *coreglib.Value) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gchar     // out
	var _arg2 *C.GValue    // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(propertyName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.GValue)(unsafe.Pointer(value.Native()))

	C.gtk_widget_style_get_property(_arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(propertyName)
	runtime.KeepAlive(value)
}

// ThawChildNotify reverts the effect of a previous call to
// gtk_widget_freeze_child_notify(). This causes all queued Widget::child-notify
// signals on widget to be emitted.
func (widget *Widget) ThawChildNotify() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_thaw_child_notify(_arg0)
	runtime.KeepAlive(widget)
}

// TranslateCoordinates: translate coordinates relative to src_widget’s
// allocation to coordinates relative to dest_widget’s allocations. In order
// to perform this operation, both widgets must be realized, and must share a
// common toplevel.
//
// The function takes the following parameters:
//
//   - destWidget: Widget.
//   - srcX: x position relative to src_widget.
//   - srcY: y position relative to src_widget.
//
// The function returns the following values:
//
//   - destX (optional): location to store X position relative to dest_widget.
//   - destY (optional): location to store Y position relative to dest_widget.
//   - ok: FALSE if either widget was not realized, or there was no common
//     ancestor. In this case, nothing is stored in *dest_x and *dest_y.
//     Otherwise TRUE.
func (srcWidget *Widget) TranslateCoordinates(destWidget Widgetter, srcX, srcY int) (destX, destY int, ok bool) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out
	var _arg4 C.gint       // in
	var _arg5 C.gint       // in
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(srcWidget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(destWidget).Native()))
	_arg2 = C.gint(srcX)
	_arg3 = C.gint(srcY)

	_cret = C.gtk_widget_translate_coordinates(_arg0, _arg1, _arg2, _arg3, &_arg4, &_arg5)
	runtime.KeepAlive(srcWidget)
	runtime.KeepAlive(destWidget)
	runtime.KeepAlive(srcX)
	runtime.KeepAlive(srcY)

	var _destX int // out
	var _destY int // out
	var _ok bool   // out

	_destX = int(_arg4)
	_destY = int(_arg5)
	if _cret != 0 {
		_ok = true
	}

	return _destX, _destY, _ok
}

// TriggerTooltipQuery triggers a tooltip query on the display where the
// toplevel of widget is located. See gtk_tooltip_trigger_tooltip_query() for
// more information.
func (widget *Widget) TriggerTooltipQuery() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_trigger_tooltip_query(_arg0)
	runtime.KeepAlive(widget)
}

// Unmap: this function is only for use in widget implementations. Causes a
// widget to be unmapped if it’s currently mapped.
func (widget *Widget) Unmap() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_unmap(_arg0)
	runtime.KeepAlive(widget)
}

// Unparent: this function is only for use in widget implementations. Should be
// called by implementations of the remove method on Container, to dissociate a
// child from the container.
func (widget *Widget) Unparent() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_unparent(_arg0)
	runtime.KeepAlive(widget)
}

// Unrealize: this function is only useful in widget implementations. Causes a
// widget to be unrealized (frees all GDK resources associated with the widget,
// such as widget->window).
func (widget *Widget) Unrealize() {
	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C.gtk_widget_unrealize(_arg0)
	runtime.KeepAlive(widget)
}

// UnregisterWindow unregisters a Window from the widget that was previously set
// up with gtk_widget_register_window(). You need to call this when the window
// is no longer used by the widget, such as when you destroy it.
//
// The function takes the following parameters:
//
//   - window: Window.
func (widget *Widget) UnregisterWindow(window gdk.Windower) {
	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkWindow // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_widget_unregister_window(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(window)
}

// UnsetStateFlags: this function is for use in widget implementations. Turns
// off flag values for the current widget state (insensitive, prelighted, etc.).
// See gtk_widget_set_state_flags().
//
// The function takes the following parameters:
//
//   - flags: state flags to turn off.
func (widget *Widget) UnsetStateFlags(flags StateFlags) {
	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkStateFlags // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateFlags(flags)

	C.gtk_widget_unset_state_flags(_arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(flags)
}

func (widget *Widget) adjustBaselineAllocation(baseline *int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.adjust_baseline_allocation

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gint      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gint)(unsafe.Pointer(baseline))

	C._gotk4_gtk3_Widget_virtual_adjust_baseline_allocation(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(baseline)
}

// The function takes the following parameters:
//
//   - minimumBaseline
//   - naturalBaseline
func (widget *Widget) adjustBaselineRequest(minimumBaseline, naturalBaseline *int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.adjust_baseline_request

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.gint      // out
	var _arg2 *C.gint      // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.gint)(unsafe.Pointer(minimumBaseline))
	_arg2 = (*C.gint)(unsafe.Pointer(naturalBaseline))

	C._gotk4_gtk3_Widget_virtual_adjust_baseline_request(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(minimumBaseline)
	runtime.KeepAlive(naturalBaseline)
}

// adjustSizeAllocation: convert an initial size allocation assigned by a
// Container using gtk_widget_size_allocate(), into an actual size allocation
// to be used by the widget. adjust_size_allocation adjusts to a child widget’s
// actual allocation from what a parent container computed for the child.
// The adjusted allocation must be entirely within the original allocation.
// In any custom implementation, chain up to the default Widget implementation
// of this method, which applies the margin and alignment properties of Widget.
// Chain up before performing your own adjustments so your own adjustments
// remove more allocation after the Widget base class has already removed margin
// and alignment. The natural size passed in should be adjusted in the same
// way as the allocated size, which allows adjustments to perform alignments or
// other changes based on natural size.
//
// The function takes the following parameters:
//
//   - orientation
//   - minimumSize
//   - naturalSize
//   - allocatedPos
//   - allocatedSize
func (widget *Widget) adjustSizeAllocation(orientation Orientation, minimumSize, naturalSize, allocatedPos, allocatedSize *int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.adjust_size_allocation

	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkOrientation // out
	var _arg2 *C.gint          // out
	var _arg3 *C.gint          // out
	var _arg4 *C.gint          // out
	var _arg5 *C.gint          // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkOrientation(orientation)
	_arg2 = (*C.gint)(unsafe.Pointer(minimumSize))
	_arg3 = (*C.gint)(unsafe.Pointer(naturalSize))
	_arg4 = (*C.gint)(unsafe.Pointer(allocatedPos))
	_arg5 = (*C.gint)(unsafe.Pointer(allocatedSize))

	C._gotk4_gtk3_Widget_virtual_adjust_size_allocation(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(minimumSize)
	runtime.KeepAlive(naturalSize)
	runtime.KeepAlive(allocatedPos)
	runtime.KeepAlive(allocatedSize)
}

// adjustSizeRequest: convert an initial size request from a widget's
// SizeRequestMode virtual method implementations into a size request to be used
// by parent containers in laying out the widget. adjust_size_request adjusts
// from a child widget's original request to what a parent container should use
// for layout. The for_size argument will be -1 if the request should not be
// for a particular size in the opposing orientation, i.e. if the request is
// not height-for-width or width-for-height. If for_size is greater than -1,
// it is the proposed allocation in the opposing orientation that we need the
// request for. Implementations of adjust_size_request should chain up to the
// default implementation, which applies Widget’s margin properties and imposes
// any values from gtk_widget_set_size_request(). Chaining up should be last,
// after your subclass adjusts the request, so Widget can apply constraints and
// add the margin properly.
//
// The function takes the following parameters:
//
//   - orientation
//   - minimumSize
//   - naturalSize
func (widget *Widget) adjustSizeRequest(orientation Orientation, minimumSize, naturalSize *int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.adjust_size_request

	var _arg0 *C.GtkWidget     // out
	var _arg1 C.GtkOrientation // out
	var _arg2 *C.gint          // out
	var _arg3 *C.gint          // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkOrientation(orientation)
	_arg2 = (*C.gint)(unsafe.Pointer(minimumSize))
	_arg3 = (*C.gint)(unsafe.Pointer(naturalSize))

	C._gotk4_gtk3_Widget_virtual_adjust_size_request(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(orientation)
	runtime.KeepAlive(minimumSize)
	runtime.KeepAlive(naturalSize)
}

// buttonPressEvent: signal will be emitted when a button (typically from a
// mouse) is pressed.
func (widget *Widget) buttonPressEvent(event *gdk.EventButton) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.button_press_event

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkEventButton // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventButton)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_button_press_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// buttonReleaseEvent: signal will be emitted when a button (typically from a
// mouse) is released.
func (widget *Widget) buttonReleaseEvent(event *gdk.EventButton) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.button_release_event

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkEventButton // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventButton)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_button_release_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// canActivateAccel determines whether an accelerator that activates the
// signal identified by signal_id can currently be activated. This is done by
// emitting the Widget::can-activate-accel signal on widget; if the signal
// isn’t overridden by a handler or in a derived widget, then the default check
// is that the widget must be sensitive, and the widget and all its ancestors
// mapped.
//
// The function takes the following parameters:
//
//   - signalId: ID of a signal installed on widget.
//
// The function returns the following values:
//
//   - ok: TRUE if the accelerator can be activated.
func (widget *Widget) canActivateAccel(signalId uint) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.can_activate_accel

	var _arg0 *C.GtkWidget // out
	var _arg1 C.guint      // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.guint(signalId)

	_cret = C._gotk4_gtk3_Widget_virtual_can_activate_accel(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(signalId)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// compositedChanged: signal emitted when the composited status of widgets
// screen changes. See gdk_screen_is_composited().
func (widget *Widget) compositedChanged() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.composited_changed

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_composited_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// configureEvent: signal will be emitted when the size, position or stacking of
// the widget’s window has changed.
func (widget *Widget) configureEvent(event *gdk.EventConfigure) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.configure_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventConfigure // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventConfigure)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_configure_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// damageEvent: signal emitted when a redirected window belonging to widget gets
// drawn into.
func (widget *Widget) damageEvent(event *gdk.EventExpose) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.damage_event

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkEventExpose // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventExpose)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_damage_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// deleteEvent: signal emitted if a user requests that a toplevel window is
// closed.
func (widget *Widget) deleteEvent(event *gdk.EventAny) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.delete_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventAny // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventAny)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_delete_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Destroy destroys a widget.
//
// When a widget is destroyed all references it holds on other objects will be
// released:
//
//   - if the widget is inside a container, it will be removed from its parent
//   - if the widget is a container, all its children will be destroyed,
//     recursively
//   - if the widget is a top level, it will be removed from the list of top
//     level widgets that GTK+ maintains internally
//
// It's expected that all references held on the widget will also be released;
// you should connect to the Widget::destroy signal if you hold a reference
// to widget and you wish to remove it when this function is called. It is not
// necessary to do so if you are implementing a Container, as you'll be able to
// use the ContainerClass.remove() virtual function for that.
//
// It's important to notice that gtk_widget_destroy() will only cause the widget
// to be finalized if no additional references, acquired using g_object_ref(),
// are held on it. In case additional references are in place, the widget will
// be in an "inert" state after calling this function; widget will still point
// to valid memory, allowing you to release the references you hold, but you may
// not query the widget's own state.
//
// You should typically call this function on top level widgets, and rarely on
// child widgets.
//
// See also: gtk_container_remove().
func (widget *Widget) destroy() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.destroy

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_destroy(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// destroyEvent: signal is emitted when a Window is destroyed.
func (widget *Widget) destroyEvent(event *gdk.EventAny) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.destroy_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventAny // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventAny)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_destroy_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// directionChanged: signal emitted when the text direction of a widget changes.
func (widget *Widget) directionChanged(previousDirection TextDirection) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.direction_changed

	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkTextDirection // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkTextDirection(previousDirection)

	C._gotk4_gtk3_Widget_virtual_direction_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousDirection)
}

// dragBegin: signal emitted on the drag source when a drag is started.
func (widget *Widget) dragBegin(context *gdk.DragContext) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_begin

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_Widget_virtual_drag_begin(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
}

// dragDataDelete: signal emitted on the drag source when a drag with the action
// GDK_ACTION_MOVE is successfully completed.
func (widget *Widget) dragDataDelete(context *gdk.DragContext) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_data_delete

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_Widget_virtual_drag_data_delete(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
}

// dragDataGet: signal emitted on the drag source when the drop site requests
// the data which is dragged.
//
// The function takes the following parameters:
//
//   - context
//   - selectionData
//   - info
//   - time_
func (widget *Widget) dragDataGet(context *gdk.DragContext, selectionData *SelectionData, info, time_ uint) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_data_get

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GdkDragContext   // out
	var _arg2 *C.GtkSelectionData // out
	var _arg3 C.guint             // out
	var _arg4 C.guint             // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg3 = C.guint(info)
	_arg4 = C.guint(time_)

	C._gotk4_gtk3_Widget_virtual_drag_data_get(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(info)
	runtime.KeepAlive(time_)
}

// dragDataReceived: signal emitted on the drop site when the dragged data has
// been received.
//
// The function takes the following parameters:
//
//   - context
//   - x
//   - y
//   - selectionData
//   - info
//   - time_
func (widget *Widget) dragDataReceived(context *gdk.DragContext, x, y int, selectionData *SelectionData, info, time_ uint) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_data_received

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GdkDragContext   // out
	var _arg2 C.gint              // out
	var _arg3 C.gint              // out
	var _arg4 *C.GtkSelectionData // out
	var _arg5 C.guint             // out
	var _arg6 C.guint             // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)
	_arg4 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg5 = C.guint(info)
	_arg6 = C.guint(time_)

	C._gotk4_gtk3_Widget_virtual_drag_data_received(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(info)
	runtime.KeepAlive(time_)
}

// dragDrop: signal emitted on the drop site when the user drops the data onto
// the widget.
//
// The function takes the following parameters:
//
//   - context
//   - x
//   - y
//   - time_
func (widget *Widget) dragDrop(context *gdk.DragContext, x, y int, time_ uint) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_drop

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out
	var _arg2 C.gint            // out
	var _arg3 C.gint            // out
	var _arg4 C.guint           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)
	_arg4 = C.guint(time_)

	_cret = C._gotk4_gtk3_Widget_virtual_drag_drop(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(time_)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// dragEnd: signal emitted on the drag source when a drag is finished.
func (widget *Widget) dragEnd(context *gdk.DragContext) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_end

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	C._gotk4_gtk3_Widget_virtual_drag_end(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
}

// dragFailed: signal emitted on the drag source when a drag has failed.
//
// The function takes the following parameters:
//
//   - context
//   - result
func (widget *Widget) dragFailed(context *gdk.DragContext, result DragResult) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_failed

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out
	var _arg2 C.GtkDragResult   // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.GtkDragResult(result)

	_cret = C._gotk4_gtk3_Widget_virtual_drag_failed(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(result)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// dragLeave: signal emitted on the drop site when the cursor leaves the widget.
//
// The function takes the following parameters:
//
//   - context
//   - time_
func (widget *Widget) dragLeave(context *gdk.DragContext, time_ uint) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_leave

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out
	var _arg2 C.guint           // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.guint(time_)

	C._gotk4_gtk3_Widget_virtual_drag_leave(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(time_)
}

// dragMotion: signal emitted on the drop site when the user moves the cursor
// over the widget during a drag.
//
// The function takes the following parameters:
//
//   - context
//   - x
//   - y
//   - time_
func (widget *Widget) dragMotion(context *gdk.DragContext, x, y int, time_ uint) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.drag_motion

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkDragContext // out
	var _arg2 C.gint            // out
	var _arg3 C.gint            // out
	var _arg4 C.guint           // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkDragContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.gint(x)
	_arg3 = C.gint(y)
	_arg4 = C.guint(time_)

	_cret = C._gotk4_gtk3_Widget_virtual_drag_motion(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(context)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(time_)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Draw: signal emitted when a widget is supposed to render itself.
func (widget *Widget) draw(cr *cairo.Context) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.draw

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.cairo_t   // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.cairo_t)(unsafe.Pointer(cr.Native()))

	_cret = C._gotk4_gtk3_Widget_virtual_draw(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(cr)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// enterNotifyEvent: signal event will be emitted when the pointer enters the
// widget’s window.
func (widget *Widget) enterNotifyEvent(event *gdk.EventCrossing) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.enter_notify_event

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GdkEventCrossing // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventCrossing)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_enter_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Event: rarely-used function. This function is used to emit the event signals
// on a widget (those signals should never be emitted without using this
// function to do so). If you want to synthesize an event though, don’t use
// this function; instead, use gtk_main_do_event() so the event will behave
// as if it were in the event queue. Don’t synthesize expose events; instead,
// use gdk_window_invalidate_rect() to invalidate a region of the window.
//
// The function takes the following parameters:
//
//   - event: Event.
//
// The function returns the following values:
//
//   - ok: return from the event signal emission (TRUE if the event was
//     handled).
func (widget *Widget) event(event *gdk.Event) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.event

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkEvent  // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEvent)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (widget *Widget) focus(direction DirectionType) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.focus

	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C._gotk4_gtk3_Widget_virtual_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// focusInEvent: signal emitted when the keyboard focus enters the widget’s
// window.
func (widget *Widget) focusInEvent(event *gdk.EventFocus) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.focus_in_event

	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GdkEventFocus // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventFocus)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_focus_in_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// focusOutEvent: signal emitted when the keyboard focus leaves the widget’s
// window.
func (widget *Widget) focusOutEvent(event *gdk.EventFocus) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.focus_out_event

	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GdkEventFocus // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventFocus)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_focus_out_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Accessible returns the accessible object that describes the widget to an
// assistive technology.
//
// If accessibility support is not available, this Object instance may be a
// no-op. Likewise, if no class-specific Object implementation is available for
// the widget instance in question, it will inherit an Object implementation
// from the first ancestor class for which such an implementation is defined.
//
// The documentation of the ATK (http://developer.gnome.org/atk/stable/) library
// contains more information about accessible objects and their uses.
//
// The function returns the following values:
//
//   - object associated with widget.
func (widget *Widget) accessible() *atk.AtkObject {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_accessible

	var _arg0 *C.GtkWidget // out
	var _cret *C.AtkObject // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C._gotk4_gtk3_Widget_virtual_get_accessible(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)

	var _object *atk.AtkObject // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_object = &atk.AtkObject{
			Object: obj,
		}
	}

	return _object
}

// preferredHeight retrieves a widget’s initial minimum and natural height.
//
// This call is specific to width-for-height requests.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location to store the minimum height, or NULL.
//   - naturalHeight (optional): location to store the natural height, or NULL.
func (widget *Widget) preferredHeight() (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_preferred_height

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_get_preferred_height(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg1)
	_naturalHeight = int(_arg2)

	return _minimumHeight, _naturalHeight
}

// preferredHeightAndBaselineForWidth retrieves a widget’s minimum and natural
// height and the corresponding baselines if it would be given the specified
// width, or the default height if width is -1. The baselines may be -1 which
// means that no baseline is requested for this widget.
//
// The returned request will be modified by
// the GtkWidgetClass::adjust_size_request and
// GtkWidgetClass::adjust_baseline_request virtual methods and by any SizeGroups
// that have been applied. That is, the returned request is the one that should
// be used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - width which is available for allocation, or -1 if none.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum height,
//     or NULL.
//   - naturalHeight (optional): location for storing the natural height,
//     or NULL.
//   - minimumBaseline (optional): location for storing the baseline for the
//     minimum height, or NULL.
//   - naturalBaseline (optional): location for storing the baseline for the
//     natural height, or NULL.
func (widget *Widget) preferredHeightAndBaselineForWidth(width int) (minimumHeight, naturalHeight, minimumBaseline, naturalBaseline int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_preferred_height_and_baseline_for_width

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in
	var _arg4 C.gint       // in
	var _arg5 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(width)

	C._gotk4_gtk3_Widget_virtual_get_preferred_height_and_baseline_for_width(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3, &_arg4, &_arg5)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int   // out
	var _naturalHeight int   // out
	var _minimumBaseline int // out
	var _naturalBaseline int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)
	_minimumBaseline = int(_arg4)
	_naturalBaseline = int(_arg5)

	return _minimumHeight, _naturalHeight, _minimumBaseline, _naturalBaseline
}

// preferredHeightForWidth retrieves a widget’s minimum and natural height if it
// would be given the specified width.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - width which is available for allocation.
//
// The function returns the following values:
//
//   - minimumHeight (optional): location for storing the minimum height,
//     or NULL.
//   - naturalHeight (optional): location for storing the natural height,
//     or NULL.
func (widget *Widget) preferredHeightForWidth(width int) (minimumHeight, naturalHeight int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_preferred_height_for_width

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(width)

	C._gotk4_gtk3_Widget_virtual_get_preferred_height_for_width(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(width)

	var _minimumHeight int // out
	var _naturalHeight int // out

	_minimumHeight = int(_arg2)
	_naturalHeight = int(_arg3)

	return _minimumHeight, _naturalHeight
}

// preferredWidth retrieves a widget’s initial minimum and natural width.
//
// This call is specific to height-for-width requests.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location to store the minimum width, or NULL.
//   - naturalWidth (optional): location to store the natural width, or NULL.
func (widget *Widget) preferredWidth() (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_preferred_width

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_get_preferred_width(unsafe.Pointer(fnarg), _arg0, &_arg1, &_arg2)
	runtime.KeepAlive(widget)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg1)
	_naturalWidth = int(_arg2)

	return _minimumWidth, _naturalWidth
}

// preferredWidthForHeight retrieves a widget’s minimum and natural width if it
// would be given the specified height.
//
// The returned request will be modified by the
// GtkWidgetClass::adjust_size_request virtual method and by any SizeGroups that
// have been applied. That is, the returned request is the one that should be
// used for layout, not necessarily the one returned by the widget itself.
//
// The function takes the following parameters:
//
//   - height which is available for allocation.
//
// The function returns the following values:
//
//   - minimumWidth (optional): location for storing the minimum width, or NULL.
//   - naturalWidth (optional): location for storing the natural width, or NULL.
func (widget *Widget) preferredWidthForHeight(height int) (minimumWidth, naturalWidth int) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_preferred_width_for_height

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // in
	var _arg3 C.gint       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(height)

	C._gotk4_gtk3_Widget_virtual_get_preferred_width_for_height(unsafe.Pointer(fnarg), _arg0, _arg1, &_arg2, &_arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(height)

	var _minimumWidth int // out
	var _naturalWidth int // out

	_minimumWidth = int(_arg2)
	_naturalWidth = int(_arg3)

	return _minimumWidth, _naturalWidth
}

// requestMode gets whether the widget prefers a height-for-width layout or a
// width-for-height layout.
//
// Bin widgets generally propagate the preference of their child, container
// widgets need to request something either in context of their children or in
// context of their allocation capabilities.
//
// The function returns the following values:
//
//   - sizeRequestMode preferred by widget.
func (widget *Widget) requestMode() SizeRequestMode {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.get_request_mode

	var _arg0 *C.GtkWidget         // out
	var _cret C.GtkSizeRequestMode // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C._gotk4_gtk3_Widget_virtual_get_request_mode(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)

	var _sizeRequestMode SizeRequestMode // out

	_sizeRequestMode = SizeRequestMode(_cret)

	return _sizeRequestMode
}

// grabBrokenEvent: signal emitted when a pointer or keyboard grab on a window
// belonging to widget gets broken.
func (widget *Widget) grabBrokenEvent(event *gdk.EventGrabBroken) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.grab_broken_event

	var _arg0 *C.GtkWidget          // out
	var _arg1 *C.GdkEventGrabBroken // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventGrabBroken)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_grab_broken_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// grabFocus causes widget to have the keyboard focus for the Window it's
// inside. widget must be a focusable widget, such as a Entry; something like
// Frame won’t work.
//
// More precisely, it must have the GTK_CAN_FOCUS flag set. Use
// gtk_widget_set_can_focus() to modify that flag.
//
// The widget also needs to be realized and mapped. This is indicated by the
// related signals. Grabbing the focus immediately after creating the widget
// will likely fail and cause critical warnings.
func (widget *Widget) grabFocus() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.grab_focus

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_grab_focus(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// grabNotify: signal emitted when a widget becomes shadowed by a GTK+ grab (not
// a pointer or keyboard grab) on another widget, or when it becomes unshadowed
// due to a grab being removed.
func (widget *Widget) grabNotify(wasGrabbed bool) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.grab_notify

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if wasGrabbed {
		_arg1 = C.TRUE
	}

	C._gotk4_gtk3_Widget_virtual_grab_notify(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(wasGrabbed)
}

// Hide reverses the effects of gtk_widget_show(), causing the widget to be
// hidden (invisible to the user).
func (widget *Widget) hide() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.hide

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_hide(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// hierarchyChanged: signal emitted when the anchored state of a widget changes.
func (widget *Widget) hierarchyChanged(previousToplevel Widgetter) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.hierarchy_changed

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(previousToplevel).Native()))

	C._gotk4_gtk3_Widget_virtual_hierarchy_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousToplevel)
}

// keyPressEvent: signal emitted when a key is pressed.
func (widget *Widget) keyPressEvent(event *gdk.EventKey) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.key_press_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_key_press_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// keyReleaseEvent: signal is emitted when a key is released.
func (widget *Widget) keyReleaseEvent(event *gdk.EventKey) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.key_release_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_key_release_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// keynavFailed: this function should be called whenever keyboard
// navigation within a single widget hits a boundary. The function emits the
// Widget::keynav-failed signal on the widget and its return value should be
// interpreted in a way similar to the return value of gtk_widget_child_focus():
//
// When TRUE is returned, stay in the widget, the failed keyboard navigation is
// OK and/or there is nowhere we can/should move the focus to.
//
// When FALSE is returned, the caller should continue with keyboard navigation
// outside the widget, e.g. by calling gtk_widget_child_focus() on the widget’s
// toplevel.
//
// The default ::keynav-failed handler returns FALSE for GTK_DIR_TAB_FORWARD and
// GTK_DIR_TAB_BACKWARD. For the other values of DirectionType it returns TRUE.
//
// Whenever the default handler returns TRUE, it also calls
// gtk_widget_error_bell() to notify the user of the failed keyboard navigation.
//
// A use case for providing an own implementation of ::keynav-failed (either by
// connecting to it or by overriding it) would be a row of Entry widgets where
// the user should be able to navigate the entire row with the cursor keys,
// as e.g. known from user interfaces that require entering license keys.
//
// The function takes the following parameters:
//
//   - direction of focus movement.
//
// The function returns the following values:
//
//   - ok: TRUE if stopping keyboard navigation is fine, FALSE if the emitting
//     widget should try to handle the keyboard navigation attempt in its parent
//     container(s).
func (widget *Widget) keynavFailed(direction DirectionType) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.keynav_failed

	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkDirectionType // out
	var _cret C.gboolean         // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDirectionType(direction)

	_cret = C._gotk4_gtk3_Widget_virtual_keynav_failed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(direction)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// leaveNotifyEvent will be emitted when the pointer leaves the widget’s window.
func (widget *Widget) leaveNotifyEvent(event *gdk.EventCrossing) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.leave_notify_event

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GdkEventCrossing // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventCrossing)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_leave_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Map: this function is only for use in widget implementations. Causes a widget
// to be mapped if it isn’t already.
func (widget *Widget) _map() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass._map

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_map(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// mapEvent: signal emitted when the widget’s window is mapped.
func (widget *Widget) mapEvent(event *gdk.EventAny) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.map_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventAny // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventAny)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_map_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// mnemonicActivate emits the Widget::mnemonic-activate signal.
//
// The function takes the following parameters:
//
//   - groupCycling: TRUE if there are other widgets with the same mnemonic.
//
// The function returns the following values:
//
//   - ok: TRUE if the signal has been handled.
func (widget *Widget) mnemonicActivate(groupCycling bool) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.mnemonic_activate

	var _arg0 *C.GtkWidget // out
	var _arg1 C.gboolean   // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	if groupCycling {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Widget_virtual_mnemonic_activate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(groupCycling)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// motionNotifyEvent: signal emitted when the pointer moves over the widget’s
// Window.
func (widget *Widget) motionNotifyEvent(event *gdk.EventMotion) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.motion_notify_event

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkEventMotion // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventMotion)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_motion_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// moveFocus: signal emitted when a change of focus is requested.
func (widget *Widget) moveFocus(direction DirectionType) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.move_focus

	var _arg0 *C.GtkWidget       // out
	var _arg1 C.GtkDirectionType // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkDirectionType(direction)

	C._gotk4_gtk3_Widget_virtual_move_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(direction)
}

// parentSet: signal emitted when a new parent has been set on a widget.
func (widget *Widget) parentSet(previousParent Widgetter) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.parent_set

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(previousParent).Native()))

	C._gotk4_gtk3_Widget_virtual_parent_set(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousParent)
}

// popupMenu: signal emitted whenever a widget should pop up a context menu.
func (widget *Widget) popupMenu() bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.popup_menu

	var _arg0 *C.GtkWidget // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C._gotk4_gtk3_Widget_virtual_popup_menu(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// propertyNotifyEvent: signal will be emitted when a property on the widget’s
// window has been changed or deleted.
func (widget *Widget) propertyNotifyEvent(event *gdk.EventProperty) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.property_notify_event

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GdkEventProperty // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventProperty)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_property_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (widget *Widget) proximityInEvent(event *gdk.EventProximity) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.proximity_in_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventProximity // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventProximity)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_proximity_in_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

func (widget *Widget) proximityOutEvent(event *gdk.EventProximity) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.proximity_out_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventProximity // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventProximity)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_proximity_out_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// queryTooltip: signal emitted when “has-tooltip” is TRUE and the hover timeout
// has expired with the cursor hovering “above” widget; or emitted when widget
// got focus in keyboard mode.
//
// The function takes the following parameters:
//
//   - x
//   - y
//   - keyboardTooltip
//   - tooltip
func (widget *Widget) queryTooltip(x, y int, keyboardTooltip bool, tooltip *Tooltip) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.query_tooltip

	var _arg0 *C.GtkWidget  // out
	var _arg1 C.gint        // out
	var _arg2 C.gint        // out
	var _arg3 C.gboolean    // out
	var _arg4 *C.GtkTooltip // out
	var _cret C.gboolean    // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)
	if keyboardTooltip {
		_arg3 = C.TRUE
	}
	_arg4 = (*C.GtkTooltip)(unsafe.Pointer(coreglib.InternObject(tooltip).Native()))

	_cret = C._gotk4_gtk3_Widget_virtual_query_tooltip(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
	runtime.KeepAlive(keyboardTooltip)
	runtime.KeepAlive(tooltip)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// queueDrawRegion invalidates the area of widget defined by region by calling
// gdk_window_invalidate_region() on the widget’s window and all its child
// windows. Once the main loop becomes idle (after the current batch of events
// has been processed, roughly), the window will receive expose events for the
// union of all regions that have been invalidated.
//
// Normally you would only use this function in widget implementations.
// You might also use it to schedule a redraw of a DrawingArea or some portion
// thereof.
//
// The function takes the following parameters:
//
//   - region to draw.
func (widget *Widget) queueDrawRegion(region *cairo.Region) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.queue_draw_region

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.cairo_region_t // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.cairo_region_t)(unsafe.Pointer(region.Native()))

	C._gotk4_gtk3_Widget_virtual_queue_draw_region(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(region)
}

// Realize creates the GDK (windowing system) resources associated with
// a widget. For example, widget->window will be created when a widget is
// realized. Normally realization happens implicitly; if you show a widget
// and all its parent containers, then the widget will be realized and mapped
// automatically.
//
// Realizing a widget requires all the widget’s parent widgets to be realized;
// calling gtk_widget_realize() realizes the widget’s parents in addition to
// widget itself. If a widget is not yet inside a toplevel window when you
// realize it, bad things will happen.
//
// This function is primarily used in widget implementations, and isn’t very
// useful otherwise. Many times when you think you might need it, a better
// approach is to connect to a signal that will be called after the widget is
// realized automatically, such as Widget::draw. Or simply g_signal_connect ()
// to the Widget::realize signal.
func (widget *Widget) realize() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.realize

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_realize(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// screenChanged: signal emitted when the screen of a widget has changed.
func (widget *Widget) screenChanged(previousScreen *gdk.Screen) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.screen_changed

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GdkScreen // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(previousScreen).Native()))

	C._gotk4_gtk3_Widget_virtual_screen_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousScreen)
}

// scrollEvent: signal emitted when a button in the 4 to 7 range is pressed.
func (widget *Widget) scrollEvent(event *gdk.EventScroll) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.scroll_event

	var _arg0 *C.GtkWidget      // out
	var _arg1 *C.GdkEventScroll // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventScroll)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_scroll_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// selectionClearEvent: signal will be emitted when the the widget’s window has
// lost ownership of a selection.
func (widget *Widget) selectionClearEvent(event *gdk.EventSelection) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.selection_clear_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventSelection)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_selection_clear_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - selectionData
//   - info
//   - time_
func (widget *Widget) selectionGet(selectionData *SelectionData, info, time_ uint) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.selection_get

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GtkSelectionData // out
	var _arg2 C.guint             // out
	var _arg3 C.guint             // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg2 = C.guint(info)
	_arg3 = C.guint(time_)

	C._gotk4_gtk3_Widget_virtual_selection_get(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(info)
	runtime.KeepAlive(time_)
}

func (widget *Widget) selectionNotifyEvent(event *gdk.EventSelection) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.selection_notify_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventSelection)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_selection_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// The function takes the following parameters:
//
//   - selectionData
//   - time_
func (widget *Widget) selectionReceived(selectionData *SelectionData, time_ uint) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.selection_received

	var _arg0 *C.GtkWidget        // out
	var _arg1 *C.GtkSelectionData // out
	var _arg2 C.guint             // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg2 = C.guint(time_)

	C._gotk4_gtk3_Widget_virtual_selection_received(unsafe.Pointer(fnarg), _arg0, _arg1, _arg2)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(time_)
}

// selectionRequestEvent: signal will be emitted when another client requests
// ownership of the selection owned by the widget's window.
func (widget *Widget) selectionRequestEvent(event *gdk.EventSelection) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.selection_request_event

	var _arg0 *C.GtkWidget         // out
	var _arg1 *C.GdkEventSelection // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventSelection)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_selection_request_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Show flags a widget to be displayed. Any widget that isn’t shown will not
// appear on the screen. If you want to show all the widgets in a container,
// it’s easier to call gtk_widget_show_all() on the container, instead of
// individually showing the widgets.
//
// Remember that you have to show the containers containing a widget,
// in addition to the widget itself, before it will appear onscreen.
//
// When a toplevel container is shown, it is immediately realized and mapped;
// other shown widgets are realized and mapped when their toplevel container is
// realized and mapped.
func (widget *Widget) show() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.show

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_show(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// showAll: recursively shows a widget, and any child widgets (if the widget is
// a container).
func (widget *Widget) showAll() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.show_all

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_show_all(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

func (widget *Widget) showHelp(helpType WidgetHelpType) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.show_help

	var _arg0 *C.GtkWidget        // out
	var _arg1 C.GtkWidgetHelpType // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkWidgetHelpType(helpType)

	_cret = C._gotk4_gtk3_Widget_virtual_show_help(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(helpType)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// sizeAllocate: this function is only used by Container subclasses, to assign a
// size and position to their child widgets.
//
// In this function, the allocation may be adjusted. It will be forced to a 1x1
// minimum size, and the adjust_size_allocation virtual method on the child will
// be used to adjust the allocation. Standard adjustments include removing the
// widget’s margins, and applying the widget’s Widget:halign and Widget:valign
// properties.
//
// For baseline support in containers you need to use
// gtk_widget_size_allocate_with_baseline() instead.
//
// The function takes the following parameters:
//
//   - allocation: position and size to be allocated to widget.
func (widget *Widget) sizeAllocate(allocation *Allocation) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.size_allocate

	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GtkAllocation // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkRectangle)(gextras.StructNative(unsafe.Pointer(allocation)))
	type _ = *Allocation
	type _ = *gdk.Rectangle

	C._gotk4_gtk3_Widget_virtual_size_allocate(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(allocation)
}

// stateChanged: signal emitted when the widget state changes. Deprecated: 3.0.
func (widget *Widget) stateChanged(previousState StateType) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.state_changed

	var _arg0 *C.GtkWidget   // out
	var _arg1 C.GtkStateType // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateType(previousState)

	C._gotk4_gtk3_Widget_virtual_state_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousState)
}

// stateFlagsChanged: signal emitted when the widget state changes, see
// gtk_widget_get_state_flags().
func (widget *Widget) stateFlagsChanged(previousStateFlags StateFlags) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.state_flags_changed

	var _arg0 *C.GtkWidget    // out
	var _arg1 C.GtkStateFlags // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = C.GtkStateFlags(previousStateFlags)

	C._gotk4_gtk3_Widget_virtual_state_flags_changed(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousStateFlags)
}

// styleSet: signal emitted when a new style has been set on a widget.
// Deprecated: 3.0.
func (widget *Widget) styleSet(previousStyle *Style) {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.style_set

	var _arg0 *C.GtkWidget // out
	var _arg1 *C.GtkStyle  // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(previousStyle).Native()))

	C._gotk4_gtk3_Widget_virtual_style_set(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(previousStyle)
}

// styleUpdated: signal emitted when the GtkStyleContext of a widget is changed.
func (widget *Widget) styleUpdated() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.style_updated

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_style_updated(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// touchEvent: signal emitted when a touch event happens.
func (widget *Widget) touchEvent(event *gdk.EventTouch) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.touch_event

	var _arg0 *C.GtkWidget     // out
	var _arg1 *C.GdkEventTouch // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventTouch)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_touch_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Unmap: this function is only for use in widget implementations. Causes a
// widget to be unmapped if it’s currently mapped.
func (widget *Widget) unmap() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.unmap

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_unmap(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// unmapEvent: signal will be emitted when the widget’s window is unmapped.
func (widget *Widget) unmapEvent(event *gdk.EventAny) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.unmap_event

	var _arg0 *C.GtkWidget   // out
	var _arg1 *C.GdkEventAny // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventAny)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_unmap_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Unrealize: this function is only useful in widget implementations. Causes a
// widget to be unrealized (frees all GDK resources associated with the widget,
// such as widget->window).
func (widget *Widget) unrealize() {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.unrealize

	var _arg0 *C.GtkWidget // out

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	C._gotk4_gtk3_Widget_virtual_unrealize(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(widget)
}

// visibilityNotifyEvent: signal emitted when the widget’s window is obscured or
// unobscured.
func (widget *Widget) visibilityNotifyEvent(event *gdk.EventVisibility) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.visibility_notify_event

	var _arg0 *C.GtkWidget          // out
	var _arg1 *C.GdkEventVisibility // out
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventVisibility)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_visibility_notify_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// windowStateEvent: signal emitted when the state of the toplevel window
// associated to the widget changes.
func (widget *Widget) windowStateEvent(event *gdk.EventWindowState) bool {
	gclass := (*C.GtkWidgetClass)(coreglib.PeekParentClass(widget))
	fnarg := gclass.window_state_event

	var _arg0 *C.GtkWidget           // out
	var _arg1 *C.GdkEventWindowState // out
	var _cret C.gboolean             // in

	_arg0 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	_arg1 = (*C.GdkEventWindowState)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C._gotk4_gtk3_Widget_virtual_window_state_event(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WidgetGetDefaultDirection obtains the current default reading direction.
// See gtk_widget_set_default_direction().
//
// The function returns the following values:
//
//   - textDirection: current default direction.
func WidgetGetDefaultDirection() TextDirection {
	var _cret C.GtkTextDirection // in

	_cret = C.gtk_widget_get_default_direction()

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// WidgetGetDefaultStyle returns the default style used by all widgets
// initially.
//
// Deprecated: Use StyleContext instead, and gtk_css_provider_get_default() to
// obtain a StyleProvider with the default widget style information.
//
// The function returns the following values:
//
//   - style: default style. This Style object is owned by GTK+ and should not
//     be modified or freed.
func WidgetGetDefaultStyle() *Style {
	var _cret *C.GtkStyle // in

	_cret = C.gtk_widget_get_default_style()

	var _style *Style // out

	_style = wrapStyle(coreglib.Take(unsafe.Pointer(_cret)))

	return _style
}

// WidgetPopCompositeChild cancels the effect of a previous call to
// gtk_widget_push_composite_child().
//
// Deprecated: Use gtk_widget_class_set_template(), or don’t use this API at
// all.
func WidgetPopCompositeChild() {
	C.gtk_widget_pop_composite_child()
}

// WidgetPushCompositeChild makes all newly-created widgets as composite
// children until the corresponding gtk_widget_pop_composite_child() call.
//
// A composite child is a child that’s an implementation detail of the
// container it’s inside and should not be visible to people using the
// container. Composite children aren’t treated differently by GTK+ (but see
// gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI builders
// might want to treat them in a different way.
//
// Deprecated: This API never really worked well and was mostly unused,
// now we have a more complete mechanism for composite children, see
// gtk_widget_class_set_template().
func WidgetPushCompositeChild() {
	C.gtk_widget_push_composite_child()
}

// WidgetSetDefaultDirection sets the default reading direction
// for widgets where the direction has not been explicitly set by
// gtk_widget_set_direction().
//
// The function takes the following parameters:
//
//   - dir: new default direction. This cannot be GTK_TEXT_DIR_NONE.
func WidgetSetDefaultDirection(dir TextDirection) {
	var _arg1 C.GtkTextDirection // out

	_arg1 = C.GtkTextDirection(dir)

	C.gtk_widget_set_default_direction(_arg1)
	runtime.KeepAlive(dir)
}

// WidgetAccessibleOverrides contains methods that are overridable.
type WidgetAccessibleOverrides struct {
}

func defaultWidgetAccessibleOverrides(v *WidgetAccessible) WidgetAccessibleOverrides {
	return WidgetAccessibleOverrides{}
}

type WidgetAccessible struct {
	_ [0]func() // equal guard
	Accessible

	atk.Component
}

var (
	_ coreglib.Objector = (*WidgetAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*WidgetAccessible, *WidgetAccessibleClass, WidgetAccessibleOverrides](
		GTypeWidgetAccessible,
		initWidgetAccessibleClass,
		wrapWidgetAccessible,
		defaultWidgetAccessibleOverrides,
	)
}

func initWidgetAccessibleClass(gclass unsafe.Pointer, overrides WidgetAccessibleOverrides, classInitFunc func(*WidgetAccessibleClass)) {
	if classInitFunc != nil {
		class := (*WidgetAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapWidgetAccessible(obj *coreglib.Object) *WidgetAccessible {
	return &WidgetAccessible{
		Accessible: Accessible{
			AtkObject: atk.AtkObject{
				Object: obj,
			},
		},
		Component: atk.Component{
			Object: obj,
		},
	}
}

func marshalWidgetAccessible(p uintptr) (interface{}, error) {
	return wrapWidgetAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// WindowOverrides contains methods that are overridable.
type WindowOverrides struct {
	// ActivateDefault activates the default widget for the window.
	ActivateDefault func()
	// ActivateFocus activates the current focused widget within the window.
	ActivateFocus func()
	// EnableDebugging class handler for the Window::enable-debugging keybinding
	// signal. Since: 3.14.
	EnableDebugging func(toggle bool) bool
	// KeysChanged: signal gets emitted when the set of accelerators or
	// mnemonics that are associated with window changes.
	KeysChanged func()
	// SetFocus: if focus is not the current focus widget, and is focusable,
	// sets it as the focus widget for the window. If focus is NULL,
	// unsets the focus widget for this window. To set the focus to a
	// particular widget in the toplevel, it is usually more convenient to use
	// gtk_widget_grab_focus() instead of this function.
	//
	// The function takes the following parameters:
	//
	//   - focus (optional): widget to be the new focus widget, or NULL to unset
	//     any focus widget for the toplevel window.
	SetFocus func(focus Widgetter)
}

func defaultWindowOverrides(v *Window) WindowOverrides {
	return WindowOverrides{
		ActivateDefault: v.activateDefault,
		ActivateFocus:   v.activateFocus,
		EnableDebugging: v.enableDebugging,
		KeysChanged:     v.keysChanged,
		SetFocus:        v.setFocus,
	}
}

// Window is a toplevel window which can contain other widgets. Windows normally
// have decorations that are under the control of the windowing system and allow
// the user to manipulate the window (resize it, move it, close it,...).
//
// # GtkWindow as GtkBuildable
//
// The GtkWindow implementation of the Buildable interface supports a custom
// <accel-groups> element, which supports any number of <group> elements
// representing the AccelGroup objects you want to add to your window
// (synonymous with gtk_window_add_accel_group().
//
// It also supports the <initial-focus> element, whose name property names the
// widget to receive the focus when the window is mapped.
//
// An example of a UI definition fragment with accel groups:
//
//	window.background
//	├── decoration
//	├── <titlebar child>.titlebar [.default-decoration]
//	╰── <child>
//
// GtkWindow has a main CSS node with name window and style class .background,
// and a subnode with name decoration.
//
// Style classes that are typically used with the main CSS node are .csd
// (when client-side decorations are in use), .solid-csd (for client-side
// decorations without invisible borders), .ssd (used by mutter when rendering
// server-side decorations). GtkWindow also represents window states with the
// following style classes on the main node: .tiled, .maximized, .fullscreen.
// Specialized types of window often add their own discriminating style classes,
// such as .popup or .tooltip.
//
// GtkWindow adds the .titlebar and .default-decoration style classes to the
// widget that is added as a titlebar child.
type Window struct {
	_ [0]func() // equal guard
	Bin
}

var (
	_ Binner = (*Window)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*Window, *WindowClass, WindowOverrides](
		GTypeWindow,
		initWindowClass,
		wrapWindow,
		defaultWindowOverrides,
	)
}

func initWindowClass(gclass unsafe.Pointer, overrides WindowOverrides, classInitFunc func(*WindowClass)) {
	pclass := (*C.GtkWindowClass)(unsafe.Pointer(C.g_type_check_class_cast((*C.GTypeClass)(gclass), C.GType(GTypeWindow))))

	if overrides.ActivateDefault != nil {
		pclass.activate_default = (*[0]byte)(C._gotk4_gtk3_WindowClass_activate_default)
	}

	if overrides.ActivateFocus != nil {
		pclass.activate_focus = (*[0]byte)(C._gotk4_gtk3_WindowClass_activate_focus)
	}

	if overrides.EnableDebugging != nil {
		pclass.enable_debugging = (*[0]byte)(C._gotk4_gtk3_WindowClass_enable_debugging)
	}

	if overrides.KeysChanged != nil {
		pclass.keys_changed = (*[0]byte)(C._gotk4_gtk3_WindowClass_keys_changed)
	}

	if overrides.SetFocus != nil {
		pclass.set_focus = (*[0]byte)(C._gotk4_gtk3_WindowClass_set_focus)
	}

	if classInitFunc != nil {
		class := (*WindowClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapWindow(obj *coreglib.Object) *Window {
	return &Window{
		Bin: Bin{
			Container: Container{
				Widget: Widget{
					InitiallyUnowned: coreglib.InitiallyUnowned{
						Object: obj,
					},
					Object: obj,
					ImplementorIface: atk.ImplementorIface{
						Object: obj,
					},
					Buildable: Buildable{
						Object: obj,
					},
				},
			},
		},
	}
}

func marshalWindow(p uintptr) (interface{}, error) {
	return wrapWindow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// ConnectActivateDefault signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user activates the default widget of window.
func (window *Window) ConnectActivateDefault(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(window, "activate-default", false, unsafe.Pointer(C._gotk4_gtk3_Window_ConnectActivateDefault), f)
}

// ConnectActivateFocus signal is a [keybinding signal][GtkBindingSignal] which
// gets emitted when the user activates the currently focused widget of window.
func (window *Window) ConnectActivateFocus(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(window, "activate-focus", false, unsafe.Pointer(C._gotk4_gtk3_Window_ConnectActivateFocus), f)
}

// ConnectEnableDebugging signal is a [keybinding signal][GtkBindingSignal]
// which gets emitted when the user enables or disables interactive debugging.
// When toggle is TRUE, interactive debugging is toggled on or off, when it is
// FALSE, the debugger will be pointed at the widget under the pointer.
//
// The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
func (window *Window) ConnectEnableDebugging(f func(toggle bool) (ok bool)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(window, "enable-debugging", false, unsafe.Pointer(C._gotk4_gtk3_Window_ConnectEnableDebugging), f)
}

// ConnectKeysChanged signal gets emitted when the set of accelerators or
// mnemonics that are associated with window changes.
func (window *Window) ConnectKeysChanged(f func()) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(window, "keys-changed", false, unsafe.Pointer(C._gotk4_gtk3_Window_ConnectKeysChanged), f)
}

// ConnectSetFocus: this signal is emitted whenever the currently focused widget
// in this window changes.
func (window *Window) ConnectSetFocus(f func(widget Widgetter)) coreglib.SignalHandle {
	return coreglib.ConnectGeneratedClosure(window, "set-focus", false, unsafe.Pointer(C._gotk4_gtk3_Window_ConnectSetFocus), f)
}

// NewWindow creates a new Window, which is a toplevel window that can
// contain other widgets. Nearly always, the type of the window should be
// K_WINDOW_TOPLEVEL. If you’re implementing something like a popup menu from
// scratch (which is a bad idea, just use Menu), you might use K_WINDOW_POPUP.
// K_WINDOW_POPUP is not for dialogs, though in some other toolkits dialogs
// are called “popups”. In GTK+, K_WINDOW_POPUP means a pop-up menu or
// pop-up tooltip. On X11, popup windows are not controlled by the [window
// manager][gtk-X11-arch].
//
// If you simply want an undecorated window (no window borders), use
// gtk_window_set_decorated(), don’t use K_WINDOW_POPUP.
//
// All top-level windows created by gtk_window_new() are stored in
// an internal top-level window list. This list can be obtained from
// gtk_window_list_toplevels(). Due to Gtk+ keeping a reference to the window
// internally, gtk_window_new() does not return a reference to the caller.
//
// To delete a Window, call gtk_widget_destroy().
//
// The function takes the following parameters:
//
//   - typ: type of window.
//
// The function returns the following values:
//
//   - window: new Window.
func NewWindow(typ WindowType) *Window {
	var _arg1 C.GtkWindowType // out
	var _cret *C.GtkWidget    // in

	_arg1 = C.GtkWindowType(typ)

	_cret = C.gtk_window_new(_arg1)
	runtime.KeepAlive(typ)

	var _window *Window // out

	_window = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))

	return _window
}

// ActivateDefault activates the default widget for the window, unless the
// current focused widget has been configured to receive the default action
// (see gtk_widget_set_receives_default()), in which case the focused widget is
// activated.
//
// The function returns the following values:
//
//   - ok: TRUE if a widget got activated.
func (window *Window) ActivateDefault() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_activate_default(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ActivateFocus activates the current focused widget within the window.
//
// The function returns the following values:
//
//   - ok: TRUE if a widget got activated.
func (window *Window) ActivateFocus() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_activate_focus(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ActivateKey activates mnemonics and accelerators for this Window. This
// is normally called by the default ::key_press_event handler for toplevel
// windows, however in some cases it may be useful to call this directly when
// overriding the standard key handling for a toplevel window.
//
// The function takes the following parameters:
//
//   - event: EventKey.
//
// The function returns the following values:
//
//   - ok: TRUE if a mnemonic or accelerator was found and activated.
func (window *Window) ActivateKey(event *gdk.EventKey) bool {
	var _arg0 *C.GtkWindow   // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_window_activate_key(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AddAccelGroup: associate accel_group with window, such that calling
// gtk_accel_groups_activate() on window will activate accelerators in
// accel_group.
//
// The function takes the following parameters:
//
//   - accelGroup: AccelGroup.
func (window *Window) AddAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkWindow     // out
	var _arg1 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	C.gtk_window_add_accel_group(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(accelGroup)
}

// AddMnemonic adds a mnemonic to this window.
//
// The function takes the following parameters:
//
//   - keyval: mnemonic.
//   - target: widget that gets activated by the mnemonic.
func (window *Window) AddMnemonic(keyval uint, target Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.guint      // out
	var _arg2 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.guint(keyval)
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(target).Native()))

	C.gtk_window_add_mnemonic(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(target)
}

// BeginMoveDrag starts moving a window. This function is used if an application
// has window movement grips. When GDK can support it, the window movement will
// be done using the standard mechanism for the [window manager][gtk-X11-arch]
// or windowing system. Otherwise, GDK will try to emulate window movement,
// potentially not all that well, depending on the windowing system.
//
// The function takes the following parameters:
//
//   - button: mouse button that initiated the drag.
//   - rootX: x position where the user clicked to initiate the drag, in root
//     window coordinates.
//   - rootY: y position where the user clicked to initiate the drag.
//   - timestamp from the click event that initiated the drag.
func (window *Window) BeginMoveDrag(button, rootX, rootY int, timestamp uint32) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out
	var _arg3 C.gint       // out
	var _arg4 C.guint32    // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(button)
	_arg2 = C.gint(rootX)
	_arg3 = C.gint(rootY)
	_arg4 = C.guint32(timestamp)

	C.gtk_window_begin_move_drag(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(window)
	runtime.KeepAlive(button)
	runtime.KeepAlive(rootX)
	runtime.KeepAlive(rootY)
	runtime.KeepAlive(timestamp)
}

// BeginResizeDrag starts resizing a window. This function is used if an
// application has window resizing controls. When GDK can support it,
// the resize will be done using the standard mechanism for the [window
// manager][gtk-X11-arch] or windowing system. Otherwise, GDK will try to
// emulate window resizing, potentially not all that well, depending on the
// windowing system.
//
// The function takes the following parameters:
//
//   - edge: position of the resize control.
//   - button: mouse button that initiated the drag.
//   - rootX: x position where the user clicked to initiate the drag, in root
//     window coordinates.
//   - rootY: y position where the user clicked to initiate the drag.
//   - timestamp from the click event that initiated the drag.
func (window *Window) BeginResizeDrag(edge gdk.WindowEdge, button, rootX, rootY int, timestamp uint32) {
	var _arg0 *C.GtkWindow    // out
	var _arg1 C.GdkWindowEdge // out
	var _arg2 C.gint          // out
	var _arg3 C.gint          // out
	var _arg4 C.gint          // out
	var _arg5 C.guint32       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.GdkWindowEdge(edge)
	_arg2 = C.gint(button)
	_arg3 = C.gint(rootX)
	_arg4 = C.gint(rootY)
	_arg5 = C.guint32(timestamp)

	C.gtk_window_begin_resize_drag(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(window)
	runtime.KeepAlive(edge)
	runtime.KeepAlive(button)
	runtime.KeepAlive(rootX)
	runtime.KeepAlive(rootY)
	runtime.KeepAlive(timestamp)
}

// Close requests that the window is closed, similar to what happens when a
// window manager close button is clicked.
//
// This function can be used with close buttons in custom titlebars.
func (window *Window) Close() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_close(_arg0)
	runtime.KeepAlive(window)
}

// Deiconify asks to deiconify (i.e. unminimize) the specified window. Note that
// you shouldn’t assume the window is definitely deiconified afterward, because
// other entities (e.g. the user or [window manager][gtk-X11-arch])) could
// iconify it again before your code which assumes deiconification gets to run.
//
// You can track iconification via the “window-state-event” signal on Widget.
func (window *Window) Deiconify() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_deiconify(_arg0)
	runtime.KeepAlive(window)
}

// Fullscreen asks to place window in the fullscreen state. Note that
// you shouldn’t assume the window is definitely full screen afterward,
// because other entities (e.g. the user or [window manager][gtk-X11-arch])
// could unfullscreen it again, and not all window managers honor requests
// to fullscreen windows. But normally the window will end up fullscreen.
// Just don’t write code that crashes if not.
//
// You can track the fullscreen state via the “window-state-event” signal on
// Widget.
func (window *Window) Fullscreen() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_fullscreen(_arg0)
	runtime.KeepAlive(window)
}

// FullscreenOnMonitor asks to place window in the fullscreen state. Note that
// you shouldn't assume the window is definitely full screen afterward.
//
// You can track the fullscreen state via the "window-state-event" signal on
// Widget.
//
// The function takes the following parameters:
//
//   - screen to draw to.
//   - monitor: which monitor to go fullscreen on.
func (window *Window) FullscreenOnMonitor(screen *gdk.Screen, monitor int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GdkScreen // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))
	_arg2 = C.gint(monitor)

	C.gtk_window_fullscreen_on_monitor(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(screen)
	runtime.KeepAlive(monitor)
}

// AcceptFocus gets the value set by gtk_window_set_accept_focus().
//
// The function returns the following values:
//
//   - ok: TRUE if window should receive the input focus.
func (window *Window) AcceptFocus() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_accept_focus(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Application gets the Application associated with the window (if any).
//
// The function returns the following values:
//
//   - application (optional) or NULL.
func (window *Window) Application() *Application {
	var _arg0 *C.GtkWindow      // out
	var _cret *C.GtkApplication // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_application(_arg0)
	runtime.KeepAlive(window)

	var _application *Application // out

	if _cret != nil {
		_application = wrapApplication(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _application
}

// AttachedTo fetches the attach widget for this window. See
// gtk_window_set_attached_to().
//
// The function returns the following values:
//
//   - widget (optional) where the window is attached, or NULL if the window is
//     not attached to any widget.
func (window *Window) AttachedTo() Widgetter {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_attached_to(_arg0)
	runtime.KeepAlive(window)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Decorated returns whether the window has been set to have decorations such as
// a title bar via gtk_window_set_decorated().
//
// The function returns the following values:
//
//   - ok: TRUE if the window has been set to have decorations.
func (window *Window) Decorated() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_decorated(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DefaultSize gets the default size of the window. A value of -1 for the width
// or height indicates that a default size has not been explicitly set for that
// dimension, so the “natural” size of the window will be used.
//
// The function returns the following values:
//
//   - width (optional): location to store the default width, or NULL.
//   - height (optional): location to store the default height, or NULL.
func (window *Window) DefaultSize() (width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_get_default_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(window)

	var _width int  // out
	var _height int // out

	_width = int(_arg1)
	_height = int(_arg2)

	return _width, _height
}

// DefaultWidget returns the default widget for window. See
// gtk_window_set_default() for more details.
//
// The function returns the following values:
//
//   - widget (optional): default widget, or NULL if there is none.
func (window *Window) DefaultWidget() Widgetter {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_default_widget(_arg0)
	runtime.KeepAlive(window)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// Deletable returns whether the window has been set to have a close button via
// gtk_window_set_deletable().
//
// The function returns the following values:
//
//   - ok: TRUE if the window has been set to have a close button.
func (window *Window) Deletable() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_deletable(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// DestroyWithParent returns whether the window will be destroyed with its
// transient parent. See gtk_window_set_destroy_with_parent ().
//
// The function returns the following values:
//
//   - ok: TRUE if the window will be destroyed with its transient parent.
func (window *Window) DestroyWithParent() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_destroy_with_parent(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Focus retrieves the current focused widget within the window. Note that this
// is the widget that would have the focus if the toplevel window focused;
// if the toplevel window is not focused then gtk_widget_has_focus (widget) will
// not be TRUE for the widget.
//
// The function returns the following values:
//
//   - widget (optional): currently focused widget, or NULL if there is none.
func (window *Window) Focus() Widgetter {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_focus(_arg0)
	runtime.KeepAlive(window)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// FocusOnMap gets the value set by gtk_window_set_focus_on_map().
//
// The function returns the following values:
//
//   - ok: TRUE if window should receive the input focus when mapped.
func (window *Window) FocusOnMap() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_focus_on_map(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// FocusVisible gets the value of the Window:focus-visible property.
//
// The function returns the following values:
//
//   - ok: TRUE if “focus rectangles” are supposed to be visible in this window.
func (window *Window) FocusVisible() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_focus_visible(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Gravity gets the value set by gtk_window_set_gravity().
//
// The function returns the following values:
//
//   - gravity: window gravity.
func (window *Window) Gravity() gdk.Gravity {
	var _arg0 *C.GtkWindow // out
	var _cret C.GdkGravity // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_gravity(_arg0)
	runtime.KeepAlive(window)

	var _gravity gdk.Gravity // out

	_gravity = gdk.Gravity(_cret)

	return _gravity
}

// Group returns the group for window or the default group, if window is NULL or
// if window does not have an explicit window group.
//
// The function returns the following values:
//
//   - windowGroup for a window or the default group.
func (window *Window) Group() *WindowGroup {
	var _arg0 *C.GtkWindow      // out
	var _cret *C.GtkWindowGroup // in

	if window != nil {
		_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	}

	_cret = C.gtk_window_get_group(_arg0)
	runtime.KeepAlive(window)

	var _windowGroup *WindowGroup // out

	_windowGroup = wrapWindowGroup(coreglib.Take(unsafe.Pointer(_cret)))

	return _windowGroup
}

// HasResizeGrip determines whether the window may have a resize grip.
//
// Deprecated: Resize grips have been removed.
//
// The function returns the following values:
//
//   - ok: TRUE if the window has a resize grip.
func (window *Window) HasResizeGrip() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_has_resize_grip(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HideTitlebarWhenMaximized returns whether the window has
// requested to have its titlebar hidden when maximized. See
// gtk_window_set_hide_titlebar_when_maximized ().
//
// The function returns the following values:
//
//   - ok: TRUE if the window has requested to have its titlebar hidden when
//     maximized.
func (window *Window) HideTitlebarWhenMaximized() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_hide_titlebar_when_maximized(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Icon gets the value set by gtk_window_set_icon() (or if you've called
// gtk_window_set_icon_list(), gets the first icon in the icon list).
//
// The function returns the following values:
//
//   - pixbuf (optional): icon for window or NULL if none.
func (window *Window) Icon() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GdkPixbuf // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_icon(_arg0)
	runtime.KeepAlive(window)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.Take(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// IconList retrieves the list of icons set by gtk_window_set_icon_list(). The
// list is copied, but the reference count on each member won’t be incremented.
//
// The function returns the following values:
//
//   - list: copy of window’s icon list.
func (window *Window) IconList() []*gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GList     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_icon_list(_arg0)
	runtime.KeepAlive(window)

	var _list []*gdkpixbuf.Pixbuf // out

	_list = make([]*gdkpixbuf.Pixbuf, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GdkPixbuf)(v)
		var dst *gdkpixbuf.Pixbuf // out
		{
			obj := coreglib.Take(unsafe.Pointer(src))
			dst = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
		_list = append(_list, dst)
	})

	return _list
}

// IconName returns the name of the themed icon for the window, see
// gtk_window_set_icon_name().
//
// The function returns the following values:
//
//   - utf8 (optional): icon name or NULL if the window has no themed icon.
func (window *Window) IconName() string {
	var _arg0 *C.GtkWindow // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_icon_name(_arg0)
	runtime.KeepAlive(window)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// MnemonicModifier returns the mnemonic modifier for this window. See
// gtk_window_set_mnemonic_modifier().
//
// The function returns the following values:
//
//   - modifierType: modifier mask used to activate mnemonics on this window.
func (window *Window) MnemonicModifier() gdk.ModifierType {
	var _arg0 *C.GtkWindow      // out
	var _cret C.GdkModifierType // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_mnemonic_modifier(_arg0)
	runtime.KeepAlive(window)

	var _modifierType gdk.ModifierType // out

	_modifierType = gdk.ModifierType(_cret)

	return _modifierType
}

// MnemonicsVisible gets the value of the Window:mnemonics-visible property.
//
// The function returns the following values:
//
//   - ok: TRUE if mnemonics are supposed to be visible in this window.
func (window *Window) MnemonicsVisible() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_mnemonics_visible(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Modal returns whether the window is modal. See gtk_window_set_modal().
//
// The function returns the following values:
//
//   - ok: TRUE if the window is set to be modal and establishes a grab when
//     shown.
func (window *Window) Modal() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_modal(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Opacity fetches the requested opacity for this window. See
// gtk_window_set_opacity().
//
// Deprecated: Use gtk_widget_get_opacity instead.
//
// The function returns the following values:
//
//   - gdouble: requested opacity for this window.
func (window *Window) Opacity() float64 {
	var _arg0 *C.GtkWindow // out
	var _cret C.gdouble    // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_opacity(_arg0)
	runtime.KeepAlive(window)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Position: this function returns the position you need to pass to
// gtk_window_move() to keep window in its current position. This means
// that the meaning of the returned value varies with window gravity. See
// gtk_window_move() for more details.
//
// The reliability of this function depends on the windowing system currently
// in use. Some windowing systems, such as Wayland, do not support a global
// coordinate system, and thus the position of the window will always be (0,
// 0). Others, like X11, do not have a reliable way to obtain the geometry
// of the decorations of a window if they are provided by the window manager.
// Additionally, on X11, window manager have been known to mismanage window
// gravity, which result in windows moving even if you use the coordinates of
// the current position as returned by this function.
//
// If you haven’t changed the window gravity, its gravity will be
// K_GRAVITY_NORTH_WEST. This means that gtk_window_get_position() gets the
// position of the top-left corner of the window manager frame for the window.
// gtk_window_move() sets the position of this same top-left corner.
//
// If a window has gravity K_GRAVITY_STATIC the window manager frame is not
// relevant, and thus gtk_window_get_position() will always produce accurate
// results. However you can’t use static gravity to do things like place a
// window in a corner of the screen, because static gravity ignores the window
// manager decorations.
//
// Ideally, this function should return appropriate values if the window has
// client side decorations, assuming that the windowing system supports global
// coordinates.
//
// In practice, saving the window position should not be left to applications,
// as they lack enough knowledge of the windowing system and the window manager
// state to effectively do so. The appropriate way to implement saving the
// window position is to use a platform-specific protocol, wherever that is
// available.
//
// The function returns the following values:
//
//   - rootX (optional): return location for X coordinate of gravity-determined
//     reference point, or NULL.
//   - rootY (optional): return location for Y coordinate of gravity-determined
//     reference point, or NULL.
func (window *Window) Position() (rootX, rootY int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_get_position(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(window)

	var _rootX int // out
	var _rootY int // out

	_rootX = int(_arg1)
	_rootY = int(_arg2)

	return _rootX, _rootY
}

// Resizable gets the value set by gtk_window_set_resizable().
//
// The function returns the following values:
//
//   - ok: TRUE if the user can resize the window.
func (window *Window) Resizable() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_resizable(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ResizeGripArea: if a window has a resize grip, this will retrieve the grip
// position, width and height into the specified Rectangle.
//
// Deprecated: Resize grips have been removed.
//
// The function returns the following values:
//
//   - rect: pointer to a Rectangle which we should store the resize grip area.
//   - ok: TRUE if the resize grip’s area was retrieved.
func (window *Window) ResizeGripArea() (*gdk.Rectangle, bool) {
	var _arg0 *C.GtkWindow   // out
	var _arg1 C.GdkRectangle // in
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_resize_grip_area(_arg0, &_arg1)
	runtime.KeepAlive(window)

	var _rect *gdk.Rectangle // out
	var _ok bool             // out

	_rect = (*gdk.Rectangle)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	if _cret != 0 {
		_ok = true
	}

	return _rect, _ok
}

// Role returns the role of the window. See gtk_window_set_role() for further
// explanation.
//
// The function returns the following values:
//
//   - utf8 (optional): role of the window if set, or NULL. The returned is
//     owned by the widget and must not be modified or freed.
func (window *Window) Role() string {
	var _arg0 *C.GtkWindow // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_role(_arg0)
	runtime.KeepAlive(window)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Screen returns the Screen associated with window.
//
// The function returns the following values:
//
//   - screen: Screen.
func (window *Window) Screen() *gdk.Screen {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GdkScreen // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_screen(_arg0)
	runtime.KeepAlive(window)

	var _screen *gdk.Screen // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_screen = &gdk.Screen{
			Object: obj,
		}
	}

	return _screen
}

// Size obtains the current size of window.
//
// If window is not visible on screen, this function return the size GTK+
// will suggest to the [window manager][gtk-X11-arch] for the initial window
// size (but this is not reliably the same as the size the window manager will
// actually select). See: gtk_window_set_default_size().
//
// Depending on the windowing system and the window manager constraints,
// the size returned by this function may not match the size set using
// gtk_window_resize(); additionally, since gtk_window_resize() may be
// implemented as an asynchronous operation, GTK+ cannot guarantee in any way
// that this code:
//
//	static void
//	on_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
//	{
//	  int new_width, new_height;
//
//	  gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height);
//
//	  ...
//	}
//
// Note that, if you connect to the Widget::size-allocate signal, you should
// not use the dimensions of the Allocation passed to the signal handler,
// as the allocation may contain client side decorations added by GTK+,
// depending on the windowing system in use.
//
// If you are getting a window size in order to position the window on the
// screen, you should, instead, simply set the window’s semantic type with
// gtk_window_set_type_hint(), which allows the window manager to e.g.
// center dialogs. Also, if you set the transient parent of dialogs with
// gtk_window_set_transient_for() window managers will often center the dialog
// over its parent window. It's much preferred to let the window manager handle
// these cases rather than doing it yourself, because all apps will behave
// consistently and according to user or system preferences, if the window
// manager handles it. Also, the window manager can take into account the size
// of the window decorations and border that it may add, and of which GTK+ has
// no knowledge. Additionally, positioning windows in global screen coordinates
// may not be allowed by the windowing system. For more information, see:
// gtk_window_set_position().
//
// The function returns the following values:
//
//   - width (optional): return location for width, or NULL.
//   - height (optional): return location for height, or NULL.
func (window *Window) Size() (width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // in
	var _arg2 C.gint       // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_get_size(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(window)

	var _width int  // out
	var _height int // out

	_width = int(_arg1)
	_height = int(_arg2)

	return _width, _height
}

// SkipPagerHint gets the value set by gtk_window_set_skip_pager_hint().
//
// The function returns the following values:
//
//   - ok: TRUE if window shouldn’t be in pager.
func (window *Window) SkipPagerHint() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_skip_pager_hint(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SkipTaskbarHint gets the value set by gtk_window_set_skip_taskbar_hint().
//
// The function returns the following values:
//
//   - ok: TRUE if window shouldn’t be in taskbar.
func (window *Window) SkipTaskbarHint() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_skip_taskbar_hint(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Title retrieves the title of the window. See gtk_window_set_title().
//
// The function returns the following values:
//
//   - utf8 (optional): title of the window, or NULL if none has been set
//     explicitly. The returned string is owned by the widget and must not be
//     modified or freed.
func (window *Window) Title() string {
	var _arg0 *C.GtkWindow // out
	var _cret *C.gchar     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_title(_arg0)
	runtime.KeepAlive(window)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// Titlebar returns the custom titlebar that has been set with
// gtk_window_set_titlebar().
//
// The function returns the following values:
//
//   - widget (optional): custom titlebar, or NULL.
func (window *Window) Titlebar() Widgetter {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GtkWidget // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_titlebar(_arg0)
	runtime.KeepAlive(window)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// TransientFor fetches the transient parent for this window. See
// gtk_window_set_transient_for().
//
// The function returns the following values:
//
//   - ret (optional): transient parent for this window, or NULL if no transient
//     parent has been set.
func (window *Window) TransientFor() *Window {
	var _arg0 *C.GtkWindow // out
	var _cret *C.GtkWindow // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_transient_for(_arg0)
	runtime.KeepAlive(window)

	var _ret *Window // out

	if _cret != nil {
		_ret = wrapWindow(coreglib.Take(unsafe.Pointer(_cret)))
	}

	return _ret
}

// TypeHint gets the type hint for this window. See gtk_window_set_type_hint().
//
// The function returns the following values:
//
//   - windowTypeHint: type hint for window.
func (window *Window) TypeHint() gdk.WindowTypeHint {
	var _arg0 *C.GtkWindow        // out
	var _cret C.GdkWindowTypeHint // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_type_hint(_arg0)
	runtime.KeepAlive(window)

	var _windowTypeHint gdk.WindowTypeHint // out

	_windowTypeHint = gdk.WindowTypeHint(_cret)

	return _windowTypeHint
}

// UrgencyHint gets the value set by gtk_window_set_urgency_hint().
//
// The function returns the following values:
//
//   - ok: TRUE if window is urgent.
func (window *Window) UrgencyHint() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_urgency_hint(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// WindowType gets the type of the window. See WindowType.
//
// The function returns the following values:
//
//   - windowType: type of the window.
func (window *Window) WindowType() WindowType {
	var _arg0 *C.GtkWindow    // out
	var _cret C.GtkWindowType // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_get_window_type(_arg0)
	runtime.KeepAlive(window)

	var _windowType WindowType // out

	_windowType = WindowType(_cret)

	return _windowType
}

// HasGroup returns whether window has an explicit window group.
//
// The function returns the following values:
//
//   - ok: TRUE if window has an explicit window group.
//
//     Since 2.22.
func (window *Window) HasGroup() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_has_group(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasToplevelFocus returns whether the input focus is within this GtkWindow.
// For real toplevel windows, this is identical to gtk_window_is_active(),
// but for embedded windows, like Plug, the results will differ.
//
// The function returns the following values:
//
//   - ok: TRUE if the input focus is within this GtkWindow.
func (window *Window) HasToplevelFocus() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_has_toplevel_focus(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Iconify asks to iconify (i.e. minimize) the specified window. Note that you
// shouldn’t assume the window is definitely iconified afterward, because other
// entities (e.g. the user or [window manager][gtk-X11-arch]) could deiconify it
// again, or there may not be a window manager in which case iconification isn’t
// possible, etc. But normally the window will end up iconified. Just don’t
// write code that crashes if not.
//
// It’s permitted to call this function before showing a window, in which case
// the window will be iconified before it ever appears onscreen.
//
// You can track iconification via the “window-state-event” signal on Widget.
func (window *Window) Iconify() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_iconify(_arg0)
	runtime.KeepAlive(window)
}

// IsActive returns whether the window is part of the current active toplevel.
// (That is, the toplevel window receiving keystrokes.) The return value is
// TRUE if the window is active toplevel itself, but also if it is, say, a Plug
// embedded in the active toplevel. You might use this function if you wanted to
// draw a widget differently in an active window from a widget in an inactive
// window. See gtk_window_has_toplevel_focus().
//
// The function returns the following values:
//
//   - ok: TRUE if the window part of the current active window.
func (window *Window) IsActive() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_is_active(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsMaximized retrieves the current maximized state of window.
//
// Note that since maximization is ultimately handled by the window manager and
// happens asynchronously to an application request, you shouldn’t assume the
// return value of this function changing immediately (or at all), as an effect
// of calling gtk_window_maximize() or gtk_window_unmaximize().
//
// The function returns the following values:
//
//   - ok: whether the window has a maximized state.
func (window *Window) IsMaximized() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_is_maximized(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Maximize asks to maximize window, so that it becomes full-screen.
// Note that you shouldn’t assume the window is definitely maximized afterward,
// because other entities (e.g. the user or [window manager][gtk-X11-arch])
// could unmaximize it again, and not all window managers support maximization.
// But normally the window will end up maximized. Just don’t write code that
// crashes if not.
//
// It’s permitted to call this function before showing a window, in which case
// the window will be maximized when it appears onscreen initially.
//
// You can track maximization via the “window-state-event” signal on Widget,
// or by listening to notifications on the Window:is-maximized property.
func (window *Window) Maximize() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_maximize(_arg0)
	runtime.KeepAlive(window)
}

// MnemonicActivate activates the targets associated with the mnemonic.
//
// The function takes the following parameters:
//
//   - keyval: mnemonic.
//   - modifier: modifiers.
//
// The function returns the following values:
//
//   - ok: TRUE if the activation is done.
func (window *Window) MnemonicActivate(keyval uint, modifier gdk.ModifierType) bool {
	var _arg0 *C.GtkWindow      // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.guint(keyval)
	_arg2 = C.GdkModifierType(modifier)

	_cret = C.gtk_window_mnemonic_activate(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifier)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Move asks the [window manager][gtk-X11-arch] to move window to the given
// position. Window managers are free to ignore this; most window managers
// ignore requests for initial window positions (instead using a user-defined
// placement algorithm) and honor requests after the window has already been
// shown.
//
// Note: the position is the position of the gravity-determined reference point
// for the window. The gravity determines two things: first, the location of the
// reference point in root window coordinates; and second, which point on the
// window is positioned at the reference point.
//
// By default the gravity is K_GRAVITY_NORTH_WEST, so the reference point is
// simply the x, y supplied to gtk_window_move(). The top-left corner of the
// window decorations (aka window frame or border) will be placed at x, y.
// Therefore, to position a window at the top left of the screen, you want to
// use the default gravity (which is K_GRAVITY_NORTH_WEST) and move the window
// to 0,0.
//
// To position a window at the bottom right corner of the screen, you would
// set K_GRAVITY_SOUTH_EAST, which means that the reference point is at x +
// the window width and y + the window height, and the bottom-right corner of
// the window border will be placed at that reference point. So, to place a
// window in the bottom right corner you would first set gravity to south east,
// then write: gtk_window_move (window, gdk_screen_width () - window_width,
// gdk_screen_height () - window_height) (note that this example does not take
// multi-head scenarios into account).
//
// The Extended Window Manager Hints Specification
// (http://www.freedesktop.org/Standards/wm-spec) has a nice table of gravities
// in the “implementation notes” section.
//
// The gtk_window_get_position() documentation may also be relevant.
//
// The function takes the following parameters:
//
//   - x: x coordinate to move window to.
//   - y: y coordinate to move window to.
func (window *Window) Move(x, y int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(x)
	_arg2 = C.gint(y)

	C.gtk_window_move(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(x)
	runtime.KeepAlive(y)
}

// ParseGeometry parses a standard X Window System geometry string
// - see the manual page for X (type “man X”) for details on this.
// gtk_window_parse_geometry() does work on all GTK+ ports including Win32 but
// is primarily intended for an X environment.
//
// If either a size or a position can be extracted from the geometry
// string, gtk_window_parse_geometry() returns TRUE and calls
// gtk_window_set_default_size() and/or gtk_window_move() to resize/move the
// window.
//
// If gtk_window_parse_geometry() returns TRUE, it will also set the
// K_HINT_USER_POS and/or K_HINT_USER_SIZE hints indicating to the window
// manager that the size/position of the window was user-specified. This causes
// most window managers to honor the geometry.
//
// Note that for gtk_window_parse_geometry() to work as expected, it has
// to be called when the window has its “final” size, i.e. after calling
// gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints() on
// the window.
//
//	#include <gtk/gtk.h>
//
//	static void
//	fill_with_content (GtkWidget *vbox)
//	{
//	  // fill with content...
//	}
//
//	int
//	main (int argc, char *argv[])
//	{
//	  GtkWidget *window, *vbox;
//	  GdkGeometry size_hints = {
//	    100, 50, 0, 0, 100, 50, 10,
//	    10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
//	  };
//
//	  gtk_init (&argc, &argv);
//
//	  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//	  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
//
//	  gtk_container_add (GTK_CONTAINER (window), vbox);
//	  fill_with_content (vbox);
//	  gtk_widget_show_all (vbox);
//
//	  gtk_window_set_geometry_hints (GTK_WINDOW (window),
//		  			    NULL,
//					    &size_hints,
//					    GDK_HINT_MIN_SIZE |
//					    GDK_HINT_BASE_SIZE |
//					    GDK_HINT_RESIZE_INC);
//
//	  if (argc > 1)
//	    {
//	      gboolean res;
//	      res = gtk_window_parse_geometry (GTK_WINDOW (window),
//	                                       argv[1]);
//	      if (! res)
//	        fprintf (stderr,
//	                 "Failed to parse “s”\n",
//	                 argv[1]);
//	    }
//
//	  gtk_widget_show_all (window);
//	  gtk_main ();
//
//	  return 0;
//	}
//
// Deprecated: Geometry handling in GTK is deprecated.
//
// The function takes the following parameters:
//
//   - geometry string.
//
// The function returns the following values:
//
//   - ok: TRUE if string was parsed successfully.
func (window *Window) ParseGeometry(geometry string) bool {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(geometry)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_window_parse_geometry(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(geometry)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Present presents a window to the user. This function should not be used as
// when it is called, it is too late to gather a valid timestamp to allow focus
// stealing prevention to work correctly.
func (window *Window) Present() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_present(_arg0)
	runtime.KeepAlive(window)
}

// PresentWithTime presents a window to the user. This may mean raising the
// window in the stacking order, deiconifying it, moving it to the current
// desktop, and/or giving it the keyboard focus, possibly dependent on the
// user’s platform, window manager, and preferences.
//
// If window is hidden, this function calls gtk_widget_show() as well.
//
// This function should be used when the user tries to open a window that’s
// already open. Say for example the preferences dialog is currently open,
// and the user chooses Preferences from the menu a second time; use
// gtk_window_present() to move the already-open dialog where the user can see
// it.
//
// Presents a window to the user in response to a user interaction. The
// timestamp should be gathered when the window was requested to be shown (when
// clicking a link for example), rather than once the window is ready to be
// shown.
//
// The function takes the following parameters:
//
//   - timestamp of the user interaction (typically a button or key press event)
//     which triggered this call.
func (window *Window) PresentWithTime(timestamp uint32) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.guint32    // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.guint32(timestamp)

	C.gtk_window_present_with_time(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(timestamp)
}

// PropagateKeyEvent: propagate a key press or release event to the focus
// widget and up the focus container chain until a widget handles event. This
// is normally called by the default ::key_press_event and ::key_release_event
// handlers for toplevel windows, however in some cases it may be useful to
// call this directly when overriding the standard key handling for a toplevel
// window.
//
// The function takes the following parameters:
//
//   - event: EventKey.
//
// The function returns the following values:
//
//   - ok: TRUE if a widget in the focus chain handled the event.
func (window *Window) PropagateKeyEvent(event *gdk.EventKey) bool {
	var _arg0 *C.GtkWindow   // out
	var _arg1 *C.GdkEventKey // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GdkEventKey)(gextras.StructNative(unsafe.Pointer(event)))

	_cret = C.gtk_window_propagate_key_event(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(event)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RemoveAccelGroup reverses the effects of gtk_window_add_accel_group().
//
// The function takes the following parameters:
//
//   - accelGroup: AccelGroup.
func (window *Window) RemoveAccelGroup(accelGroup *AccelGroup) {
	var _arg0 *C.GtkWindow     // out
	var _arg1 *C.GtkAccelGroup // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GtkAccelGroup)(unsafe.Pointer(coreglib.InternObject(accelGroup).Native()))

	C.gtk_window_remove_accel_group(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(accelGroup)
}

// RemoveMnemonic removes a mnemonic from this window.
//
// The function takes the following parameters:
//
//   - keyval: mnemonic.
//   - target: widget that gets activated by the mnemonic.
func (window *Window) RemoveMnemonic(keyval uint, target Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.guint      // out
	var _arg2 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.guint(keyval)
	_arg2 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(target).Native()))

	C.gtk_window_remove_mnemonic(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(target)
}

// ReshowWithInitialSize hides window, then reshows it, resetting the default
// size and position of the window. Used by GUI builders only.
//
// Deprecated: GUI builders can call gtk_widget_hide(), gtk_widget_unrealize()
// and then gtk_widget_show() on window themselves, if they still need this
// functionality.
func (window *Window) ReshowWithInitialSize() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_reshow_with_initial_size(_arg0)
	runtime.KeepAlive(window)
}

// Resize resizes the window as if the user had done so, obeying geometry
// constraints. The default geometry constraint is that windows may not
// be smaller than their size request; to override this constraint, call
// gtk_widget_set_size_request() to set the window's request to a smaller value.
//
// If gtk_window_resize() is called before showing a window for the first time,
// it overrides any default size set with gtk_window_set_default_size().
//
// Windows may not be resized smaller than 1 by 1 pixels.
//
// When using client side decorations, GTK+ will do its best to adjust the given
// size so that the resulting window size matches the requested size without
// the title bar, borders and shadows added for the client side decorations,
// but there is no guarantee that the result will be totally accurate because
// these widgets added for client side decorations depend on the theme and may
// not be realized or visible at the time gtk_window_resize() is issued.
//
// If the GtkWindow has a titlebar widget (see gtk_window_set_titlebar()),
// then typically, gtk_window_resize() will compensate for the height of the
// titlebar widget only if the height is known when the resulting GtkWindow
// configuration is issued. For example, if new widgets are added after the
// GtkWindow configuration and cause the titlebar widget to grow in height, this
// will result in a window content smaller that specified by gtk_window_resize()
// and not a larger window.
//
// The function takes the following parameters:
//
//   - width in pixels to resize the window to.
//   - height in pixels to resize the window to.
func (window *Window) Resize(width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_window_resize(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// ResizeGripIsVisible determines whether a resize grip is visible for the
// specified window.
//
// Deprecated: Resize grips have been removed.
//
// The function returns the following values:
//
//   - ok: TRUE if a resize grip exists and is visible.
func (window *Window) ResizeGripIsVisible() bool {
	var _arg0 *C.GtkWindow // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	_cret = C.gtk_window_resize_grip_is_visible(_arg0)
	runtime.KeepAlive(window)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ResizeToGeometry: like gtk_window_resize(), but width and height
// are interpreted in terms of the base size and increment set with
// gtk_window_set_geometry_hints.
//
// Deprecated: This function does nothing. Use gtk_window_resize() and compute
// the geometry yourself.
//
// The function takes the following parameters:
//
//   - width in resize increments to resize the window to.
//   - height in resize increments to resize the window to.
func (window *Window) ResizeToGeometry(width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_window_resize_to_geometry(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetAcceptFocus windows may set a hint asking the desktop environment not to
// receive the input focus. This function sets this hint.
//
// The function takes the following parameters:
//
//   - setting: TRUE to let this window receive input focus.
func (window *Window) SetAcceptFocus(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_accept_focus(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetApplication sets or unsets the Application associated with the window.
//
// The application will be kept alive for at least as long as it has any windows
// associated with it (see g_application_hold() for a way to keep it alive
// without windows).
//
// Normally, the connection between the application and the window will remain
// until the window is destroyed, but you can explicitly remove it by setting
// the application to NULL.
//
// This is equivalent to calling gtk_application_remove_window() and/or
// gtk_application_add_window() on the old/new applications as relevant.
//
// The function takes the following parameters:
//
//   - application (optional) or NULL to unset.
func (window *Window) SetApplication(application *Application) {
	var _arg0 *C.GtkWindow      // out
	var _arg1 *C.GtkApplication // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if application != nil {
		_arg1 = (*C.GtkApplication)(unsafe.Pointer(coreglib.InternObject(application).Native()))
	}

	C.gtk_window_set_application(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(application)
}

// SetAttachedTo marks window as attached to attach_widget. This creates a
// logical binding between the window and the widget it belongs to, which is
// used by GTK+ to propagate information such as styling or accessibility to
// window as if it was a children of attach_widget.
//
// Examples of places where specifying this relation is useful are for instance
// a Menu created by a ComboBox, a completion popup window created by Entry or a
// typeahead search entry created by TreeView.
//
// Note that this function should not be confused with
// gtk_window_set_transient_for(), which specifies a window manager relation
// between two toplevels instead.
//
// Passing NULL for attach_widget detaches the window.
//
// The function takes the following parameters:
//
//   - attachWidget (optional) or NULL.
func (window *Window) SetAttachedTo(attachWidget Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if attachWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(attachWidget).Native()))
	}

	C.gtk_window_set_attached_to(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(attachWidget)
}

// SetDecorated: by default, windows are decorated with a title bar, resize
// controls, etc. Some [window managers][gtk-X11-arch] allow GTK+ to disable
// these decorations, creating a borderless window. If you set the decorated
// property to FALSE using this function, GTK+ will do its best to convince
// the window manager not to decorate the window. Depending on the system,
// this function may not have any effect when called on a window that is already
// visible, so you should call it before calling gtk_widget_show().
//
// On Windows, this function always works, since there’s no window manager
// policy involved.
//
// The function takes the following parameters:
//
//   - setting: TRUE to decorate the window.
func (window *Window) SetDecorated(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_decorated(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetDefault: 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 Window. When setting (rather than unsetting) the
// default widget it’s generally easier to call gtk_widget_grab_default()
// on the widget. Before making a widget the default widget, you must call
// gtk_widget_set_can_default() on the widget you’d like to make the default.
//
// The function takes the following parameters:
//
//   - defaultWidget (optional): widget to be the default, or NULL to unset the
//     default widget for the toplevel.
func (window *Window) SetDefault(defaultWidget Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if defaultWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(defaultWidget).Native()))
	}

	C.gtk_window_set_default(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(defaultWidget)
}

// SetDefaultGeometry: like gtk_window_set_default_size(), but width and
// height are interpreted in terms of the base size and increment set with
// gtk_window_set_geometry_hints.
//
// Deprecated: This function does nothing. If you want to set a default size,
// use gtk_window_set_default_size() instead.
//
// The function takes the following parameters:
//
//   - width in resize increments, or -1 to unset the default width.
//   - height in resize increments, or -1 to unset the default height.
func (window *Window) SetDefaultGeometry(width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_window_set_default_geometry(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetDefaultSize sets the default size of a window. If the window’s “natural”
// size (its size request) is larger than the default, the default will be
// ignored. More generally, if the default size does not obey the geometry hints
// for the window (gtk_window_set_geometry_hints() can be used to set these
// explicitly), the default size will be clamped to the nearest permitted size.
//
// Unlike gtk_widget_set_size_request(), which sets a size request for a widget
// and thus would keep users from shrinking the window, this function only sets
// the initial size, just as if the user had resized the window themselves.
// Users can still shrink the window again as they normally would. Setting a
// default size of -1 means to use the “natural” default size (the size request
// of the window).
//
// For more control over a window’s initial size and how resizing works,
// investigate gtk_window_set_geometry_hints().
//
// For some uses, gtk_window_resize() is a more appropriate function.
// gtk_window_resize() changes the current size of the window, rather than the
// size to be used on initial display. gtk_window_resize() always affects the
// window itself, not the geometry widget.
//
// The default size of a window only affects the first time a window is shown;
// if a window is hidden and re-shown, it will remember the size it had prior to
// hiding, rather than using the default size.
//
// Windows can’t actually be 0x0 in size, they must be at least 1x1, but passing
// 0 for width and height is OK, resulting in a 1x1 default size.
//
// If you use this function to reestablish a previously saved window size,
// note that the appropriate size to save is the one returned by
// gtk_window_get_size(). Using the window allocation directly will not work in
// all circumstances and can lead to growing or shrinking windows.
//
// The function takes the following parameters:
//
//   - width in pixels, or -1 to unset the default width.
//   - height in pixels, or -1 to unset the default height.
func (window *Window) SetDefaultSize(width, height int) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gint       // out
	var _arg2 C.gint       // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gint(width)
	_arg2 = C.gint(height)

	C.gtk_window_set_default_size(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
}

// SetDeletable: by default, windows have a close button in the window frame.
// Some [window managers][gtk-X11-arch] allow GTK+ to disable this button.
// If you set the deletable property to FALSE using this function, GTK+ will
// do its best to convince the window manager not to show a close button.
// Depending on the system, this function may not have any effect when called
// on a window that is already visible, so you should call it before calling
// gtk_widget_show().
//
// On Windows, this function always works, since there’s no window manager
// policy involved.
//
// The function takes the following parameters:
//
//   - setting: TRUE to decorate the window as deletable.
func (window *Window) SetDeletable(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_deletable(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetDestroyWithParent: if setting is TRUE, then destroying the transient
// parent of window will also destroy window itself. This is useful for dialogs
// that shouldn’t persist beyond the lifetime of the main window they're
// associated with, for example.
//
// The function takes the following parameters:
//
//   - setting: whether to destroy window with its transient parent.
func (window *Window) SetDestroyWithParent(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_destroy_with_parent(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetFocus: if focus is not the current focus widget, and is focusable, sets it
// as the focus widget for the window. If focus is NULL, unsets the focus widget
// for this window. To set the focus to a particular widget in the toplevel,
// it is usually more convenient to use gtk_widget_grab_focus() instead of this
// function.
//
// The function takes the following parameters:
//
//   - focus (optional): widget to be the new focus widget, or NULL to unset any
//     focus widget for the toplevel window.
func (window *Window) SetFocus(focus Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if focus != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(focus).Native()))
	}

	C.gtk_window_set_focus(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(focus)
}

// SetFocusOnMap windows may set a hint asking the desktop environment not to
// receive the input focus when the window is mapped. This function sets this
// hint.
//
// The function takes the following parameters:
//
//   - setting: TRUE to let this window receive input focus on map.
func (window *Window) SetFocusOnMap(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_focus_on_map(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetFocusVisible sets the Window:focus-visible property.
//
// The function takes the following parameters:
//
//   - setting: new value.
func (window *Window) SetFocusVisible(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_focus_visible(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetGeometryHints: this function sets up hints about how a window can be
// resized by the user. You can set a minimum and maximum size; allowed resize
// increments (e.g. for xterm, you can only resize by the size of a character);
// aspect ratios; and more. See the Geometry struct.
//
// The function takes the following parameters:
//
//   - geometryWidget (optional): widget the geometry hints used to be applied
//     to or NULL. Since 3.20 this argument is ignored and GTK behaves as if
//     NULL was set.
//   - geometry (optional): struct containing geometry information or NULL.
//   - geomMask: mask indicating which struct fields should be paid attention
//     to.
func (window *Window) SetGeometryHints(geometryWidget Widgetter, geometry *gdk.Geometry, geomMask gdk.WindowHints) {
	var _arg0 *C.GtkWindow     // out
	var _arg1 *C.GtkWidget     // out
	var _arg2 *C.GdkGeometry   // out
	var _arg3 C.GdkWindowHints // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if geometryWidget != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(geometryWidget).Native()))
	}
	if geometry != nil {
		_arg2 = (*C.GdkGeometry)(gextras.StructNative(unsafe.Pointer(geometry)))
	}
	_arg3 = C.GdkWindowHints(geomMask)

	C.gtk_window_set_geometry_hints(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(window)
	runtime.KeepAlive(geometryWidget)
	runtime.KeepAlive(geometry)
	runtime.KeepAlive(geomMask)
}

// SetGravity: window gravity defines the meaning of coordinates passed to
// gtk_window_move(). See gtk_window_move() and Gravity for more details.
//
// The default window gravity is K_GRAVITY_NORTH_WEST which will typically “do
// what you mean.”.
//
// The function takes the following parameters:
//
//   - gravity: window gravity.
func (window *Window) SetGravity(gravity gdk.Gravity) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.GdkGravity // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.GdkGravity(gravity)

	C.gtk_window_set_gravity(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(gravity)
}

// SetHasResizeGrip sets whether window has a corner resize grip.
//
// Note that the resize grip is only shown if the window is actually resizable
// and not maximized. Use gtk_window_resize_grip_is_visible() to find out if the
// resize grip is currently shown.
//
// Deprecated: Resize grips have been removed.
//
// The function takes the following parameters:
//
//   - value: TRUE to allow a resize grip.
func (window *Window) SetHasResizeGrip(value bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if value {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_has_resize_grip(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(value)
}

// SetHasUserRefCount tells GTK+ whether to drop its extra reference to the
// window when gtk_widget_destroy() is called.
//
// This function is only exported for the benefit of language bindings which
// may need to keep the window alive until their wrapper object is garbage
// collected. There is no justification for ever calling this function in an
// application.
//
// The function takes the following parameters:
//
//   - setting: new value.
func (window *Window) SetHasUserRefCount(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_has_user_ref_count(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetHideTitlebarWhenMaximized: if setting is TRUE, then window will request
// that it’s titlebar should be hidden when maximized. This is useful for
// windows that don’t convey any information other than the application name
// in the titlebar, to put the available screen space to better use. If the
// underlying window system does not support the request, the setting will not
// have any effect.
//
// Note that custom titlebars set with gtk_window_set_titlebar() are not
// affected by this. The application is in full control of their content and
// visibility anyway.
//
// The function takes the following parameters:
//
//   - setting: whether to hide the titlebar when window is maximized.
func (window *Window) SetHideTitlebarWhenMaximized(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_hide_titlebar_when_maximized(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetIcon sets up the icon representing a Window. This icon is used when
// the window is minimized (also known as iconified). Some window managers or
// desktop environments may also place it in the window frame, or display it in
// other contexts. On others, the icon is not used at all, so your mileage may
// vary.
//
// The icon should be provided in whatever size it was naturally drawn; that is,
// don’t scale the image before passing it to GTK+. Scaling is postponed until
// the last minute, when the desired final size is known, to allow best quality.
//
// If you have your icon hand-drawn in multiple sizes, use
// gtk_window_set_icon_list(). Then the best size will be used.
//
// This function is equivalent to calling gtk_window_set_icon_list() with a
// 1-element list.
//
// See also gtk_window_set_default_icon_list() to set the icon for all windows
// in your application in one go.
//
// The function takes the following parameters:
//
//   - icon (optional) image, or NULL.
func (window *Window) SetIcon(icon *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GdkPixbuf // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if icon != nil {
		_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(icon).Native()))
	}

	C.gtk_window_set_icon(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(icon)
}

// SetIconFromFile sets the icon for window. Warns on failure if err is NULL.
//
// This function is equivalent to calling gtk_window_set_icon() with a pixbuf
// created by loading the image from filename.
//
// The function takes the following parameters:
//
//   - filename: location of icon file.
func (window *Window) SetIconFromFile(filename string) error {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out
	var _cerr *C.GError    // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_icon_from_file(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(window)
	runtime.KeepAlive(filename)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// SetIconList sets up the icon representing a Window. The icon is used when
// the window is minimized (also known as iconified). Some window managers or
// desktop environments may also place it in the window frame, or display it in
// other contexts. On others, the icon is not used at all, so your mileage may
// vary.
//
// gtk_window_set_icon_list() allows you to pass in the same icon in several
// hand-drawn sizes. The list should contain the natural sizes your icon is
// available in; that is, don’t scale the image before passing it to GTK+.
// Scaling is postponed until the last minute, when the desired final size is
// known, to allow best quality.
//
// By passing several sizes, you may improve the final image quality of the
// icon, by reducing or eliminating automatic image scaling.
//
// Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger
// images (64x64, 128x128) if you have them.
//
// See also gtk_window_set_default_icon_list() to set the icon for all windows
// in your application in one go.
//
// Note that transient windows (those who have been set transient for another
// window using gtk_window_set_transient_for()) will inherit their icon from
// their transient parent. So there’s no need to explicitly set the icon on
// transient windows.
//
// The function takes the following parameters:
//
//   - list of Pixbuf.
func (window *Window) SetIconList(list []*gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GList     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	for i := len(list) - 1; i >= 0; i-- {
		src := list[i]
		var dst *C.GdkPixbuf // out
		dst = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(src).Native()))
		_arg1 = C.g_list_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
	}
	defer C.g_list_free(_arg1)

	C.gtk_window_set_icon_list(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(list)
}

// SetIconName sets the icon for the window from a named themed icon. See the
// docs for IconTheme for more details. On some platforms, the window icon is
// not used at all.
//
// Note that this has nothing to do with the WM_ICON_NAME property which is
// mentioned in the ICCCM.
//
// The function takes the following parameters:
//
//   - name (optional) of the themed icon.
func (window *Window) SetIconName(name string) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_window_set_icon_name(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(name)
}

// SetKeepAbove asks to keep window above, so that it stays on top. Note that
// you shouldn’t assume the window is definitely above afterward, because other
// entities (e.g. the user or [window manager][gtk-X11-arch]) could not keep
// it above, and not all window managers support keeping windows above. But
// normally the window will end kept above. Just don’t write code that crashes
// if not.
//
// It’s permitted to call this function before showing a window, in which case
// the window will be kept above when it appears onscreen initially.
//
// You can track the above state via the “window-state-event” signal on Widget.
//
// Note that, according to the Extended Window Manager Hints Specification
// (http://www.freedesktop.org/Standards/wm-spec), the above state is mainly
// meant for user preferences and should not be used by applications e.g.
// for drawing attention to their dialogs.
//
// The function takes the following parameters:
//
//   - setting: whether to keep window above other windows.
func (window *Window) SetKeepAbove(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_keep_above(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetKeepBelow asks to keep window below, so that it stays in bottom.
// Note that you shouldn’t assume the window is definitely below afterward,
// because other entities (e.g. the user or [window manager][gtk-X11-arch])
// could not keep it below, and not all window managers support putting windows
// below. But normally the window will be kept below. Just don’t write code that
// crashes if not.
//
// It’s permitted to call this function before showing a window, in which case
// the window will be kept below when it appears onscreen initially.
//
// You can track the below state via the “window-state-event” signal on Widget.
//
// Note that, according to the Extended Window Manager Hints Specification
// (http://www.freedesktop.org/Standards/wm-spec), the above state is mainly
// meant for user preferences and should not be used by applications e.g.
// for drawing attention to their dialogs.
//
// The function takes the following parameters:
//
//   - setting: whether to keep window below other windows.
func (window *Window) SetKeepBelow(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_keep_below(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetMnemonicModifier sets the mnemonic modifier for this window.
//
// The function takes the following parameters:
//
//   - modifier mask used to activate mnemonics on this window.
func (window *Window) SetMnemonicModifier(modifier gdk.ModifierType) {
	var _arg0 *C.GtkWindow      // out
	var _arg1 C.GdkModifierType // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.GdkModifierType(modifier)

	C.gtk_window_set_mnemonic_modifier(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(modifier)
}

// SetMnemonicsVisible sets the Window:mnemonics-visible property.
//
// The function takes the following parameters:
//
//   - setting: new value.
func (window *Window) SetMnemonicsVisible(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_mnemonics_visible(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetModal sets a window modal or non-modal. Modal windows prevent interaction
// with other windows in the same application. To keep modal dialogs on top
// of main application windows, use gtk_window_set_transient_for() to make the
// dialog transient for the parent; most [window managers][gtk-X11-arch] will
// then disallow lowering the dialog below the parent.
//
// The function takes the following parameters:
//
//   - modal: whether the window is modal.
func (window *Window) SetModal(modal bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if modal {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_modal(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(modal)
}

// SetOpacity: request the windowing system to make window partially
// transparent, with opacity 0 being fully transparent and 1 fully opaque.
// (Values of the opacity parameter are clamped to the [0,1] range.) On X11
// this has any effect only on X screens with a compositing manager running.
// See gtk_widget_is_composited(). On Windows it should work always.
//
// Note that setting a window’s opacity after the window has been shown causes
// it to flicker once on Windows.
//
// Deprecated: Use gtk_widget_set_opacity instead.
//
// The function takes the following parameters:
//
//   - opacity: desired opacity, between 0 and 1.
func (window *Window) SetOpacity(opacity float64) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gdouble    // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.gdouble(opacity)

	C.gtk_window_set_opacity(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(opacity)
}

// SetPosition sets a position constraint for this window. If the old or new
// constraint is GTK_WIN_POS_CENTER_ALWAYS, this will also cause the window to
// be repositioned to satisfy the new constraint.
//
// The function takes the following parameters:
//
//   - position constraint.
func (window *Window) SetPosition(position WindowPosition) {
	var _arg0 *C.GtkWindow        // out
	var _arg1 C.GtkWindowPosition // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.GtkWindowPosition(position)

	C.gtk_window_set_position(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(position)
}

// SetResizable sets whether the user can resize a window. Windows are user
// resizable by default.
//
// The function takes the following parameters:
//
//   - resizable: TRUE if the user can resize this window.
func (window *Window) SetResizable(resizable bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if resizable {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_resizable(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(resizable)
}

// SetRole: this function is only useful on X11, not with other GTK+ targets.
//
// In combination with the window title, the window role allows a [window
// manager][gtk-X11-arch] to identify "the same" window when an application
// is restarted. So for example you might set the “toolbox” role on your app’s
// toolbox window, so that when the user restarts their session, the window
// manager can put the toolbox back in the same place.
//
// If a window already has a unique title, you don’t need to set the role, since
// the WM can use the title to identify the window when restoring the session.
//
// The function takes the following parameters:
//
//   - role: unique identifier for the window to be used when restoring a
//     session.
func (window *Window) SetRole(role string) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(role)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_role(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(role)
}

// SetScreen sets the Screen where the window is displayed; if the window is
// already mapped, it will be unmapped, and then remapped on the new screen.
//
// The function takes the following parameters:
//
//   - screen: Screen.
func (window *Window) SetScreen(screen *gdk.Screen) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GdkScreen // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.GdkScreen)(unsafe.Pointer(coreglib.InternObject(screen).Native()))

	C.gtk_window_set_screen(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(screen)
}

// SetSkipPagerHint windows may set a hint asking the desktop environment not
// to display the window in the pager. This function sets this hint. (A "pager"
// is any desktop navigation tool such as a workspace switcher that displays a
// thumbnail representation of the windows on the screen.).
//
// The function takes the following parameters:
//
//   - setting: TRUE to keep this window from appearing in the pager.
func (window *Window) SetSkipPagerHint(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_skip_pager_hint(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetSkipTaskbarHint windows may set a hint asking the desktop environment not
// to display the window in the task bar. This function sets this hint.
//
// The function takes the following parameters:
//
//   - setting: TRUE to keep this window from appearing in the task bar.
func (window *Window) SetSkipTaskbarHint(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_skip_taskbar_hint(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetStartupID: startup notification identifiers are used by desktop
// environment to track application startup, to provide user feedback and
// other features. This function changes the corresponding property on the
// underlying GdkWindow. Normally, startup identifier is managed automatically
// and you should only use this function in special cases like transferring
// focus from other processes. You should use this function before calling
// gtk_window_present() or any equivalent function generating a window map
// event.
//
// This function is only useful on X11, not with other GTK+ targets.
//
// The function takes the following parameters:
//
//   - startupId: string with startup-notification identifier.
func (window *Window) SetStartupID(startupId string) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(startupId)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_startup_id(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(startupId)
}

// SetTitle sets the title of the Window. The title of a window will be
// displayed in its title bar; on the X Window System, the title bar is rendered
// by the [window manager][gtk-X11-arch], so exactly how the title appears to
// users may vary according to a user’s exact configuration. The title should
// help a user distinguish this window from other windows they may have open. A
// good title might include the application name and current document filename,
// for example.
//
// The function takes the following parameters:
//
//   - title of the window.
func (window *Window) SetTitle(title string) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(title)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_title(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(title)
}

// SetTitlebar sets a custom titlebar for window.
//
// A typical widget used here is HeaderBar, as it provides various features
// expected of a titlebar while allowing the addition of child widgets to it.
//
// If you set a custom titlebar, GTK+ will do its best to convince the window
// manager not to put its own titlebar on the window. Depending on the system,
// this function may not work for a window that is already visible, so you set
// the titlebar before calling gtk_widget_show().
//
// The function takes the following parameters:
//
//   - titlebar (optional): widget to use as titlebar.
func (window *Window) SetTitlebar(titlebar Widgetter) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if titlebar != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(titlebar).Native()))
	}

	C.gtk_window_set_titlebar(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(titlebar)
}

// SetTransientFor: dialog windows should be set transient for the
// main application window they were spawned from. This allows [window
// managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window,
// or center the dialog over the main window. gtk_dialog_new_with_buttons()
// and other convenience functions in GTK+ will sometimes call
// gtk_window_set_transient_for() on your behalf.
//
// Passing NULL for parent unsets the current transient window.
//
// On Wayland, this function can also be used to attach a new K_WINDOW_POPUP
// to a K_WINDOW_TOPLEVEL parent already mapped on screen so that
// the K_WINDOW_POPUP will be created as a subsurface-based window
// K_WINDOW_SUBSURFACE which can be positioned at will relatively to the
// K_WINDOW_TOPLEVEL surface.
//
// On Windows, this function puts the child window on top of the parent, much as
// the window manager would have done on X.
//
// The function takes the following parameters:
//
//   - parent (optional) window, or NULL.
func (window *Window) SetTransientFor(parent *Window) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if parent != nil {
		_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native()))
	}

	C.gtk_window_set_transient_for(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(parent)
}

// SetTypeHint: by setting the type hint for the window, you allow the window
// manager to decorate and handle the window in a way which is suitable to the
// function of the window in your application.
//
// This function should be called before the window becomes visible.
//
// gtk_dialog_new_with_buttons() and other convenience functions in GTK+ will
// sometimes call gtk_window_set_type_hint() on your behalf.
//
// The function takes the following parameters:
//
//   - hint: window type.
func (window *Window) SetTypeHint(hint gdk.WindowTypeHint) {
	var _arg0 *C.GtkWindow        // out
	var _arg1 C.GdkWindowTypeHint // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = C.GdkWindowTypeHint(hint)

	C.gtk_window_set_type_hint(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(hint)
}

// SetUrgencyHint windows may set a hint asking the desktop environment to draw
// the users attention to the window. This function sets this hint.
//
// The function takes the following parameters:
//
//   - setting: TRUE to mark this window as urgent.
func (window *Window) SetUrgencyHint(setting bool) {
	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_urgency_hint(_arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(setting)
}

// SetWmclass: don’t use this function. It sets the X Window System “class”
// and “name” hints for a window. According to the ICCCM, you should always set
// these to the same value for all windows in an application, and GTK+ sets them
// to that value by default, so calling this function is sort of pointless.
// However, you may want to call gtk_window_set_role() on each window in your
// application, for the benefit of the session manager. Setting the role allows
// the window manager to restore window positions when loading a saved session.
//
// Deprecated: since version 3.22.
//
// The function takes the following parameters:
//
//   - wmclassName: window name hint.
//   - wmclassClass: window class hint.
func (window *Window) SetWmclass(wmclassName, wmclassClass string) {
	var _arg0 *C.GtkWindow // out
	var _arg1 *C.gchar     // out
	var _arg2 *C.gchar     // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(wmclassName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(wmclassClass)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_window_set_wmclass(_arg0, _arg1, _arg2)
	runtime.KeepAlive(window)
	runtime.KeepAlive(wmclassName)
	runtime.KeepAlive(wmclassClass)
}

// Stick asks to stick window, which means that it will appear on all
// user desktops. Note that you shouldn’t assume the window is definitely
// stuck afterward, because other entities (e.g. the user or [window
// manager][gtk-X11-arch] could unstick it again, and some window managers do
// not support sticking windows. But normally the window will end up stuck.
// Just don't write code that crashes if not.
//
// It’s permitted to call this function before showing a window.
//
// You can track stickiness via the “window-state-event” signal on Widget.
func (window *Window) Stick() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_stick(_arg0)
	runtime.KeepAlive(window)
}

// Unfullscreen asks to toggle off the fullscreen state for window. Note that
// you shouldn’t assume the window is definitely not full screen afterward,
// because other entities (e.g. the user or [window manager][gtk-X11-arch])
// could fullscreen it again, and not all window managers honor requests to
// unfullscreen windows. But normally the window will end up restored to its
// normal state. Just don’t write code that crashes if not.
//
// You can track the fullscreen state via the “window-state-event” signal on
// Widget.
func (window *Window) Unfullscreen() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_unfullscreen(_arg0)
	runtime.KeepAlive(window)
}

// Unmaximize asks to unmaximize window. Note that you shouldn’t assume the
// window is definitely unmaximized afterward, because other entities (e.g.
// the user or [window manager][gtk-X11-arch]) could maximize it again, and not
// all window managers honor requests to unmaximize. But normally the window
// will end up unmaximized. Just don’t write code that crashes if not.
//
// You can track maximization via the “window-state-event” signal on Widget.
func (window *Window) Unmaximize() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_unmaximize(_arg0)
	runtime.KeepAlive(window)
}

// Unstick asks to unstick window, which means that it will appear on only
// one of the user’s desktops. Note that you shouldn’t assume the window is
// definitely unstuck afterward, because other entities (e.g. the user or
// [window manager][gtk-X11-arch]) could stick it again. But normally the window
// will end up unstuck. Just don’t write code that crashes if not.
//
// You can track stickiness via the “window-state-event” signal on Widget.
func (window *Window) Unstick() {
	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_unstick(_arg0)
	runtime.KeepAlive(window)
}

// activateDefault activates the default widget for the window.
func (window *Window) activateDefault() {
	gclass := (*C.GtkWindowClass)(coreglib.PeekParentClass(window))
	fnarg := gclass.activate_default

	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C._gotk4_gtk3_Window_virtual_activate_default(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(window)
}

// activateFocus activates the current focused widget within the window.
func (window *Window) activateFocus() {
	gclass := (*C.GtkWindowClass)(coreglib.PeekParentClass(window))
	fnarg := gclass.activate_focus

	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C._gotk4_gtk3_Window_virtual_activate_focus(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(window)
}

// enableDebugging class handler for the Window::enable-debugging keybinding
// signal. Since: 3.14.
func (window *Window) enableDebugging(toggle bool) bool {
	gclass := (*C.GtkWindowClass)(coreglib.PeekParentClass(window))
	fnarg := gclass.enable_debugging

	var _arg0 *C.GtkWindow // out
	var _arg1 C.gboolean   // out
	var _cret C.gboolean   // in

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if toggle {
		_arg1 = C.TRUE
	}

	_cret = C._gotk4_gtk3_Window_virtual_enable_debugging(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(toggle)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// keysChanged: signal gets emitted when the set of accelerators or mnemonics
// that are associated with window changes.
func (window *Window) keysChanged() {
	gclass := (*C.GtkWindowClass)(coreglib.PeekParentClass(window))
	fnarg := gclass.keys_changed

	var _arg0 *C.GtkWindow // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C._gotk4_gtk3_Window_virtual_keys_changed(unsafe.Pointer(fnarg), _arg0)
	runtime.KeepAlive(window)
}

// setFocus: if focus is not the current focus widget, and is focusable, sets it
// as the focus widget for the window. If focus is NULL, unsets the focus widget
// for this window. To set the focus to a particular widget in the toplevel,
// it is usually more convenient to use gtk_widget_grab_focus() instead of this
// function.
//
// The function takes the following parameters:
//
//   - focus (optional): widget to be the new focus widget, or NULL to unset any
//     focus widget for the toplevel window.
func (window *Window) setFocus(focus Widgetter) {
	gclass := (*C.GtkWindowClass)(coreglib.PeekParentClass(window))
	fnarg := gclass.set_focus

	var _arg0 *C.GtkWindow // out
	var _arg1 *C.GtkWidget // out

	_arg0 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))
	if focus != nil {
		_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(focus).Native()))
	}

	C._gotk4_gtk3_Window_virtual_set_focus(unsafe.Pointer(fnarg), _arg0, _arg1)
	runtime.KeepAlive(window)
	runtime.KeepAlive(focus)
}

// WindowGetDefaultIconList gets the value set by
// gtk_window_set_default_icon_list(). The list is a copy and should be freed
// with g_list_free(), but the pixbufs in the list have not had their reference
// count incremented.
//
// The function returns the following values:
//
//   - list: copy of default icon list.
func WindowGetDefaultIconList() []*gdkpixbuf.Pixbuf {
	var _cret *C.GList // in

	_cret = C.gtk_window_get_default_icon_list()

	var _list []*gdkpixbuf.Pixbuf // out

	_list = make([]*gdkpixbuf.Pixbuf, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GdkPixbuf)(v)
		var dst *gdkpixbuf.Pixbuf // out
		{
			obj := coreglib.Take(unsafe.Pointer(src))
			dst = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
		_list = append(_list, dst)
	})

	return _list
}

// WindowGetDefaultIconName returns the fallback icon name for windows that
// has been set with gtk_window_set_default_icon_name(). The returned string
// is owned by GTK+ and should not be modified. It is only valid until the next
// call to gtk_window_set_default_icon_name().
//
// The function returns the following values:
//
//   - utf8: fallback icon name for windows.
func WindowGetDefaultIconName() string {
	var _cret *C.gchar // in

	_cret = C.gtk_window_get_default_icon_name()

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// WindowListToplevels returns a list of all existing toplevel windows. The
// widgets in the list are not individually referenced. If you want to iterate
// through the list and perform actions involving callbacks that might destroy
// the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref,
// NULL) first, and then unref all the widgets afterwards.
//
// The function returns the following values:
//
//   - list of toplevel widgets.
func WindowListToplevels() []Widgetter {
	var _cret *C.GList // in

	_cret = C.gtk_window_list_toplevels()

	var _list []Widgetter // out

	_list = make([]Widgetter, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWidget)(v)
		var dst Widgetter // out
		{
			objptr := unsafe.Pointer(src)
			if objptr == nil {
				panic("object of type gtk.Widgetter is nil")
			}

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			dst = rv
		}
		_list = append(_list, dst)
	})

	return _list
}

// WindowSetAutoStartupNotification: by default, after showing the first Window,
// GTK+ calls gdk_notify_startup_complete(). Call this function to disable the
// automatic startup notification. You might do this if your first window is a
// splash screen, and you want to delay notification until after your real main
// window has been shown, for example.
//
// In that example, you would disable startup notification temporarily, show
// your splash screen, then re-enable it so that showing the main window would
// automatically result in notification.
//
// The function takes the following parameters:
//
//   - setting: TRUE to automatically do startup notification.
func WindowSetAutoStartupNotification(setting bool) {
	var _arg1 C.gboolean // out

	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_auto_startup_notification(_arg1)
	runtime.KeepAlive(setting)
}

// WindowSetDefaultIcon sets an icon to be used as fallback for windows that
// haven't had gtk_window_set_icon() called on them from a pixbuf.
//
// The function takes the following parameters:
//
//   - icon: icon.
func WindowSetDefaultIcon(icon *gdkpixbuf.Pixbuf) {
	var _arg1 *C.GdkPixbuf // out

	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(icon).Native()))

	C.gtk_window_set_default_icon(_arg1)
	runtime.KeepAlive(icon)
}

// WindowSetDefaultIconFromFile sets an icon to be used as fallback for windows
// that haven't had gtk_window_set_icon_list() called on them from a file on
// disk. Warns on failure if err is NULL.
//
// The function takes the following parameters:
//
//   - filename: location of icon file.
func WindowSetDefaultIconFromFile(filename string) error {
	var _arg1 *C.gchar  // out
	var _cerr *C.GError // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_default_icon_from_file(_arg1, &_cerr)
	runtime.KeepAlive(filename)

	var _goerr error // out

	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _goerr
}

// WindowSetDefaultIconList sets an icon list to be used as fallback for windows
// that haven't had gtk_window_set_icon_list() called on them to set up a
// window-specific icon list. This function allows you to set up the icon for
// all windows in your app at once.
//
// See gtk_window_set_icon_list() for more details.
//
// The function takes the following parameters:
//
//   - list of Pixbuf.
func WindowSetDefaultIconList(list []*gdkpixbuf.Pixbuf) {
	var _arg1 *C.GList // out

	for i := len(list) - 1; i >= 0; i-- {
		src := list[i]
		var dst *C.GdkPixbuf // out
		dst = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(src).Native()))
		_arg1 = C.g_list_prepend(_arg1, C.gpointer(unsafe.Pointer(dst)))
	}

	C.gtk_window_set_default_icon_list(_arg1)
	runtime.KeepAlive(list)
}

// WindowSetDefaultIconName sets an icon to be used as fallback for windows that
// haven't had gtk_window_set_icon_list() called on them from a named themed
// icon, see gtk_window_set_icon_name().
//
// The function takes the following parameters:
//
//   - name of the themed icon.
func WindowSetDefaultIconName(name string) {
	var _arg1 *C.gchar // out

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_window_set_default_icon_name(_arg1)
	runtime.KeepAlive(name)
}

// WindowSetInteractiveDebugging opens or closes the [interactive
// debugger][interactive-debugging], which offers access to the widget hierarchy
// of the application and to useful debugging tools.
//
// The function takes the following parameters:
//
//   - enable: TRUE to enable interactive debugging.
func WindowSetInteractiveDebugging(enable bool) {
	var _arg1 C.gboolean // out

	if enable {
		_arg1 = C.TRUE
	}

	C.gtk_window_set_interactive_debugging(_arg1)
	runtime.KeepAlive(enable)
}

// WindowAccessibleOverrides contains methods that are overridable.
type WindowAccessibleOverrides struct {
}

func defaultWindowAccessibleOverrides(v *WindowAccessible) WindowAccessibleOverrides {
	return WindowAccessibleOverrides{}
}

type WindowAccessible struct {
	_ [0]func() // equal guard
	ContainerAccessible

	atk.Window
}

var (
	_ coreglib.Objector = (*WindowAccessible)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*WindowAccessible, *WindowAccessibleClass, WindowAccessibleOverrides](
		GTypeWindowAccessible,
		initWindowAccessibleClass,
		wrapWindowAccessible,
		defaultWindowAccessibleOverrides,
	)
}

func initWindowAccessibleClass(gclass unsafe.Pointer, overrides WindowAccessibleOverrides, classInitFunc func(*WindowAccessibleClass)) {
	if classInitFunc != nil {
		class := (*WindowAccessibleClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapWindowAccessible(obj *coreglib.Object) *WindowAccessible {
	return &WindowAccessible{
		ContainerAccessible: ContainerAccessible{
			WidgetAccessible: WidgetAccessible{
				Accessible: Accessible{
					AtkObject: atk.AtkObject{
						Object: obj,
					},
				},
				Component: atk.Component{
					Object: obj,
				},
			},
		},
		Window: atk.Window{
			AtkObject: atk.AtkObject{
				Object: obj,
			},
		},
	}
}

func marshalWindowAccessible(p uintptr) (interface{}, error) {
	return wrapWindowAccessible(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// WindowGroupOverrides contains methods that are overridable.
type WindowGroupOverrides struct {
}

func defaultWindowGroupOverrides(v *WindowGroup) WindowGroupOverrides {
	return WindowGroupOverrides{}
}

// WindowGroup restricts the effect of grabs to windows in the same group,
// thereby making window groups almost behave like separate applications.
//
// A window can be a member in at most one window group at a time. Windows that
// have not been explicitly assigned to a group are implicitly treated like
// windows of the default window group.
//
// GtkWindowGroup objects are referenced by each window in the group, so once
// you have added all windows to a GtkWindowGroup, you can drop the initial
// reference to the window group with g_object_unref(). If the windows in the
// window group are subsequently destroyed, then they will be removed from the
// window group and drop their references on the window group; when all window
// have been removed, the window group will be freed.
type WindowGroup struct {
	_ [0]func() // equal guard
	*coreglib.Object
}

var (
	_ coreglib.Objector = (*WindowGroup)(nil)
)

func init() {
	coreglib.RegisterClassInfo[*WindowGroup, *WindowGroupClass, WindowGroupOverrides](
		GTypeWindowGroup,
		initWindowGroupClass,
		wrapWindowGroup,
		defaultWindowGroupOverrides,
	)
}

func initWindowGroupClass(gclass unsafe.Pointer, overrides WindowGroupOverrides, classInitFunc func(*WindowGroupClass)) {
	if classInitFunc != nil {
		class := (*WindowGroupClass)(gextras.NewStructNative(gclass))
		classInitFunc(class)
	}
}

func wrapWindowGroup(obj *coreglib.Object) *WindowGroup {
	return &WindowGroup{
		Object: obj,
	}
}

func marshalWindowGroup(p uintptr) (interface{}, error) {
	return wrapWindowGroup(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}

// NewWindowGroup creates a new WindowGroup object. Grabs added with
// gtk_grab_add() only affect windows within the same WindowGroup.
//
// The function returns the following values:
//
//   - windowGroup: new WindowGroup.
func NewWindowGroup() *WindowGroup {
	var _cret *C.GtkWindowGroup // in

	_cret = C.gtk_window_group_new()

	var _windowGroup *WindowGroup // out

	_windowGroup = wrapWindowGroup(coreglib.AssumeOwnership(unsafe.Pointer(_cret)))

	return _windowGroup
}

// AddWindow adds a window to a WindowGroup.
//
// The function takes the following parameters:
//
//   - window to add.
func (windowGroup *WindowGroup) AddWindow(window *Window) {
	var _arg0 *C.GtkWindowGroup // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkWindowGroup)(unsafe.Pointer(coreglib.InternObject(windowGroup).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_group_add_window(_arg0, _arg1)
	runtime.KeepAlive(windowGroup)
	runtime.KeepAlive(window)
}

// CurrentDeviceGrab returns the current grab widget for device, or NULL if
// none.
//
// The function takes the following parameters:
//
//   - device: Device.
//
// The function returns the following values:
//
//   - widget (optional): grab widget, or NULL.
func (windowGroup *WindowGroup) CurrentDeviceGrab(device gdk.Devicer) Widgetter {
	var _arg0 *C.GtkWindowGroup // out
	var _arg1 *C.GdkDevice      // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkWindowGroup)(unsafe.Pointer(coreglib.InternObject(windowGroup).Native()))
	_arg1 = (*C.GdkDevice)(unsafe.Pointer(coreglib.InternObject(device).Native()))

	_cret = C.gtk_window_group_get_current_device_grab(_arg0, _arg1)
	runtime.KeepAlive(windowGroup)
	runtime.KeepAlive(device)

	var _widget Widgetter // out

	if _cret != nil {
		{
			objptr := unsafe.Pointer(_cret)

			object := coreglib.Take(objptr)
			casted := object.WalkCast(func(obj coreglib.Objector) bool {
				_, ok := obj.(Widgetter)
				return ok
			})
			rv, ok := casted.(Widgetter)
			if !ok {
				panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
			}
			_widget = rv
		}
	}

	return _widget
}

// CurrentGrab gets the current grab widget of the given group, see
// gtk_grab_add().
//
// The function returns the following values:
//
//   - widget: current grab widget of the group.
func (windowGroup *WindowGroup) CurrentGrab() Widgetter {
	var _arg0 *C.GtkWindowGroup // out
	var _cret *C.GtkWidget      // in

	_arg0 = (*C.GtkWindowGroup)(unsafe.Pointer(coreglib.InternObject(windowGroup).Native()))

	_cret = C.gtk_window_group_get_current_grab(_arg0)
	runtime.KeepAlive(windowGroup)

	var _widget Widgetter // out

	{
		objptr := unsafe.Pointer(_cret)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_widget = rv
	}

	return _widget
}

// ListWindows returns a list of the Windows that belong to window_group.
//
// The function returns the following values:
//
//   - list: a newly-allocated list of windows inside the group.
func (windowGroup *WindowGroup) ListWindows() []*Window {
	var _arg0 *C.GtkWindowGroup // out
	var _cret *C.GList          // in

	_arg0 = (*C.GtkWindowGroup)(unsafe.Pointer(coreglib.InternObject(windowGroup).Native()))

	_cret = C.gtk_window_group_list_windows(_arg0)
	runtime.KeepAlive(windowGroup)

	var _list []*Window // out

	_list = make([]*Window, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkWindow)(v)
		var dst *Window // out
		dst = wrapWindow(coreglib.Take(unsafe.Pointer(src)))
		_list = append(_list, dst)
	})

	return _list
}

// RemoveWindow removes a window from a WindowGroup.
//
// The function takes the following parameters:
//
//   - window to remove.
func (windowGroup *WindowGroup) RemoveWindow(window *Window) {
	var _arg0 *C.GtkWindowGroup // out
	var _arg1 *C.GtkWindow      // out

	_arg0 = (*C.GtkWindowGroup)(unsafe.Pointer(coreglib.InternObject(windowGroup).Native()))
	_arg1 = (*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(window).Native()))

	C.gtk_window_group_remove_window(_arg0, _arg1)
	runtime.KeepAlive(windowGroup)
	runtime.KeepAlive(window)
}

// AboutDialogClass: instance of this type is always passed by reference.
type AboutDialogClass struct {
	*aboutDialogClass
}

// aboutDialogClass is the struct that's finalized.
type aboutDialogClass struct {
	native *C.GtkAboutDialogClass
}

func (a *AboutDialogClass) ParentClass() *DialogClass {
	valptr := &a.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AccelGroupClass: instance of this type is always passed by reference.
type AccelGroupClass struct {
	*accelGroupClass
}

// accelGroupClass is the struct that's finalized.
type accelGroupClass struct {
	native *C.GtkAccelGroupClass
}

// AccelGroupEntry: instance of this type is always passed by reference.
type AccelGroupEntry struct {
	*accelGroupEntry
}

// accelGroupEntry is the struct that's finalized.
type accelGroupEntry struct {
	native *C.GtkAccelGroupEntry
}

func (a *AccelGroupEntry) Key() *AccelKey {
	valptr := &a.native.key
	var _v *AccelKey // out
	_v = (*AccelKey)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (a *AccelGroupEntry) AccelPathQuark() glib.Quark {
	valptr := &a.native.accel_path_quark
	var _v glib.Quark // out
	_v = glib.Quark(*valptr)
	return _v
}

// AccelKey: instance of this type is always passed by reference.
type AccelKey struct {
	*accelKey
}

// accelKey is the struct that's finalized.
type accelKey struct {
	native *C.GtkAccelKey
}

// AccelKey: accelerator keyval.
func (a *AccelKey) AccelKey() uint {
	valptr := &a.native.accel_key
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// AccelMods: accelerator modifiers.
func (a *AccelKey) AccelMods() gdk.ModifierType {
	valptr := &a.native.accel_mods
	var _v gdk.ModifierType // out
	_v = gdk.ModifierType(*valptr)
	return _v
}

// AccelKey: accelerator keyval.
func (a *AccelKey) SetAccelKey(accelKey uint) {
	valptr := &a.native.accel_key
	*valptr = C.guint(accelKey)
}

// AccelLabelClass: instance of this type is always passed by reference.
type AccelLabelClass struct {
	*accelLabelClass
}

// accelLabelClass is the struct that's finalized.
type accelLabelClass struct {
	native *C.GtkAccelLabelClass
}

func (a *AccelLabelClass) ParentClass() *LabelClass {
	valptr := &a.native.parent_class
	var _v *LabelClass // out
	_v = (*LabelClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (a *AccelLabelClass) SignalQuote1() string {
	valptr := &a.native.signal_quote1
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (a *AccelLabelClass) SignalQuote2() string {
	valptr := &a.native.signal_quote2
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (a *AccelLabelClass) ModNameShift() string {
	valptr := &a.native.mod_name_shift
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (a *AccelLabelClass) ModNameControl() string {
	valptr := &a.native.mod_name_control
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (a *AccelLabelClass) ModNameAlt() string {
	valptr := &a.native.mod_name_alt
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (a *AccelLabelClass) ModSeparator() string {
	valptr := &a.native.mod_separator
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// AccessibleClass: instance of this type is always passed by reference.
type AccessibleClass struct {
	*accessibleClass
}

// accessibleClass is the struct that's finalized.
type accessibleClass struct {
	native *C.GtkAccessibleClass
}

func (a *AccessibleClass) ParentClass() *atk.ObjectClass {
	valptr := &a.native.parent_class
	var _v *atk.ObjectClass // out
	_v = (*atk.ObjectClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ActionBarClass: instance of this type is always passed by reference.
type ActionBarClass struct {
	*actionBarClass
}

// actionBarClass is the struct that's finalized.
type actionBarClass struct {
	native *C.GtkActionBarClass
}

// ActionClass: instance of this type is always passed by reference.
type ActionClass struct {
	*actionClass
}

// actionClass is the struct that's finalized.
type actionClass struct {
	native *C.GtkActionClass
}

// ActionEntry structs are used with gtk_action_group_add_actions() to construct
// actions.
//
// Deprecated: since version 3.10.
//
// An instance of this type is always passed by reference.
type ActionEntry struct {
	*actionEntry
}

// actionEntry is the struct that's finalized.
type actionEntry struct {
	native *C.GtkActionEntry
}

// Name: name of the action.
func (a *ActionEntry) Name() string {
	valptr := &a.native.name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// StockID: stock id for the action, or the name of an icon from the icon theme.
func (a *ActionEntry) StockID() string {
	valptr := &a.native.stock_id
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Label: label for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain(). If label is NULL,
// the label of the stock item with id stock_id is used.
func (a *ActionEntry) Label() string {
	valptr := &a.native.label
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Accelerator: accelerator for the action, in the format understood by
// gtk_accelerator_parse().
func (a *ActionEntry) Accelerator() string {
	valptr := &a.native.accelerator
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Tooltip: tooltip for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain().
func (a *ActionEntry) Tooltip() string {
	valptr := &a.native.tooltip
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// ActionGroupClass: instance of this type is always passed by reference.
type ActionGroupClass struct {
	*actionGroupClass
}

// actionGroupClass is the struct that's finalized.
type actionGroupClass struct {
	native *C.GtkActionGroupClass
}

// ActionableInterface: interface vtable for Actionable.
//
// An instance of this type is always passed by reference.
type ActionableInterface struct {
	*actionableInterface
}

// actionableInterface is the struct that's finalized.
type actionableInterface struct {
	native *C.GtkActionableInterface
}

// ActivatableIface: > This method can be called with a NULL action at times.
//
// Deprecated: since version 3.10.
//
// An instance of this type is always passed by reference.
type ActivatableIface struct {
	*activatableIface
}

// activatableIface is the struct that's finalized.
type activatableIface struct {
	native *C.GtkActivatableIface
}

// AdjustmentClass: instance of this type is always passed by reference.
type AdjustmentClass struct {
	*adjustmentClass
}

// adjustmentClass is the struct that's finalized.
type adjustmentClass struct {
	native *C.GtkAdjustmentClass
}

// AlignmentClass: instance of this type is always passed by reference.
type AlignmentClass struct {
	*alignmentClass
}

// alignmentClass is the struct that's finalized.
type alignmentClass struct {
	native *C.GtkAlignmentClass
}

// ParentClass: parent class.
func (a *AlignmentClass) ParentClass() *BinClass {
	valptr := &a.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AppChooserButtonClass: instance of this type is always passed by reference.
type AppChooserButtonClass struct {
	*appChooserButtonClass
}

// appChooserButtonClass is the struct that's finalized.
type appChooserButtonClass struct {
	native *C.GtkAppChooserButtonClass
}

// ParentClass: parent class.
func (a *AppChooserButtonClass) ParentClass() *ComboBoxClass {
	valptr := &a.native.parent_class
	var _v *ComboBoxClass // out
	_v = (*ComboBoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AppChooserDialogClass: instance of this type is always passed by reference.
type AppChooserDialogClass struct {
	*appChooserDialogClass
}

// appChooserDialogClass is the struct that's finalized.
type appChooserDialogClass struct {
	native *C.GtkAppChooserDialogClass
}

// ParentClass: parent class.
func (a *AppChooserDialogClass) ParentClass() *DialogClass {
	valptr := &a.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AppChooserWidgetClass: instance of this type is always passed by reference.
type AppChooserWidgetClass struct {
	*appChooserWidgetClass
}

// appChooserWidgetClass is the struct that's finalized.
type appChooserWidgetClass struct {
	native *C.GtkAppChooserWidgetClass
}

// ParentClass: parent class.
func (a *AppChooserWidgetClass) ParentClass() *BoxClass {
	valptr := &a.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ApplicationClass: instance of this type is always passed by reference.
type ApplicationClass struct {
	*applicationClass
}

// applicationClass is the struct that's finalized.
type applicationClass struct {
	native *C.GtkApplicationClass
}

// ParentClass: parent class.
func (a *ApplicationClass) ParentClass() *gio.ApplicationClass {
	valptr := &a.native.parent_class
	var _v *gio.ApplicationClass // out
	_v = (*gio.ApplicationClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ApplicationWindowClass: instance of this type is always passed by reference.
type ApplicationWindowClass struct {
	*applicationWindowClass
}

// applicationWindowClass is the struct that's finalized.
type applicationWindowClass struct {
	native *C.GtkApplicationWindowClass
}

// ParentClass: parent class.
func (a *ApplicationWindowClass) ParentClass() *WindowClass {
	valptr := &a.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ArrowAccessibleClass: instance of this type is always passed by reference.
type ArrowAccessibleClass struct {
	*arrowAccessibleClass
}

// arrowAccessibleClass is the struct that's finalized.
type arrowAccessibleClass struct {
	native *C.GtkArrowAccessibleClass
}

func (a *ArrowAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &a.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ArrowClass: instance of this type is always passed by reference.
type ArrowClass struct {
	*arrowClass
}

// arrowClass is the struct that's finalized.
type arrowClass struct {
	native *C.GtkArrowClass
}

func (a *ArrowClass) ParentClass() *MiscClass {
	valptr := &a.native.parent_class
	var _v *MiscClass // out
	_v = (*MiscClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AspectFrameClass: instance of this type is always passed by reference.
type AspectFrameClass struct {
	*aspectFrameClass
}

// aspectFrameClass is the struct that's finalized.
type aspectFrameClass struct {
	native *C.GtkAspectFrameClass
}

// ParentClass: parent class.
func (a *AspectFrameClass) ParentClass() *FrameClass {
	valptr := &a.native.parent_class
	var _v *FrameClass // out
	_v = (*FrameClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// AssistantClass: instance of this type is always passed by reference.
type AssistantClass struct {
	*assistantClass
}

// assistantClass is the struct that's finalized.
type assistantClass struct {
	native *C.GtkAssistantClass
}

// ParentClass: parent class.
func (a *AssistantClass) ParentClass() *WindowClass {
	valptr := &a.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// BinClass: instance of this type is always passed by reference.
type BinClass struct {
	*binClass
}

// binClass is the struct that's finalized.
type binClass struct {
	native *C.GtkBinClass
}

// ParentClass: parent class.
func (b *BinClass) ParentClass() *ContainerClass {
	valptr := &b.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// BindingArg holds the data associated with an argument for a key binding
// signal emission as stored in BindingSignal.
//
// An instance of this type is always passed by reference.
type BindingArg struct {
	*bindingArg
}

// bindingArg is the struct that's finalized.
type bindingArg struct {
	native *C.GtkBindingArg
}

// ArgType: implementation detail.
func (b *BindingArg) ArgType() coreglib.Type {
	valptr := &b.native.arg_type
	var _v coreglib.Type // out
	_v = coreglib.Type(*valptr)
	return _v
}

// BindingEntry: each key binding element of a binding sets binding list is
// represented by a GtkBindingEntry.
//
// An instance of this type is always passed by reference.
type BindingEntry struct {
	*bindingEntry
}

// bindingEntry is the struct that's finalized.
type bindingEntry struct {
	native *C.GtkBindingEntry
}

// Keyval: key value to match.
func (b *BindingEntry) Keyval() uint {
	valptr := &b.native.keyval
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// Modifiers: key modifiers to match.
func (b *BindingEntry) Modifiers() gdk.ModifierType {
	valptr := &b.native.modifiers
	var _v gdk.ModifierType // out
	_v = gdk.ModifierType(*valptr)
	return _v
}

// BindingSet: binding set this entry belongs to.
func (b *BindingEntry) BindingSet() *BindingSet {
	valptr := &b.native.binding_set
	var _v *BindingSet // out
	_v = (*BindingSet)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// SetNext: linked list of entries maintained by binding set.
func (b *BindingEntry) SetNext() *BindingEntry {
	valptr := &b.native.set_next
	var _v *BindingEntry // out
	_v = (*BindingEntry)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// HashNext: implementation detail.
func (b *BindingEntry) HashNext() *BindingEntry {
	valptr := &b.native.hash_next
	var _v *BindingEntry // out
	_v = (*BindingEntry)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// Signals: action signals of this entry.
func (b *BindingEntry) Signals() *BindingSignal {
	valptr := &b.native.signals
	var _v *BindingSignal // out
	_v = (*BindingSignal)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// Keyval: key value to match.
func (b *BindingEntry) SetKeyval(keyval uint) {
	valptr := &b.native.keyval
	*valptr = C.guint(keyval)
}

// BindingEntryAddSignalFromString parses a signal description from signal_desc
// and incorporates it into binding_set.
//
// Signal descriptions may either bind a key combination to one or more signals:
//
//	bind "key" {
//	  "signalname" (param, ...)
//	  ...
//	}
//
// Or they may also unbind a key combination:
//
//	unbind "key"
//
// Key combinations must be in a format that can be parsed by
// gtk_accelerator_parse().
//
// The function takes the following parameters:
//
//   - bindingSet: BindingSet.
//   - signalDesc: signal description.
//
// The function returns the following values:
//
//   - tokenType: G_TOKEN_NONE if the signal was successfully parsed and added,
//     the expected token otherwise.
func BindingEntryAddSignalFromString(bindingSet *BindingSet, signalDesc string) glib.TokenType {
	var _arg1 *C.GtkBindingSet // out
	var _arg2 *C.gchar         // out
	var _cret C.GTokenType     // in

	_arg1 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(signalDesc)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_binding_entry_add_signal_from_string(_arg1, _arg2)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(signalDesc)

	var _tokenType glib.TokenType // out

	_tokenType = glib.TokenType(_cret)

	return _tokenType
}

// BindingEntryAddSignall: override or install a new key binding for keyval with
// modifiers on binding_set.
//
// The function takes the following parameters:
//
//   - bindingSet to add a signal to.
//   - keyval: key value.
//   - modifiers: key modifier.
//   - signalName: signal name to be bound.
//   - bindingArgs: list of BindingArg signal arguments.
func BindingEntryAddSignall(bindingSet *BindingSet, keyval uint, modifiers gdk.ModifierType, signalName string, bindingArgs []*BindingArg) {
	var _arg1 *C.GtkBindingSet  // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out
	var _arg4 *C.gchar          // out
	var _arg5 *C.GSList         // out

	_arg1 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg2 = C.guint(keyval)
	_arg3 = C.GdkModifierType(modifiers)
	_arg4 = (*C.gchar)(unsafe.Pointer(C.CString(signalName)))
	defer C.free(unsafe.Pointer(_arg4))
	for i := len(bindingArgs) - 1; i >= 0; i-- {
		src := bindingArgs[i]
		var dst *C.GtkBindingArg // out
		dst = (*C.GtkBindingArg)(gextras.StructNative(unsafe.Pointer(src)))
		_arg5 = C.g_slist_prepend(_arg5, C.gpointer(unsafe.Pointer(dst)))
	}
	defer C.g_slist_free(_arg5)

	C.gtk_binding_entry_add_signall(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)
	runtime.KeepAlive(signalName)
	runtime.KeepAlive(bindingArgs)
}

// BindingEntryRemove: remove a binding previously installed via
// gtk_binding_entry_add_signal() on binding_set.
//
// The function takes the following parameters:
//
//   - bindingSet to remove an entry of.
//   - keyval: key value of binding to remove.
//   - modifiers: key modifier of binding to remove.
func BindingEntryRemove(bindingSet *BindingSet, keyval uint, modifiers gdk.ModifierType) {
	var _arg1 *C.GtkBindingSet  // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out

	_arg1 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg2 = C.guint(keyval)
	_arg3 = C.GdkModifierType(modifiers)

	C.gtk_binding_entry_remove(_arg1, _arg2, _arg3)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)
}

// BindingEntrySkip: install a binding on binding_set which causes key lookups
// to be aborted, to prevent bindings from lower priority sets to be activated.
//
// The function takes the following parameters:
//
//   - bindingSet to skip an entry of.
//   - keyval: key value of binding to skip.
//   - modifiers: key modifier of binding to skip.
func BindingEntrySkip(bindingSet *BindingSet, keyval uint, modifiers gdk.ModifierType) {
	var _arg1 *C.GtkBindingSet  // out
	var _arg2 C.guint           // out
	var _arg3 C.GdkModifierType // out

	_arg1 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg2 = C.guint(keyval)
	_arg3 = C.GdkModifierType(modifiers)

	C.gtk_binding_entry_skip(_arg1, _arg2, _arg3)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)
}

// BindingSet: binding set maintains a list of activatable key bindings.
// A single binding set can match multiple types of widgets. Similar to
// style contexts, can be matched by any information contained in a widgets
// WidgetPath. When a binding within a set is matched upon activation, an action
// signal is emitted on the target widget to carry out the actual activation.
//
// An instance of this type is always passed by reference.
type BindingSet struct {
	*bindingSet
}

// bindingSet is the struct that's finalized.
type bindingSet struct {
	native *C.GtkBindingSet
}

// SetName: unique name of this binding set.
func (b *BindingSet) SetName() string {
	valptr := &b.native.set_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Priority: unused.
func (b *BindingSet) Priority() int {
	valptr := &b.native.priority
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Entries: key binding entries in this binding set.
func (b *BindingSet) Entries() *BindingEntry {
	valptr := &b.native.entries
	var _v *BindingEntry // out
	_v = (*BindingEntry)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// Current: implementation detail.
func (b *BindingSet) Current() *BindingEntry {
	valptr := &b.native.current
	var _v *BindingEntry // out
	_v = (*BindingEntry)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// Priority: unused.
func (b *BindingSet) SetPriority(priority int) {
	valptr := &b.native.priority
	*valptr = C.gint(priority)
}

// Activate: find a key binding matching keyval and modifiers within binding_set
// and activate the binding on object.
//
// The function takes the following parameters:
//
//   - keyval: key value of the binding.
//   - modifiers: key modifier of the binding.
//   - object to activate when binding found.
//
// The function returns the following values:
//
//   - ok: TRUE if a binding was found and activated.
func (bindingSet *BindingSet) Activate(keyval uint, modifiers gdk.ModifierType, object *coreglib.Object) bool {
	var _arg0 *C.GtkBindingSet  // out
	var _arg1 C.guint           // out
	var _arg2 C.GdkModifierType // out
	var _arg3 *C.GObject        // out
	var _cret C.gboolean        // in

	_arg0 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg1 = C.guint(keyval)
	_arg2 = C.GdkModifierType(modifiers)
	_arg3 = (*C.GObject)(unsafe.Pointer(object.Native()))

	_cret = C.gtk_binding_set_activate(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(keyval)
	runtime.KeepAlive(modifiers)
	runtime.KeepAlive(object)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// AddPath: this function was used internally by the GtkRC parsing mechanism to
// assign match patterns to BindingSet structures.
//
// In GTK+ 3, these match patterns are unused.
//
// Deprecated: since version 3.0.
//
// The function takes the following parameters:
//
//   - pathType: path type the pattern applies to.
//   - pathPattern: actual match pattern.
//   - priority: binding priority.
func (bindingSet *BindingSet) AddPath(pathType PathType, pathPattern string, priority PathPriorityType) {
	var _arg0 *C.GtkBindingSet      // out
	var _arg1 C.GtkPathType         // out
	var _arg2 *C.gchar              // out
	var _arg3 C.GtkPathPriorityType // out

	_arg0 = (*C.GtkBindingSet)(gextras.StructNative(unsafe.Pointer(bindingSet)))
	_arg1 = C.GtkPathType(pathType)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(pathPattern)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.GtkPathPriorityType(priority)

	C.gtk_binding_set_add_path(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(bindingSet)
	runtime.KeepAlive(pathType)
	runtime.KeepAlive(pathPattern)
	runtime.KeepAlive(priority)
}

// BindingSetFind: find a binding set by its globally unique name.
//
// The set_name can either be a name used for gtk_binding_set_new() or the type
// name of a class used in gtk_binding_set_by_class().
//
// The function takes the following parameters:
//
//   - setName: unique binding set name.
//
// The function returns the following values:
//
//   - bindingSet (optional): NULL or the specified binding set.
func BindingSetFind(setName string) *BindingSet {
	var _arg1 *C.gchar         // out
	var _cret *C.GtkBindingSet // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(setName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_binding_set_find(_arg1)
	runtime.KeepAlive(setName)

	var _bindingSet *BindingSet // out

	if _cret != nil {
		_bindingSet = (*BindingSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	}

	return _bindingSet
}

// BindingSignal stores the necessary information to activate a widget in
// response to a key press via a signal emission.
//
// An instance of this type is always passed by reference.
type BindingSignal struct {
	*bindingSignal
}

// bindingSignal is the struct that's finalized.
type bindingSignal struct {
	native *C.GtkBindingSignal
}

// BooleanCellAccessibleClass: instance of this type is always passed by
// reference.
type BooleanCellAccessibleClass struct {
	*booleanCellAccessibleClass
}

// booleanCellAccessibleClass is the struct that's finalized.
type booleanCellAccessibleClass struct {
	native *C.GtkBooleanCellAccessibleClass
}

func (b *BooleanCellAccessibleClass) ParentClass() *RendererCellAccessibleClass {
	valptr := &b.native.parent_class
	var _v *RendererCellAccessibleClass // out
	_v = (*RendererCellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// Border: struct that specifies a border around a rectangular area that can be
// of different width on each side.
//
// An instance of this type is always passed by reference.
type Border struct {
	*border
}

// border is the struct that's finalized.
type border struct {
	native *C.GtkBorder
}

func marshalBorder(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &Border{&border{(*C.GtkBorder)(b)}}, nil
}

// NewBorder constructs a struct Border.
func NewBorder() *Border {
	var _cret *C.GtkBorder // in

	_cret = C.gtk_border_new()

	var _border *Border // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_border)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_border_free((*C.GtkBorder)(intern.C))
		},
	)

	return _border
}

// Left: width of the left border.
func (b *Border) Left() int16 {
	valptr := &b.native.left
	var _v int16 // out
	_v = int16(*valptr)
	return _v
}

// Right: width of the right border.
func (b *Border) Right() int16 {
	valptr := &b.native.right
	var _v int16 // out
	_v = int16(*valptr)
	return _v
}

// Top: width of the top border.
func (b *Border) Top() int16 {
	valptr := &b.native.top
	var _v int16 // out
	_v = int16(*valptr)
	return _v
}

// Bottom: width of the bottom border.
func (b *Border) Bottom() int16 {
	valptr := &b.native.bottom
	var _v int16 // out
	_v = int16(*valptr)
	return _v
}

// Left: width of the left border.
func (b *Border) SetLeft(left int16) {
	valptr := &b.native.left
	*valptr = C.gint16(left)
}

// Right: width of the right border.
func (b *Border) SetRight(right int16) {
	valptr := &b.native.right
	*valptr = C.gint16(right)
}

// Top: width of the top border.
func (b *Border) SetTop(top int16) {
	valptr := &b.native.top
	*valptr = C.gint16(top)
}

// Bottom: width of the bottom border.
func (b *Border) SetBottom(bottom int16) {
	valptr := &b.native.bottom
	*valptr = C.gint16(bottom)
}

// Copy copies a Border-struct.
//
// The function returns the following values:
//
//   - border: copy of border_.
func (border_ *Border) Copy() *Border {
	var _arg0 *C.GtkBorder // out
	var _cret *C.GtkBorder // in

	_arg0 = (*C.GtkBorder)(gextras.StructNative(unsafe.Pointer(border_)))

	_cret = C.gtk_border_copy(_arg0)
	runtime.KeepAlive(border_)

	var _border *Border // out

	_border = (*Border)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_border)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_border_free((*C.GtkBorder)(intern.C))
		},
	)

	return _border
}

// BoxClass: instance of this type is always passed by reference.
type BoxClass struct {
	*boxClass
}

// boxClass is the struct that's finalized.
type boxClass struct {
	native *C.GtkBoxClass
}

// ParentClass: parent class.
func (b *BoxClass) ParentClass() *ContainerClass {
	valptr := &b.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// BuildableIface interface contains method that are necessary to allow Builder
// to construct an object from a Builder UI definition.
//
// An instance of this type is always passed by reference.
type BuildableIface struct {
	*buildableIface
}

// buildableIface is the struct that's finalized.
type buildableIface struct {
	native *C.GtkBuildableIface
}

// BuilderClass: instance of this type is always passed by reference.
type BuilderClass struct {
	*builderClass
}

// builderClass is the struct that's finalized.
type builderClass struct {
	native *C.GtkBuilderClass
}

// ButtonAccessibleClass: instance of this type is always passed by reference.
type ButtonAccessibleClass struct {
	*buttonAccessibleClass
}

// buttonAccessibleClass is the struct that's finalized.
type buttonAccessibleClass struct {
	native *C.GtkButtonAccessibleClass
}

func (b *ButtonAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &b.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ButtonBoxClass: instance of this type is always passed by reference.
type ButtonBoxClass struct {
	*buttonBoxClass
}

// buttonBoxClass is the struct that's finalized.
type buttonBoxClass struct {
	native *C.GtkButtonBoxClass
}

// ParentClass: parent class.
func (b *ButtonBoxClass) ParentClass() *BoxClass {
	valptr := &b.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ButtonClass: instance of this type is always passed by reference.
type ButtonClass struct {
	*buttonClass
}

// buttonClass is the struct that's finalized.
type buttonClass struct {
	native *C.GtkButtonClass
}

// ParentClass: parent class.
func (b *ButtonClass) ParentClass() *BinClass {
	valptr := &b.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CalendarClass: instance of this type is always passed by reference.
type CalendarClass struct {
	*calendarClass
}

// calendarClass is the struct that's finalized.
type calendarClass struct {
	native *C.GtkCalendarClass
}

func (c *CalendarClass) ParentClass() *WidgetClass {
	valptr := &c.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellAccessibleClass: instance of this type is always passed by reference.
type CellAccessibleClass struct {
	*cellAccessibleClass
}

// cellAccessibleClass is the struct that's finalized.
type cellAccessibleClass struct {
	native *C.GtkCellAccessibleClass
}

func (c *CellAccessibleClass) ParentClass() *AccessibleClass {
	valptr := &c.native.parent_class
	var _v *AccessibleClass // out
	_v = (*AccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellAccessibleParentIface: instance of this type is always passed by
// reference.
type CellAccessibleParentIface struct {
	*cellAccessibleParentIface
}

// cellAccessibleParentIface is the struct that's finalized.
type cellAccessibleParentIface struct {
	native *C.GtkCellAccessibleParentIface
}

// CellAreaBoxClass: instance of this type is always passed by reference.
type CellAreaBoxClass struct {
	*cellAreaBoxClass
}

// cellAreaBoxClass is the struct that's finalized.
type cellAreaBoxClass struct {
	native *C.GtkCellAreaBoxClass
}

// CellAreaClass: instance of this type is always passed by reference.
type CellAreaClass struct {
	*cellAreaClass
}

// cellAreaClass is the struct that's finalized.
type cellAreaClass struct {
	native *C.GtkCellAreaClass
}

// CellAreaContextClass: instance of this type is always passed by reference.
type CellAreaContextClass struct {
	*cellAreaContextClass
}

// cellAreaContextClass is the struct that's finalized.
type cellAreaContextClass struct {
	native *C.GtkCellAreaContextClass
}

// CellEditableIface: instance of this type is always passed by reference.
type CellEditableIface struct {
	*cellEditableIface
}

// cellEditableIface is the struct that's finalized.
type cellEditableIface struct {
	native *C.GtkCellEditableIface
}

// CellLayoutIface: instance of this type is always passed by reference.
type CellLayoutIface struct {
	*cellLayoutIface
}

// cellLayoutIface is the struct that's finalized.
type cellLayoutIface struct {
	native *C.GtkCellLayoutIface
}

// CellRendererAccelClass: instance of this type is always passed by reference.
type CellRendererAccelClass struct {
	*cellRendererAccelClass
}

// cellRendererAccelClass is the struct that's finalized.
type cellRendererAccelClass struct {
	native *C.GtkCellRendererAccelClass
}

func (c *CellRendererAccelClass) ParentClass() *CellRendererTextClass {
	valptr := &c.native.parent_class
	var _v *CellRendererTextClass // out
	_v = (*CellRendererTextClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererClass: instance of this type is always passed by reference.
type CellRendererClass struct {
	*cellRendererClass
}

// cellRendererClass is the struct that's finalized.
type cellRendererClass struct {
	native *C.GtkCellRendererClass
}

// SetAccessibleType sets the type to be used for creating accessibles for cells
// rendered by cell renderers of renderer_class. Note that multiple accessibles
// will be created.
//
// This function should only be called from class init functions of cell
// renderers.
//
// The function takes the following parameters:
//
//   - typ: object type that implements the accessible for widget_class.
//     The type must be a subtype of RendererCellAccessible.
func (rendererClass *CellRendererClass) SetAccessibleType(typ coreglib.Type) {
	var _arg0 *C.GtkCellRendererClass // out
	var _arg1 C.GType                 // out

	_arg0 = (*C.GtkCellRendererClass)(gextras.StructNative(unsafe.Pointer(rendererClass)))
	_arg1 = C.GType(typ)

	C.gtk_cell_renderer_class_set_accessible_type(_arg0, _arg1)
	runtime.KeepAlive(rendererClass)
	runtime.KeepAlive(typ)
}

// CellRendererComboClass: instance of this type is always passed by reference.
type CellRendererComboClass struct {
	*cellRendererComboClass
}

// cellRendererComboClass is the struct that's finalized.
type cellRendererComboClass struct {
	native *C.GtkCellRendererComboClass
}

func (c *CellRendererComboClass) Parent() *CellRendererTextClass {
	valptr := &c.native.parent
	var _v *CellRendererTextClass // out
	_v = (*CellRendererTextClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererPixbufClass: instance of this type is always passed by reference.
type CellRendererPixbufClass struct {
	*cellRendererPixbufClass
}

// cellRendererPixbufClass is the struct that's finalized.
type cellRendererPixbufClass struct {
	native *C.GtkCellRendererPixbufClass
}

func (c *CellRendererPixbufClass) ParentClass() *CellRendererClass {
	valptr := &c.native.parent_class
	var _v *CellRendererClass // out
	_v = (*CellRendererClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererProgressClass: instance of this type is always passed by
// reference.
type CellRendererProgressClass struct {
	*cellRendererProgressClass
}

// cellRendererProgressClass is the struct that's finalized.
type cellRendererProgressClass struct {
	native *C.GtkCellRendererProgressClass
}

func (c *CellRendererProgressClass) ParentClass() *CellRendererClass {
	valptr := &c.native.parent_class
	var _v *CellRendererClass // out
	_v = (*CellRendererClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererSpinClass: instance of this type is always passed by reference.
type CellRendererSpinClass struct {
	*cellRendererSpinClass
}

// cellRendererSpinClass is the struct that's finalized.
type cellRendererSpinClass struct {
	native *C.GtkCellRendererSpinClass
}

func (c *CellRendererSpinClass) Parent() *CellRendererTextClass {
	valptr := &c.native.parent
	var _v *CellRendererTextClass // out
	_v = (*CellRendererTextClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererSpinnerClass: instance of this type is always passed by
// reference.
type CellRendererSpinnerClass struct {
	*cellRendererSpinnerClass
}

// cellRendererSpinnerClass is the struct that's finalized.
type cellRendererSpinnerClass struct {
	native *C.GtkCellRendererSpinnerClass
}

func (c *CellRendererSpinnerClass) ParentClass() *CellRendererClass {
	valptr := &c.native.parent_class
	var _v *CellRendererClass // out
	_v = (*CellRendererClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererTextClass: instance of this type is always passed by reference.
type CellRendererTextClass struct {
	*cellRendererTextClass
}

// cellRendererTextClass is the struct that's finalized.
type cellRendererTextClass struct {
	native *C.GtkCellRendererTextClass
}

func (c *CellRendererTextClass) ParentClass() *CellRendererClass {
	valptr := &c.native.parent_class
	var _v *CellRendererClass // out
	_v = (*CellRendererClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellRendererToggleClass: instance of this type is always passed by reference.
type CellRendererToggleClass struct {
	*cellRendererToggleClass
}

// cellRendererToggleClass is the struct that's finalized.
type cellRendererToggleClass struct {
	native *C.GtkCellRendererToggleClass
}

func (c *CellRendererToggleClass) ParentClass() *CellRendererClass {
	valptr := &c.native.parent_class
	var _v *CellRendererClass // out
	_v = (*CellRendererClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CellViewClass: instance of this type is always passed by reference.
type CellViewClass struct {
	*cellViewClass
}

// cellViewClass is the struct that's finalized.
type cellViewClass struct {
	native *C.GtkCellViewClass
}

// ParentClass: parent class.
func (c *CellViewClass) ParentClass() *WidgetClass {
	valptr := &c.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CheckButtonClass: instance of this type is always passed by reference.
type CheckButtonClass struct {
	*checkButtonClass
}

// checkButtonClass is the struct that's finalized.
type checkButtonClass struct {
	native *C.GtkCheckButtonClass
}

func (c *CheckButtonClass) ParentClass() *ToggleButtonClass {
	valptr := &c.native.parent_class
	var _v *ToggleButtonClass // out
	_v = (*ToggleButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CheckMenuItemAccessibleClass: instance of this type is always passed by
// reference.
type CheckMenuItemAccessibleClass struct {
	*checkMenuItemAccessibleClass
}

// checkMenuItemAccessibleClass is the struct that's finalized.
type checkMenuItemAccessibleClass struct {
	native *C.GtkCheckMenuItemAccessibleClass
}

func (c *CheckMenuItemAccessibleClass) ParentClass() *MenuItemAccessibleClass {
	valptr := &c.native.parent_class
	var _v *MenuItemAccessibleClass // out
	_v = (*MenuItemAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// CheckMenuItemClass: instance of this type is always passed by reference.
type CheckMenuItemClass struct {
	*checkMenuItemClass
}

// checkMenuItemClass is the struct that's finalized.
type checkMenuItemClass struct {
	native *C.GtkCheckMenuItemClass
}

// ParentClass: parent class.
func (c *CheckMenuItemClass) ParentClass() *MenuItemClass {
	valptr := &c.native.parent_class
	var _v *MenuItemClass // out
	_v = (*MenuItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ColorButtonClass: instance of this type is always passed by reference.
type ColorButtonClass struct {
	*colorButtonClass
}

// colorButtonClass is the struct that's finalized.
type colorButtonClass struct {
	native *C.GtkColorButtonClass
}

func (c *ColorButtonClass) ParentClass() *ButtonClass {
	valptr := &c.native.parent_class
	var _v *ButtonClass // out
	_v = (*ButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ColorChooserDialogClass: instance of this type is always passed by reference.
type ColorChooserDialogClass struct {
	*colorChooserDialogClass
}

// colorChooserDialogClass is the struct that's finalized.
type colorChooserDialogClass struct {
	native *C.GtkColorChooserDialogClass
}

func (c *ColorChooserDialogClass) ParentClass() *DialogClass {
	valptr := &c.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ColorChooserInterface: instance of this type is always passed by reference.
type ColorChooserInterface struct {
	*colorChooserInterface
}

// colorChooserInterface is the struct that's finalized.
type colorChooserInterface struct {
	native *C.GtkColorChooserInterface
}

func (c *ColorChooserInterface) Padding() [12]unsafe.Pointer {
	valptr := &c.native.padding
	var _v [12]unsafe.Pointer // out
	{
		src := &*valptr
		for i := 0; i < 12; i++ {
			_v[i] = (unsafe.Pointer)(unsafe.Pointer(src[i]))
		}
	}
	return _v
}

// ColorChooserWidgetClass: instance of this type is always passed by reference.
type ColorChooserWidgetClass struct {
	*colorChooserWidgetClass
}

// colorChooserWidgetClass is the struct that's finalized.
type colorChooserWidgetClass struct {
	native *C.GtkColorChooserWidgetClass
}

// ParentClass: parent class.
func (c *ColorChooserWidgetClass) ParentClass() *BoxClass {
	valptr := &c.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ColorSelectionClass: instance of this type is always passed by reference.
type ColorSelectionClass struct {
	*colorSelectionClass
}

// colorSelectionClass is the struct that's finalized.
type colorSelectionClass struct {
	native *C.GtkColorSelectionClass
}

// ParentClass: parent class.
func (c *ColorSelectionClass) ParentClass() *BoxClass {
	valptr := &c.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ColorSelectionDialogClass: instance of this type is always passed by
// reference.
type ColorSelectionDialogClass struct {
	*colorSelectionDialogClass
}

// colorSelectionDialogClass is the struct that's finalized.
type colorSelectionDialogClass struct {
	native *C.GtkColorSelectionDialogClass
}

func (c *ColorSelectionDialogClass) ParentClass() *DialogClass {
	valptr := &c.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ComboBoxAccessibleClass: instance of this type is always passed by reference.
type ComboBoxAccessibleClass struct {
	*comboBoxAccessibleClass
}

// comboBoxAccessibleClass is the struct that's finalized.
type comboBoxAccessibleClass struct {
	native *C.GtkComboBoxAccessibleClass
}

func (c *ComboBoxAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &c.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ComboBoxClass: instance of this type is always passed by reference.
type ComboBoxClass struct {
	*comboBoxClass
}

// comboBoxClass is the struct that's finalized.
type comboBoxClass struct {
	native *C.GtkComboBoxClass
}

// ParentClass: parent class.
func (c *ComboBoxClass) ParentClass() *BinClass {
	valptr := &c.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ComboBoxTextClass: instance of this type is always passed by reference.
type ComboBoxTextClass struct {
	*comboBoxTextClass
}

// comboBoxTextClass is the struct that's finalized.
type comboBoxTextClass struct {
	native *C.GtkComboBoxTextClass
}

func (c *ComboBoxTextClass) ParentClass() *ComboBoxClass {
	valptr := &c.native.parent_class
	var _v *ComboBoxClass // out
	_v = (*ComboBoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ContainerAccessibleClass: instance of this type is always passed by
// reference.
type ContainerAccessibleClass struct {
	*containerAccessibleClass
}

// containerAccessibleClass is the struct that's finalized.
type containerAccessibleClass struct {
	native *C.GtkContainerAccessibleClass
}

func (c *ContainerAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &c.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ContainerCellAccessibleClass: instance of this type is always passed by
// reference.
type ContainerCellAccessibleClass struct {
	*containerCellAccessibleClass
}

// containerCellAccessibleClass is the struct that's finalized.
type containerCellAccessibleClass struct {
	native *C.GtkContainerCellAccessibleClass
}

func (c *ContainerCellAccessibleClass) ParentClass() *CellAccessibleClass {
	valptr := &c.native.parent_class
	var _v *CellAccessibleClass // out
	_v = (*CellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ContainerClass: base class for containers.
//
// An instance of this type is always passed by reference.
type ContainerClass struct {
	*containerClass
}

// containerClass is the struct that's finalized.
type containerClass struct {
	native *C.GtkContainerClass
}

// ParentClass: parent class.
func (c *ContainerClass) ParentClass() *WidgetClass {
	valptr := &c.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HandleBorderWidth modifies a subclass of ContainerClass to automatically
// add and remove the border-width setting on GtkContainer. This allows the
// subclass to ignore the border width in its size request and allocate methods.
// The intent is for a subclass to invoke this in its class_init function.
//
// gtk_container_class_handle_border_width() is necessary because it would break
// API too badly to make this behavior the default. So subclasses must “opt in”
// to the parent class handling border_width for them.
func (klass *ContainerClass) HandleBorderWidth() {
	var _arg0 *C.GtkContainerClass // out

	_arg0 = (*C.GtkContainerClass)(gextras.StructNative(unsafe.Pointer(klass)))

	C.gtk_container_class_handle_border_width(_arg0)
	runtime.KeepAlive(klass)
}

// CSSProviderClass: instance of this type is always passed by reference.
type CSSProviderClass struct {
	*cssProviderClass
}

// cssProviderClass is the struct that's finalized.
type cssProviderClass struct {
	native *C.GtkCssProviderClass
}

// CSSSection defines a part of a CSS document. Because sections are nested into
// one another, you can use gtk_css_section_get_parent() to get the containing
// region.
//
// An instance of this type is always passed by reference.
type CSSSection struct {
	*cssSection
}

// cssSection is the struct that's finalized.
type cssSection struct {
	native *C.GtkCssSection
}

func marshalCSSSection(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &CSSSection{&cssSection{(*C.GtkCssSection)(b)}}, nil
}

// EndLine returns the line in the CSS document where this section end.
// The line number is 0-indexed, so the first line of the document will
// return 0. This value may change in future invocations of this function if
// section is not yet parsed completely. This will for example happen in the
// GtkCssProvider::parsing-error signal. The end position and line may be
// identical to the start position and line for sections which failed to parse
// anything successfully.
//
// The function returns the following values:
//
//   - guint: line number.
func (section *CSSSection) EndLine() uint {
	var _arg0 *C.GtkCssSection // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_end_line(_arg0)
	runtime.KeepAlive(section)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// EndPosition returns the offset in bytes from the start of the current line
// returned via gtk_css_section_get_end_line(). This value may change in future
// invocations of this function if section is not yet parsed completely.
// This will for example happen in the GtkCssProvider::parsing-error signal.
// The end position and line may be identical to the start position and line for
// sections which failed to parse anything successfully.
//
// The function returns the following values:
//
//   - guint: offset in bytes from the start of the line.
func (section *CSSSection) EndPosition() uint {
	var _arg0 *C.GtkCssSection // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_end_position(_arg0)
	runtime.KeepAlive(section)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// File gets the file that section was parsed from. If no such file exists,
// for example because the CSS was loaded via gtk_css_provider_load_from_data(),
// then NULL is returned.
//
// The function returns the following values:
//
//   - file that section was parsed from or NULL if section was parsed from
//     other data.
func (section *CSSSection) File() *gio.File {
	var _arg0 *C.GtkCssSection // out
	var _cret *C.GFile         // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_file(_arg0)
	runtime.KeepAlive(section)

	var _file *gio.File // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_file = &gio.File{
			Object: obj,
		}
	}

	return _file
}

// Parent gets the parent section for the given section. The parent section is
// the section that contains this section. A special case are sections of type
// K_CSS_SECTION_DOCUMENT. Their parent will either be NULL if they are the
// original CSS document that was loaded by gtk_css_provider_load_from_file() or
// a section of type K_CSS_SECTION_IMPORT if it was loaded with an import rule
// from a different file.
//
// The function returns the following values:
//
//   - cssSection (optional): parent section or NULL if none.
func (section *CSSSection) Parent() *CSSSection {
	var _arg0 *C.GtkCssSection // out
	var _cret *C.GtkCssSection // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_parent(_arg0)
	runtime.KeepAlive(section)

	var _cssSection *CSSSection // out

	if _cret != nil {
		_cssSection = (*CSSSection)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		C.gtk_css_section_ref(_cret)
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_cssSection)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_css_section_unref((*C.GtkCssSection)(intern.C))
			},
		)
	}

	return _cssSection
}

// SectionType gets the type of information that section describes.
//
// The function returns the following values:
//
//   - cssSectionType: type of section.
func (section *CSSSection) SectionType() CSSSectionType {
	var _arg0 *C.GtkCssSection    // out
	var _cret C.GtkCssSectionType // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_section_type(_arg0)
	runtime.KeepAlive(section)

	var _cssSectionType CSSSectionType // out

	_cssSectionType = CSSSectionType(_cret)

	return _cssSectionType
}

// StartLine returns the line in the CSS document where this section starts. The
// line number is 0-indexed, so the first line of the document will return 0.
//
// The function returns the following values:
//
//   - guint: line number.
func (section *CSSSection) StartLine() uint {
	var _arg0 *C.GtkCssSection // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_start_line(_arg0)
	runtime.KeepAlive(section)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// StartPosition returns the offset in bytes from the start of the current line
// returned via gtk_css_section_get_start_line().
//
// The function returns the following values:
//
//   - guint: offset in bytes from the start of the line.
func (section *CSSSection) StartPosition() uint {
	var _arg0 *C.GtkCssSection // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkCssSection)(gextras.StructNative(unsafe.Pointer(section)))

	_cret = C.gtk_css_section_get_start_position(_arg0)
	runtime.KeepAlive(section)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// DialogClass: instance of this type is always passed by reference.
type DialogClass struct {
	*dialogClass
}

// dialogClass is the struct that's finalized.
type dialogClass struct {
	native *C.GtkDialogClass
}

// ParentClass: parent class.
func (d *DialogClass) ParentClass() *WindowClass {
	valptr := &d.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// DrawingAreaClass: instance of this type is always passed by reference.
type DrawingAreaClass struct {
	*drawingAreaClass
}

// drawingAreaClass is the struct that's finalized.
type drawingAreaClass struct {
	native *C.GtkDrawingAreaClass
}

func (d *DrawingAreaClass) ParentClass() *WidgetClass {
	valptr := &d.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// EditableInterface: instance of this type is always passed by reference.
type EditableInterface struct {
	*editableInterface
}

// editableInterface is the struct that's finalized.
type editableInterface struct {
	native *C.GtkEditableInterface
}

// EntryAccessibleClass: instance of this type is always passed by reference.
type EntryAccessibleClass struct {
	*entryAccessibleClass
}

// entryAccessibleClass is the struct that's finalized.
type entryAccessibleClass struct {
	native *C.GtkEntryAccessibleClass
}

func (e *EntryAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &e.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// EntryBufferClass: instance of this type is always passed by reference.
type EntryBufferClass struct {
	*entryBufferClass
}

// entryBufferClass is the struct that's finalized.
type entryBufferClass struct {
	native *C.GtkEntryBufferClass
}

// EntryClass class structure for Entry. All virtual functions have a default
// implementation. Derived classes may set the virtual function pointers for the
// signal handlers to NULL, but must keep get_text_area_size and get_frame_size
// non-NULL; either use the default implementation, or provide a custom one.
//
// An instance of this type is always passed by reference.
type EntryClass struct {
	*entryClass
}

// entryClass is the struct that's finalized.
type entryClass struct {
	native *C.GtkEntryClass
}

// ParentClass: parent class.
func (e *EntryClass) ParentClass() *WidgetClass {
	valptr := &e.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// EntryCompletionClass: instance of this type is always passed by reference.
type EntryCompletionClass struct {
	*entryCompletionClass
}

// entryCompletionClass is the struct that's finalized.
type entryCompletionClass struct {
	native *C.GtkEntryCompletionClass
}

// EventBoxClass: instance of this type is always passed by reference.
type EventBoxClass struct {
	*eventBoxClass
}

// eventBoxClass is the struct that's finalized.
type eventBoxClass struct {
	native *C.GtkEventBoxClass
}

// ParentClass: parent class.
func (e *EventBoxClass) ParentClass() *BinClass {
	valptr := &e.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ExpanderAccessibleClass: instance of this type is always passed by reference.
type ExpanderAccessibleClass struct {
	*expanderAccessibleClass
}

// expanderAccessibleClass is the struct that's finalized.
type expanderAccessibleClass struct {
	native *C.GtkExpanderAccessibleClass
}

func (e *ExpanderAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &e.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ExpanderClass: instance of this type is always passed by reference.
type ExpanderClass struct {
	*expanderClass
}

// expanderClass is the struct that's finalized.
type expanderClass struct {
	native *C.GtkExpanderClass
}

// ParentClass: parent class.
func (e *ExpanderClass) ParentClass() *BinClass {
	valptr := &e.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FileChooserButtonClass: instance of this type is always passed by reference.
type FileChooserButtonClass struct {
	*fileChooserButtonClass
}

// fileChooserButtonClass is the struct that's finalized.
type fileChooserButtonClass struct {
	native *C.GtkFileChooserButtonClass
}

// ParentClass: parent class.
func (f *FileChooserButtonClass) ParentClass() *BoxClass {
	valptr := &f.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FileChooserDialogClass: instance of this type is always passed by reference.
type FileChooserDialogClass struct {
	*fileChooserDialogClass
}

// fileChooserDialogClass is the struct that's finalized.
type fileChooserDialogClass struct {
	native *C.GtkFileChooserDialogClass
}

func (f *FileChooserDialogClass) ParentClass() *DialogClass {
	valptr := &f.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FileChooserNativeClass: instance of this type is always passed by reference.
type FileChooserNativeClass struct {
	*fileChooserNativeClass
}

// fileChooserNativeClass is the struct that's finalized.
type fileChooserNativeClass struct {
	native *C.GtkFileChooserNativeClass
}

func (f *FileChooserNativeClass) ParentClass() *NativeDialogClass {
	valptr := &f.native.parent_class
	var _v *NativeDialogClass // out
	_v = (*NativeDialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FileChooserWidgetClass: instance of this type is always passed by reference.
type FileChooserWidgetClass struct {
	*fileChooserWidgetClass
}

// fileChooserWidgetClass is the struct that's finalized.
type fileChooserWidgetClass struct {
	native *C.GtkFileChooserWidgetClass
}

// ParentClass: parent class.
func (f *FileChooserWidgetClass) ParentClass() *BoxClass {
	valptr := &f.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FileFilterInfo is used to pass information about the tested file to
// gtk_file_filter_filter().
//
// An instance of this type is always passed by reference.
type FileFilterInfo struct {
	*fileFilterInfo
}

// fileFilterInfo is the struct that's finalized.
type fileFilterInfo struct {
	native *C.GtkFileFilterInfo
}

// Contains flags indicating which of the following fields need are filled.
func (f *FileFilterInfo) Contains() FileFilterFlags {
	valptr := &f.native.contains
	var _v FileFilterFlags // out
	_v = FileFilterFlags(*valptr)
	return _v
}

// Filename: filename of the file being tested.
func (f *FileFilterInfo) Filename() string {
	valptr := &f.native.filename
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// URI for the file being tested.
func (f *FileFilterInfo) URI() string {
	valptr := &f.native.uri
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// DisplayName: string that will be used to display the file in the file
// chooser.
func (f *FileFilterInfo) DisplayName() string {
	valptr := &f.native.display_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// MIMEType: mime type of the file.
func (f *FileFilterInfo) MIMEType() string {
	valptr := &f.native.mime_type
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// FixedChild: instance of this type is always passed by reference.
type FixedChild struct {
	*fixedChild
}

// fixedChild is the struct that's finalized.
type fixedChild struct {
	native *C.GtkFixedChild
}

func (f *FixedChild) Widget() Widgetter {
	valptr := &f.native.widget
	var _v Widgetter // out
	{
		objptr := unsafe.Pointer(*valptr)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_v = rv
	}
	return _v
}

func (f *FixedChild) X() int {
	valptr := &f.native.x
	var _v int // out
	_v = int(*valptr)
	return _v
}

func (f *FixedChild) Y() int {
	valptr := &f.native.y
	var _v int // out
	_v = int(*valptr)
	return _v
}

func (f *FixedChild) SetX(x int) {
	valptr := &f.native.x
	*valptr = C.gint(x)
}

func (f *FixedChild) SetY(y int) {
	valptr := &f.native.y
	*valptr = C.gint(y)
}

// FixedClass: instance of this type is always passed by reference.
type FixedClass struct {
	*fixedClass
}

// fixedClass is the struct that's finalized.
type fixedClass struct {
	native *C.GtkFixedClass
}

func (f *FixedClass) ParentClass() *ContainerClass {
	valptr := &f.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FlowBoxAccessibleClass: instance of this type is always passed by reference.
type FlowBoxAccessibleClass struct {
	*flowBoxAccessibleClass
}

// flowBoxAccessibleClass is the struct that's finalized.
type flowBoxAccessibleClass struct {
	native *C.GtkFlowBoxAccessibleClass
}

func (f *FlowBoxAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &f.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FlowBoxChildAccessibleClass: instance of this type is always passed by
// reference.
type FlowBoxChildAccessibleClass struct {
	*flowBoxChildAccessibleClass
}

// flowBoxChildAccessibleClass is the struct that's finalized.
type flowBoxChildAccessibleClass struct {
	native *C.GtkFlowBoxChildAccessibleClass
}

func (f *FlowBoxChildAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &f.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FlowBoxChildClass: instance of this type is always passed by reference.
type FlowBoxChildClass struct {
	*flowBoxChildClass
}

// flowBoxChildClass is the struct that's finalized.
type flowBoxChildClass struct {
	native *C.GtkFlowBoxChildClass
}

func (f *FlowBoxChildClass) ParentClass() *BinClass {
	valptr := &f.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FlowBoxClass: instance of this type is always passed by reference.
type FlowBoxClass struct {
	*flowBoxClass
}

// flowBoxClass is the struct that's finalized.
type flowBoxClass struct {
	native *C.GtkFlowBoxClass
}

func (f *FlowBoxClass) ParentClass() *ContainerClass {
	valptr := &f.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FontButtonClass: instance of this type is always passed by reference.
type FontButtonClass struct {
	*fontButtonClass
}

// fontButtonClass is the struct that's finalized.
type fontButtonClass struct {
	native *C.GtkFontButtonClass
}

func (f *FontButtonClass) ParentClass() *ButtonClass {
	valptr := &f.native.parent_class
	var _v *ButtonClass // out
	_v = (*ButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FontChooserDialogClass: instance of this type is always passed by reference.
type FontChooserDialogClass struct {
	*fontChooserDialogClass
}

// fontChooserDialogClass is the struct that's finalized.
type fontChooserDialogClass struct {
	native *C.GtkFontChooserDialogClass
}

// ParentClass: parent class.
func (f *FontChooserDialogClass) ParentClass() *DialogClass {
	valptr := &f.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FontChooserIface: instance of this type is always passed by reference.
type FontChooserIface struct {
	*fontChooserIface
}

// fontChooserIface is the struct that's finalized.
type fontChooserIface struct {
	native *C.GtkFontChooserIface
}

func (f *FontChooserIface) Padding() [10]unsafe.Pointer {
	valptr := &f.native.padding
	var _v [10]unsafe.Pointer // out
	{
		src := &*valptr
		for i := 0; i < 10; i++ {
			_v[i] = (unsafe.Pointer)(unsafe.Pointer(src[i]))
		}
	}
	return _v
}

// FontChooserWidgetClass: instance of this type is always passed by reference.
type FontChooserWidgetClass struct {
	*fontChooserWidgetClass
}

// fontChooserWidgetClass is the struct that's finalized.
type fontChooserWidgetClass struct {
	native *C.GtkFontChooserWidgetClass
}

// ParentClass: parent class.
func (f *FontChooserWidgetClass) ParentClass() *BoxClass {
	valptr := &f.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FontSelectionClass: instance of this type is always passed by reference.
type FontSelectionClass struct {
	*fontSelectionClass
}

// fontSelectionClass is the struct that's finalized.
type fontSelectionClass struct {
	native *C.GtkFontSelectionClass
}

func (f *FontSelectionClass) ParentClass() *BoxClass {
	valptr := &f.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FontSelectionDialogClass: instance of this type is always passed by
// reference.
type FontSelectionDialogClass struct {
	*fontSelectionDialogClass
}

// fontSelectionDialogClass is the struct that's finalized.
type fontSelectionDialogClass struct {
	native *C.GtkFontSelectionDialogClass
}

func (f *FontSelectionDialogClass) ParentClass() *DialogClass {
	valptr := &f.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FrameAccessibleClass: instance of this type is always passed by reference.
type FrameAccessibleClass struct {
	*frameAccessibleClass
}

// frameAccessibleClass is the struct that's finalized.
type frameAccessibleClass struct {
	native *C.GtkFrameAccessibleClass
}

func (f *FrameAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &f.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FrameClass: instance of this type is always passed by reference.
type FrameClass struct {
	*frameClass
}

// frameClass is the struct that's finalized.
type frameClass struct {
	native *C.GtkFrameClass
}

// ParentClass: parent class.
func (f *FrameClass) ParentClass() *BinClass {
	valptr := &f.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// GLAreaClass: GtkGLAreaClass structure contains only private data.
//
// An instance of this type is always passed by reference.
type GLAreaClass struct {
	*glAreaClass
}

// glAreaClass is the struct that's finalized.
type glAreaClass struct {
	native *C.GtkGLAreaClass
}

// Gradient is a boxed type that represents a gradient. It is the result
// of parsing a [gradient expression][gtkcssprovider-gradients]. To obtain
// the gradient represented by a GtkGradient, it has to be resolved with
// gtk_gradient_resolve(), which replaces all symbolic color references by the
// colors they refer to (in a given context) and constructs a #cairo_pattern_t
// value.
//
// It is not normally necessary to deal directly with Gradients, since they are
// mostly used behind the scenes by StyleContext and CssProvider.
//
// Gradient is deprecated. It was used internally by GTK’s CSS engine to
// represent gradients. As its handling is not conforming to modern web
// standards, it is not used anymore. If you want to use gradients in your own
// code, please use Cairo directly.
//
// An instance of this type is always passed by reference.
type Gradient struct {
	*gradient
}

// gradient is the struct that's finalized.
type gradient struct {
	native *C.GtkGradient
}

func marshalGradient(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &Gradient{&gradient{(*C.GtkGradient)(b)}}, nil
}

// NewGradientLinear constructs a struct Gradient.
func NewGradientLinear(x0 float64, y0 float64, x1 float64, y1 float64) *Gradient {
	var _arg1 C.gdouble      // out
	var _arg2 C.gdouble      // out
	var _arg3 C.gdouble      // out
	var _arg4 C.gdouble      // out
	var _cret *C.GtkGradient // in

	_arg1 = C.gdouble(x0)
	_arg2 = C.gdouble(y0)
	_arg3 = C.gdouble(x1)
	_arg4 = C.gdouble(y1)

	_cret = C.gtk_gradient_new_linear(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(x0)
	runtime.KeepAlive(y0)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(y1)

	var _gradient *Gradient // out

	_gradient = (*Gradient)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_gradient)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_gradient_unref((*C.GtkGradient)(intern.C))
		},
	)

	return _gradient
}

// NewGradientRadial constructs a struct Gradient.
func NewGradientRadial(x0 float64, y0 float64, radius0 float64, x1 float64, y1 float64, radius1 float64) *Gradient {
	var _arg1 C.gdouble      // out
	var _arg2 C.gdouble      // out
	var _arg3 C.gdouble      // out
	var _arg4 C.gdouble      // out
	var _arg5 C.gdouble      // out
	var _arg6 C.gdouble      // out
	var _cret *C.GtkGradient // in

	_arg1 = C.gdouble(x0)
	_arg2 = C.gdouble(y0)
	_arg3 = C.gdouble(radius0)
	_arg4 = C.gdouble(x1)
	_arg5 = C.gdouble(y1)
	_arg6 = C.gdouble(radius1)

	_cret = C.gtk_gradient_new_radial(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(x0)
	runtime.KeepAlive(y0)
	runtime.KeepAlive(radius0)
	runtime.KeepAlive(x1)
	runtime.KeepAlive(y1)
	runtime.KeepAlive(radius1)

	var _gradient *Gradient // out

	_gradient = (*Gradient)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_gradient)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_gradient_unref((*C.GtkGradient)(intern.C))
		},
	)

	return _gradient
}

// AddColorStop adds a stop color to gradient.
//
// Deprecated: Gradient is deprecated.
//
// The function takes the following parameters:
//
//   - offset for the color stop.
//   - color to use.
func (gradient *Gradient) AddColorStop(offset float64, color *SymbolicColor) {
	var _arg0 *C.GtkGradient      // out
	var _arg1 C.gdouble           // out
	var _arg2 *C.GtkSymbolicColor // out

	_arg0 = (*C.GtkGradient)(gextras.StructNative(unsafe.Pointer(gradient)))
	_arg1 = C.gdouble(offset)
	_arg2 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))

	C.gtk_gradient_add_color_stop(_arg0, _arg1, _arg2)
	runtime.KeepAlive(gradient)
	runtime.KeepAlive(offset)
	runtime.KeepAlive(color)
}

// Resolve: if gradient is resolvable, resolved_gradient will be filled in
// with the resolved gradient as a cairo_pattern_t, and TRUE will be returned.
// Generally, if gradient can’t be resolved, it is due to it being defined on
// top of a named color that doesn't exist in props.
//
// Deprecated: Gradient is deprecated.
//
// The function takes the following parameters:
//
//   - props to use when resolving named colors.
//
// The function returns the following values:
//
//   - resolvedGradient: return location for the resolved pattern.
//   - ok: TRUE if the gradient has been resolved.
func (gradient *Gradient) Resolve(props *StyleProperties) (*cairo.Pattern, bool) {
	var _arg0 *C.GtkGradient        // out
	var _arg1 *C.GtkStyleProperties // out
	var _arg2 *C.cairo_pattern_t    // in
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkGradient)(gextras.StructNative(unsafe.Pointer(gradient)))
	_arg1 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))

	_cret = C.gtk_gradient_resolve(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(gradient)
	runtime.KeepAlive(props)

	var _resolvedGradient *cairo.Pattern // out
	var _ok bool                         // out

	{
		_pp := &struct{ p unsafe.Pointer }{unsafe.Pointer(_arg2)}
		_resolvedGradient = (*cairo.Pattern)(unsafe.Pointer(_pp))
	}
	runtime.SetFinalizer(_resolvedGradient, func(v *cairo.Pattern) {
		C.cairo_pattern_destroy((*C.cairo_pattern_t)(unsafe.Pointer(v.Native())))
	})
	if _cret != 0 {
		_ok = true
	}

	return _resolvedGradient, _ok
}

func (gradient *Gradient) ResolveForContext(context *StyleContext) *cairo.Pattern {
	var _arg0 *C.GtkGradient     // out
	var _arg1 *C.GtkStyleContext // out
	var _cret *C.cairo_pattern_t // in

	_arg0 = (*C.GtkGradient)(gextras.StructNative(unsafe.Pointer(gradient)))
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))

	_cret = C.gtk_gradient_resolve_for_context(_arg0, _arg1)
	runtime.KeepAlive(gradient)
	runtime.KeepAlive(context)

	var _pattern *cairo.Pattern // out

	{
		_pp := &struct{ p unsafe.Pointer }{unsafe.Pointer(_cret)}
		_pattern = (*cairo.Pattern)(unsafe.Pointer(_pp))
	}
	runtime.SetFinalizer(_pattern, func(v *cairo.Pattern) {
		C.cairo_pattern_destroy((*C.cairo_pattern_t)(unsafe.Pointer(v.Native())))
	})

	return _pattern
}

// String creates a string representation for gradient that is suitable for
// using in GTK CSS files.
//
// Deprecated: Gradient is deprecated.
//
// The function returns the following values:
//
//   - utf8: string representation for gradient.
func (gradient *Gradient) String() string {
	var _arg0 *C.GtkGradient // out
	var _cret *C.char        // in

	_arg0 = (*C.GtkGradient)(gextras.StructNative(unsafe.Pointer(gradient)))

	_cret = C.gtk_gradient_to_string(_arg0)
	runtime.KeepAlive(gradient)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// GridClass: instance of this type is always passed by reference.
type GridClass struct {
	*gridClass
}

// gridClass is the struct that's finalized.
type gridClass struct {
	native *C.GtkGridClass
}

// ParentClass: parent class.
func (g *GridClass) ParentClass() *ContainerClass {
	valptr := &g.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HBoxClass: instance of this type is always passed by reference.
type HBoxClass struct {
	*hBoxClass
}

// hBoxClass is the struct that's finalized.
type hBoxClass struct {
	native *C.GtkHBoxClass
}

func (h *HBoxClass) ParentClass() *BoxClass {
	valptr := &h.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HButtonBoxClass: instance of this type is always passed by reference.
type HButtonBoxClass struct {
	*hButtonBoxClass
}

// hButtonBoxClass is the struct that's finalized.
type hButtonBoxClass struct {
	native *C.GtkHButtonBoxClass
}

func (h *HButtonBoxClass) ParentClass() *ButtonBoxClass {
	valptr := &h.native.parent_class
	var _v *ButtonBoxClass // out
	_v = (*ButtonBoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HPanedClass: instance of this type is always passed by reference.
type HPanedClass struct {
	*hPanedClass
}

// hPanedClass is the struct that's finalized.
type hPanedClass struct {
	native *C.GtkHPanedClass
}

func (h *HPanedClass) ParentClass() *PanedClass {
	valptr := &h.native.parent_class
	var _v *PanedClass // out
	_v = (*PanedClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HSVClass: instance of this type is always passed by reference.
type HSVClass struct {
	*hsvClass
}

// hsvClass is the struct that's finalized.
type hsvClass struct {
	native *C.GtkHSVClass
}

func (h *HSVClass) ParentClass() *WidgetClass {
	valptr := &h.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HScaleClass: instance of this type is always passed by reference.
type HScaleClass struct {
	*hScaleClass
}

// hScaleClass is the struct that's finalized.
type hScaleClass struct {
	native *C.GtkHScaleClass
}

func (h *HScaleClass) ParentClass() *ScaleClass {
	valptr := &h.native.parent_class
	var _v *ScaleClass // out
	_v = (*ScaleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HScrollbarClass: instance of this type is always passed by reference.
type HScrollbarClass struct {
	*hScrollbarClass
}

// hScrollbarClass is the struct that's finalized.
type hScrollbarClass struct {
	native *C.GtkHScrollbarClass
}

func (h *HScrollbarClass) ParentClass() *ScrollbarClass {
	valptr := &h.native.parent_class
	var _v *ScrollbarClass // out
	_v = (*ScrollbarClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HSeparatorClass: instance of this type is always passed by reference.
type HSeparatorClass struct {
	*hSeparatorClass
}

// hSeparatorClass is the struct that's finalized.
type hSeparatorClass struct {
	native *C.GtkHSeparatorClass
}

func (h *HSeparatorClass) ParentClass() *SeparatorClass {
	valptr := &h.native.parent_class
	var _v *SeparatorClass // out
	_v = (*SeparatorClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HandleBoxClass: instance of this type is always passed by reference.
type HandleBoxClass struct {
	*handleBoxClass
}

// handleBoxClass is the struct that's finalized.
type handleBoxClass struct {
	native *C.GtkHandleBoxClass
}

// ParentClass: parent class.
func (h *HandleBoxClass) ParentClass() *BinClass {
	valptr := &h.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// HeaderBarClass: instance of this type is always passed by reference.
type HeaderBarClass struct {
	*headerBarClass
}

// headerBarClass is the struct that's finalized.
type headerBarClass struct {
	native *C.GtkHeaderBarClass
}

func (h *HeaderBarClass) ParentClass() *ContainerClass {
	valptr := &h.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// IMContextClass: instance of this type is always passed by reference.
type IMContextClass struct {
	*imContextClass
}

// imContextClass is the struct that's finalized.
type imContextClass struct {
	native *C.GtkIMContextClass
}

// IMContextInfo: bookkeeping information about a loadable input method.
//
// An instance of this type is always passed by reference.
type IMContextInfo struct {
	*imContextInfo
}

// imContextInfo is the struct that's finalized.
type imContextInfo struct {
	native *C.GtkIMContextInfo
}

// ContextID: unique identification string of the input method.
func (i *IMContextInfo) ContextID() string {
	valptr := &i.native.context_id
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// ContextName: human-readable name of the input method.
func (i *IMContextInfo) ContextName() string {
	valptr := &i.native.context_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Domain: translation domain to be used with dgettext().
func (i *IMContextInfo) Domain() string {
	valptr := &i.native.domain
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// DomainDirname: name of locale directory for use with bindtextdomain().
func (i *IMContextInfo) DomainDirname() string {
	valptr := &i.native.domain_dirname
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// DefaultLocales: colon-separated list of locales where this input method
// should be the default. The asterisk “*” sets the default for all locales.
func (i *IMContextInfo) DefaultLocales() string {
	valptr := &i.native.default_locales
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// IMContextSimpleClass: instance of this type is always passed by reference.
type IMContextSimpleClass struct {
	*imContextSimpleClass
}

// imContextSimpleClass is the struct that's finalized.
type imContextSimpleClass struct {
	native *C.GtkIMContextSimpleClass
}

func (i *IMContextSimpleClass) ParentClass() *IMContextClass {
	valptr := &i.native.parent_class
	var _v *IMContextClass // out
	_v = (*IMContextClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// IMMulticontextClass: instance of this type is always passed by reference.
type IMMulticontextClass struct {
	*imMulticontextClass
}

// imMulticontextClass is the struct that's finalized.
type imMulticontextClass struct {
	native *C.GtkIMMulticontextClass
}

func (i *IMMulticontextClass) ParentClass() *IMContextClass {
	valptr := &i.native.parent_class
	var _v *IMContextClass // out
	_v = (*IMContextClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// IconFactoryClass: instance of this type is always passed by reference.
type IconFactoryClass struct {
	*iconFactoryClass
}

// iconFactoryClass is the struct that's finalized.
type iconFactoryClass struct {
	native *C.GtkIconFactoryClass
}

// IconSet: instance of this type is always passed by reference.
type IconSet struct {
	*iconSet
}

// iconSet is the struct that's finalized.
type iconSet struct {
	native *C.GtkIconSet
}

func marshalIconSet(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &IconSet{&iconSet{(*C.GtkIconSet)(b)}}, nil
}

// NewIconSet constructs a struct IconSet.
func NewIconSet() *IconSet {
	var _cret *C.GtkIconSet // in

	_cret = C.gtk_icon_set_new()

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// NewIconSetFromPixbuf constructs a struct IconSet.
func NewIconSetFromPixbuf(pixbuf *gdkpixbuf.Pixbuf) *IconSet {
	var _arg1 *C.GdkPixbuf  // out
	var _cret *C.GtkIconSet // in

	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	_cret = C.gtk_icon_set_new_from_pixbuf(_arg1)
	runtime.KeepAlive(pixbuf)

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// AddSource: icon sets have a list of IconSource, which they use as base icons
// for rendering icons in different states and sizes. Icons are scaled, made to
// look insensitive, etc. in gtk_icon_set_render_icon(), but IconSet needs base
// images to work with. The base images and when to use them are described by a
// IconSource.
//
// This function copies source, so you can reuse the same source immediately
// without affecting the icon set.
//
// An example of when you’d use this function: a web browser’s "Back to Previous
// Page" icon might point in a different direction in Hebrew and in English;
// it might look different when insensitive; and it might change size depending
// on toolbar mode (small/large icons). So a single icon set would contain all
// those variants of the icon, and you might add a separate source for each one.
//
// You should nearly always add a “default” icon source with all fields
// wildcarded, which will be used as a fallback if no more specific source
// matches. IconSet always prefers more specific icon sources to more generic
// icon sources. The order in which you add the sources to the icon set does not
// matter.
//
// gtk_icon_set_new_from_pixbuf() creates a new icon set with a default icon
// source based on the given pixbuf.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - source: IconSource.
func (iconSet *IconSet) AddSource(source *IconSource) {
	var _arg0 *C.GtkIconSet    // out
	var _arg1 *C.GtkIconSource // out

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	_arg1 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	C.gtk_icon_set_add_source(_arg0, _arg1)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(source)
}

// Copy copies icon_set by value.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - iconSet: new IconSet identical to the first.
func (iconSet *IconSet) Copy() *IconSet {
	var _arg0 *C.GtkIconSet // out
	var _cret *C.GtkIconSet // in

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))

	_cret = C.gtk_icon_set_copy(_arg0)
	runtime.KeepAlive(iconSet)

	var _iconSet *IconSet // out

	_iconSet = (*IconSet)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSet)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_set_unref((*C.GtkIconSet)(intern.C))
		},
	)

	return _iconSet
}

// Sizes obtains a list of icon sizes this icon set can render. The returned
// array must be freed with g_free().
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - sizes: return location for array of sizes (IconSize).
func (iconSet *IconSet) Sizes() []int {
	var _arg0 *C.GtkIconSet  // out
	var _arg1 *C.GtkIconSize // in
	var _arg2 C.gint         // in

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))

	C.gtk_icon_set_get_sizes(_arg0, &_arg1, &_arg2)
	runtime.KeepAlive(iconSet)

	var _sizes []int // out

	defer C.free(unsafe.Pointer(_arg1))
	{
		src := unsafe.Slice((*C.GtkIconSize)(_arg1), _arg2)
		_sizes = make([]int, _arg2)
		for i := 0; i < int(_arg2); i++ {
			_sizes[i] = int(src[i])
		}
	}

	return _sizes
}

// RenderIcon renders an icon using gtk_style_render_icon(). In most cases,
// gtk_widget_render_icon() is better, since it automatically provides most of
// the arguments from the current widget settings. This function never returns
// NULL; if the icon can’t be rendered (perhaps because an image file fails to
// load), a default "missing image" icon will be returned instead.
//
// Deprecated: Use gtk_icon_set_render_icon_pixbuf() instead.
//
// The function takes the following parameters:
//
//   - style (optional) associated with widget, or NULL.
//   - direction: text direction.
//   - state: widget state.
//   - size: icon size (IconSize). A size of (GtkIconSize)-1 means render at the
//     size of the source and don’t scale.
//   - widget (optional) that will display the icon, or NULL. The only use that
//     is typically made of this is to determine the appropriate Screen.
//   - detail (optional) to pass to the theme engine, or NULL. Note that passing
//     a detail of anything but NULL will disable caching.
//
// The function returns the following values:
//
//   - pixbuf to be displayed.
func (iconSet *IconSet) RenderIcon(style *Style, direction TextDirection, state StateType, size int, widget Widgetter, detail string) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkIconSet      // out
	var _arg1 *C.GtkStyle        // out
	var _arg2 C.GtkTextDirection // out
	var _arg3 C.GtkStateType     // out
	var _arg4 C.GtkIconSize      // out
	var _arg5 *C.GtkWidget       // out
	var _arg6 *C.gchar           // out
	var _cret *C.GdkPixbuf       // in

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	if style != nil {
		_arg1 = (*C.GtkStyle)(unsafe.Pointer(coreglib.InternObject(style).Native()))
	}
	_arg2 = C.GtkTextDirection(direction)
	_arg3 = C.GtkStateType(state)
	_arg4 = C.GtkIconSize(size)
	if widget != nil {
		_arg5 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))
	}
	if detail != "" {
		_arg6 = (*C.gchar)(unsafe.Pointer(C.CString(detail)))
		defer C.free(unsafe.Pointer(_arg6))
	}

	_cret = C.gtk_icon_set_render_icon(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(style)
	runtime.KeepAlive(direction)
	runtime.KeepAlive(state)
	runtime.KeepAlive(size)
	runtime.KeepAlive(widget)
	runtime.KeepAlive(detail)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// RenderIconPixbuf renders an icon using gtk_render_icon_pixbuf(). In most
// cases, gtk_widget_render_icon_pixbuf() is better, since it automatically
// provides most of the arguments from the current widget settings. This
// function never returns NULL; if the icon can’t be rendered (perhaps because
// an image file fails to load), a default "missing image" icon will be returned
// instead.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - size: icon size (IconSize). A size of (GtkIconSize)-1 means render at the
//     size of the source and don’t scale.
//
// The function returns the following values:
//
//   - pixbuf to be displayed.
func (iconSet *IconSet) RenderIconPixbuf(context *StyleContext, size int) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkIconSet      // out
	var _arg1 *C.GtkStyleContext // out
	var _arg2 C.GtkIconSize      // out
	var _cret *C.GdkPixbuf       // in

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.GtkIconSize(size)

	_cret = C.gtk_icon_set_render_icon_pixbuf(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(context)
	runtime.KeepAlive(size)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// RenderIconSurface renders an icon using gtk_render_icon_pixbuf() and converts
// it to a cairo surface.
//
// This function never returns NULL; if the icon can’t be rendered (perhaps
// because an image file fails to load), a default "missing image" icon will be
// returned instead.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - context: StyleContext.
//   - size: icon size (IconSize). A size of (GtkIconSize)-1 means render at the
//     size of the source and don’t scale.
//   - scale: window scale to render for.
//   - forWindow (optional) to optimize drawing for, or NULL.
//
// The function returns the following values:
//
//   - surface to be displayed.
func (iconSet *IconSet) RenderIconSurface(context *StyleContext, size int, scale int, forWindow gdk.Windower) *cairo.Surface {
	var _arg0 *C.GtkIconSet      // out
	var _arg1 *C.GtkStyleContext // out
	var _arg2 C.GtkIconSize      // out
	var _arg3 C.int              // out
	var _arg4 *C.GdkWindow       // out
	var _cret *C.cairo_surface_t // in

	_arg0 = (*C.GtkIconSet)(gextras.StructNative(unsafe.Pointer(iconSet)))
	_arg1 = (*C.GtkStyleContext)(unsafe.Pointer(coreglib.InternObject(context).Native()))
	_arg2 = C.GtkIconSize(size)
	_arg3 = C.int(scale)
	if forWindow != nil {
		_arg4 = (*C.GdkWindow)(unsafe.Pointer(coreglib.InternObject(forWindow).Native()))
	}

	_cret = C.gtk_icon_set_render_icon_surface(_arg0, _arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(iconSet)
	runtime.KeepAlive(context)
	runtime.KeepAlive(size)
	runtime.KeepAlive(scale)
	runtime.KeepAlive(forWindow)

	var _surface *cairo.Surface // out

	_surface = cairo.WrapSurface(uintptr(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(_surface, func(v *cairo.Surface) {
		C.cairo_surface_destroy((*C.cairo_surface_t)(unsafe.Pointer(v.Native())))
	})

	return _surface
}

// IconSource: instance of this type is always passed by reference.
type IconSource struct {
	*iconSource
}

// iconSource is the struct that's finalized.
type iconSource struct {
	native *C.GtkIconSource
}

func marshalIconSource(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &IconSource{&iconSource{(*C.GtkIconSource)(b)}}, nil
}

// NewIconSource constructs a struct IconSource.
func NewIconSource() *IconSource {
	var _cret *C.GtkIconSource // in

	_cret = C.gtk_icon_source_new()

	var _iconSource *IconSource // out

	_iconSource = (*IconSource)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSource)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_source_free((*C.GtkIconSource)(intern.C))
		},
	)

	return _iconSource
}

// Copy creates a copy of source; mostly useful for language bindings.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - iconSource: new IconSource.
func (source *IconSource) Copy() *IconSource {
	var _arg0 *C.GtkIconSource // out
	var _cret *C.GtkIconSource // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_copy(_arg0)
	runtime.KeepAlive(source)

	var _iconSource *IconSource // out

	_iconSource = (*IconSource)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_iconSource)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_icon_source_free((*C.GtkIconSource)(intern.C))
		},
	)

	return _iconSource
}

// Direction obtains the text direction this icon source applies to. The return
// value is only useful/meaningful if the text direction is not wildcarded.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - textDirection: text direction this source matches.
func (source *IconSource) Direction() TextDirection {
	var _arg0 *C.GtkIconSource   // out
	var _cret C.GtkTextDirection // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_direction(_arg0)
	runtime.KeepAlive(source)

	var _textDirection TextDirection // out

	_textDirection = TextDirection(_cret)

	return _textDirection
}

// DirectionWildcarded gets the value set by
// gtk_icon_source_set_direction_wildcarded().
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - ok: TRUE if this icon source is a base for any text direction variant.
func (source *IconSource) DirectionWildcarded() bool {
	var _arg0 *C.GtkIconSource // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_direction_wildcarded(_arg0)
	runtime.KeepAlive(source)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Filename retrieves the source filename, or NULL if none is set. The filename
// is not a copy, and should not be modified or expected to persist beyond the
// lifetime of the icon source.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - filename: image filename. This string must not be modified or freed.
func (source *IconSource) Filename() string {
	var _arg0 *C.GtkIconSource // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_filename(_arg0)
	runtime.KeepAlive(source)

	var _filename string // out

	_filename = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _filename
}

// IconName retrieves the source icon name, or NULL if none is set. The
// icon_name is not a copy, and should not be modified or expected to persist
// beyond the lifetime of the icon source.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - utf8: icon name. This string must not be modified or freed.
func (source *IconSource) IconName() string {
	var _arg0 *C.GtkIconSource // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_icon_name(_arg0)
	runtime.KeepAlive(source)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Pixbuf retrieves the source pixbuf, or NULL if none is set. In addition,
// if a filename source is in use, this function in some cases will return
// the pixbuf from loaded from the filename. This is, for example, true for
// the GtkIconSource passed to the Style render_icon() virtual function.
// The reference count on the pixbuf is not incremented.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - pixbuf: source pixbuf.
func (source *IconSource) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkIconSource // out
	var _cret *C.GdkPixbuf     // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_pixbuf(_arg0)
	runtime.KeepAlive(source)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// Size obtains the icon size this source applies to. The return value is only
// useful/meaningful if the icon size is not wildcarded.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - gint: icon size (IconSize) this source matches.
func (source *IconSource) Size() int {
	var _arg0 *C.GtkIconSource // out
	var _cret C.GtkIconSize    // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_size(_arg0)
	runtime.KeepAlive(source)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// SizeWildcarded gets the value set by gtk_icon_source_set_size_wildcarded().
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - ok: TRUE if this icon source is a base for any icon size variant.
func (source *IconSource) SizeWildcarded() bool {
	var _arg0 *C.GtkIconSource // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_size_wildcarded(_arg0)
	runtime.KeepAlive(source)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// State obtains the widget state this icon source applies to. The return value
// is only useful/meaningful if the widget state is not wildcarded.
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - stateType: widget state this source matches.
func (source *IconSource) State() StateType {
	var _arg0 *C.GtkIconSource // out
	var _cret C.GtkStateType   // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_state(_arg0)
	runtime.KeepAlive(source)

	var _stateType StateType // out

	_stateType = StateType(_cret)

	return _stateType
}

// StateWildcarded gets the value set by gtk_icon_source_set_state_wildcarded().
//
// Deprecated: Use IconTheme instead.
//
// The function returns the following values:
//
//   - ok: TRUE if this icon source is a base for any widget state variant.
func (source *IconSource) StateWildcarded() bool {
	var _arg0 *C.GtkIconSource // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))

	_cret = C.gtk_icon_source_get_state_wildcarded(_arg0)
	runtime.KeepAlive(source)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetDirection sets the text direction this icon source is intended to be used
// with.
//
// Setting the text direction on an icon source makes no difference if
// the text direction is wildcarded. Therefore, you should usually call
// gtk_icon_source_set_direction_wildcarded() to un-wildcard it in addition to
// calling this function.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - direction: text direction this source applies to.
func (source *IconSource) SetDirection(direction TextDirection) {
	var _arg0 *C.GtkIconSource   // out
	var _arg1 C.GtkTextDirection // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg1 = C.GtkTextDirection(direction)

	C.gtk_icon_source_set_direction(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(direction)
}

// SetDirectionWildcarded: if the text direction is wildcarded, this source
// can be used as the base image for an icon in any TextDirection. If the text
// direction is not wildcarded, then the text direction the icon source applies
// to should be set with gtk_icon_source_set_direction(), and the icon source
// will only be used with that text direction.
//
// IconSet prefers non-wildcarded sources (exact matches) over wildcarded
// sources, and will use an exact match when possible.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - setting: TRUE to wildcard the text direction.
func (source *IconSource) SetDirectionWildcarded(setting bool) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_icon_source_set_direction_wildcarded(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(setting)
}

// SetFilename sets the name of an image file to use as a base image when
// creating icon variants for IconSet. The filename must be absolute.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - filename: image file to use.
func (source *IconSource) SetFilename(filename string) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(filename)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_icon_source_set_filename(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(filename)
}

// SetIconName sets the name of an icon to look up in the current icon theme to
// use as a base image when creating icon variants for IconSet.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - iconName (optional): name of icon to use.
func (source *IconSource) SetIconName(iconName string) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 *C.gchar         // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	if iconName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(iconName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	C.gtk_icon_source_set_icon_name(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(iconName)
}

// SetPixbuf sets a pixbuf to use as a base image when creating icon variants
// for IconSet.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - pixbuf to use as a source.
func (source *IconSource) SetPixbuf(pixbuf *gdkpixbuf.Pixbuf) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 *C.GdkPixbuf     // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	C.gtk_icon_source_set_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(pixbuf)
}

// SetSize sets the icon size this icon source is intended to be used with.
//
// Setting the icon size on an icon source makes no difference
// if the size is wildcarded. Therefore, you should usually call
// gtk_icon_source_set_size_wildcarded() to un-wildcard it in addition to
// calling this function.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - size: icon size (IconSize) this source applies to.
func (source *IconSource) SetSize(size int) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 C.GtkIconSize    // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg1 = C.GtkIconSize(size)

	C.gtk_icon_source_set_size(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(size)
}

// SetSizeWildcarded: if the icon size is wildcarded, this source can be used as
// the base image for an icon of any size. If the size is not wildcarded, then
// the size the source applies to should be set with gtk_icon_source_set_size()
// and the icon source will only be used with that specific size.
//
// IconSet prefers non-wildcarded sources (exact matches) over wildcarded
// sources, and will use an exact match when possible.
//
// IconSet will normally scale wildcarded source images to produce an
// appropriate icon at a given size, but will not change the size of source
// images that match exactly.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - setting: TRUE to wildcard the widget state.
func (source *IconSource) SetSizeWildcarded(setting bool) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_icon_source_set_size_wildcarded(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(setting)
}

// SetState sets the widget state this icon source is intended to be used with.
//
// Setting the widget state on an icon source makes no difference
// if the state is wildcarded. Therefore, you should usually call
// gtk_icon_source_set_state_wildcarded() to un-wildcard it in addition to
// calling this function.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - state: widget state this source applies to.
func (source *IconSource) SetState(state StateType) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 C.GtkStateType   // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	_arg1 = C.GtkStateType(state)

	C.gtk_icon_source_set_state(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(state)
}

// SetStateWildcarded: if the widget state is wildcarded, this source can be
// used as the base image for an icon in any StateType. If the widget state
// is not wildcarded, then the state the source applies to should be set with
// gtk_icon_source_set_state() and the icon source will only be used with that
// specific state.
//
// IconSet prefers non-wildcarded sources (exact matches) over wildcarded
// sources, and will use an exact match when possible.
//
// IconSet will normally transform wildcarded source images to produce an
// appropriate icon for a given state, for example lightening an image on
// prelight, but will not modify source images that match exactly.
//
// Deprecated: Use IconTheme instead.
//
// The function takes the following parameters:
//
//   - setting: TRUE to wildcard the widget state.
func (source *IconSource) SetStateWildcarded(setting bool) {
	var _arg0 *C.GtkIconSource // out
	var _arg1 C.gboolean       // out

	_arg0 = (*C.GtkIconSource)(gextras.StructNative(unsafe.Pointer(source)))
	if setting {
		_arg1 = C.TRUE
	}

	C.gtk_icon_source_set_state_wildcarded(_arg0, _arg1)
	runtime.KeepAlive(source)
	runtime.KeepAlive(setting)
}

// IconThemeClass: instance of this type is always passed by reference.
type IconThemeClass struct {
	*iconThemeClass
}

// iconThemeClass is the struct that's finalized.
type iconThemeClass struct {
	native *C.GtkIconThemeClass
}

// IconViewAccessibleClass: instance of this type is always passed by reference.
type IconViewAccessibleClass struct {
	*iconViewAccessibleClass
}

// iconViewAccessibleClass is the struct that's finalized.
type iconViewAccessibleClass struct {
	native *C.GtkIconViewAccessibleClass
}

func (i *IconViewAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &i.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// IconViewClass: instance of this type is always passed by reference.
type IconViewClass struct {
	*iconViewClass
}

// iconViewClass is the struct that's finalized.
type iconViewClass struct {
	native *C.GtkIconViewClass
}

func (i *IconViewClass) ParentClass() *ContainerClass {
	valptr := &i.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ImageAccessibleClass: instance of this type is always passed by reference.
type ImageAccessibleClass struct {
	*imageAccessibleClass
}

// imageAccessibleClass is the struct that's finalized.
type imageAccessibleClass struct {
	native *C.GtkImageAccessibleClass
}

func (i *ImageAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &i.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ImageCellAccessibleClass: instance of this type is always passed by
// reference.
type ImageCellAccessibleClass struct {
	*imageCellAccessibleClass
}

// imageCellAccessibleClass is the struct that's finalized.
type imageCellAccessibleClass struct {
	native *C.GtkImageCellAccessibleClass
}

func (i *ImageCellAccessibleClass) ParentClass() *RendererCellAccessibleClass {
	valptr := &i.native.parent_class
	var _v *RendererCellAccessibleClass // out
	_v = (*RendererCellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ImageClass: instance of this type is always passed by reference.
type ImageClass struct {
	*imageClass
}

// imageClass is the struct that's finalized.
type imageClass struct {
	native *C.GtkImageClass
}

func (i *ImageClass) ParentClass() *MiscClass {
	valptr := &i.native.parent_class
	var _v *MiscClass // out
	_v = (*MiscClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ImageMenuItemClass: instance of this type is always passed by reference.
type ImageMenuItemClass struct {
	*imageMenuItemClass
}

// imageMenuItemClass is the struct that's finalized.
type imageMenuItemClass struct {
	native *C.GtkImageMenuItemClass
}

// ParentClass: parent class.
func (i *ImageMenuItemClass) ParentClass() *MenuItemClass {
	valptr := &i.native.parent_class
	var _v *MenuItemClass // out
	_v = (*MenuItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// InfoBarClass: instance of this type is always passed by reference.
type InfoBarClass struct {
	*infoBarClass
}

// infoBarClass is the struct that's finalized.
type infoBarClass struct {
	native *C.GtkInfoBarClass
}

func (i *InfoBarClass) ParentClass() *BoxClass {
	valptr := &i.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// InvisibleClass: instance of this type is always passed by reference.
type InvisibleClass struct {
	*invisibleClass
}

// invisibleClass is the struct that's finalized.
type invisibleClass struct {
	native *C.GtkInvisibleClass
}

func (i *InvisibleClass) ParentClass() *WidgetClass {
	valptr := &i.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LabelAccessibleClass: instance of this type is always passed by reference.
type LabelAccessibleClass struct {
	*labelAccessibleClass
}

// labelAccessibleClass is the struct that's finalized.
type labelAccessibleClass struct {
	native *C.GtkLabelAccessibleClass
}

func (l *LabelAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &l.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LabelClass: instance of this type is always passed by reference.
type LabelClass struct {
	*labelClass
}

// labelClass is the struct that's finalized.
type labelClass struct {
	native *C.GtkLabelClass
}

func (l *LabelClass) ParentClass() *MiscClass {
	valptr := &l.native.parent_class
	var _v *MiscClass // out
	_v = (*MiscClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LayoutClass: instance of this type is always passed by reference.
type LayoutClass struct {
	*layoutClass
}

// layoutClass is the struct that's finalized.
type layoutClass struct {
	native *C.GtkLayoutClass
}

func (l *LayoutClass) ParentClass() *ContainerClass {
	valptr := &l.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LevelBarAccessibleClass: instance of this type is always passed by reference.
type LevelBarAccessibleClass struct {
	*levelBarAccessibleClass
}

// levelBarAccessibleClass is the struct that's finalized.
type levelBarAccessibleClass struct {
	native *C.GtkLevelBarAccessibleClass
}

func (l *LevelBarAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &l.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LevelBarClass: instance of this type is always passed by reference.
type LevelBarClass struct {
	*levelBarClass
}

// levelBarClass is the struct that's finalized.
type levelBarClass struct {
	native *C.GtkLevelBarClass
}

// LinkButtonAccessibleClass: instance of this type is always passed by
// reference.
type LinkButtonAccessibleClass struct {
	*linkButtonAccessibleClass
}

// linkButtonAccessibleClass is the struct that's finalized.
type linkButtonAccessibleClass struct {
	native *C.GtkLinkButtonAccessibleClass
}

func (l *LinkButtonAccessibleClass) ParentClass() *ButtonAccessibleClass {
	valptr := &l.native.parent_class
	var _v *ButtonAccessibleClass // out
	_v = (*ButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LinkButtonClass contains only private data.
//
// An instance of this type is always passed by reference.
type LinkButtonClass struct {
	*linkButtonClass
}

// linkButtonClass is the struct that's finalized.
type linkButtonClass struct {
	native *C.GtkLinkButtonClass
}

// ListBoxAccessibleClass: instance of this type is always passed by reference.
type ListBoxAccessibleClass struct {
	*listBoxAccessibleClass
}

// listBoxAccessibleClass is the struct that's finalized.
type listBoxAccessibleClass struct {
	native *C.GtkListBoxAccessibleClass
}

func (l *ListBoxAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &l.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ListBoxClass: instance of this type is always passed by reference.
type ListBoxClass struct {
	*listBoxClass
}

// listBoxClass is the struct that's finalized.
type listBoxClass struct {
	native *C.GtkListBoxClass
}

// ParentClass: parent class.
func (l *ListBoxClass) ParentClass() *ContainerClass {
	valptr := &l.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ListBoxRowAccessibleClass: instance of this type is always passed by
// reference.
type ListBoxRowAccessibleClass struct {
	*listBoxRowAccessibleClass
}

// listBoxRowAccessibleClass is the struct that's finalized.
type listBoxRowAccessibleClass struct {
	native *C.GtkListBoxRowAccessibleClass
}

func (l *ListBoxRowAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &l.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ListBoxRowClass: instance of this type is always passed by reference.
type ListBoxRowClass struct {
	*listBoxRowClass
}

// listBoxRowClass is the struct that's finalized.
type listBoxRowClass struct {
	native *C.GtkListBoxRowClass
}

// ParentClass: parent class.
func (l *ListBoxRowClass) ParentClass() *BinClass {
	valptr := &l.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ListStoreClass: instance of this type is always passed by reference.
type ListStoreClass struct {
	*listStoreClass
}

// listStoreClass is the struct that's finalized.
type listStoreClass struct {
	native *C.GtkListStoreClass
}

// LockButtonAccessibleClass: instance of this type is always passed by
// reference.
type LockButtonAccessibleClass struct {
	*lockButtonAccessibleClass
}

// lockButtonAccessibleClass is the struct that's finalized.
type lockButtonAccessibleClass struct {
	native *C.GtkLockButtonAccessibleClass
}

func (l *LockButtonAccessibleClass) ParentClass() *ButtonAccessibleClass {
	valptr := &l.native.parent_class
	var _v *ButtonAccessibleClass // out
	_v = (*ButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// LockButtonClass: instance of this type is always passed by reference.
type LockButtonClass struct {
	*lockButtonClass
}

// lockButtonClass is the struct that's finalized.
type lockButtonClass struct {
	native *C.GtkLockButtonClass
}

// ParentClass: parent class.
func (l *LockButtonClass) ParentClass() *ButtonClass {
	valptr := &l.native.parent_class
	var _v *ButtonClass // out
	_v = (*ButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuAccessibleClass: instance of this type is always passed by reference.
type MenuAccessibleClass struct {
	*menuAccessibleClass
}

// menuAccessibleClass is the struct that's finalized.
type menuAccessibleClass struct {
	native *C.GtkMenuAccessibleClass
}

func (m *MenuAccessibleClass) ParentClass() *MenuShellAccessibleClass {
	valptr := &m.native.parent_class
	var _v *MenuShellAccessibleClass // out
	_v = (*MenuShellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuBarClass: instance of this type is always passed by reference.
type MenuBarClass struct {
	*menuBarClass
}

// menuBarClass is the struct that's finalized.
type menuBarClass struct {
	native *C.GtkMenuBarClass
}

func (m *MenuBarClass) ParentClass() *MenuShellClass {
	valptr := &m.native.parent_class
	var _v *MenuShellClass // out
	_v = (*MenuShellClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuButtonAccessibleClass: instance of this type is always passed by
// reference.
type MenuButtonAccessibleClass struct {
	*menuButtonAccessibleClass
}

// menuButtonAccessibleClass is the struct that's finalized.
type menuButtonAccessibleClass struct {
	native *C.GtkMenuButtonAccessibleClass
}

func (m *MenuButtonAccessibleClass) ParentClass() *ToggleButtonAccessibleClass {
	valptr := &m.native.parent_class
	var _v *ToggleButtonAccessibleClass // out
	_v = (*ToggleButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuButtonClass: instance of this type is always passed by reference.
type MenuButtonClass struct {
	*menuButtonClass
}

// menuButtonClass is the struct that's finalized.
type menuButtonClass struct {
	native *C.GtkMenuButtonClass
}

func (m *MenuButtonClass) ParentClass() *ToggleButtonClass {
	valptr := &m.native.parent_class
	var _v *ToggleButtonClass // out
	_v = (*ToggleButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuClass: instance of this type is always passed by reference.
type MenuClass struct {
	*menuClass
}

// menuClass is the struct that's finalized.
type menuClass struct {
	native *C.GtkMenuClass
}

func (m *MenuClass) ParentClass() *MenuShellClass {
	valptr := &m.native.parent_class
	var _v *MenuShellClass // out
	_v = (*MenuShellClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuItemAccessibleClass: instance of this type is always passed by reference.
type MenuItemAccessibleClass struct {
	*menuItemAccessibleClass
}

// menuItemAccessibleClass is the struct that's finalized.
type menuItemAccessibleClass struct {
	native *C.GtkMenuItemAccessibleClass
}

func (m *MenuItemAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &m.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuItemClass: instance of this type is always passed by reference.
type MenuItemClass struct {
	*menuItemClass
}

// menuItemClass is the struct that's finalized.
type menuItemClass struct {
	native *C.GtkMenuItemClass
}

// ParentClass: parent class.
func (m *MenuItemClass) ParentClass() *BinClass {
	valptr := &m.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuShellAccessibleClass: instance of this type is always passed by
// reference.
type MenuShellAccessibleClass struct {
	*menuShellAccessibleClass
}

// menuShellAccessibleClass is the struct that's finalized.
type menuShellAccessibleClass struct {
	native *C.GtkMenuShellAccessibleClass
}

func (m *MenuShellAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &m.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuShellClass: instance of this type is always passed by reference.
type MenuShellClass struct {
	*menuShellClass
}

// menuShellClass is the struct that's finalized.
type menuShellClass struct {
	native *C.GtkMenuShellClass
}

func (m *MenuShellClass) ParentClass() *ContainerClass {
	valptr := &m.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MenuToolButtonClass: instance of this type is always passed by reference.
type MenuToolButtonClass struct {
	*menuToolButtonClass
}

// menuToolButtonClass is the struct that's finalized.
type menuToolButtonClass struct {
	native *C.GtkMenuToolButtonClass
}

// ParentClass: parent class.
func (m *MenuToolButtonClass) ParentClass() *ToolButtonClass {
	valptr := &m.native.parent_class
	var _v *ToolButtonClass // out
	_v = (*ToolButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MessageDialogClass: instance of this type is always passed by reference.
type MessageDialogClass struct {
	*messageDialogClass
}

// messageDialogClass is the struct that's finalized.
type messageDialogClass struct {
	native *C.GtkMessageDialogClass
}

func (m *MessageDialogClass) ParentClass() *DialogClass {
	valptr := &m.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MiscClass: instance of this type is always passed by reference.
type MiscClass struct {
	*miscClass
}

// miscClass is the struct that's finalized.
type miscClass struct {
	native *C.GtkMiscClass
}

func (m *MiscClass) ParentClass() *WidgetClass {
	valptr := &m.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// MountOperationClass: instance of this type is always passed by reference.
type MountOperationClass struct {
	*mountOperationClass
}

// mountOperationClass is the struct that's finalized.
type mountOperationClass struct {
	native *C.GtkMountOperationClass
}

// ParentClass: parent class.
func (m *MountOperationClass) ParentClass() *gio.MountOperationClass {
	valptr := &m.native.parent_class
	var _v *gio.MountOperationClass // out
	_v = (*gio.MountOperationClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// NativeDialogClass: instance of this type is always passed by reference.
type NativeDialogClass struct {
	*nativeDialogClass
}

// nativeDialogClass is the struct that's finalized.
type nativeDialogClass struct {
	native *C.GtkNativeDialogClass
}

// NotebookAccessibleClass: instance of this type is always passed by reference.
type NotebookAccessibleClass struct {
	*notebookAccessibleClass
}

// notebookAccessibleClass is the struct that's finalized.
type notebookAccessibleClass struct {
	native *C.GtkNotebookAccessibleClass
}

func (n *NotebookAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &n.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// NotebookClass: instance of this type is always passed by reference.
type NotebookClass struct {
	*notebookClass
}

// notebookClass is the struct that's finalized.
type notebookClass struct {
	native *C.GtkNotebookClass
}

func (n *NotebookClass) ParentClass() *ContainerClass {
	valptr := &n.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// NotebookPageAccessibleClass: instance of this type is always passed by
// reference.
type NotebookPageAccessibleClass struct {
	*notebookPageAccessibleClass
}

// notebookPageAccessibleClass is the struct that's finalized.
type notebookPageAccessibleClass struct {
	native *C.GtkNotebookPageAccessibleClass
}

func (n *NotebookPageAccessibleClass) ParentClass() *atk.ObjectClass {
	valptr := &n.native.parent_class
	var _v *atk.ObjectClass // out
	_v = (*atk.ObjectClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// NumerableIconClass: instance of this type is always passed by reference.
type NumerableIconClass struct {
	*numerableIconClass
}

// numerableIconClass is the struct that's finalized.
type numerableIconClass struct {
	native *C.GtkNumerableIconClass
}

func (n *NumerableIconClass) ParentClass() *gio.EmblemedIconClass {
	valptr := &n.native.parent_class
	var _v *gio.EmblemedIconClass // out
	_v = (*gio.EmblemedIconClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (n *NumerableIconClass) Padding() [16]unsafe.Pointer {
	valptr := &n.native.padding
	var _v [16]unsafe.Pointer // out
	{
		src := &*valptr
		for i := 0; i < 16; i++ {
			_v[i] = (unsafe.Pointer)(unsafe.Pointer(src[i]))
		}
	}
	return _v
}

// OffscreenWindowClass: instance of this type is always passed by reference.
type OffscreenWindowClass struct {
	*offscreenWindowClass
}

// offscreenWindowClass is the struct that's finalized.
type offscreenWindowClass struct {
	native *C.GtkOffscreenWindowClass
}

// ParentClass: parent class.
func (o *OffscreenWindowClass) ParentClass() *WindowClass {
	valptr := &o.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// OrientableIface: instance of this type is always passed by reference.
type OrientableIface struct {
	*orientableIface
}

// orientableIface is the struct that's finalized.
type orientableIface struct {
	native *C.GtkOrientableIface
}

// OverlayClass: instance of this type is always passed by reference.
type OverlayClass struct {
	*overlayClass
}

// overlayClass is the struct that's finalized.
type overlayClass struct {
	native *C.GtkOverlayClass
}

// ParentClass: parent class.
func (o *OverlayClass) ParentClass() *BinClass {
	valptr := &o.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PadActionEntry: struct defining a pad action entry.
//
// An instance of this type is always passed by reference.
type PadActionEntry struct {
	*padActionEntry
}

// padActionEntry is the struct that's finalized.
type padActionEntry struct {
	native *C.GtkPadActionEntry
}

// Type: type of pad feature that will trigger this action entry.
func (p *PadActionEntry) Type() PadActionType {
	valptr := &p.native._type
	var _v PadActionType // out
	_v = PadActionType(*valptr)
	return _v
}

// Index: 0-indexed button/ring/strip number that will trigger this action
// entry.
func (p *PadActionEntry) Index() int {
	valptr := &p.native.index
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Mode: mode that will trigger this action entry, or -1 for all modes.
func (p *PadActionEntry) Mode() int {
	valptr := &p.native.mode
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Label: human readable description of this action entry, this string should be
// deemed user-visible.
func (p *PadActionEntry) Label() string {
	valptr := &p.native.label
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// ActionName: action name that will be activated in the Group.
func (p *PadActionEntry) ActionName() string {
	valptr := &p.native.action_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Index: 0-indexed button/ring/strip number that will trigger this action
// entry.
func (p *PadActionEntry) SetIndex(index int) {
	valptr := &p.native.index
	*valptr = C.gint(index)
}

// Mode: mode that will trigger this action entry, or -1 for all modes.
func (p *PadActionEntry) SetMode(mode int) {
	valptr := &p.native.mode
	*valptr = C.gint(mode)
}

// PageRange: see also gtk_print_settings_set_page_ranges().
//
// An instance of this type is always passed by reference.
type PageRange struct {
	*pageRange
}

// pageRange is the struct that's finalized.
type pageRange struct {
	native *C.GtkPageRange
}

// NewPageRange creates a new PageRange instance from the given
// fields. Beware that this function allocates on the Go heap; be careful
// when using it!
func NewPageRange(start, end int) PageRange {
	var f0 C.gint // out
	f0 = C.gint(start)
	var f1 C.gint // out
	f1 = C.gint(end)

	v := C.GtkPageRange{
		start: f0,
		end:   f1,
	}

	return *(*PageRange)(gextras.NewStructNative(unsafe.Pointer(&v)))
}

// Start: start of page range.
func (p *PageRange) Start() int {
	valptr := &p.native.start
	var _v int // out
	_v = int(*valptr)
	return _v
}

// End: end of page range.
func (p *PageRange) End() int {
	valptr := &p.native.end
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Start: start of page range.
func (p *PageRange) SetStart(start int) {
	valptr := &p.native.start
	*valptr = C.gint(start)
}

// End: end of page range.
func (p *PageRange) SetEnd(end int) {
	valptr := &p.native.end
	*valptr = C.gint(end)
}

// PanedAccessibleClass: instance of this type is always passed by reference.
type PanedAccessibleClass struct {
	*panedAccessibleClass
}

// panedAccessibleClass is the struct that's finalized.
type panedAccessibleClass struct {
	native *C.GtkPanedAccessibleClass
}

func (p *PanedAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &p.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PanedClass: instance of this type is always passed by reference.
type PanedClass struct {
	*panedClass
}

// panedClass is the struct that's finalized.
type panedClass struct {
	native *C.GtkPanedClass
}

func (p *PanedClass) ParentClass() *ContainerClass {
	valptr := &p.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PaperSize handles paper sizes. It uses the standard called
// PWG 5101.1-2002 PWG: Standard for Media Standardized Names
// (http://www.pwg.org/standards.html) to name the paper sizes (and to get the
// data for the page sizes). In addition to standard paper sizes, GtkPaperSize
// allows to construct custom paper sizes with arbitrary dimensions.
//
// The PaperSize object stores not only the dimensions (width and
// height) of a paper size and its name, it also provides default [print
// margins][print-margins].
//
// Printing support has been added in GTK+ 2.10.
//
// An instance of this type is always passed by reference.
type PaperSize struct {
	*paperSize
}

// paperSize is the struct that's finalized.
type paperSize struct {
	native *C.GtkPaperSize
}

func marshalPaperSize(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &PaperSize{&paperSize{(*C.GtkPaperSize)(b)}}, nil
}

// NewPaperSize constructs a struct PaperSize.
func NewPaperSize(name string) *PaperSize {
	var _arg1 *C.gchar        // out
	var _cret *C.GtkPaperSize // in

	if name != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_paper_size_new(_arg1)
	runtime.KeepAlive(name)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// NewPaperSizeCustom constructs a struct PaperSize.
func NewPaperSizeCustom(name string, displayName string, width float64, height float64, unit Unit) *PaperSize {
	var _arg1 *C.gchar        // out
	var _arg2 *C.gchar        // out
	var _arg3 C.gdouble       // out
	var _arg4 C.gdouble       // out
	var _arg5 C.GtkUnit       // out
	var _cret *C.GtkPaperSize // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(displayName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gdouble(width)
	_arg4 = C.gdouble(height)
	_arg5 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_new_custom(_arg1, _arg2, _arg3, _arg4, _arg5)
	runtime.KeepAlive(name)
	runtime.KeepAlive(displayName)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(unit)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// NewPaperSizeFromGVariant constructs a struct PaperSize.
func NewPaperSizeFromGVariant(variant *glib.Variant) *PaperSize {
	var _arg1 *C.GVariant     // out
	var _cret *C.GtkPaperSize // in

	_arg1 = (*C.GVariant)(gextras.StructNative(unsafe.Pointer(variant)))

	_cret = C.gtk_paper_size_new_from_gvariant(_arg1)
	runtime.KeepAlive(variant)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// NewPaperSizeFromIPP constructs a struct PaperSize.
func NewPaperSizeFromIPP(ippName string, width float64, height float64) *PaperSize {
	var _arg1 *C.gchar        // out
	var _arg2 C.gdouble       // out
	var _arg3 C.gdouble       // out
	var _cret *C.GtkPaperSize // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(ippName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gdouble(width)
	_arg3 = C.gdouble(height)

	_cret = C.gtk_paper_size_new_from_ipp(_arg1, _arg2, _arg3)
	runtime.KeepAlive(ippName)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// NewPaperSizeFromKeyFile constructs a struct PaperSize.
func NewPaperSizeFromKeyFile(keyFile *glib.KeyFile, groupName string) (*PaperSize, error) {
	var _arg1 *C.GKeyFile     // out
	var _arg2 *C.gchar        // out
	var _cret *C.GtkPaperSize // in
	var _cerr *C.GError       // in

	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	if groupName != "" {
		_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	_cret = C.gtk_paper_size_new_from_key_file(_arg1, _arg2, &_cerr)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)

	var _paperSize *PaperSize // out
	var _goerr error          // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _paperSize, _goerr
}

// NewPaperSizeFromPPD constructs a struct PaperSize.
func NewPaperSizeFromPPD(ppdName string, ppdDisplayName string, width float64, height float64) *PaperSize {
	var _arg1 *C.gchar        // out
	var _arg2 *C.gchar        // out
	var _arg3 C.gdouble       // out
	var _arg4 C.gdouble       // out
	var _cret *C.GtkPaperSize // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(ppdName)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(ppdDisplayName)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.gdouble(width)
	_arg4 = C.gdouble(height)

	_cret = C.gtk_paper_size_new_from_ppd(_arg1, _arg2, _arg3, _arg4)
	runtime.KeepAlive(ppdName)
	runtime.KeepAlive(ppdDisplayName)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// Copy copies an existing PaperSize.
//
// The function returns the following values:
//
//   - paperSize: copy of other.
func (other *PaperSize) Copy() *PaperSize {
	var _arg0 *C.GtkPaperSize // out
	var _cret *C.GtkPaperSize // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(other)))

	_cret = C.gtk_paper_size_copy(_arg0)
	runtime.KeepAlive(other)

	var _paperSize *PaperSize // out

	_paperSize = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_paperSize)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
		},
	)

	return _paperSize
}

// DefaultBottomMargin gets the default bottom margin for the PaperSize.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: default bottom margin.
func (size *PaperSize) DefaultBottomMargin(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_default_bottom_margin(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DefaultLeftMargin gets the default left margin for the PaperSize.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: default left margin.
func (size *PaperSize) DefaultLeftMargin(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_default_left_margin(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DefaultRightMargin gets the default right margin for the PaperSize.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: default right margin.
func (size *PaperSize) DefaultRightMargin(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_default_right_margin(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DefaultTopMargin gets the default top margin for the PaperSize.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: default top margin.
func (size *PaperSize) DefaultTopMargin(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_default_top_margin(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// DisplayName gets the human-readable name of the PaperSize.
//
// The function returns the following values:
//
//   - utf8: human-readable name of size.
func (size *PaperSize) DisplayName() string {
	var _arg0 *C.GtkPaperSize // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	_cret = C.gtk_paper_size_get_display_name(_arg0)
	runtime.KeepAlive(size)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Height gets the paper height of the PaperSize, in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: paper height.
func (size *PaperSize) Height(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_height(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// Name gets the name of the PaperSize.
//
// The function returns the following values:
//
//   - utf8: name of size.
func (size *PaperSize) Name() string {
	var _arg0 *C.GtkPaperSize // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	_cret = C.gtk_paper_size_get_name(_arg0)
	runtime.KeepAlive(size)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PPDName gets the PPD name of the PaperSize, which may be NULL.
//
// The function returns the following values:
//
//   - utf8: PPD name of size.
func (size *PaperSize) PPDName() string {
	var _arg0 *C.GtkPaperSize // out
	var _cret *C.gchar        // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	_cret = C.gtk_paper_size_get_ppd_name(_arg0)
	runtime.KeepAlive(size)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// Width gets the paper width of the PaperSize, in units of unit.
//
// The function takes the following parameters:
//
//   - unit for the return value, not GTK_UNIT_NONE.
//
// The function returns the following values:
//
//   - gdouble: paper width.
func (size *PaperSize) Width(unit Unit) float64 {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.GtkUnit       // out
	var _cret C.gdouble       // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.GtkUnit(unit)

	_cret = C.gtk_paper_size_get_width(_arg0, _arg1)
	runtime.KeepAlive(size)
	runtime.KeepAlive(unit)

	var _gdouble float64 // out

	_gdouble = float64(_cret)

	return _gdouble
}

// IsCustom returns TRUE if size is not a standard paper size.
//
// The function returns the following values:
//
//   - ok: whether size is a custom paper size.
func (size *PaperSize) IsCustom() bool {
	var _arg0 *C.GtkPaperSize // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	_cret = C.gtk_paper_size_is_custom(_arg0)
	runtime.KeepAlive(size)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsEqual compares two PaperSize objects.
//
// The function takes the following parameters:
//
//   - size2: another PaperSize object.
//
// The function returns the following values:
//
//   - ok: TRUE, if size1 and size2 represent the same paper size.
func (size1 *PaperSize) IsEqual(size2 *PaperSize) bool {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 *C.GtkPaperSize // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size1)))
	_arg1 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size2)))

	_cret = C.gtk_paper_size_is_equal(_arg0, _arg1)
	runtime.KeepAlive(size1)
	runtime.KeepAlive(size2)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsIPP returns TRUE if size is an IPP standard paper size.
//
// The function returns the following values:
//
//   - ok: whether size is not an IPP custom paper size.
func (size *PaperSize) IsIPP() bool {
	var _arg0 *C.GtkPaperSize // out
	var _cret C.gboolean      // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))

	_cret = C.gtk_paper_size_is_ipp(_arg0)
	runtime.KeepAlive(size)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetSize changes the dimensions of a size to width x height.
//
// The function takes the following parameters:
//
//   - width: new width in units of unit.
//   - height: new height in units of unit.
//   - unit for width and height.
func (size *PaperSize) SetSize(width float64, height float64, unit Unit) {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 C.gdouble       // out
	var _arg2 C.gdouble       // out
	var _arg3 C.GtkUnit       // out

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = C.gdouble(width)
	_arg2 = C.gdouble(height)
	_arg3 = C.GtkUnit(unit)

	C.gtk_paper_size_set_size(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(size)
	runtime.KeepAlive(width)
	runtime.KeepAlive(height)
	runtime.KeepAlive(unit)
}

// ToGVariant: serialize a paper size to an a{sv} variant.
//
// The function returns the following values:
//
//   - variant: new, floating, #GVariant.
func (paperSize *PaperSize) ToGVariant() *glib.Variant {
	var _arg0 *C.GtkPaperSize // out
	var _cret *C.GVariant     // in

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(paperSize)))

	_cret = C.gtk_paper_size_to_gvariant(_arg0)
	runtime.KeepAlive(paperSize)

	var _variant *glib.Variant // out

	_variant = (*glib.Variant)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.g_variant_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_variant)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.g_variant_unref((*C.GVariant)(intern.C))
		},
	)

	return _variant
}

// ToKeyFile: this function adds the paper size from size to key_file.
//
// The function takes the following parameters:
//
//   - keyFile to save the paper size to.
//   - groupName: group to add the settings to in key_file.
func (size *PaperSize) ToKeyFile(keyFile *glib.KeyFile, groupName string) {
	var _arg0 *C.GtkPaperSize // out
	var _arg1 *C.GKeyFile     // out
	var _arg2 *C.gchar        // out

	_arg0 = (*C.GtkPaperSize)(gextras.StructNative(unsafe.Pointer(size)))
	_arg1 = (*C.GKeyFile)(gextras.StructNative(unsafe.Pointer(keyFile)))
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_paper_size_to_key_file(_arg0, _arg1, _arg2)
	runtime.KeepAlive(size)
	runtime.KeepAlive(keyFile)
	runtime.KeepAlive(groupName)
}

// PaperSizeGetDefault returns the name of the default paper size, which depends
// on the current locale.
//
// The function returns the following values:
//
//   - utf8: name of the default paper size. The string is owned by GTK+ and
//     should not be modified.
func PaperSizeGetDefault() string {
	var _cret *C.gchar // in

	_cret = C.gtk_paper_size_get_default()

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PaperSizeGetPaperSizes creates a list of known paper sizes.
//
// The function takes the following parameters:
//
//   - includeCustom: whether to include custom paper sizes as defined in the
//     page setup dialog.
//
// The function returns the following values:
//
//   - list: newly allocated list of newly allocated PaperSize objects.
func PaperSizeGetPaperSizes(includeCustom bool) []*PaperSize {
	var _arg1 C.gboolean // out
	var _cret *C.GList   // in

	if includeCustom {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_paper_size_get_paper_sizes(_arg1)
	runtime.KeepAlive(includeCustom)

	var _list []*PaperSize // out

	_list = make([]*PaperSize, 0, gextras.ListSize(unsafe.Pointer(_cret)))
	gextras.MoveList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkPaperSize)(v)
		var dst *PaperSize // out
		dst = (*PaperSize)(gextras.NewStructNative(unsafe.Pointer(src)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(dst)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_paper_size_free((*C.GtkPaperSize)(intern.C))
			},
		)
		_list = append(_list, dst)
	})

	return _list
}

// PlugAccessibleClass: instance of this type is always passed by reference.
type PlugAccessibleClass struct {
	*plugAccessibleClass
}

// plugAccessibleClass is the struct that's finalized.
type plugAccessibleClass struct {
	native *C.GtkPlugAccessibleClass
}

func (p *PlugAccessibleClass) ParentClass() *WindowAccessibleClass {
	valptr := &p.native.parent_class
	var _v *WindowAccessibleClass // out
	_v = (*WindowAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PlugClass: instance of this type is always passed by reference.
type PlugClass struct {
	*plugClass
}

// plugClass is the struct that's finalized.
type plugClass struct {
	native *C.GtkPlugClass
}

func (p *PlugClass) ParentClass() *WindowClass {
	valptr := &p.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PopoverAccessibleClass: instance of this type is always passed by reference.
type PopoverAccessibleClass struct {
	*popoverAccessibleClass
}

// popoverAccessibleClass is the struct that's finalized.
type popoverAccessibleClass struct {
	native *C.GtkPopoverAccessibleClass
}

func (p *PopoverAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &p.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PopoverClass: instance of this type is always passed by reference.
type PopoverClass struct {
	*popoverClass
}

// popoverClass is the struct that's finalized.
type popoverClass struct {
	native *C.GtkPopoverClass
}

func (p *PopoverClass) ParentClass() *BinClass {
	valptr := &p.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PopoverMenuClass: instance of this type is always passed by reference.
type PopoverMenuClass struct {
	*popoverMenuClass
}

// popoverMenuClass is the struct that's finalized.
type popoverMenuClass struct {
	native *C.GtkPopoverMenuClass
}

func (p *PopoverMenuClass) ParentClass() *PopoverClass {
	valptr := &p.native.parent_class
	var _v *PopoverClass // out
	_v = (*PopoverClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// PrintOperationClass: instance of this type is always passed by reference.
type PrintOperationClass struct {
	*printOperationClass
}

// printOperationClass is the struct that's finalized.
type printOperationClass struct {
	native *C.GtkPrintOperationClass
}

// PrintOperationPreviewIface: instance of this type is always passed by
// reference.
type PrintOperationPreviewIface struct {
	*printOperationPreviewIface
}

// printOperationPreviewIface is the struct that's finalized.
type printOperationPreviewIface struct {
	native *C.GtkPrintOperationPreviewIface
}

// ProgressBarAccessibleClass: instance of this type is always passed by
// reference.
type ProgressBarAccessibleClass struct {
	*progressBarAccessibleClass
}

// progressBarAccessibleClass is the struct that's finalized.
type progressBarAccessibleClass struct {
	native *C.GtkProgressBarAccessibleClass
}

func (p *ProgressBarAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &p.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ProgressBarClass: instance of this type is always passed by reference.
type ProgressBarClass struct {
	*progressBarClass
}

// progressBarClass is the struct that's finalized.
type progressBarClass struct {
	native *C.GtkProgressBarClass
}

func (p *ProgressBarClass) ParentClass() *WidgetClass {
	valptr := &p.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioActionClass: instance of this type is always passed by reference.
type RadioActionClass struct {
	*radioActionClass
}

// radioActionClass is the struct that's finalized.
type radioActionClass struct {
	native *C.GtkRadioActionClass
}

func (r *RadioActionClass) ParentClass() *ToggleActionClass {
	valptr := &r.native.parent_class
	var _v *ToggleActionClass // out
	_v = (*ToggleActionClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioActionEntry structs are used with gtk_action_group_add_radio_actions()
// to construct groups of radio actions.
//
// Deprecated: since version 3.10.
//
// An instance of this type is always passed by reference.
type RadioActionEntry struct {
	*radioActionEntry
}

// radioActionEntry is the struct that's finalized.
type radioActionEntry struct {
	native *C.GtkRadioActionEntry
}

// Name: name of the action.
func (r *RadioActionEntry) Name() string {
	valptr := &r.native.name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// StockID: stock id for the action, or the name of an icon from the icon theme.
func (r *RadioActionEntry) StockID() string {
	valptr := &r.native.stock_id
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Label: label for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain().
func (r *RadioActionEntry) Label() string {
	valptr := &r.native.label
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Accelerator: accelerator for the action, in the format understood by
// gtk_accelerator_parse().
func (r *RadioActionEntry) Accelerator() string {
	valptr := &r.native.accelerator
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Tooltip: tooltip for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain().
func (r *RadioActionEntry) Tooltip() string {
	valptr := &r.native.tooltip
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Value: value to set on the radio action. See
// gtk_radio_action_get_current_value().
func (r *RadioActionEntry) Value() int {
	valptr := &r.native.value
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Value: value to set on the radio action. See
// gtk_radio_action_get_current_value().
func (r *RadioActionEntry) SetValue(value int) {
	valptr := &r.native.value
	*valptr = C.gint(value)
}

// RadioButtonAccessibleClass: instance of this type is always passed by
// reference.
type RadioButtonAccessibleClass struct {
	*radioButtonAccessibleClass
}

// radioButtonAccessibleClass is the struct that's finalized.
type radioButtonAccessibleClass struct {
	native *C.GtkRadioButtonAccessibleClass
}

func (r *RadioButtonAccessibleClass) ParentClass() *ToggleButtonAccessibleClass {
	valptr := &r.native.parent_class
	var _v *ToggleButtonAccessibleClass // out
	_v = (*ToggleButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioButtonClass: instance of this type is always passed by reference.
type RadioButtonClass struct {
	*radioButtonClass
}

// radioButtonClass is the struct that's finalized.
type radioButtonClass struct {
	native *C.GtkRadioButtonClass
}

func (r *RadioButtonClass) ParentClass() *CheckButtonClass {
	valptr := &r.native.parent_class
	var _v *CheckButtonClass // out
	_v = (*CheckButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioMenuItemAccessibleClass: instance of this type is always passed by
// reference.
type RadioMenuItemAccessibleClass struct {
	*radioMenuItemAccessibleClass
}

// radioMenuItemAccessibleClass is the struct that's finalized.
type radioMenuItemAccessibleClass struct {
	native *C.GtkRadioMenuItemAccessibleClass
}

func (r *RadioMenuItemAccessibleClass) ParentClass() *CheckMenuItemAccessibleClass {
	valptr := &r.native.parent_class
	var _v *CheckMenuItemAccessibleClass // out
	_v = (*CheckMenuItemAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioMenuItemClass: instance of this type is always passed by reference.
type RadioMenuItemClass struct {
	*radioMenuItemClass
}

// radioMenuItemClass is the struct that's finalized.
type radioMenuItemClass struct {
	native *C.GtkRadioMenuItemClass
}

func (r *RadioMenuItemClass) ParentClass() *CheckMenuItemClass {
	valptr := &r.native.parent_class
	var _v *CheckMenuItemClass // out
	_v = (*CheckMenuItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RadioToolButtonClass: instance of this type is always passed by reference.
type RadioToolButtonClass struct {
	*radioToolButtonClass
}

// radioToolButtonClass is the struct that's finalized.
type radioToolButtonClass struct {
	native *C.GtkRadioToolButtonClass
}

func (r *RadioToolButtonClass) ParentClass() *ToggleToolButtonClass {
	valptr := &r.native.parent_class
	var _v *ToggleToolButtonClass // out
	_v = (*ToggleToolButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RangeAccessibleClass: instance of this type is always passed by reference.
type RangeAccessibleClass struct {
	*rangeAccessibleClass
}

// rangeAccessibleClass is the struct that's finalized.
type rangeAccessibleClass struct {
	native *C.GtkRangeAccessibleClass
}

func (r *RangeAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &r.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RangeClass: instance of this type is always passed by reference.
type RangeClass struct {
	*rangeClass
}

// rangeClass is the struct that's finalized.
type rangeClass struct {
	native *C.GtkRangeClass
}

func (r *RangeClass) ParentClass() *WidgetClass {
	valptr := &r.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (r *RangeClass) SliderDetail() string {
	valptr := &r.native.slider_detail
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

func (r *RangeClass) StepperDetail() string {
	valptr := &r.native.stepper_detail
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// RCProperty: deprecated
//
// An instance of this type is always passed by reference.
type RCProperty struct {
	*rcProperty
}

// rcProperty is the struct that's finalized.
type rcProperty struct {
	native *C.GtkRcProperty
}

// TypeName: quark-ified type identifier.
func (r *RCProperty) TypeName() glib.Quark {
	valptr := &r.native.type_name
	var _v glib.Quark // out
	_v = glib.Quark(*valptr)
	return _v
}

// PropertyName: quark-ified property identifier like “GtkScrollbar::spacing”.
func (r *RCProperty) PropertyName() glib.Quark {
	valptr := &r.native.property_name
	var _v glib.Quark // out
	_v = glib.Quark(*valptr)
	return _v
}

// Origin: field similar to one found in SettingsValue.
func (r *RCProperty) Origin() string {
	valptr := &r.native.origin
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// RCStyleClass: instance of this type is always passed by reference.
type RCStyleClass struct {
	*rcStyleClass
}

// rcStyleClass is the struct that's finalized.
type rcStyleClass struct {
	native *C.GtkRcStyleClass
}

// RecentActionClass: instance of this type is always passed by reference.
type RecentActionClass struct {
	*recentActionClass
}

// recentActionClass is the struct that's finalized.
type recentActionClass struct {
	native *C.GtkRecentActionClass
}

func (r *RecentActionClass) ParentClass() *ActionClass {
	valptr := &r.native.parent_class
	var _v *ActionClass // out
	_v = (*ActionClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RecentChooserDialogClass: instance of this type is always passed by
// reference.
type RecentChooserDialogClass struct {
	*recentChooserDialogClass
}

// recentChooserDialogClass is the struct that's finalized.
type recentChooserDialogClass struct {
	native *C.GtkRecentChooserDialogClass
}

func (r *RecentChooserDialogClass) ParentClass() *DialogClass {
	valptr := &r.native.parent_class
	var _v *DialogClass // out
	_v = (*DialogClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RecentChooserIface: instance of this type is always passed by reference.
type RecentChooserIface struct {
	*recentChooserIface
}

// recentChooserIface is the struct that's finalized.
type recentChooserIface struct {
	native *C.GtkRecentChooserIface
}

// RecentChooserMenuClass: instance of this type is always passed by reference.
type RecentChooserMenuClass struct {
	*recentChooserMenuClass
}

// recentChooserMenuClass is the struct that's finalized.
type recentChooserMenuClass struct {
	native *C.GtkRecentChooserMenuClass
}

func (r *RecentChooserMenuClass) ParentClass() *MenuClass {
	valptr := &r.native.parent_class
	var _v *MenuClass // out
	_v = (*MenuClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RecentChooserWidgetClass: instance of this type is always passed by
// reference.
type RecentChooserWidgetClass struct {
	*recentChooserWidgetClass
}

// recentChooserWidgetClass is the struct that's finalized.
type recentChooserWidgetClass struct {
	native *C.GtkRecentChooserWidgetClass
}

func (r *RecentChooserWidgetClass) ParentClass() *BoxClass {
	valptr := &r.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RecentData: meta-data to be passed to gtk_recent_manager_add_full() when
// registering a recently used resource.
//
// An instance of this type is always passed by reference.
type RecentData struct {
	*recentData
}

// recentData is the struct that's finalized.
type recentData struct {
	native *C.GtkRecentData
}

// DisplayName: UTF-8 encoded string, containing the name of the recently used
// resource to be displayed, or NULL;.
func (r *RecentData) DisplayName() string {
	valptr := &r.native.display_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Description: UTF-8 encoded string, containing a short description of the
// resource, or NULL;.
func (r *RecentData) Description() string {
	valptr := &r.native.description
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// MIMEType: MIME type of the resource;.
func (r *RecentData) MIMEType() string {
	valptr := &r.native.mime_type
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// AppName: name of the application that is registering this recently used
// resource;.
func (r *RecentData) AppName() string {
	valptr := &r.native.app_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// AppExec: command line used to launch this resource; may contain the “\f” and
// “\u” escape characters which will be expanded to the resource file path and
// URI respectively when the command line is retrieved;.
func (r *RecentData) AppExec() string {
	valptr := &r.native.app_exec
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Groups: vector of strings containing groups names;.
func (r *RecentData) Groups() []string {
	valptr := &r.native.groups
	var _v []string // out
	{
		var i int
		var z *C.gchar
		for p := *valptr; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(*valptr, i)
		_v = make([]string, i)
		for i := range src {
			_v[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}
	return _v
}

// IsPrivate: whether this resource should be displayed only by the applications
// that have registered it or not.
func (r *RecentData) IsPrivate() bool {
	valptr := &r.native.is_private
	var _v bool // out
	if *valptr != 0 {
		_v = true
	}
	return _v
}

// IsPrivate: whether this resource should be displayed only by the applications
// that have registered it or not.
func (r *RecentData) SetIsPrivate(isPrivate bool) {
	valptr := &r.native.is_private
	if isPrivate {
		*valptr = C.TRUE
	}
}

// RecentFilterInfo struct is used to pass information about the tested file to
// gtk_recent_filter_filter().
//
// An instance of this type is always passed by reference.
type RecentFilterInfo struct {
	*recentFilterInfo
}

// recentFilterInfo is the struct that's finalized.
type recentFilterInfo struct {
	native *C.GtkRecentFilterInfo
}

// Contains to indicate which fields are set.
func (r *RecentFilterInfo) Contains() RecentFilterFlags {
	valptr := &r.native.contains
	var _v RecentFilterFlags // out
	_v = RecentFilterFlags(*valptr)
	return _v
}

// URI of the file being tested.
func (r *RecentFilterInfo) URI() string {
	valptr := &r.native.uri
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// DisplayName: string that will be used to display the file in the recent
// chooser.
func (r *RecentFilterInfo) DisplayName() string {
	valptr := &r.native.display_name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// MIMEType: MIME type of the file.
func (r *RecentFilterInfo) MIMEType() string {
	valptr := &r.native.mime_type
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Applications: list of applications that have registered the file.
func (r *RecentFilterInfo) Applications() []string {
	valptr := &r.native.applications
	var _v []string // out
	{
		var i int
		var z *C.gchar
		for p := *valptr; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(*valptr, i)
		_v = make([]string, i)
		for i := range src {
			_v[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}
	return _v
}

// Groups groups to which the file belongs to.
func (r *RecentFilterInfo) Groups() []string {
	valptr := &r.native.groups
	var _v []string // out
	{
		var i int
		var z *C.gchar
		for p := *valptr; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(*valptr, i)
		_v = make([]string, i)
		for i := range src {
			_v[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
		}
	}
	return _v
}

// Age: number of days elapsed since the file has been registered.
func (r *RecentFilterInfo) Age() int {
	valptr := &r.native.age
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Age: number of days elapsed since the file has been registered.
func (r *RecentFilterInfo) SetAge(age int) {
	valptr := &r.native.age
	*valptr = C.gint(age)
}

// RecentInfo contains private data only, and should be accessed using the
// provided API.
//
// RecentInfo constains all the meta-data associated with an entry in the
// recently used files list.
//
// An instance of this type is always passed by reference.
type RecentInfo struct {
	*recentInfo
}

// recentInfo is the struct that's finalized.
type recentInfo struct {
	native *C.GtkRecentInfo
}

func marshalRecentInfo(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &RecentInfo{&recentInfo{(*C.GtkRecentInfo)(b)}}, nil
}

// CreateAppInfo creates a Info for the specified RecentInfo.
//
// The function takes the following parameters:
//
//   - appName (optional): name of the application that should be mapped to a
//     Info; if NULL is used then the default application for the MIME type is
//     used.
//
// The function returns the following values:
//
//   - appInfo (optional): newly created Info, or NULL. In case of error,
//     error will be set either with a GTK_RECENT_MANAGER_ERROR or a G_IO_ERROR.
func (info *RecentInfo) CreateAppInfo(appName string) (*gio.AppInfo, error) {
	var _arg0 *C.GtkRecentInfo // out
	var _arg1 *C.gchar         // out
	var _cret *C.GAppInfo      // in
	var _cerr *C.GError        // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))
	if appName != "" {
		_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(appName)))
		defer C.free(unsafe.Pointer(_arg1))
	}

	_cret = C.gtk_recent_info_create_app_info(_arg0, _arg1, &_cerr)
	runtime.KeepAlive(info)
	runtime.KeepAlive(appName)

	var _appInfo *gio.AppInfo // out
	var _goerr error          // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_appInfo = &gio.AppInfo{
				Object: obj,
			}
		}
	}
	if _cerr != nil {
		_goerr = gerror.Take(unsafe.Pointer(_cerr))
	}

	return _appInfo, _goerr
}

// Exists checks whether the resource pointed by info still exists. At the
// moment this check is done only on resources pointing to local files.
//
// The function returns the following values:
//
//   - ok: TRUE if the resource exists.
func (info *RecentInfo) Exists() bool {
	var _arg0 *C.GtkRecentInfo // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_exists(_arg0)
	runtime.KeepAlive(info)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Age gets the number of days elapsed since the last update of the resource
// pointed by info.
//
// The function returns the following values:
//
//   - gint: positive integer containing the number of days elapsed since the
//     time this resource was last modified.
func (info *RecentInfo) Age() int {
	var _arg0 *C.GtkRecentInfo // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_age(_arg0)
	runtime.KeepAlive(info)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Applications retrieves the list of applications that have registered this
// resource.
//
// The function returns the following values:
//
//   - utf8s: a newly allocated NULL-terminated array of strings. Use
//     g_strfreev() to free it.
func (info *RecentInfo) Applications() []string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret **C.gchar        // in
	var _arg1 C.gsize          // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_applications(_arg0, &_arg1)
	runtime.KeepAlive(info)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		src := unsafe.Slice((**C.gchar)(_cret), _arg1)
		_utf8s = make([]string, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// Description gets the (short) description of the resource.
//
// The function returns the following values:
//
//   - utf8: description of the resource. The returned string is owned by the
//     recent manager, and should not be freed.
func (info *RecentInfo) Description() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_description(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// DisplayName gets the name of the resource. If none has been defined,
// the basename of the resource is obtained.
//
// The function returns the following values:
//
//   - utf8: display name of the resource. The returned string is owned by the
//     recent manager, and should not be freed.
func (info *RecentInfo) DisplayName() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_display_name(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// GIcon retrieves the icon associated to the resource MIME type.
//
// The function returns the following values:
//
//   - icon (optional) containing the icon, or NULL. Use g_object_unref() when
//     finished using the icon.
func (info *RecentInfo) GIcon() *gio.Icon {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.GIcon         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_gicon(_arg0)
	runtime.KeepAlive(info)

	var _icon *gio.Icon // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_icon = &gio.Icon{
				Object: obj,
			}
		}
	}

	return _icon
}

// Groups returns all groups registered for the recently used item info.
// The array of returned group names will be NULL terminated, so length might
// optionally be NULL.
//
// The function returns the following values:
//
//   - utf8s: a newly allocated NULL terminated array of strings. Use
//     g_strfreev() to free it.
func (info *RecentInfo) Groups() []string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret **C.gchar        // in
	var _arg1 C.gsize          // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_groups(_arg0, &_arg1)
	runtime.KeepAlive(info)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		src := unsafe.Slice((**C.gchar)(_cret), _arg1)
		_utf8s = make([]string, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// Icon retrieves the icon of size size associated to the resource MIME type.
//
// The function takes the following parameters:
//
//   - size of the icon in pixels.
//
// The function returns the following values:
//
//   - pixbuf (optional) containing the icon, or NULL. Use g_object_unref() when
//     finished using the icon.
func (info *RecentInfo) Icon(size int) *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkRecentInfo // out
	var _arg1 C.gint           // out
	var _cret *C.GdkPixbuf     // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))
	_arg1 = C.gint(size)

	_cret = C.gtk_recent_info_get_icon(_arg0, _arg1)
	runtime.KeepAlive(info)
	runtime.KeepAlive(size)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// MIMEType gets the MIME type of the resource.
//
// The function returns the following values:
//
//   - utf8: MIME type of the resource. The returned string is owned by the
//     recent manager, and should not be freed.
func (info *RecentInfo) MIMEType() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_mime_type(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// PrivateHint gets the value of the “private” flag. Resources in the recently
// used list that have this flag set to TRUE should only be displayed by the
// applications that have registered them.
//
// The function returns the following values:
//
//   - ok: TRUE if the private flag was found, FALSE otherwise.
func (info *RecentInfo) PrivateHint() bool {
	var _arg0 *C.GtkRecentInfo // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_private_hint(_arg0)
	runtime.KeepAlive(info)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ShortName computes a valid UTF-8 string that can be used as the name of the
// item in a menu or list. For example, calling this function on an item that
// refers to “file:///foo/bar.txt” will yield “bar.txt”.
//
// The function returns the following values:
//
//   - utf8: newly-allocated string in UTF-8 encoding free it with g_free().
func (info *RecentInfo) ShortName() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_short_name(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// URI gets the URI of the resource.
//
// The function returns the following values:
//
//   - utf8: URI of the resource. The returned string is owned by the recent
//     manager, and should not be freed.
func (info *RecentInfo) URI() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_uri(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// URIDisplay gets a displayable version of the resource’s URI. If the resource
// is local, it returns a local path; if the resource is not local, it returns
// the UTF-8 encoded content of gtk_recent_info_get_uri().
//
// The function returns the following values:
//
//   - utf8 (optional): newly allocated UTF-8 string containing the resource’s
//     URI or NULL. Use g_free() when done using it.
func (info *RecentInfo) URIDisplay() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_get_uri_display(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// HasApplication checks whether an application registered this resource using
// app_name.
//
// The function takes the following parameters:
//
//   - appName: string containing an application name.
//
// The function returns the following values:
//
//   - ok: TRUE if an application with name app_name was found, FALSE otherwise.
func (info *RecentInfo) HasApplication(appName string) bool {
	var _arg0 *C.GtkRecentInfo // out
	var _arg1 *C.gchar         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(appName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_recent_info_has_application(_arg0, _arg1)
	runtime.KeepAlive(info)
	runtime.KeepAlive(appName)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// HasGroup checks whether group_name appears inside the groups registered for
// the recently used item info.
//
// The function takes the following parameters:
//
//   - groupName: name of a group.
//
// The function returns the following values:
//
//   - ok: TRUE if the group was found.
func (info *RecentInfo) HasGroup(groupName string) bool {
	var _arg0 *C.GtkRecentInfo // out
	var _arg1 *C.gchar         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(groupName)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_recent_info_has_group(_arg0, _arg1)
	runtime.KeepAlive(info)
	runtime.KeepAlive(groupName)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsLocal checks whether the resource is local or not by looking at the scheme
// of its URI.
//
// The function returns the following values:
//
//   - ok: TRUE if the resource is local.
func (info *RecentInfo) IsLocal() bool {
	var _arg0 *C.GtkRecentInfo // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_is_local(_arg0)
	runtime.KeepAlive(info)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// LastApplication gets the name of the last application that have registered
// the recently used resource represented by info.
//
// The function returns the following values:
//
//   - utf8: application name. Use g_free() to free it.
func (info *RecentInfo) LastApplication() string {
	var _arg0 *C.GtkRecentInfo // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(info)))

	_cret = C.gtk_recent_info_last_application(_arg0)
	runtime.KeepAlive(info)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Match checks whether two RecentInfo-struct point to the same resource.
//
// The function takes the following parameters:
//
//   - infoB: RecentInfo.
//
// The function returns the following values:
//
//   - ok: TRUE if both RecentInfo-struct point to the same resource, FALSE
//     otherwise.
func (infoA *RecentInfo) Match(infoB *RecentInfo) bool {
	var _arg0 *C.GtkRecentInfo // out
	var _arg1 *C.GtkRecentInfo // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(infoA)))
	_arg1 = (*C.GtkRecentInfo)(gextras.StructNative(unsafe.Pointer(infoB)))

	_cret = C.gtk_recent_info_match(_arg0, _arg1)
	runtime.KeepAlive(infoA)
	runtime.KeepAlive(infoB)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// RecentManagerClass contains only private data.
//
// An instance of this type is always passed by reference.
type RecentManagerClass struct {
	*recentManagerClass
}

// recentManagerClass is the struct that's finalized.
type recentManagerClass struct {
	native *C.GtkRecentManagerClass
}

// RendererCellAccessibleClass: instance of this type is always passed by
// reference.
type RendererCellAccessibleClass struct {
	*rendererCellAccessibleClass
}

// rendererCellAccessibleClass is the struct that's finalized.
type rendererCellAccessibleClass struct {
	native *C.GtkRendererCellAccessibleClass
}

func (r *RendererCellAccessibleClass) ParentClass() *CellAccessibleClass {
	valptr := &r.native.parent_class
	var _v *CellAccessibleClass // out
	_v = (*CellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// RequestedSize represents a request of a screen object in a given orientation.
// These are primarily used in container implementations when allocating a
// natural size for children calling. See gtk_distribute_natural_allocation().
//
// An instance of this type is always passed by reference.
type RequestedSize struct {
	*requestedSize
}

// requestedSize is the struct that's finalized.
type requestedSize struct {
	native *C.GtkRequestedSize
}

// Data: client pointer.
func (r *RequestedSize) Data() unsafe.Pointer {
	valptr := &r.native.data
	var _v unsafe.Pointer // out
	_v = (unsafe.Pointer)(unsafe.Pointer(*valptr))
	return _v
}

// MinimumSize: minimum size needed for allocation in a given orientation.
func (r *RequestedSize) MinimumSize() int {
	valptr := &r.native.minimum_size
	var _v int // out
	_v = int(*valptr)
	return _v
}

// NaturalSize: natural size for allocation in a given orientation.
func (r *RequestedSize) NaturalSize() int {
	valptr := &r.native.natural_size
	var _v int // out
	_v = int(*valptr)
	return _v
}

// MinimumSize: minimum size needed for allocation in a given orientation.
func (r *RequestedSize) SetMinimumSize(minimumSize int) {
	valptr := &r.native.minimum_size
	*valptr = C.gint(minimumSize)
}

// NaturalSize: natural size for allocation in a given orientation.
func (r *RequestedSize) SetNaturalSize(naturalSize int) {
	valptr := &r.native.natural_size
	*valptr = C.gint(naturalSize)
}

// Requisition represents the desired size of a widget. See [GtkWidget’s
// geometry management section][geometry-management] for more information.
//
// An instance of this type is always passed by reference.
type Requisition struct {
	*requisition
}

// requisition is the struct that's finalized.
type requisition struct {
	native *C.GtkRequisition
}

func marshalRequisition(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &Requisition{&requisition{(*C.GtkRequisition)(b)}}, nil
}

// NewRequisition constructs a struct Requisition.
func NewRequisition() *Requisition {
	var _cret *C.GtkRequisition // in

	_cret = C.gtk_requisition_new()

	var _requisition *Requisition // out

	_requisition = (*Requisition)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_requisition)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_requisition_free((*C.GtkRequisition)(intern.C))
		},
	)

	return _requisition
}

// Width widget’s desired width.
func (r *Requisition) Width() int {
	valptr := &r.native.width
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Height widget’s desired height.
func (r *Requisition) Height() int {
	valptr := &r.native.height
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Width widget’s desired width.
func (r *Requisition) SetWidth(width int) {
	valptr := &r.native.width
	*valptr = C.gint(width)
}

// Height widget’s desired height.
func (r *Requisition) SetHeight(height int) {
	valptr := &r.native.height
	*valptr = C.gint(height)
}

// Copy copies a Requisition.
//
// The function returns the following values:
//
//   - ret: copy of requisition.
func (requisition *Requisition) Copy() *Requisition {
	var _arg0 *C.GtkRequisition // out
	var _cret *C.GtkRequisition // in

	_arg0 = (*C.GtkRequisition)(gextras.StructNative(unsafe.Pointer(requisition)))

	_cret = C.gtk_requisition_copy(_arg0)
	runtime.KeepAlive(requisition)

	var _ret *Requisition // out

	_ret = (*Requisition)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_ret)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_requisition_free((*C.GtkRequisition)(intern.C))
		},
	)

	return _ret
}

// RevealerClass: instance of this type is always passed by reference.
type RevealerClass struct {
	*revealerClass
}

// revealerClass is the struct that's finalized.
type revealerClass struct {
	native *C.GtkRevealerClass
}

// ParentClass: parent class.
func (r *RevealerClass) ParentClass() *BinClass {
	valptr := &r.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScaleAccessibleClass: instance of this type is always passed by reference.
type ScaleAccessibleClass struct {
	*scaleAccessibleClass
}

// scaleAccessibleClass is the struct that's finalized.
type scaleAccessibleClass struct {
	native *C.GtkScaleAccessibleClass
}

func (s *ScaleAccessibleClass) ParentClass() *RangeAccessibleClass {
	valptr := &s.native.parent_class
	var _v *RangeAccessibleClass // out
	_v = (*RangeAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScaleButtonAccessibleClass: instance of this type is always passed by
// reference.
type ScaleButtonAccessibleClass struct {
	*scaleButtonAccessibleClass
}

// scaleButtonAccessibleClass is the struct that's finalized.
type scaleButtonAccessibleClass struct {
	native *C.GtkScaleButtonAccessibleClass
}

func (s *ScaleButtonAccessibleClass) ParentClass() *ButtonAccessibleClass {
	valptr := &s.native.parent_class
	var _v *ButtonAccessibleClass // out
	_v = (*ButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScaleButtonClass: instance of this type is always passed by reference.
type ScaleButtonClass struct {
	*scaleButtonClass
}

// scaleButtonClass is the struct that's finalized.
type scaleButtonClass struct {
	native *C.GtkScaleButtonClass
}

func (s *ScaleButtonClass) ParentClass() *ButtonClass {
	valptr := &s.native.parent_class
	var _v *ButtonClass // out
	_v = (*ButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScaleClass: instance of this type is always passed by reference.
type ScaleClass struct {
	*scaleClass
}

// scaleClass is the struct that's finalized.
type scaleClass struct {
	native *C.GtkScaleClass
}

func (s *ScaleClass) ParentClass() *RangeClass {
	valptr := &s.native.parent_class
	var _v *RangeClass // out
	_v = (*RangeClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScrollableInterface: instance of this type is always passed by reference.
type ScrollableInterface struct {
	*scrollableInterface
}

// scrollableInterface is the struct that's finalized.
type scrollableInterface struct {
	native *C.GtkScrollableInterface
}

// ScrollbarClass: instance of this type is always passed by reference.
type ScrollbarClass struct {
	*scrollbarClass
}

// scrollbarClass is the struct that's finalized.
type scrollbarClass struct {
	native *C.GtkScrollbarClass
}

func (s *ScrollbarClass) ParentClass() *RangeClass {
	valptr := &s.native.parent_class
	var _v *RangeClass // out
	_v = (*RangeClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScrolledWindowAccessibleClass: instance of this type is always passed by
// reference.
type ScrolledWindowAccessibleClass struct {
	*scrolledWindowAccessibleClass
}

// scrolledWindowAccessibleClass is the struct that's finalized.
type scrolledWindowAccessibleClass struct {
	native *C.GtkScrolledWindowAccessibleClass
}

func (s *ScrolledWindowAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &s.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ScrolledWindowClass: instance of this type is always passed by reference.
type ScrolledWindowClass struct {
	*scrolledWindowClass
}

// scrolledWindowClass is the struct that's finalized.
type scrolledWindowClass struct {
	native *C.GtkScrolledWindowClass
}

// ParentClass: parent class.
func (s *ScrolledWindowClass) ParentClass() *BinClass {
	valptr := &s.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (s *ScrolledWindowClass) ScrollbarSpacing() int {
	valptr := &s.native.scrollbar_spacing
	var _v int // out
	_v = int(*valptr)
	return _v
}

// SearchBarClass: instance of this type is always passed by reference.
type SearchBarClass struct {
	*searchBarClass
}

// searchBarClass is the struct that's finalized.
type searchBarClass struct {
	native *C.GtkSearchBarClass
}

// ParentClass: parent class.
func (s *SearchBarClass) ParentClass() *BinClass {
	valptr := &s.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SearchEntryClass: instance of this type is always passed by reference.
type SearchEntryClass struct {
	*searchEntryClass
}

// searchEntryClass is the struct that's finalized.
type searchEntryClass struct {
	native *C.GtkSearchEntryClass
}

func (s *SearchEntryClass) ParentClass() *EntryClass {
	valptr := &s.native.parent_class
	var _v *EntryClass // out
	_v = (*EntryClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SelectionData: instance of this type is always passed by reference.
type SelectionData struct {
	*selectionData
}

// selectionData is the struct that's finalized.
type selectionData struct {
	native *C.GtkSelectionData
}

func marshalSelectionData(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &SelectionData{&selectionData{(*C.GtkSelectionData)(b)}}, nil
}

// Copy makes a copy of a SelectionData-struct and its data.
//
// The function returns the following values:
//
//   - selectionData: pointer to a copy of data.
func (data *SelectionData) Copy() *SelectionData {
	var _arg0 *C.GtkSelectionData // out
	var _cret *C.GtkSelectionData // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(data)))

	_cret = C.gtk_selection_data_copy(_arg0)
	runtime.KeepAlive(data)

	var _selectionData *SelectionData // out

	_selectionData = (*SelectionData)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_selectionData)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_selection_data_free((*C.GtkSelectionData)(intern.C))
		},
	)

	return _selectionData
}

// Data retrieves the raw data of the selection along with its length.
//
// The function returns the following values:
//
//   - guint8s: raw data of the selection.
func (selectionData *SelectionData) Data() []byte {
	var _arg0 *C.GtkSelectionData // out
	var _cret *C.guchar           // in
	var _arg1 C.gint              // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_data_with_length(_arg0, &_arg1)
	runtime.KeepAlive(selectionData)

	var _guint8s []byte // out

	_guint8s = make([]byte, _arg1)
	copy(_guint8s, unsafe.Slice((*byte)(unsafe.Pointer(_cret)), _arg1))

	return _guint8s
}

// Display retrieves the display of the selection.
//
// The function returns the following values:
//
//   - display of the selection.
func (selectionData *SelectionData) Display() *gdk.Display {
	var _arg0 *C.GtkSelectionData // out
	var _cret *C.GdkDisplay       // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_display(_arg0)
	runtime.KeepAlive(selectionData)

	var _display *gdk.Display // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_display = &gdk.Display{
			Object: obj,
		}
	}

	return _display
}

// Format retrieves the format of the selection.
//
// The function returns the following values:
//
//   - gint: format of the selection.
func (selectionData *SelectionData) Format() int {
	var _arg0 *C.GtkSelectionData // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_format(_arg0)
	runtime.KeepAlive(selectionData)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Length retrieves the length of the raw data of the selection.
//
// The function returns the following values:
//
//   - gint: length of the data of the selection.
func (selectionData *SelectionData) Length() int {
	var _arg0 *C.GtkSelectionData // out
	var _cret C.gint              // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_length(_arg0)
	runtime.KeepAlive(selectionData)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Pixbuf gets the contents of the selection data as a Pixbuf.
//
// The function returns the following values:
//
//   - pixbuf (optional): if the selection data contained a recognized image
//     type and it could be converted to a Pixbuf, a newly allocated pixbuf is
//     returned, otherwise NULL. If the result is non-NULL it must be freed with
//     g_object_unref().
func (selectionData *SelectionData) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkSelectionData // out
	var _cret *C.GdkPixbuf        // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_pixbuf(_arg0)
	runtime.KeepAlive(selectionData)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	if _cret != nil {
		{
			obj := coreglib.AssumeOwnership(unsafe.Pointer(_cret))
			_pixbuf = &gdkpixbuf.Pixbuf{
				Object: obj,
				LoadableIcon: gio.LoadableIcon{
					Icon: gio.Icon{
						Object: obj,
					},
				},
			}
		}
	}

	return _pixbuf
}

// Text gets the contents of the selection data as a UTF-8 string.
//
// The function returns the following values:
//
//   - utf8 (optional): if the selection data contained a recognized text type
//     and it could be converted to UTF-8, a newly allocated string containing
//     the converted text, otherwise NULL. If the result is non-NULL it must be
//     freed with g_free().
func (selectionData *SelectionData) Text() string {
	var _arg0 *C.GtkSelectionData // out
	var _cret *C.guchar           // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_text(_arg0)
	runtime.KeepAlive(selectionData)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
		defer C.free(unsafe.Pointer(_cret))
	}

	return _utf8
}

// URIs gets the contents of the selection data as array of URIs.
//
// Since 3.24.37, this may involve using the FileTransfer portal to send files
// between sandboxed apps.
//
// The function returns the following values:
//
//   - utf8s: if the selection data contains a list of URIs, a newly allocated
//     NULL-terminated string array containing the URIs, otherwise NULL.
//     If the result is non-NULL it must be freed with g_strfreev().
func (selectionData *SelectionData) URIs() []string {
	var _arg0 *C.GtkSelectionData // out
	var _cret **C.gchar           // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_get_uris(_arg0)
	runtime.KeepAlive(selectionData)

	var _utf8s []string // out

	defer C.free(unsafe.Pointer(_cret))
	{
		var i int
		var z *C.gchar
		for p := _cret; *p != z; p = &unsafe.Slice(p, 2)[1] {
			i++
		}

		src := unsafe.Slice(_cret, i)
		_utf8s = make([]string, i)
		for i := range src {
			_utf8s[i] = C.GoString((*C.gchar)(unsafe.Pointer(src[i])))
			defer C.free(unsafe.Pointer(src[i]))
		}
	}

	return _utf8s
}

// SetPixbuf sets the contents of the selection from a Pixbuf The pixbuf is
// converted to the form determined by selection_data->target.
//
// The function takes the following parameters:
//
//   - pixbuf: Pixbuf.
//
// The function returns the following values:
//
//   - ok: TRUE if the selection was successfully set, otherwise FALSE.
func (selectionData *SelectionData) SetPixbuf(pixbuf *gdkpixbuf.Pixbuf) bool {
	var _arg0 *C.GtkSelectionData // out
	var _arg1 *C.GdkPixbuf        // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg1 = (*C.GdkPixbuf)(unsafe.Pointer(coreglib.InternObject(pixbuf).Native()))

	_cret = C.gtk_selection_data_set_pixbuf(_arg0, _arg1)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(pixbuf)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetText sets the contents of the selection from a UTF-8 encoded string.
// The string is converted to the form determined by selection_data->target.
//
// The function takes the following parameters:
//
//   - str: UTF-8 string.
//
// The function returns the following values:
//
//   - ok: TRUE if the selection was successfully set, otherwise FALSE.
func (selectionData *SelectionData) SetText(str string) bool {
	var _arg0 *C.GtkSelectionData // out
	var _arg1 *C.gchar            // out
	var _arg2 C.gint
	var _cret C.gboolean // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg2 = (C.gint)(len(str))
	_arg1 = (*C.gchar)(C.calloc(C.size_t((len(str) + 1)), C.size_t(C.sizeof_gchar)))
	copy(unsafe.Slice((*byte)(unsafe.Pointer(_arg1)), len(str)), str)
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_selection_data_set_text(_arg0, _arg1, _arg2)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(str)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SetURIs sets the contents of the selection from a list of URIs. The string is
// converted to the form determined by selection_data->target.
//
// Since 3.24.37, this may involve using the FileTransfer portal to send files
// between sandboxed apps.
//
// The function takes the following parameters:
//
//   - uris: NULL-terminated array of strings holding URIs.
//
// The function returns the following values:
//
//   - ok: TRUE if the selection was successfully set, otherwise FALSE.
func (selectionData *SelectionData) SetURIs(uris []string) bool {
	var _arg0 *C.GtkSelectionData // out
	var _arg1 **C.gchar           // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	{
		_arg1 = (**C.gchar)(C.calloc(C.size_t((len(uris) + 1)), C.size_t(unsafe.Sizeof(uint(0)))))
		defer C.free(unsafe.Pointer(_arg1))
		{
			out := unsafe.Slice(_arg1, len(uris)+1)
			var zero *C.gchar
			out[len(uris)] = zero
			for i := range uris {
				out[i] = (*C.gchar)(unsafe.Pointer(C.CString(uris[i])))
				defer C.free(unsafe.Pointer(out[i]))
			}
		}
	}

	_cret = C.gtk_selection_data_set_uris(_arg0, _arg1)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(uris)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TargetsIncludeImage: given a SelectionData object holding a list of targets,
// determines if any of the targets in targets can be used to provide a Pixbuf.
//
// The function takes the following parameters:
//
//   - writable: whether to accept only targets for which GTK+ knows how to
//     convert a pixbuf into the format.
//
// The function returns the following values:
//
//   - ok: TRUE if selection_data holds a list of targets, and a suitable target
//     for images is included, otherwise FALSE.
func (selectionData *SelectionData) TargetsIncludeImage(writable bool) bool {
	var _arg0 *C.GtkSelectionData // out
	var _arg1 C.gboolean          // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	if writable {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_selection_data_targets_include_image(_arg0, _arg1)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(writable)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TargetsIncludeRichText: given a SelectionData object holding a list of
// targets, determines if any of the targets in targets can be used to provide
// rich text.
//
// The function takes the following parameters:
//
//   - buffer: TextBuffer.
//
// The function returns the following values:
//
//   - ok: TRUE if selection_data holds a list of targets, and a suitable target
//     for rich text is included, otherwise FALSE.
func (selectionData *SelectionData) TargetsIncludeRichText(buffer *TextBuffer) bool {
	var _arg0 *C.GtkSelectionData // out
	var _arg1 *C.GtkTextBuffer    // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))
	_arg1 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	_cret = C.gtk_selection_data_targets_include_rich_text(_arg0, _arg1)
	runtime.KeepAlive(selectionData)
	runtime.KeepAlive(buffer)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TargetsIncludeText: given a SelectionData object holding a list of targets,
// determines if any of the targets in targets can be used to provide text.
//
// The function returns the following values:
//
//   - ok: TRUE if selection_data holds a list of targets, and a suitable target
//     for text is included, otherwise FALSE.
func (selectionData *SelectionData) TargetsIncludeText() bool {
	var _arg0 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_targets_include_text(_arg0)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TargetsIncludeURI: given a SelectionData object holding a list of targets,
// determines if any of the targets in targets can be used to provide a list or
// URIs.
//
// The function returns the following values:
//
//   - ok: TRUE if selection_data holds a list of targets, and a suitable target
//     for URI lists is included, otherwise FALSE.
func (selectionData *SelectionData) TargetsIncludeURI() bool {
	var _arg0 *C.GtkSelectionData // out
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkSelectionData)(gextras.StructNative(unsafe.Pointer(selectionData)))

	_cret = C.gtk_selection_data_targets_include_uri(_arg0)
	runtime.KeepAlive(selectionData)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// SeparatorClass: instance of this type is always passed by reference.
type SeparatorClass struct {
	*separatorClass
}

// separatorClass is the struct that's finalized.
type separatorClass struct {
	native *C.GtkSeparatorClass
}

func (s *SeparatorClass) ParentClass() *WidgetClass {
	valptr := &s.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SeparatorMenuItemClass: instance of this type is always passed by reference.
type SeparatorMenuItemClass struct {
	*separatorMenuItemClass
}

// separatorMenuItemClass is the struct that's finalized.
type separatorMenuItemClass struct {
	native *C.GtkSeparatorMenuItemClass
}

// ParentClass: parent class.
func (s *SeparatorMenuItemClass) ParentClass() *MenuItemClass {
	valptr := &s.native.parent_class
	var _v *MenuItemClass // out
	_v = (*MenuItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SeparatorToolItemClass: instance of this type is always passed by reference.
type SeparatorToolItemClass struct {
	*separatorToolItemClass
}

// separatorToolItemClass is the struct that's finalized.
type separatorToolItemClass struct {
	native *C.GtkSeparatorToolItemClass
}

// ParentClass: parent class.
func (s *SeparatorToolItemClass) ParentClass() *ToolItemClass {
	valptr := &s.native.parent_class
	var _v *ToolItemClass // out
	_v = (*ToolItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SettingsClass: instance of this type is always passed by reference.
type SettingsClass struct {
	*settingsClass
}

// settingsClass is the struct that's finalized.
type settingsClass struct {
	native *C.GtkSettingsClass
}

// SettingsValue: instance of this type is always passed by reference.
type SettingsValue struct {
	*settingsValue
}

// settingsValue is the struct that's finalized.
type settingsValue struct {
	native *C.GtkSettingsValue
}

// Origin should be something like “filename:linenumber” for rc files, or e.g.
// “XProperty” for other sources.
func (s *SettingsValue) Origin() string {
	valptr := &s.native.origin
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// ShortcutsWindowClass: instance of this type is always passed by reference.
type ShortcutsWindowClass struct {
	*shortcutsWindowClass
}

// shortcutsWindowClass is the struct that's finalized.
type shortcutsWindowClass struct {
	native *C.GtkShortcutsWindowClass
}

func (s *ShortcutsWindowClass) ParentClass() *WindowClass {
	valptr := &s.native.parent_class
	var _v *WindowClass // out
	_v = (*WindowClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SizeGroupClass: instance of this type is always passed by reference.
type SizeGroupClass struct {
	*sizeGroupClass
}

// sizeGroupClass is the struct that's finalized.
type sizeGroupClass struct {
	native *C.GtkSizeGroupClass
}

// SocketAccessibleClass: instance of this type is always passed by reference.
type SocketAccessibleClass struct {
	*socketAccessibleClass
}

// socketAccessibleClass is the struct that's finalized.
type socketAccessibleClass struct {
	native *C.GtkSocketAccessibleClass
}

func (s *SocketAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &s.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SocketClass: instance of this type is always passed by reference.
type SocketClass struct {
	*socketClass
}

// socketClass is the struct that's finalized.
type socketClass struct {
	native *C.GtkSocketClass
}

func (s *SocketClass) ParentClass() *ContainerClass {
	valptr := &s.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SpinButtonAccessibleClass: instance of this type is always passed by
// reference.
type SpinButtonAccessibleClass struct {
	*spinButtonAccessibleClass
}

// spinButtonAccessibleClass is the struct that's finalized.
type spinButtonAccessibleClass struct {
	native *C.GtkSpinButtonAccessibleClass
}

func (s *SpinButtonAccessibleClass) ParentClass() *EntryAccessibleClass {
	valptr := &s.native.parent_class
	var _v *EntryAccessibleClass // out
	_v = (*EntryAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SpinButtonClass: instance of this type is always passed by reference.
type SpinButtonClass struct {
	*spinButtonClass
}

// spinButtonClass is the struct that's finalized.
type spinButtonClass struct {
	native *C.GtkSpinButtonClass
}

func (s *SpinButtonClass) ParentClass() *EntryClass {
	valptr := &s.native.parent_class
	var _v *EntryClass // out
	_v = (*EntryClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SpinnerAccessibleClass: instance of this type is always passed by reference.
type SpinnerAccessibleClass struct {
	*spinnerAccessibleClass
}

// spinnerAccessibleClass is the struct that's finalized.
type spinnerAccessibleClass struct {
	native *C.GtkSpinnerAccessibleClass
}

func (s *SpinnerAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &s.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SpinnerClass: instance of this type is always passed by reference.
type SpinnerClass struct {
	*spinnerClass
}

// spinnerClass is the struct that's finalized.
type spinnerClass struct {
	native *C.GtkSpinnerClass
}

func (s *SpinnerClass) ParentClass() *WidgetClass {
	valptr := &s.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StackAccessibleClass: instance of this type is always passed by reference.
type StackAccessibleClass struct {
	*stackAccessibleClass
}

// stackAccessibleClass is the struct that's finalized.
type stackAccessibleClass struct {
	native *C.GtkStackAccessibleClass
}

func (s *StackAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &s.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StackClass: instance of this type is always passed by reference.
type StackClass struct {
	*stackClass
}

// stackClass is the struct that's finalized.
type stackClass struct {
	native *C.GtkStackClass
}

func (s *StackClass) ParentClass() *ContainerClass {
	valptr := &s.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StackSidebarClass: instance of this type is always passed by reference.
type StackSidebarClass struct {
	*stackSidebarClass
}

// stackSidebarClass is the struct that's finalized.
type stackSidebarClass struct {
	native *C.GtkStackSidebarClass
}

func (s *StackSidebarClass) ParentClass() *BinClass {
	valptr := &s.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StackSwitcherClass: instance of this type is always passed by reference.
type StackSwitcherClass struct {
	*stackSwitcherClass
}

// stackSwitcherClass is the struct that's finalized.
type stackSwitcherClass struct {
	native *C.GtkStackSwitcherClass
}

func (s *StackSwitcherClass) ParentClass() *BoxClass {
	valptr := &s.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StatusIconClass: instance of this type is always passed by reference.
type StatusIconClass struct {
	*statusIconClass
}

// statusIconClass is the struct that's finalized.
type statusIconClass struct {
	native *C.GtkStatusIconClass
}

// StatusbarAccessibleClass: instance of this type is always passed by
// reference.
type StatusbarAccessibleClass struct {
	*statusbarAccessibleClass
}

// statusbarAccessibleClass is the struct that's finalized.
type statusbarAccessibleClass struct {
	native *C.GtkStatusbarAccessibleClass
}

func (s *StatusbarAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &s.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// StatusbarClass: instance of this type is always passed by reference.
type StatusbarClass struct {
	*statusbarClass
}

// statusbarClass is the struct that's finalized.
type statusbarClass struct {
	native *C.GtkStatusbarClass
}

func (s *StatusbarClass) ParentClass() *BoxClass {
	valptr := &s.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (s *StatusbarClass) Reserved() unsafe.Pointer {
	valptr := &s.native.reserved
	var _v unsafe.Pointer // out
	_v = (unsafe.Pointer)(unsafe.Pointer(*valptr))
	return _v
}

// StockItem: deprecated: since version 3.10.
//
// An instance of this type is always passed by reference.
type StockItem struct {
	*stockItem
}

// stockItem is the struct that's finalized.
type stockItem struct {
	native *C.GtkStockItem
}

// StockID: identifier.
func (s *StockItem) StockID() string {
	valptr := &s.native.stock_id
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Label: user visible label.
func (s *StockItem) Label() string {
	valptr := &s.native.label
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Modifier type for keyboard accelerator.
func (s *StockItem) Modifier() gdk.ModifierType {
	valptr := &s.native.modifier
	var _v gdk.ModifierType // out
	_v = gdk.ModifierType(*valptr)
	return _v
}

// Keyval: keyboard accelerator.
func (s *StockItem) Keyval() uint {
	valptr := &s.native.keyval
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// TranslationDomain: translation domain of the menu or toolbar item.
func (s *StockItem) TranslationDomain() string {
	valptr := &s.native.translation_domain
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Keyval: keyboard accelerator.
func (s *StockItem) SetKeyval(keyval uint) {
	valptr := &s.native.keyval
	*valptr = C.guint(keyval)
}

// StyleClass: instance of this type is always passed by reference.
type StyleClass struct {
	*styleClass
}

// styleClass is the struct that's finalized.
type styleClass struct {
	native *C.GtkStyleClass
}

// StyleContextClass: instance of this type is always passed by reference.
type StyleContextClass struct {
	*styleContextClass
}

// styleContextClass is the struct that's finalized.
type styleContextClass struct {
	native *C.GtkStyleContextClass
}

// StylePropertiesClass: instance of this type is always passed by reference.
type StylePropertiesClass struct {
	*stylePropertiesClass
}

// stylePropertiesClass is the struct that's finalized.
type stylePropertiesClass struct {
	native *C.GtkStylePropertiesClass
}

// StyleProviderIface: instance of this type is always passed by reference.
type StyleProviderIface struct {
	*styleProviderIface
}

// styleProviderIface is the struct that's finalized.
type styleProviderIface struct {
	native *C.GtkStyleProviderIface
}

// SwitchAccessibleClass: instance of this type is always passed by reference.
type SwitchAccessibleClass struct {
	*switchAccessibleClass
}

// switchAccessibleClass is the struct that's finalized.
type switchAccessibleClass struct {
	native *C.GtkSwitchAccessibleClass
}

func (s *SwitchAccessibleClass) ParentClass() *WidgetAccessibleClass {
	valptr := &s.native.parent_class
	var _v *WidgetAccessibleClass // out
	_v = (*WidgetAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SwitchClass: instance of this type is always passed by reference.
type SwitchClass struct {
	*switchClass
}

// switchClass is the struct that's finalized.
type switchClass struct {
	native *C.GtkSwitchClass
}

// ParentClass: parent class.
func (s *SwitchClass) ParentClass() *WidgetClass {
	valptr := &s.native.parent_class
	var _v *WidgetClass // out
	_v = (*WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// SymbolicColor is a boxed type that represents a symbolic color. It is the
// result of parsing a [color expression][gtkcssprovider-symbolic-colors].
// To obtain the color represented by a GtkSymbolicColor, it has to be resolved
// with gtk_symbolic_color_resolve(), which replaces all symbolic color
// references by the colors they refer to (in a given context) and evaluates
// mix, shade and other expressions, resulting in a RGBA value.
//
// It is not normally necessary to deal directly with SymbolicColors, since they
// are mostly used behind the scenes by StyleContext and CssProvider.
//
// SymbolicColor is deprecated. Symbolic colors are considered an implementation
// detail of GTK+.
//
// An instance of this type is always passed by reference.
type SymbolicColor struct {
	*symbolicColor
}

// symbolicColor is the struct that's finalized.
type symbolicColor struct {
	native *C.GtkSymbolicColor
}

func marshalSymbolicColor(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &SymbolicColor{&symbolicColor{(*C.GtkSymbolicColor)(b)}}, nil
}

// NewSymbolicColorAlpha constructs a struct SymbolicColor.
func NewSymbolicColorAlpha(color *SymbolicColor, factor float64) *SymbolicColor {
	var _arg1 *C.GtkSymbolicColor // out
	var _arg2 C.gdouble           // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))
	_arg2 = C.gdouble(factor)

	_cret = C.gtk_symbolic_color_new_alpha(_arg1, _arg2)
	runtime.KeepAlive(color)
	runtime.KeepAlive(factor)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// NewSymbolicColorLiteral constructs a struct SymbolicColor.
func NewSymbolicColorLiteral(color *gdk.RGBA) *SymbolicColor {
	var _arg1 *C.GdkRGBA          // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.GdkRGBA)(gextras.StructNative(unsafe.Pointer(color)))

	_cret = C.gtk_symbolic_color_new_literal(_arg1)
	runtime.KeepAlive(color)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// NewSymbolicColorMix constructs a struct SymbolicColor.
func NewSymbolicColorMix(color1 *SymbolicColor, color2 *SymbolicColor, factor float64) *SymbolicColor {
	var _arg1 *C.GtkSymbolicColor // out
	var _arg2 *C.GtkSymbolicColor // out
	var _arg3 C.gdouble           // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color1)))
	_arg2 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color2)))
	_arg3 = C.gdouble(factor)

	_cret = C.gtk_symbolic_color_new_mix(_arg1, _arg2, _arg3)
	runtime.KeepAlive(color1)
	runtime.KeepAlive(color2)
	runtime.KeepAlive(factor)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// NewSymbolicColorName constructs a struct SymbolicColor.
func NewSymbolicColorName(name string) *SymbolicColor {
	var _arg1 *C.gchar            // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_symbolic_color_new_name(_arg1)
	runtime.KeepAlive(name)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// NewSymbolicColorShade constructs a struct SymbolicColor.
func NewSymbolicColorShade(color *SymbolicColor, factor float64) *SymbolicColor {
	var _arg1 *C.GtkSymbolicColor // out
	var _arg2 C.gdouble           // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))
	_arg2 = C.gdouble(factor)

	_cret = C.gtk_symbolic_color_new_shade(_arg1, _arg2)
	runtime.KeepAlive(color)
	runtime.KeepAlive(factor)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// NewSymbolicColorWin32 constructs a struct SymbolicColor.
func NewSymbolicColorWin32(themeClass string, id int) *SymbolicColor {
	var _arg1 *C.gchar            // out
	var _arg2 C.gint              // out
	var _cret *C.GtkSymbolicColor // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(themeClass)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.gint(id)

	_cret = C.gtk_symbolic_color_new_win32(_arg1, _arg2)
	runtime.KeepAlive(themeClass)
	runtime.KeepAlive(id)

	var _symbolicColor *SymbolicColor // out

	_symbolicColor = (*SymbolicColor)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_symbolicColor)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_symbolic_color_unref((*C.GtkSymbolicColor)(intern.C))
		},
	)

	return _symbolicColor
}

// Resolve: if color is resolvable, resolved_color will be filled in with the
// resolved color, and TRUE will be returned. Generally, if color can’t be
// resolved, it is due to it being defined on top of a named color that doesn’t
// exist in props.
//
// When props is NULL, resolving of named colors will fail, so if your color is
// or references such a color, this function will return FALSE.
//
// Deprecated: SymbolicColor is deprecated.
//
// The function takes the following parameters:
//
//   - props (optional) to use when resolving named colors, or NULL.
//
// The function returns the following values:
//
//   - resolvedColor: return location for the resolved color.
//   - ok: TRUE if the color has been resolved.
func (color *SymbolicColor) Resolve(props *StyleProperties) (*gdk.RGBA, bool) {
	var _arg0 *C.GtkSymbolicColor   // out
	var _arg1 *C.GtkStyleProperties // out
	var _arg2 C.GdkRGBA             // in
	var _cret C.gboolean            // in

	_arg0 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))
	if props != nil {
		_arg1 = (*C.GtkStyleProperties)(unsafe.Pointer(coreglib.InternObject(props).Native()))
	}

	_cret = C.gtk_symbolic_color_resolve(_arg0, _arg1, &_arg2)
	runtime.KeepAlive(color)
	runtime.KeepAlive(props)

	var _resolvedColor *gdk.RGBA // out
	var _ok bool                 // out

	_resolvedColor = (*gdk.RGBA)(gextras.NewStructNative(unsafe.Pointer((&_arg2))))
	if _cret != 0 {
		_ok = true
	}

	return _resolvedColor, _ok
}

// String converts the given color to a string representation. This is useful
// both for debugging and for serialization of strings. The format of the string
// may change between different versions of GTK, but it is guaranteed that the
// GTK css parser is able to read the string and create the same symbolic color
// from it.
//
// Deprecated: SymbolicColor is deprecated.
//
// The function returns the following values:
//
//   - utf8: new string representing color.
func (color *SymbolicColor) String() string {
	var _arg0 *C.GtkSymbolicColor // out
	var _cret *C.char             // in

	_arg0 = (*C.GtkSymbolicColor)(gextras.StructNative(unsafe.Pointer(color)))

	_cret = C.gtk_symbolic_color_to_string(_arg0)
	runtime.KeepAlive(color)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// TableChild: instance of this type is always passed by reference.
type TableChild struct {
	*tableChild
}

// tableChild is the struct that's finalized.
type tableChild struct {
	native *C.GtkTableChild
}

func (t *TableChild) Widget() Widgetter {
	valptr := &t.native.widget
	var _v Widgetter // out
	{
		objptr := unsafe.Pointer(*valptr)
		if objptr == nil {
			panic("object of type gtk.Widgetter is nil")
		}

		object := coreglib.Take(objptr)
		casted := object.WalkCast(func(obj coreglib.Objector) bool {
			_, ok := obj.(Widgetter)
			return ok
		})
		rv, ok := casted.(Widgetter)
		if !ok {
			panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
		}
		_v = rv
	}
	return _v
}

func (t *TableChild) LeftAttach() uint16 {
	valptr := &t.native.left_attach
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) RightAttach() uint16 {
	valptr := &t.native.right_attach
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) TopAttach() uint16 {
	valptr := &t.native.top_attach
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) BottomAttach() uint16 {
	valptr := &t.native.bottom_attach
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) Xpadding() uint16 {
	valptr := &t.native.xpadding
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) Ypadding() uint16 {
	valptr := &t.native.ypadding
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableChild) SetLeftAttach(leftAttach uint16) {
	valptr := &t.native.left_attach
	*valptr = C.guint16(leftAttach)
}

func (t *TableChild) SetRightAttach(rightAttach uint16) {
	valptr := &t.native.right_attach
	*valptr = C.guint16(rightAttach)
}

func (t *TableChild) SetTopAttach(topAttach uint16) {
	valptr := &t.native.top_attach
	*valptr = C.guint16(topAttach)
}

func (t *TableChild) SetBottomAttach(bottomAttach uint16) {
	valptr := &t.native.bottom_attach
	*valptr = C.guint16(bottomAttach)
}

func (t *TableChild) SetXpadding(xpadding uint16) {
	valptr := &t.native.xpadding
	*valptr = C.guint16(xpadding)
}

func (t *TableChild) SetYpadding(ypadding uint16) {
	valptr := &t.native.ypadding
	*valptr = C.guint16(ypadding)
}

// TableClass: instance of this type is always passed by reference.
type TableClass struct {
	*tableClass
}

// tableClass is the struct that's finalized.
type tableClass struct {
	native *C.GtkTableClass
}

func (t *TableClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TableRowCol: instance of this type is always passed by reference.
type TableRowCol struct {
	*tableRowCol
}

// tableRowCol is the struct that's finalized.
type tableRowCol struct {
	native *C.GtkTableRowCol
}

func (t *TableRowCol) Requisition() uint16 {
	valptr := &t.native.requisition
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableRowCol) Allocation() uint16 {
	valptr := &t.native.allocation
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableRowCol) Spacing() uint16 {
	valptr := &t.native.spacing
	var _v uint16 // out
	_v = uint16(*valptr)
	return _v
}

func (t *TableRowCol) SetRequisition(requisition uint16) {
	valptr := &t.native.requisition
	*valptr = C.guint16(requisition)
}

func (t *TableRowCol) SetAllocation(allocation uint16) {
	valptr := &t.native.allocation
	*valptr = C.guint16(allocation)
}

func (t *TableRowCol) SetSpacing(spacing uint16) {
	valptr := &t.native.spacing
	*valptr = C.guint16(spacing)
}

// TargetEntry represents a single type of data than can be supplied for by a
// widget for a selection or for supplied or received during drag-and-drop.
//
// An instance of this type is always passed by reference.
type TargetEntry struct {
	*targetEntry
}

// targetEntry is the struct that's finalized.
type targetEntry struct {
	native *C.GtkTargetEntry
}

func marshalTargetEntry(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TargetEntry{&targetEntry{(*C.GtkTargetEntry)(b)}}, nil
}

// NewTargetEntry constructs a struct TargetEntry.
func NewTargetEntry(target string, flags uint, info uint) *TargetEntry {
	var _arg1 *C.gchar          // out
	var _arg2 C.guint           // out
	var _arg3 C.guint           // out
	var _cret *C.GtkTargetEntry // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(target)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.guint(flags)
	_arg3 = C.guint(info)

	_cret = C.gtk_target_entry_new(_arg1, _arg2, _arg3)
	runtime.KeepAlive(target)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(info)

	var _targetEntry *TargetEntry // out

	_targetEntry = (*TargetEntry)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_targetEntry)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_target_entry_free((*C.GtkTargetEntry)(intern.C))
		},
	)

	return _targetEntry
}

// Target: string representation of the target type.
func (t *TargetEntry) Target() string {
	valptr := &t.native.target
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Flags for DND.
func (t *TargetEntry) Flags() uint {
	valptr := &t.native.flags
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// Info: application-assigned integer ID which will get passed as a parameter to
// e.g the Widget::selection-get signal. It allows the application to identify
// the target type without extensive string compares.
func (t *TargetEntry) Info() uint {
	valptr := &t.native.info
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// Flags for DND.
func (t *TargetEntry) SetFlags(flags uint) {
	valptr := &t.native.flags
	*valptr = C.guint(flags)
}

// Info: application-assigned integer ID which will get passed as a parameter to
// e.g the Widget::selection-get signal. It allows the application to identify
// the target type without extensive string compares.
func (t *TargetEntry) SetInfo(info uint) {
	valptr := &t.native.info
	*valptr = C.guint(info)
}

// Copy makes a copy of a TargetEntry and its data.
//
// The function returns the following values:
//
//   - targetEntry: pointer to a copy of data. Free with
//     gtk_target_entry_free().
func (data *TargetEntry) Copy() *TargetEntry {
	var _arg0 *C.GtkTargetEntry // out
	var _cret *C.GtkTargetEntry // in

	_arg0 = (*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer(data)))

	_cret = C.gtk_target_entry_copy(_arg0)
	runtime.KeepAlive(data)

	var _targetEntry *TargetEntry // out

	_targetEntry = (*TargetEntry)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_targetEntry)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_target_entry_free((*C.GtkTargetEntry)(intern.C))
		},
	)

	return _targetEntry
}

// TargetList is a reference counted list of TargetPair and should be treated as
// opaque.
//
// An instance of this type is always passed by reference.
type TargetList struct {
	*targetList
}

// targetList is the struct that's finalized.
type targetList struct {
	native *C.GtkTargetList
}

func marshalTargetList(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TargetList{&targetList{(*C.GtkTargetList)(b)}}, nil
}

// NewTargetList constructs a struct TargetList.
func NewTargetList(targets []TargetEntry) *TargetList {
	var _arg1 *C.GtkTargetEntry // out
	var _arg2 C.guint
	var _cret *C.GtkTargetList // in

	_arg2 = (C.guint)(len(targets))
	_arg1 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg1), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}

	_cret = C.gtk_target_list_new(_arg1, _arg2)
	runtime.KeepAlive(targets)

	var _targetList *TargetList // out

	_targetList = (*TargetList)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_targetList)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_target_list_unref((*C.GtkTargetList)(intern.C))
		},
	)

	return _targetList
}

// AddImageTargets appends the image targets supported by SelectionData to the
// target list. All targets are added with the same info.
//
// The function takes the following parameters:
//
//   - info: ID that will be passed back to the application.
//   - writable: whether to add only targets for which GTK+ knows how to convert
//     a pixbuf into the format.
func (list *TargetList) AddImageTargets(info uint, writable bool) {
	var _arg0 *C.GtkTargetList // out
	var _arg1 C.guint          // out
	var _arg2 C.gboolean       // out

	_arg0 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))
	_arg1 = C.guint(info)
	if writable {
		_arg2 = C.TRUE
	}

	C.gtk_target_list_add_image_targets(_arg0, _arg1, _arg2)
	runtime.KeepAlive(list)
	runtime.KeepAlive(info)
	runtime.KeepAlive(writable)
}

// AddRichTextTargets appends the rich text targets registered
// with gtk_text_buffer_register_serialize_format() or
// gtk_text_buffer_register_deserialize_format() to the target list. All targets
// are added with the same info.
//
// The function takes the following parameters:
//
//   - info: ID that will be passed back to the application.
//   - deserializable: if TRUE, then deserializable rich text formats will be
//     added, serializable formats otherwise.
//   - buffer: TextBuffer.
func (list *TargetList) AddRichTextTargets(info uint, deserializable bool, buffer *TextBuffer) {
	var _arg0 *C.GtkTargetList // out
	var _arg1 C.guint          // out
	var _arg2 C.gboolean       // out
	var _arg3 *C.GtkTextBuffer // out

	_arg0 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))
	_arg1 = C.guint(info)
	if deserializable {
		_arg2 = C.TRUE
	}
	_arg3 = (*C.GtkTextBuffer)(unsafe.Pointer(coreglib.InternObject(buffer).Native()))

	C.gtk_target_list_add_rich_text_targets(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(list)
	runtime.KeepAlive(info)
	runtime.KeepAlive(deserializable)
	runtime.KeepAlive(buffer)
}

// AddTable prepends a table of TargetEntry to a target list.
//
// The function takes the following parameters:
//
//   - targets: table of TargetEntry.
func (list *TargetList) AddTable(targets []TargetEntry) {
	var _arg0 *C.GtkTargetList  // out
	var _arg1 *C.GtkTargetEntry // out
	var _arg2 C.guint

	_arg0 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))
	_arg2 = (C.guint)(len(targets))
	_arg1 = (*C.GtkTargetEntry)(C.calloc(C.size_t(len(targets)), C.size_t(C.sizeof_GtkTargetEntry)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.GtkTargetEntry)(_arg1), len(targets))
		for i := range targets {
			out[i] = *(*C.GtkTargetEntry)(gextras.StructNative(unsafe.Pointer((&targets[i]))))
		}
	}

	C.gtk_target_list_add_table(_arg0, _arg1, _arg2)
	runtime.KeepAlive(list)
	runtime.KeepAlive(targets)
}

// AddTextTargets appends the text targets supported by SelectionData to the
// target list. All targets are added with the same info.
//
// The function takes the following parameters:
//
//   - info: ID that will be passed back to the application.
func (list *TargetList) AddTextTargets(info uint) {
	var _arg0 *C.GtkTargetList // out
	var _arg1 C.guint          // out

	_arg0 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))
	_arg1 = C.guint(info)

	C.gtk_target_list_add_text_targets(_arg0, _arg1)
	runtime.KeepAlive(list)
	runtime.KeepAlive(info)
}

// AddURITargets appends the URI targets supported by SelectionData to the
// target list. All targets are added with the same info.
//
// Since 3.24.37, this includes the application/vnd.portal.files target when
// possible, to allow sending files between sandboxed apps via the FileTransfer
// portal.
//
// The function takes the following parameters:
//
//   - info: ID that will be passed back to the application.
func (list *TargetList) AddURITargets(info uint) {
	var _arg0 *C.GtkTargetList // out
	var _arg1 C.guint          // out

	_arg0 = (*C.GtkTargetList)(gextras.StructNative(unsafe.Pointer(list)))
	_arg1 = C.guint(info)

	C.gtk_target_list_add_uri_targets(_arg0, _arg1)
	runtime.KeepAlive(list)
	runtime.KeepAlive(info)
}

// TargetPair is used to represent the same information as a table of
// TargetEntry, but in an efficient form.
//
// An instance of this type is always passed by reference.
type TargetPair struct {
	*targetPair
}

// targetPair is the struct that's finalized.
type targetPair struct {
	native *C.GtkTargetPair
}

// TearoffMenuItemClass: instance of this type is always passed by reference.
type TearoffMenuItemClass struct {
	*tearoffMenuItemClass
}

// tearoffMenuItemClass is the struct that's finalized.
type tearoffMenuItemClass struct {
	native *C.GtkTearoffMenuItemClass
}

// ParentClass: parent class.
func (t *TearoffMenuItemClass) ParentClass() *MenuItemClass {
	valptr := &t.native.parent_class
	var _v *MenuItemClass // out
	_v = (*MenuItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TextAppearance: instance of this type is always passed by reference.
type TextAppearance struct {
	*textAppearance
}

// textAppearance is the struct that's finalized.
type textAppearance struct {
	native *C.GtkTextAppearance
}

// BgColor: background Color.
func (t *TextAppearance) BgColor() *gdk.Color {
	valptr := &t.native.bg_color
	var _v *gdk.Color // out
	_v = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// FgColor: foreground Color.
func (t *TextAppearance) FgColor() *gdk.Color {
	valptr := &t.native.fg_color
	var _v *gdk.Color // out
	_v = (*gdk.Color)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// Rise: super/subscript rise, can be negative.
func (t *TextAppearance) Rise() int {
	valptr := &t.native.rise
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Rise: super/subscript rise, can be negative.
func (t *TextAppearance) SetRise(rise int) {
	valptr := &t.native.rise
	*valptr = C.gint(rise)
}

// TextAttributes: using TextAttributes directly should rarely be necessary.
// It’s primarily useful with gtk_text_iter_get_attributes(). As with most
// GTK+ structs, the fields in this struct should only be read, never modified
// directly.
//
// An instance of this type is always passed by reference.
type TextAttributes struct {
	*textAttributes
}

// textAttributes is the struct that's finalized.
type textAttributes struct {
	native *C.GtkTextAttributes
}

func marshalTextAttributes(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TextAttributes{&textAttributes{(*C.GtkTextAttributes)(b)}}, nil
}

// NewTextAttributes constructs a struct TextAttributes.
func NewTextAttributes() *TextAttributes {
	var _cret *C.GtkTextAttributes // in

	_cret = C.gtk_text_attributes_new()

	var _textAttributes *TextAttributes // out

	_textAttributes = (*TextAttributes)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_textAttributes)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_text_attributes_unref((*C.GtkTextAttributes)(intern.C))
		},
	)

	return _textAttributes
}

// Appearance for text.
func (t *TextAttributes) Appearance() *TextAppearance {
	valptr := &t.native.appearance
	var _v *TextAppearance // out
	_v = (*TextAppearance)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// Justification for text.
func (t *TextAttributes) Justification() Justification {
	valptr := &t.native.justification
	var _v Justification // out
	_v = Justification(*valptr)
	return _v
}

// Direction for text.
func (t *TextAttributes) Direction() TextDirection {
	valptr := &t.native.direction
	var _v TextDirection // out
	_v = TextDirection(*valptr)
	return _v
}

// Font for text.
func (t *TextAttributes) Font() *pango.FontDescription {
	valptr := &t.native.font
	var _v *pango.FontDescription // out
	_v = (*pango.FontDescription)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// FontScale: font scale factor.
func (t *TextAttributes) FontScale() float64 {
	valptr := &t.native.font_scale
	var _v float64 // out
	_v = float64(*valptr)
	return _v
}

// LeftMargin: width of the left margin in pixels.
func (t *TextAttributes) LeftMargin() int {
	valptr := &t.native.left_margin
	var _v int // out
	_v = int(*valptr)
	return _v
}

// RightMargin: width of the right margin in pixels.
func (t *TextAttributes) RightMargin() int {
	valptr := &t.native.right_margin
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Indent: amount to indent the paragraph, in pixels.
func (t *TextAttributes) Indent() int {
	valptr := &t.native.indent
	var _v int // out
	_v = int(*valptr)
	return _v
}

// PixelsAboveLines pixels of blank space above paragraphs.
func (t *TextAttributes) PixelsAboveLines() int {
	valptr := &t.native.pixels_above_lines
	var _v int // out
	_v = int(*valptr)
	return _v
}

// PixelsBelowLines pixels of blank space below paragraphs.
func (t *TextAttributes) PixelsBelowLines() int {
	valptr := &t.native.pixels_below_lines
	var _v int // out
	_v = int(*valptr)
	return _v
}

// PixelsInsideWrap pixels of blank space between wrapped lines in a paragraph.
func (t *TextAttributes) PixelsInsideWrap() int {
	valptr := &t.native.pixels_inside_wrap
	var _v int // out
	_v = int(*valptr)
	return _v
}

// Tabs: custom TabArray for this text.
func (t *TextAttributes) Tabs() *pango.TabArray {
	valptr := &t.native.tabs
	var _v *pango.TabArray // out
	_v = (*pango.TabArray)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// WrapMode for text.
func (t *TextAttributes) WrapMode() WrapMode {
	valptr := &t.native.wrap_mode
	var _v WrapMode // out
	_v = WrapMode(*valptr)
	return _v
}

// Language for text.
func (t *TextAttributes) Language() *pango.Language {
	valptr := &t.native.language
	var _v *pango.Language // out
	_v = (*pango.Language)(gextras.NewStructNative(unsafe.Pointer(*valptr)))
	return _v
}

// LetterSpacing: extra space to insert between graphemes, in Pango units.
func (t *TextAttributes) LetterSpacing() int {
	valptr := &t.native.letter_spacing
	var _v int // out
	_v = int(*valptr)
	return _v
}

// FontScale: font scale factor.
func (t *TextAttributes) SetFontScale(fontScale float64) {
	valptr := &t.native.font_scale
	*valptr = C.gdouble(fontScale)
}

// LeftMargin: width of the left margin in pixels.
func (t *TextAttributes) SetLeftMargin(leftMargin int) {
	valptr := &t.native.left_margin
	*valptr = C.gint(leftMargin)
}

// RightMargin: width of the right margin in pixels.
func (t *TextAttributes) SetRightMargin(rightMargin int) {
	valptr := &t.native.right_margin
	*valptr = C.gint(rightMargin)
}

// Indent: amount to indent the paragraph, in pixels.
func (t *TextAttributes) SetIndent(indent int) {
	valptr := &t.native.indent
	*valptr = C.gint(indent)
}

// PixelsAboveLines pixels of blank space above paragraphs.
func (t *TextAttributes) SetPixelsAboveLines(pixelsAboveLines int) {
	valptr := &t.native.pixels_above_lines
	*valptr = C.gint(pixelsAboveLines)
}

// PixelsBelowLines pixels of blank space below paragraphs.
func (t *TextAttributes) SetPixelsBelowLines(pixelsBelowLines int) {
	valptr := &t.native.pixels_below_lines
	*valptr = C.gint(pixelsBelowLines)
}

// PixelsInsideWrap pixels of blank space between wrapped lines in a paragraph.
func (t *TextAttributes) SetPixelsInsideWrap(pixelsInsideWrap int) {
	valptr := &t.native.pixels_inside_wrap
	*valptr = C.gint(pixelsInsideWrap)
}

// LetterSpacing: extra space to insert between graphemes, in Pango units.
func (t *TextAttributes) SetLetterSpacing(letterSpacing int) {
	valptr := &t.native.letter_spacing
	*valptr = C.gint(letterSpacing)
}

// Copy copies src and returns a new TextAttributes.
//
// The function returns the following values:
//
//   - textAttributes: copy of src, free with gtk_text_attributes_unref().
func (src *TextAttributes) Copy() *TextAttributes {
	var _arg0 *C.GtkTextAttributes // out
	var _cret *C.GtkTextAttributes // in

	_arg0 = (*C.GtkTextAttributes)(gextras.StructNative(unsafe.Pointer(src)))

	_cret = C.gtk_text_attributes_copy(_arg0)
	runtime.KeepAlive(src)

	var _textAttributes *TextAttributes // out

	_textAttributes = (*TextAttributes)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_textAttributes)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_text_attributes_unref((*C.GtkTextAttributes)(intern.C))
		},
	)

	return _textAttributes
}

// CopyValues copies the values from src to dest so that dest has the same
// values as src. Frees existing values in dest.
//
// The function takes the following parameters:
//
//   - dest: another TextAttributes.
func (src *TextAttributes) CopyValues(dest *TextAttributes) {
	var _arg0 *C.GtkTextAttributes // out
	var _arg1 *C.GtkTextAttributes // out

	_arg0 = (*C.GtkTextAttributes)(gextras.StructNative(unsafe.Pointer(src)))
	_arg1 = (*C.GtkTextAttributes)(gextras.StructNative(unsafe.Pointer(dest)))

	C.gtk_text_attributes_copy_values(_arg0, _arg1)
	runtime.KeepAlive(src)
	runtime.KeepAlive(dest)
}

// TextBufferClass: instance of this type is always passed by reference.
type TextBufferClass struct {
	*textBufferClass
}

// textBufferClass is the struct that's finalized.
type textBufferClass struct {
	native *C.GtkTextBufferClass
}

// TextCellAccessibleClass: instance of this type is always passed by reference.
type TextCellAccessibleClass struct {
	*textCellAccessibleClass
}

// textCellAccessibleClass is the struct that's finalized.
type textCellAccessibleClass struct {
	native *C.GtkTextCellAccessibleClass
}

func (t *TextCellAccessibleClass) ParentClass() *RendererCellAccessibleClass {
	valptr := &t.native.parent_class
	var _v *RendererCellAccessibleClass // out
	_v = (*RendererCellAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TextChildAnchorClass: instance of this type is always passed by reference.
type TextChildAnchorClass struct {
	*textChildAnchorClass
}

// textChildAnchorClass is the struct that's finalized.
type textChildAnchorClass struct {
	native *C.GtkTextChildAnchorClass
}

// TextIter: you may wish to begin by reading the text widget conceptual
// overview (TextWidget.html) which gives an overview of all the objects and
// data types related to the text widget and how they work together.
//
// An instance of this type is always passed by reference.
type TextIter struct {
	*textIter
}

// textIter is the struct that's finalized.
type textIter struct {
	native *C.GtkTextIter
}

func marshalTextIter(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TextIter{&textIter{(*C.GtkTextIter)(b)}}, nil
}

// Assign assigns the value of other to iter. This function is not useful in
// applications, because iterators can be assigned with GtkTextIter i = j;.
// The function is used by language bindings.
//
// The function takes the following parameters:
//
//   - other TextIter.
func (iter *TextIter) Assign(other *TextIter) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(other)))

	C.gtk_text_iter_assign(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(other)
}

// BackwardChar moves backward by one character offset. Returns TRUE if movement
// was possible; if iter was the first in the buffer (character offset 0),
// gtk_text_iter_backward_char() returns FALSE for convenience when writing
// loops.
//
// The function returns the following values:
//
//   - ok: whether movement was possible.
func (iter *TextIter) BackwardChar() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_char(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardChars moves count characters backward, if possible (if count would
// move past the start or end of the buffer, moves to the start or end of
// the buffer). The return value indicates whether the iterator moved onto a
// dereferenceable position; if the iterator didn’t move, or moved onto the end
// iterator, then FALSE is returned. If count is 0, the function does nothing
// and returns FALSE.
//
// The function takes the following parameters:
//
//   - count: number of characters to move.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) BackwardChars(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_chars(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardCursorPosition: like gtk_text_iter_forward_cursor_position(),
// but moves backward.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved.
func (iter *TextIter) BackwardCursorPosition() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_cursor_position(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardCursorPositions moves up to count cursor positions. See
// gtk_text_iter_forward_cursor_position() for details.
//
// The function takes the following parameters:
//
//   - count: number of positions to move.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) BackwardCursorPositions(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_cursor_positions(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardFindChar: same as gtk_text_iter_forward_find_char(), but goes
// backward from iter.
//
// The function takes the following parameters:
//
//   - pred: function to be called on each character.
//   - limit (optional): search limit, or NULL for none.
//
// The function returns the following values:
//
//   - ok: whether a match was found.
func (iter *TextIter) BackwardFindChar(pred TextCharPredicate, limit *TextIter) bool {
	var _arg0 *C.GtkTextIter         // out
	var _arg1 C.GtkTextCharPredicate // out
	var _arg2 C.gpointer
	var _arg3 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TextCharPredicate)
	_arg2 = C.gpointer(gbox.Assign(pred))
	defer gbox.Delete(uintptr(_arg2))
	if limit != nil {
		_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(limit)))
	}

	_cret = C.gtk_text_iter_backward_find_char(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(pred)
	runtime.KeepAlive(limit)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardLine moves iter to the start of the previous line. Returns TRUE if
// iter could be moved; i.e. if iter was at character offset 0, this function
// returns FALSE. Therefore if iter was already on line 0, but not at the start
// of the line, iter is snapped to the start of the line and the function
// returns TRUE. (Note that this implies that in a loop calling this function,
// the line number may not change on every iteration, if your first iteration is
// on line 0.).
//
// The function returns the following values:
//
//   - ok: whether iter moved.
func (iter *TextIter) BackwardLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardLines moves count lines backward, if possible (if count would
// move past the start or end of the buffer, moves to the start or end of
// the buffer). The return value indicates whether the iterator moved onto a
// dereferenceable position; if the iterator didn’t move, or moved onto the end
// iterator, then FALSE is returned. If count is 0, the function does nothing
// and returns FALSE. If count is negative, moves forward by 0 - count lines.
//
// The function takes the following parameters:
//
//   - count: number of lines to move backward.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) BackwardLines(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_lines(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardSearch: same as gtk_text_iter_forward_search(), but moves backward.
//
// match_end will never be set to a TextIter located after iter, even if there
// is a possible match_start before or at iter.
//
// The function takes the following parameters:
//
//   - str: search string.
//   - flags: bitmask of flags affecting the search.
//   - limit (optional): location of last possible match_start, or NULL for
//     start of buffer.
//
// The function returns the following values:
//
//   - matchStart (optional): return location for start of match, or NULL.
//   - matchEnd (optional): return location for end of match, or NULL.
//   - ok: whether a match was found.
func (iter *TextIter) BackwardSearch(str string, flags TextSearchFlags, limit *TextIter) (matchStart *TextIter, matchEnd *TextIter, ok bool) {
	var _arg0 *C.GtkTextIter       // out
	var _arg1 *C.gchar             // out
	var _arg2 C.GtkTextSearchFlags // out
	var _arg3 C.GtkTextIter        // in
	var _arg4 C.GtkTextIter        // in
	var _arg5 *C.GtkTextIter       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkTextSearchFlags(flags)
	if limit != nil {
		_arg5 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(limit)))
	}

	_cret = C.gtk_text_iter_backward_search(_arg0, _arg1, _arg2, &_arg3, &_arg4, _arg5)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(str)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(limit)

	var _matchStart *TextIter // out
	var _matchEnd *TextIter   // out
	var _ok bool              // out

	_matchStart = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))
	_matchEnd = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))
	if _cret != 0 {
		_ok = true
	}

	return _matchStart, _matchEnd, _ok
}

// BackwardSentenceStart moves backward to the previous sentence start; if
// iter is already at the start of a sentence, moves backward to the next one.
// Sentence boundaries are determined by Pango and should be correct for nearly
// any language (if not, the correct fix would be to the Pango text boundary
// algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardSentenceStart() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_sentence_start(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardSentenceStarts calls gtk_text_iter_backward_sentence_start() up to
// count times, or until it returns FALSE. If count is negative, moves forward
// instead of backward.
//
// The function takes the following parameters:
//
//   - count: number of sentences to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardSentenceStarts(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_sentence_starts(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardToTagToggle moves backward to the next toggle (on or off) of the
// TextTag tag, or to the next toggle of any tag if tag is NULL. If no matching
// tag toggles are found, returns FALSE, otherwise TRUE. Does not return toggles
// located at iter, only toggles before iter. Sets iter to the location of the
// toggle, or the start of the buffer if no toggle is found.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether we found a tag toggle before iter.
func (iter *TextIter) BackwardToTagToggle(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_backward_to_tag_toggle(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleCursorPosition moves iter forward to the previous visible
// cursor position. See gtk_text_iter_backward_cursor_position() for details.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) BackwardVisibleCursorPosition() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_visible_cursor_position(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleCursorPositions moves up to count visible cursor positions.
// See gtk_text_iter_backward_cursor_position() for details.
//
// The function takes the following parameters:
//
//   - count: number of positions to move.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) BackwardVisibleCursorPositions(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_visible_cursor_positions(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleLine moves iter to the start of the previous visible line.
// Returns TRUE if iter could be moved; i.e. if iter was at character offset 0,
// this function returns FALSE. Therefore if iter was already on line 0,
// but not at the start of the line, iter is snapped to the start of the line
// and the function returns TRUE. (Note that this implies that in a loop calling
// this function, the line number may not change on every iteration, if your
// first iteration is on line 0.).
//
// The function returns the following values:
//
//   - ok: whether iter moved.
func (iter *TextIter) BackwardVisibleLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_visible_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleLines moves count visible lines backward, if possible (if
// count would move past the start or end of the buffer, moves to the start or
// end of the buffer). The return value indicates whether the iterator moved
// onto a dereferenceable position; if the iterator didn’t move, or moved onto
// the end iterator, then FALSE is returned. If count is 0, the function does
// nothing and returns FALSE. If count is negative, moves forward by 0 - count
// lines.
//
// The function takes the following parameters:
//
//   - count: number of lines to move backward.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) BackwardVisibleLines(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_visible_lines(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleWordStart moves backward to the previous visible word start.
// (If iter is currently on a word start, moves backward to the next one after
// that.) Word breaks are determined by Pango and should be correct for nearly
// any language (if not, the correct fix would be to the Pango word break
// algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardVisibleWordStart() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_visible_word_start(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardVisibleWordStarts calls gtk_text_iter_backward_visible_word_start()
// up to count times.
//
// The function takes the following parameters:
//
//   - count: number of times to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardVisibleWordStarts(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_visible_word_starts(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardWordStart moves backward to the previous word start. (If iter is
// currently on a word start, moves backward to the next one after that.) Word
// breaks are determined by Pango and should be correct for nearly any language
// (if not, the correct fix would be to the Pango word break algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardWordStart() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_backward_word_start(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BackwardWordStarts calls gtk_text_iter_backward_word_start() up to count
// times.
//
// The function takes the following parameters:
//
//   - count: number of times to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) BackwardWordStarts(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_backward_word_starts(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// BeginsTag returns TRUE if tag is toggled on at exactly this point. If tag is
// NULL, returns TRUE if any tag is toggled on at this point.
//
// Note that if gtk_text_iter_begins_tag() returns TRUE, it means that iter
// is at the beginning of the tagged range, and that the character at iter is
// inside the tagged range. In other words, unlike gtk_text_iter_ends_tag(),
// if gtk_text_iter_begins_tag() returns TRUE, gtk_text_iter_has_tag() will also
// return TRUE for the same parameters.
//
// Deprecated: Use gtk_text_iter_starts_tag() instead.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether iter is the start of a range tagged with tag.
func (iter *TextIter) BeginsTag(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_begins_tag(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// CanInsert: considering the default editability of the buffer, and tags
// that affect editability, determines whether text inserted at iter would be
// editable. If text inserted at iter would be editable then the user should
// be allowed to insert text at iter. gtk_text_buffer_insert_interactive() uses
// this function to decide whether insertions are allowed at a given position.
//
// The function takes the following parameters:
//
//   - defaultEditability: TRUE if text is editable by default.
//
// The function returns the following values:
//
//   - ok: whether text inserted at iter would be editable.
func (iter *TextIter) CanInsert(defaultEditability bool) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if defaultEditability {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_text_iter_can_insert(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(defaultEditability)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Compare: qsort()-style function that returns negative if lhs is less than
// rhs, positive if lhs is greater than rhs, and 0 if they’re equal. Ordering
// is in character offset order, i.e. the first character in the buffer is less
// than the second character in the buffer.
//
// The function takes the following parameters:
//
//   - rhs: another TextIter.
//
// The function returns the following values:
//
//   - gint: -1 if lhs is less than rhs, 1 if lhs is greater, 0 if they are
//     equal.
func (lhs *TextIter) Compare(rhs *TextIter) int {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(lhs)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(rhs)))

	_cret = C.gtk_text_iter_compare(_arg0, _arg1)
	runtime.KeepAlive(lhs)
	runtime.KeepAlive(rhs)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Copy creates a dynamically-allocated copy of an iterator. This function is
// not useful in applications, because iterators can be copied with a simple
// assignment (GtkTextIter i = j;). The function is used by language bindings.
//
// The function returns the following values:
//
//   - textIter: copy of the iter, free with gtk_text_iter_free().
func (iter *TextIter) Copy() *TextIter {
	var _arg0 *C.GtkTextIter // out
	var _cret *C.GtkTextIter // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_copy(_arg0)
	runtime.KeepAlive(iter)

	var _textIter *TextIter // out

	_textIter = (*TextIter)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_textIter)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_text_iter_free((*C.GtkTextIter)(intern.C))
		},
	)

	return _textIter
}

// Editable returns whether the character at iter is within an editable
// region of text. Non-editable text is “locked” and can’t be changed by the
// user via TextView. This function is simply a convenience wrapper around
// gtk_text_iter_get_attributes(). If no tags applied to this text affect
// editability, default_setting will be returned.
//
// You don’t want to use this function to decide whether text can be
// inserted at iter, because for insertion you don’t want to know whether
// the char at iter is inside an editable range, you want to know whether
// a new character inserted at iter would be inside an editable range. Use
// gtk_text_iter_can_insert() to handle this case.
//
// The function takes the following parameters:
//
//   - defaultSetting: TRUE if text is editable by default.
//
// The function returns the following values:
//
//   - ok: whether iter is inside an editable range.
func (iter *TextIter) Editable(defaultSetting bool) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gboolean     // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if defaultSetting {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_text_iter_editable(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(defaultSetting)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EndsLine returns TRUE if iter points to the start of the paragraph delimiter
// characters for a line (delimiters will be either a newline, a carriage
// return, a carriage return followed by a newline, or a Unicode paragraph
// separator character). Note that an iterator pointing to the \n of a \r\n
// pair will not be counted as the end of a line, the line ends before the \r.
// The end iterator is considered to be at the end of a line, even though there
// are no paragraph delimiter chars there.
//
// The function returns the following values:
//
//   - ok: whether iter is at the end of a line.
func (iter *TextIter) EndsLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_ends_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EndsSentence determines whether iter ends a sentence. Sentence boundaries are
// determined by Pango and should be correct for nearly any language (if not,
// the correct fix would be to the Pango text boundary algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter is at the end of a sentence.
func (iter *TextIter) EndsSentence() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_ends_sentence(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EndsTag returns TRUE if tag is toggled off at exactly this point. If tag is
// NULL, returns TRUE if any tag is toggled off at this point.
//
// Note that if gtk_text_iter_ends_tag() returns TRUE, it means that iter is
// at the end of the tagged range, but that the character at iter is outside
// the tagged range. In other words, unlike gtk_text_iter_starts_tag(),
// if gtk_text_iter_ends_tag() returns TRUE, gtk_text_iter_has_tag() will return
// FALSE for the same parameters.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether iter is the end of a range tagged with tag.
func (iter *TextIter) EndsTag(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_ends_tag(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// EndsWord determines whether iter ends a natural-language word. Word breaks
// are determined by Pango and should be correct for nearly any language (if
// not, the correct fix would be to the Pango word break algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter is at the end of a word.
func (iter *TextIter) EndsWord() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_ends_word(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Equal tests whether two iterators are equal, using the fastest possible
// mechanism. This function is very fast; you can expect it to perform better
// than e.g. getting the character offset for each iterator and comparing the
// offsets yourself. Also, it’s a bit faster than gtk_text_iter_compare().
//
// The function takes the following parameters:
//
//   - rhs: another TextIter.
//
// The function returns the following values:
//
//   - ok: TRUE if the iterators point to the same place in the buffer.
func (lhs *TextIter) Equal(rhs *TextIter) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(lhs)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(rhs)))

	_cret = C.gtk_text_iter_equal(_arg0, _arg1)
	runtime.KeepAlive(lhs)
	runtime.KeepAlive(rhs)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardChar moves iter forward by one character offset.
// Note that images embedded in the buffer occupy 1 character slot,
// so gtk_text_iter_forward_char() may actually move onto an image instead of
// a character, if you have images in your buffer. If iter is the end iterator
// or one character before it, iter will now point at the end iterator,
// and gtk_text_iter_forward_char() returns FALSE for convenience when writing
// loops.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) ForwardChar() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_char(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardChars moves count characters if possible (if count would move past
// the start or end of the buffer, moves to the start or end of the buffer).
// The return value indicates whether the new position of iter is different from
// its original position, and dereferenceable (the last iterator in the buffer
// is not dereferenceable). If count is 0, the function does nothing and returns
// FALSE.
//
// The function takes the following parameters:
//
//   - count: number of characters to move, may be negative.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) ForwardChars(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_chars(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardCursorPosition moves iter forward by a single cursor position. Cursor
// positions are (unsurprisingly) positions where the cursor can appear. Perhaps
// surprisingly, there may not be a cursor position between all characters. The
// most common example for European languages would be a carriage return/newline
// sequence. For some Unicode characters, the equivalent of say the letter “a”
// with an accent mark will be represented as two characters, first the letter
// then a "combining mark" that causes the accent to be rendered; so the cursor
// can’t go between those two characters. See also the LogAttr-struct and
// pango_break() function.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) ForwardCursorPosition() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_cursor_position(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardCursorPositions moves up to count cursor positions. See
// gtk_text_iter_forward_cursor_position() for details.
//
// The function takes the following parameters:
//
//   - count: number of positions to move.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) ForwardCursorPositions(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_cursor_positions(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardFindChar advances iter, calling pred on each character. If pred
// returns TRUE, returns TRUE and stops scanning. If pred never returns TRUE,
// iter is set to limit if limit is non-NULL, otherwise to the end iterator.
//
// The function takes the following parameters:
//
//   - pred: function to be called on each character.
//   - limit (optional): search limit, or NULL for none.
//
// The function returns the following values:
//
//   - ok: whether a match was found.
func (iter *TextIter) ForwardFindChar(pred TextCharPredicate, limit *TextIter) bool {
	var _arg0 *C.GtkTextIter         // out
	var _arg1 C.GtkTextCharPredicate // out
	var _arg2 C.gpointer
	var _arg3 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*[0]byte)(C._gotk4_gtk3_TextCharPredicate)
	_arg2 = C.gpointer(gbox.Assign(pred))
	defer gbox.Delete(uintptr(_arg2))
	if limit != nil {
		_arg3 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(limit)))
	}

	_cret = C.gtk_text_iter_forward_find_char(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(pred)
	runtime.KeepAlive(limit)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardLine moves iter to the start of the next line. If the iter is already
// on the last line of the buffer, moves the iter to the end of the current
// line. If after the operation, the iter is at the end of the buffer and not
// dereferencable, returns FALSE. Otherwise, returns TRUE.
//
// The function returns the following values:
//
//   - ok: whether iter can be dereferenced.
func (iter *TextIter) ForwardLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardLines moves count lines forward, if possible (if count would move past
// the start or end of the buffer, moves to the start or end of the buffer).
// The return value indicates whether the iterator moved onto a dereferenceable
// position; if the iterator didn’t move, or moved onto the end iterator,
// then FALSE is returned. If count is 0, the function does nothing and returns
// FALSE. If count is negative, moves backward by 0 - count lines.
//
// The function takes the following parameters:
//
//   - count: number of lines to move forward.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) ForwardLines(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_lines(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardSearch searches forward for str. Any match is returned by setting
// match_start to the first character of the match and match_end to the first
// character after the match. The search will not continue past limit. Note that
// a search is a linear or O(n) operation, so you may wish to use limit to avoid
// locking up your UI on large buffers.
//
// match_start will never be set to a TextIter located before iter, even if
// there is a possible match_end after or at iter.
//
// The function takes the following parameters:
//
//   - str: search string.
//   - flags affecting how the search is done.
//   - limit (optional): location of last possible match_end, or NULL for the
//     end of the buffer.
//
// The function returns the following values:
//
//   - matchStart (optional): return location for start of match, or NULL.
//   - matchEnd (optional): return location for end of match, or NULL.
//   - ok: whether a match was found.
func (iter *TextIter) ForwardSearch(str string, flags TextSearchFlags, limit *TextIter) (matchStart *TextIter, matchEnd *TextIter, ok bool) {
	var _arg0 *C.GtkTextIter       // out
	var _arg1 *C.gchar             // out
	var _arg2 C.GtkTextSearchFlags // out
	var _arg3 C.GtkTextIter        // in
	var _arg4 C.GtkTextIter        // in
	var _arg5 *C.GtkTextIter       // out
	var _cret C.gboolean           // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(str)))
	defer C.free(unsafe.Pointer(_arg1))
	_arg2 = C.GtkTextSearchFlags(flags)
	if limit != nil {
		_arg5 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(limit)))
	}

	_cret = C.gtk_text_iter_forward_search(_arg0, _arg1, _arg2, &_arg3, &_arg4, _arg5)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(str)
	runtime.KeepAlive(flags)
	runtime.KeepAlive(limit)

	var _matchStart *TextIter // out
	var _matchEnd *TextIter   // out
	var _ok bool              // out

	_matchStart = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg3))))
	_matchEnd = (*TextIter)(gextras.NewStructNative(unsafe.Pointer((&_arg4))))
	if _cret != 0 {
		_ok = true
	}

	return _matchStart, _matchEnd, _ok
}

// ForwardSentenceEnd moves forward to the next sentence end. (If iter is at the
// end of a sentence, moves to the next end of sentence.) Sentence boundaries
// are determined by Pango and should be correct for nearly any language (if
// not, the correct fix would be to the Pango text boundary algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardSentenceEnd() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_sentence_end(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardSentenceEnds calls gtk_text_iter_forward_sentence_end() count times
// (or until gtk_text_iter_forward_sentence_end() returns FALSE). If count is
// negative, moves backward instead of forward.
//
// The function takes the following parameters:
//
//   - count: number of sentences to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardSentenceEnds(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_sentence_ends(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardToEnd moves iter forward to the “end iterator,” which points one past
// the last valid character in the buffer. gtk_text_iter_get_char() called on
// the end iterator returns 0, which is convenient for writing loops.
func (iter *TextIter) ForwardToEnd() {
	var _arg0 *C.GtkTextIter // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	C.gtk_text_iter_forward_to_end(_arg0)
	runtime.KeepAlive(iter)
}

// ForwardToLineEnd moves the iterator to point to the paragraph delimiter
// characters, which will be either a newline, a carriage return, a carriage
// return/newline in sequence, or the Unicode paragraph separator character.
// If the iterator is already at the paragraph delimiter characters, moves to
// the paragraph delimiter characters for the next line. If iter is on the last
// line in the buffer, which does not end in paragraph delimiters, moves to the
// end iterator (end of the last line), and returns FALSE.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new location is not the end iterator.
func (iter *TextIter) ForwardToLineEnd() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_to_line_end(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardToTagToggle moves forward to the next toggle (on or off) of the
// TextTag tag, or to the next toggle of any tag if tag is NULL. If no matching
// tag toggles are found, returns FALSE, otherwise TRUE. Does not return toggles
// located at iter, only toggles after iter. Sets iter to the location of the
// toggle, or to the end of the buffer if no toggle is found.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether we found a tag toggle after iter.
func (iter *TextIter) ForwardToTagToggle(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_forward_to_tag_toggle(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleCursorPosition moves iter forward to the next visible cursor
// position. See gtk_text_iter_forward_cursor_position() for details.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) ForwardVisibleCursorPosition() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_visible_cursor_position(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleCursorPositions moves up to count visible cursor positions.
// See gtk_text_iter_forward_cursor_position() for details.
//
// The function takes the following parameters:
//
//   - count: number of positions to move.
//
// The function returns the following values:
//
//   - ok: TRUE if we moved and the new position is dereferenceable.
func (iter *TextIter) ForwardVisibleCursorPositions(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_visible_cursor_positions(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleLine moves iter to the start of the next visible line. Returns
// TRUE if there was a next line to move to, and FALSE if iter was simply moved
// to the end of the buffer and is now not dereferenceable, or if iter was
// already at the end of the buffer.
//
// The function returns the following values:
//
//   - ok: whether iter can be dereferenced.
func (iter *TextIter) ForwardVisibleLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_visible_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleLines moves count visible lines forward, if possible (if count
// would move past the start or end of the buffer, moves to the start or end
// of the buffer). The return value indicates whether the iterator moved onto a
// dereferenceable position; if the iterator didn’t move, or moved onto the end
// iterator, then FALSE is returned. If count is 0, the function does nothing
// and returns FALSE. If count is negative, moves backward by 0 - count lines.
//
// The function takes the following parameters:
//
//   - count: number of lines to move forward.
//
// The function returns the following values:
//
//   - ok: whether iter moved and is dereferenceable.
func (iter *TextIter) ForwardVisibleLines(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_visible_lines(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleWordEnd moves forward to the next visible word end. (If iter
// is currently on a word end, moves forward to the next one after that.) Word
// breaks are determined by Pango and should be correct for nearly any language
// (if not, the correct fix would be to the Pango word break algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardVisibleWordEnd() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_visible_word_end(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardVisibleWordEnds calls gtk_text_iter_forward_visible_word_end() up to
// count times.
//
// The function takes the following parameters:
//
//   - count: number of times to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardVisibleWordEnds(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_visible_word_ends(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardWordEnd moves forward to the next word end. (If iter is currently
// on a word end, moves forward to the next one after that.) Word breaks are
// determined by Pango and should be correct for nearly any language (if not,
// the correct fix would be to the Pango word break algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardWordEnd() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_forward_word_end(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// ForwardWordEnds calls gtk_text_iter_forward_word_end() up to count times.
//
// The function takes the following parameters:
//
//   - count: number of times to move.
//
// The function returns the following values:
//
//   - ok: TRUE if iter moved and is not the end iterator.
func (iter *TextIter) ForwardWordEnds(count int) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(count)

	_cret = C.gtk_text_iter_forward_word_ends(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(count)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Attributes computes the effect of any tags applied to this spot in the text.
// The values parameter should be initialized to the default settings you wish
// to use if no tags are in effect. You’d typically obtain the defaults from
// gtk_text_view_get_default_attributes().
//
// gtk_text_iter_get_attributes() will modify values, applying the effects of
// any tags present at iter. If any tags affected values, the function returns
// TRUE.
//
// The function returns the following values:
//
//   - values to be filled in.
//   - ok: TRUE if values was modified.
func (iter *TextIter) Attributes() (*TextAttributes, bool) {
	var _arg0 *C.GtkTextIter      // out
	var _arg1 C.GtkTextAttributes // in
	var _cret C.gboolean          // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_attributes(_arg0, &_arg1)
	runtime.KeepAlive(iter)

	var _values *TextAttributes // out
	var _ok bool                // out

	_values = (*TextAttributes)(gextras.NewStructNative(unsafe.Pointer((&_arg1))))
	C.gtk_text_attributes_ref((&_arg1))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_values)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_text_attributes_unref((*C.GtkTextAttributes)(intern.C))
		},
	)
	if _cret != 0 {
		_ok = true
	}

	return _values, _ok
}

// Buffer returns the TextBuffer this iterator is associated with.
//
// The function returns the following values:
//
//   - textBuffer: buffer.
func (iter *TextIter) Buffer() *TextBuffer {
	var _arg0 *C.GtkTextIter   // out
	var _cret *C.GtkTextBuffer // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_buffer(_arg0)
	runtime.KeepAlive(iter)

	var _textBuffer *TextBuffer // out

	_textBuffer = wrapTextBuffer(coreglib.Take(unsafe.Pointer(_cret)))

	return _textBuffer
}

// BytesInLine returns the number of bytes in the line containing iter,
// including the paragraph delimiters.
//
// The function returns the following values:
//
//   - gint: number of bytes in the line.
func (iter *TextIter) BytesInLine() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_bytes_in_line(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Char: unicode character at this iterator is returned. (Equivalent to
// operator* on a C++ iterator.) If the element at this iterator is a
// non-character element, such as an image embedded in the buffer, the Unicode
// “unknown” character 0xFFFC is returned. If invoked on the end iterator,
// zero is returned; zero is not a valid Unicode character. So you can write a
// loop which ends when gtk_text_iter_get_char() returns 0.
//
// The function returns the following values:
//
//   - gunichar: unicode character, or 0 if iter is not dereferenceable.
func (iter *TextIter) Char() uint32 {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gunichar     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_char(_arg0)
	runtime.KeepAlive(iter)

	var _gunichar uint32 // out

	_gunichar = uint32(_cret)

	return _gunichar
}

// CharsInLine returns the number of characters in the line containing iter,
// including the paragraph delimiters.
//
// The function returns the following values:
//
//   - gint: number of characters in the line.
func (iter *TextIter) CharsInLine() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_chars_in_line(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// ChildAnchor: if the location at iter contains a child anchor, the anchor is
// returned (with no new reference count added). Otherwise, NULL is returned.
//
// The function returns the following values:
//
//   - textChildAnchor: anchor at iter.
func (iter *TextIter) ChildAnchor() *TextChildAnchor {
	var _arg0 *C.GtkTextIter        // out
	var _cret *C.GtkTextChildAnchor // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_child_anchor(_arg0)
	runtime.KeepAlive(iter)

	var _textChildAnchor *TextChildAnchor // out

	_textChildAnchor = wrapTextChildAnchor(coreglib.Take(unsafe.Pointer(_cret)))

	return _textChildAnchor
}

// Language: convenience wrapper around gtk_text_iter_get_attributes(), which
// returns the language in effect at iter. If no tags affecting language apply
// to iter, the return value is identical to that of gtk_get_default_language().
//
// The function returns the following values:
//
//   - language in effect at iter.
func (iter *TextIter) Language() *pango.Language {
	var _arg0 *C.GtkTextIter   // out
	var _cret *C.PangoLanguage // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_language(_arg0)
	runtime.KeepAlive(iter)

	var _language *pango.Language // out

	_language = (*pango.Language)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_language)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.free(intern.C)
		},
	)

	return _language
}

// Line returns the line number containing the iterator. Lines in a TextBuffer
// are numbered beginning with 0 for the first line in the buffer.
//
// The function returns the following values:
//
//   - gint: line number.
func (iter *TextIter) Line() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_line(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// LineIndex returns the byte index of the iterator, counting from the start of
// a newline-terminated line. Remember that TextBuffer encodes text in UTF-8,
// and that characters can require a variable number of bytes to represent.
//
// The function returns the following values:
//
//   - gint: distance from start of line, in bytes.
func (iter *TextIter) LineIndex() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_line_index(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// LineOffset returns the character offset of the iterator, counting from the
// start of a newline-terminated line. The first character on the line has
// offset 0.
//
// The function returns the following values:
//
//   - gint: offset from start of line.
func (iter *TextIter) LineOffset() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_line_offset(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Marks returns a list of all TextMark at this location. Because marks are not
// iterable (they don’t take up any "space" in the buffer, they are just marks
// in between iterable locations), multiple marks can exist in the same place.
// The returned list is not in any meaningful order.
//
// The function returns the following values:
//
//   - sList: list of TextMark.
func (iter *TextIter) Marks() []*TextMark {
	var _arg0 *C.GtkTextIter // out
	var _cret *C.GSList      // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_marks(_arg0)
	runtime.KeepAlive(iter)

	var _sList []*TextMark // out

	_sList = make([]*TextMark, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTextMark)(v)
		var dst *TextMark // out
		dst = wrapTextMark(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// Offset returns the character offset of an iterator. Each character in a
// TextBuffer has an offset, starting with 0 for the first character in the
// buffer. Use gtk_text_buffer_get_iter_at_offset() to convert an offset back
// into an iterator.
//
// The function returns the following values:
//
//   - gint: character offset.
func (iter *TextIter) Offset() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_offset(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Pixbuf: if the element at iter is a pixbuf, the pixbuf is returned (with no
// new reference count added). Otherwise, NULL is returned.
//
// The function returns the following values:
//
//   - pixbuf at iter.
func (iter *TextIter) Pixbuf() *gdkpixbuf.Pixbuf {
	var _arg0 *C.GtkTextIter // out
	var _cret *C.GdkPixbuf   // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_pixbuf(_arg0)
	runtime.KeepAlive(iter)

	var _pixbuf *gdkpixbuf.Pixbuf // out

	{
		obj := coreglib.Take(unsafe.Pointer(_cret))
		_pixbuf = &gdkpixbuf.Pixbuf{
			Object: obj,
			LoadableIcon: gio.LoadableIcon{
				Icon: gio.Icon{
					Object: obj,
				},
			},
		}
	}

	return _pixbuf
}

// Slice returns the text in the given range. A “slice” is an array of
// characters encoded in UTF-8 format, including the Unicode “unknown” character
// 0xFFFC for iterable non-character elements in the buffer, such as images.
// Because images are encoded in the slice, byte and character offsets in the
// returned array will correspond to byte offsets in the text buffer. Note that
// 0xFFFC can occur in normal text as well, so it is not a reliable indicator
// that a pixbuf or widget is in the buffer.
//
// The function takes the following parameters:
//
//   - end: iterator at end of a range.
//
// The function returns the following values:
//
//   - utf8: slice of text from the buffer.
func (start *TextIter) Slice(end *TextIter) string {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C.gtk_text_iter_get_slice(_arg0, _arg1)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Tags returns a list of tags that apply to iter, in ascending order of
// priority (highest-priority tags are last). The TextTag in the list don’t have
// a reference added, but you have to free the list itself.
//
// The function returns the following values:
//
//   - sList: list of TextTag.
func (iter *TextIter) Tags() []*TextTag {
	var _arg0 *C.GtkTextIter // out
	var _cret *C.GSList      // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_tags(_arg0)
	runtime.KeepAlive(iter)

	var _sList []*TextTag // out

	_sList = make([]*TextTag, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTextTag)(v)
		var dst *TextTag // out
		dst = wrapTextTag(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// Text returns text in the given range. If the range contains non-text elements
// such as images, the character and byte offsets in the returned string will
// not correspond to character and byte offsets in the buffer. If you want
// offsets to correspond, see gtk_text_iter_get_slice().
//
// The function takes the following parameters:
//
//   - end: iterator at end of a range.
//
// The function returns the following values:
//
//   - utf8: array of characters from the buffer.
func (start *TextIter) Text(end *TextIter) string {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C.gtk_text_iter_get_text(_arg0, _arg1)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// ToggledTags returns a list of TextTag that are toggled on or off at this
// point. (If toggled_on is TRUE, the list contains tags that are toggled on.)
// If a tag is toggled on at iter, then some non-empty range of characters
// following iter has that tag applied to it. If a tag is toggled off, then some
// non-empty range following iter does not have the tag applied to it.
//
// The function takes the following parameters:
//
//   - toggledOn: TRUE to get toggled-on tags.
//
// The function returns the following values:
//
//   - sList tags toggled at this point.
func (iter *TextIter) ToggledTags(toggledOn bool) []*TextTag {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gboolean     // out
	var _cret *C.GSList      // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if toggledOn {
		_arg1 = C.TRUE
	}

	_cret = C.gtk_text_iter_get_toggled_tags(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(toggledOn)

	var _sList []*TextTag // out

	_sList = make([]*TextTag, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.GtkTextTag)(v)
		var dst *TextTag // out
		dst = wrapTextTag(coreglib.Take(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// VisibleLineIndex returns the number of bytes from the start of the line to
// the given iter, not counting bytes that are invisible due to tags with the
// “invisible” flag toggled on.
//
// The function returns the following values:
//
//   - gint: byte index of iter with respect to the start of the line.
func (iter *TextIter) VisibleLineIndex() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_visible_line_index(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// VisibleLineOffset returns the offset in characters from the start of the line
// to the given iter, not counting characters that are invisible due to tags
// with the “invisible” flag toggled on.
//
// The function returns the following values:
//
//   - gint: offset in visible characters from the start of the line.
func (iter *TextIter) VisibleLineOffset() int {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_get_visible_line_offset(_arg0)
	runtime.KeepAlive(iter)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// VisibleSlice: like gtk_text_iter_get_slice(), but invisible text is not
// included. Invisible text is usually invisible because a TextTag with the
// “invisible” attribute turned on has been applied to it.
//
// The function takes the following parameters:
//
//   - end: iterator at end of range.
//
// The function returns the following values:
//
//   - utf8: slice of text from the buffer.
func (start *TextIter) VisibleSlice(end *TextIter) string {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C.gtk_text_iter_get_visible_slice(_arg0, _arg1)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// VisibleText: like gtk_text_iter_get_text(), but invisible text is not
// included. Invisible text is usually invisible because a TextTag with the
// “invisible” attribute turned on has been applied to it.
//
// The function takes the following parameters:
//
//   - end: iterator at end of range.
//
// The function returns the following values:
//
//   - utf8: string containing visible text in the range.
func (start *TextIter) VisibleText(end *TextIter) string {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C.gtk_text_iter_get_visible_text(_arg0, _arg1)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// HasTag returns TRUE if iter points to a character that is part of
// a range tagged with tag. See also gtk_text_iter_starts_tag() and
// gtk_text_iter_ends_tag().
//
// The function takes the following parameters:
//
//   - tag: TextTag.
//
// The function returns the following values:
//
//   - ok: whether iter is tagged with tag.
func (iter *TextIter) HasTag(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))

	_cret = C.gtk_text_iter_has_tag(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InRange checks whether iter falls in the range [start, end). start and end
// must be in ascending order.
//
// The function takes the following parameters:
//
//   - start of range.
//   - end of range.
//
// The function returns the following values:
//
//   - ok: TRUE if iter is in the range.
func (iter *TextIter) InRange(start *TextIter, end *TextIter) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out
	var _arg2 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(start)))
	_arg2 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(end)))

	_cret = C.gtk_text_iter_in_range(_arg0, _arg1, _arg2)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(start)
	runtime.KeepAlive(end)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InsideSentence determines whether iter is inside a sentence (as opposed to
// in between two sentences, e.g. after a period and before the first letter of
// the next sentence). Sentence boundaries are determined by Pango and should
// be correct for nearly any language (if not, the correct fix would be to the
// Pango text boundary algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter is inside a sentence.
func (iter *TextIter) InsideSentence() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_inside_sentence(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// InsideWord determines whether the character pointed by iter is part of a
// natural-language word (as opposed to say inside some whitespace). Word breaks
// are determined by Pango and should be correct for nearly any language (if
// not, the correct fix would be to the Pango word break algorithms).
//
// Note that if gtk_text_iter_starts_word() returns TRUE, then this function
// returns TRUE too, since iter points to the first character of the word.
//
// The function returns the following values:
//
//   - ok: TRUE if iter is inside a word.
func (iter *TextIter) InsideWord() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_inside_word(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsCursorPosition: see gtk_text_iter_forward_cursor_position() or LogAttr or
// pango_break() for details on what a cursor position is.
//
// The function returns the following values:
//
//   - ok: TRUE if the cursor can be placed at iter.
func (iter *TextIter) IsCursorPosition() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_is_cursor_position(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsEnd returns TRUE if iter is the end iterator, i.e. one past the last
// dereferenceable iterator in the buffer. gtk_text_iter_is_end() is the most
// efficient way to check whether an iterator is the end iterator.
//
// The function returns the following values:
//
//   - ok: whether iter is the end iterator.
func (iter *TextIter) IsEnd() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_is_end(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsStart returns TRUE if iter is the first iterator in the buffer, that is if
// iter has a character offset of 0.
//
// The function returns the following values:
//
//   - ok: whether iter is the first in the buffer.
func (iter *TextIter) IsStart() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_is_start(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Order swaps the value of first and second if second comes before first in
// the buffer. That is, ensures that first and second are in sequence. Most text
// buffer functions that take a range call this automatically on your behalf,
// so there’s no real reason to call it yourself in those cases. There are some
// exceptions, such as gtk_text_iter_in_range(), that expect a pre-sorted range.
//
// The function takes the following parameters:
//
//   - second: another TextIter.
func (first *TextIter) Order(second *TextIter) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextIter // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(first)))
	_arg1 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(second)))

	C.gtk_text_iter_order(_arg0, _arg1)
	runtime.KeepAlive(first)
	runtime.KeepAlive(second)
}

// SetLine moves iterator iter to the start of the line line_number.
// If line_number is negative or larger than the number of lines in the buffer,
// moves iter to the start of the last line in the buffer.
//
// The function takes the following parameters:
//
//   - lineNumber: line number (counted from 0).
func (iter *TextIter) SetLine(lineNumber int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(lineNumber)

	C.gtk_text_iter_set_line(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(lineNumber)
}

// SetLineIndex: same as gtk_text_iter_set_line_offset(), but works with a byte
// index. The given byte index must be at the start of a character, it can’t be
// in the middle of a UTF-8 encoded character.
//
// The function takes the following parameters:
//
//   - byteOnLine: byte index relative to the start of iter’s current line.
func (iter *TextIter) SetLineIndex(byteOnLine int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(byteOnLine)

	C.gtk_text_iter_set_line_index(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(byteOnLine)
}

// SetLineOffset moves iter within a line, to a new character (not byte) offset.
// The given character offset must be less than or equal to the number of
// characters in the line; if equal, iter moves to the start of the next line.
// See gtk_text_iter_set_line_index() if you have a byte index rather than a
// character offset.
//
// The function takes the following parameters:
//
//   - charOnLine: character offset relative to the start of iter’s current
//     line.
func (iter *TextIter) SetLineOffset(charOnLine int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(charOnLine)

	C.gtk_text_iter_set_line_offset(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(charOnLine)
}

// SetOffset sets iter to point to char_offset. char_offset counts from the
// start of the entire text buffer, starting with 0.
//
// The function takes the following parameters:
//
//   - charOffset: character number.
func (iter *TextIter) SetOffset(charOffset int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(charOffset)

	C.gtk_text_iter_set_offset(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(charOffset)
}

// SetVisibleLineIndex: like gtk_text_iter_set_line_index(), but the index is in
// visible bytes, i.e. text with a tag making it invisible is not counted in the
// index.
//
// The function takes the following parameters:
//
//   - byteOnLine: byte index.
func (iter *TextIter) SetVisibleLineIndex(byteOnLine int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(byteOnLine)

	C.gtk_text_iter_set_visible_line_index(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(byteOnLine)
}

// SetVisibleLineOffset: like gtk_text_iter_set_line_offset(), but the offset
// is in visible characters, i.e. text with a tag making it invisible is not
// counted in the offset.
//
// The function takes the following parameters:
//
//   - charOnLine: character offset.
func (iter *TextIter) SetVisibleLineOffset(charOnLine int) {
	var _arg0 *C.GtkTextIter // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	_arg1 = C.gint(charOnLine)

	C.gtk_text_iter_set_visible_line_offset(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(charOnLine)
}

// StartsLine returns TRUE if iter begins a paragraph, i.e. if
// gtk_text_iter_get_line_offset() would return 0. However this function is
// potentially more efficient than gtk_text_iter_get_line_offset() because it
// doesn’t have to compute the offset, it just has to see whether it’s 0.
//
// The function returns the following values:
//
//   - ok: whether iter begins a line.
func (iter *TextIter) StartsLine() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_starts_line(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// StartsSentence determines whether iter begins a sentence. Sentence boundaries
// are determined by Pango and should be correct for nearly any language (if
// not, the correct fix would be to the Pango text boundary algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter is at the start of a sentence.
func (iter *TextIter) StartsSentence() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_starts_sentence(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// StartsTag returns TRUE if tag is toggled on at exactly this point. If tag is
// NULL, returns TRUE if any tag is toggled on at this point.
//
// Note that if gtk_text_iter_starts_tag() returns TRUE, it means that iter
// is at the beginning of the tagged range, and that the character at iter is
// inside the tagged range. In other words, unlike gtk_text_iter_ends_tag(),
// if gtk_text_iter_starts_tag() returns TRUE, gtk_text_iter_has_tag() will also
// return TRUE for the same parameters.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether iter is the start of a range tagged with tag.
func (iter *TextIter) StartsTag(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_starts_tag(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// StartsWord determines whether iter begins a natural-language word. Word
// breaks are determined by Pango and should be correct for nearly any language
// (if not, the correct fix would be to the Pango word break algorithms).
//
// The function returns the following values:
//
//   - ok: TRUE if iter is at the start of a word.
func (iter *TextIter) StartsWord() bool {
	var _arg0 *C.GtkTextIter // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_text_iter_starts_word(_arg0)
	runtime.KeepAlive(iter)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TogglesTag: this is equivalent to (gtk_text_iter_starts_tag() ||
// gtk_text_iter_ends_tag()), i.e. it tells you whether a range with tag applied
// to it begins or ends at iter.
//
// The function takes the following parameters:
//
//   - tag (optional) or NULL.
//
// The function returns the following values:
//
//   - ok: whether tag is toggled on or off at iter.
func (iter *TextIter) TogglesTag(tag *TextTag) bool {
	var _arg0 *C.GtkTextIter // out
	var _arg1 *C.GtkTextTag  // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTextIter)(gextras.StructNative(unsafe.Pointer(iter)))
	if tag != nil {
		_arg1 = (*C.GtkTextTag)(unsafe.Pointer(coreglib.InternObject(tag).Native()))
	}

	_cret = C.gtk_text_iter_toggles_tag(_arg0, _arg1)
	runtime.KeepAlive(iter)
	runtime.KeepAlive(tag)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TextMarkClass: instance of this type is always passed by reference.
type TextMarkClass struct {
	*textMarkClass
}

// textMarkClass is the struct that's finalized.
type textMarkClass struct {
	native *C.GtkTextMarkClass
}

// TextTagClass: instance of this type is always passed by reference.
type TextTagClass struct {
	*textTagClass
}

// textTagClass is the struct that's finalized.
type textTagClass struct {
	native *C.GtkTextTagClass
}

// TextTagTableClass: instance of this type is always passed by reference.
type TextTagTableClass struct {
	*textTagTableClass
}

// textTagTableClass is the struct that's finalized.
type textTagTableClass struct {
	native *C.GtkTextTagTableClass
}

// TextViewAccessibleClass: instance of this type is always passed by reference.
type TextViewAccessibleClass struct {
	*textViewAccessibleClass
}

// textViewAccessibleClass is the struct that's finalized.
type textViewAccessibleClass struct {
	native *C.GtkTextViewAccessibleClass
}

func (t *TextViewAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &t.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TextViewClass: instance of this type is always passed by reference.
type TextViewClass struct {
	*textViewClass
}

// textViewClass is the struct that's finalized.
type textViewClass struct {
	native *C.GtkTextViewClass
}

// ParentClass: object class structure needs to be the first.
func (t *TextViewClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ThemingEngineClass: base class for theming engines.
//
// An instance of this type is always passed by reference.
type ThemingEngineClass struct {
	*themingEngineClass
}

// themingEngineClass is the struct that's finalized.
type themingEngineClass struct {
	native *C.GtkThemingEngineClass
}

// ToggleActionClass: instance of this type is always passed by reference.
type ToggleActionClass struct {
	*toggleActionClass
}

// toggleActionClass is the struct that's finalized.
type toggleActionClass struct {
	native *C.GtkToggleActionClass
}

func (t *ToggleActionClass) ParentClass() *ActionClass {
	valptr := &t.native.parent_class
	var _v *ActionClass // out
	_v = (*ActionClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToggleActionEntry structs are used with gtk_action_group_add_toggle_actions()
// to construct toggle actions.
//
// Deprecated: since version 3.10.
//
// An instance of this type is always passed by reference.
type ToggleActionEntry struct {
	*toggleActionEntry
}

// toggleActionEntry is the struct that's finalized.
type toggleActionEntry struct {
	native *C.GtkToggleActionEntry
}

// Name: name of the action.
func (t *ToggleActionEntry) Name() string {
	valptr := &t.native.name
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// StockID: stock id for the action, or the name of an icon from the icon theme.
func (t *ToggleActionEntry) StockID() string {
	valptr := &t.native.stock_id
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Label: label for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain().
func (t *ToggleActionEntry) Label() string {
	valptr := &t.native.label
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Accelerator: accelerator for the action, in the format understood by
// gtk_accelerator_parse().
func (t *ToggleActionEntry) Accelerator() string {
	valptr := &t.native.accelerator
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// Tooltip: tooltip for the action. This field should typically be marked for
// translation, see gtk_action_group_set_translation_domain().
func (t *ToggleActionEntry) Tooltip() string {
	valptr := &t.native.tooltip
	var _v string // out
	_v = C.GoString((*C.gchar)(unsafe.Pointer(*valptr)))
	return _v
}

// IsActive: initial state of the toggle action.
func (t *ToggleActionEntry) IsActive() bool {
	valptr := &t.native.is_active
	var _v bool // out
	if *valptr != 0 {
		_v = true
	}
	return _v
}

// IsActive: initial state of the toggle action.
func (t *ToggleActionEntry) SetIsActive(isActive bool) {
	valptr := &t.native.is_active
	if isActive {
		*valptr = C.TRUE
	}
}

// ToggleButtonAccessibleClass: instance of this type is always passed by
// reference.
type ToggleButtonAccessibleClass struct {
	*toggleButtonAccessibleClass
}

// toggleButtonAccessibleClass is the struct that's finalized.
type toggleButtonAccessibleClass struct {
	native *C.GtkToggleButtonAccessibleClass
}

func (t *ToggleButtonAccessibleClass) ParentClass() *ButtonAccessibleClass {
	valptr := &t.native.parent_class
	var _v *ButtonAccessibleClass // out
	_v = (*ButtonAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToggleButtonClass: instance of this type is always passed by reference.
type ToggleButtonClass struct {
	*toggleButtonClass
}

// toggleButtonClass is the struct that's finalized.
type toggleButtonClass struct {
	native *C.GtkToggleButtonClass
}

func (t *ToggleButtonClass) ParentClass() *ButtonClass {
	valptr := &t.native.parent_class
	var _v *ButtonClass // out
	_v = (*ButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToggleToolButtonClass: instance of this type is always passed by reference.
type ToggleToolButtonClass struct {
	*toggleToolButtonClass
}

// toggleToolButtonClass is the struct that's finalized.
type toggleToolButtonClass struct {
	native *C.GtkToggleToolButtonClass
}

// ParentClass: parent class.
func (t *ToggleToolButtonClass) ParentClass() *ToolButtonClass {
	valptr := &t.native.parent_class
	var _v *ToolButtonClass // out
	_v = (*ToolButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToolButtonClass: instance of this type is always passed by reference.
type ToolButtonClass struct {
	*toolButtonClass
}

// toolButtonClass is the struct that's finalized.
type toolButtonClass struct {
	native *C.GtkToolButtonClass
}

// ParentClass: parent class.
func (t *ToolButtonClass) ParentClass() *ToolItemClass {
	valptr := &t.native.parent_class
	var _v *ToolItemClass // out
	_v = (*ToolItemClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

func (t *ToolButtonClass) ButtonType() coreglib.Type {
	valptr := &t.native.button_type
	var _v coreglib.Type // out
	_v = coreglib.Type(*valptr)
	return _v
}

// ToolItemClass: instance of this type is always passed by reference.
type ToolItemClass struct {
	*toolItemClass
}

// toolItemClass is the struct that's finalized.
type toolItemClass struct {
	native *C.GtkToolItemClass
}

// ParentClass: parent class.
func (t *ToolItemClass) ParentClass() *BinClass {
	valptr := &t.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToolItemGroupClass: instance of this type is always passed by reference.
type ToolItemGroupClass struct {
	*toolItemGroupClass
}

// toolItemGroupClass is the struct that's finalized.
type toolItemGroupClass struct {
	native *C.GtkToolItemGroupClass
}

// ParentClass: parent class.
func (t *ToolItemGroupClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToolPaletteClass: instance of this type is always passed by reference.
type ToolPaletteClass struct {
	*toolPaletteClass
}

// toolPaletteClass is the struct that's finalized.
type toolPaletteClass struct {
	native *C.GtkToolPaletteClass
}

// ParentClass: parent class.
func (t *ToolPaletteClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToolShellIface: virtual function table for the ToolShell interface.
//
// An instance of this type is always passed by reference.
type ToolShellIface struct {
	*toolShellIface
}

// toolShellIface is the struct that's finalized.
type toolShellIface struct {
	native *C.GtkToolShellIface
}

// ToolbarClass: instance of this type is always passed by reference.
type ToolbarClass struct {
	*toolbarClass
}

// toolbarClass is the struct that's finalized.
type toolbarClass struct {
	native *C.GtkToolbarClass
}

func (t *ToolbarClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ToplevelAccessibleClass: instance of this type is always passed by reference.
type ToplevelAccessibleClass struct {
	*toplevelAccessibleClass
}

// toplevelAccessibleClass is the struct that's finalized.
type toplevelAccessibleClass struct {
	native *C.GtkToplevelAccessibleClass
}

func (t *ToplevelAccessibleClass) ParentClass() *atk.ObjectClass {
	valptr := &t.native.parent_class
	var _v *atk.ObjectClass // out
	_v = (*atk.ObjectClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TreeDragDestIface: instance of this type is always passed by reference.
type TreeDragDestIface struct {
	*treeDragDestIface
}

// treeDragDestIface is the struct that's finalized.
type treeDragDestIface struct {
	native *C.GtkTreeDragDestIface
}

// TreeDragSourceIface: instance of this type is always passed by reference.
type TreeDragSourceIface struct {
	*treeDragSourceIface
}

// treeDragSourceIface is the struct that's finalized.
type treeDragSourceIface struct {
	native *C.GtkTreeDragSourceIface
}

// TreeIter is the primary structure for accessing a TreeModel. Models are
// expected to put a unique integer in the stamp member, and put model-specific
// data in the three user_data members.
//
// An instance of this type is always passed by reference.
type TreeIter struct {
	*treeIter
}

// treeIter is the struct that's finalized.
type treeIter struct {
	native *C.GtkTreeIter
}

func marshalTreeIter(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TreeIter{&treeIter{(*C.GtkTreeIter)(b)}}, nil
}

// Stamp: unique stamp to catch invalid iterators.
func (t *TreeIter) Stamp() int {
	valptr := &t.native.stamp
	var _v int // out
	_v = int(*valptr)
	return _v
}

// UserData: model-specific data.
func (t *TreeIter) UserData() unsafe.Pointer {
	valptr := &t.native.user_data
	var _v unsafe.Pointer // out
	_v = (unsafe.Pointer)(unsafe.Pointer(*valptr))
	return _v
}

// UserData2: model-specific data.
func (t *TreeIter) UserData2() unsafe.Pointer {
	valptr := &t.native.user_data2
	var _v unsafe.Pointer // out
	_v = (unsafe.Pointer)(unsafe.Pointer(*valptr))
	return _v
}

// UserData3: model-specific data.
func (t *TreeIter) UserData3() unsafe.Pointer {
	valptr := &t.native.user_data3
	var _v unsafe.Pointer // out
	_v = (unsafe.Pointer)(unsafe.Pointer(*valptr))
	return _v
}

// Stamp: unique stamp to catch invalid iterators.
func (t *TreeIter) SetStamp(stamp int) {
	valptr := &t.native.stamp
	*valptr = C.gint(stamp)
}

// Copy creates a dynamically allocated tree iterator as a copy of iter.
//
// This function is not intended for use in applications, because you can just
// copy the structs by value (GtkTreeIter new_iter = iter;). You must free this
// iter with gtk_tree_iter_free().
//
// The function returns the following values:
//
//   - treeIter: newly-allocated copy of iter.
func (iter *TreeIter) Copy() *TreeIter {
	var _arg0 *C.GtkTreeIter // out
	var _cret *C.GtkTreeIter // in

	_arg0 = (*C.GtkTreeIter)(gextras.StructNative(unsafe.Pointer(iter)))

	_cret = C.gtk_tree_iter_copy(_arg0)
	runtime.KeepAlive(iter)

	var _treeIter *TreeIter // out

	_treeIter = (*TreeIter)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treeIter)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_iter_free((*C.GtkTreeIter)(intern.C))
		},
	)

	return _treeIter
}

// TreeModelFilterClass: instance of this type is always passed by reference.
type TreeModelFilterClass struct {
	*treeModelFilterClass
}

// treeModelFilterClass is the struct that's finalized.
type treeModelFilterClass struct {
	native *C.GtkTreeModelFilterClass
}

// TreeModelIface: instance of this type is always passed by reference.
type TreeModelIface struct {
	*treeModelIface
}

// treeModelIface is the struct that's finalized.
type treeModelIface struct {
	native *C.GtkTreeModelIface
}

// TreeModelSortClass: instance of this type is always passed by reference.
type TreeModelSortClass struct {
	*treeModelSortClass
}

// treeModelSortClass is the struct that's finalized.
type treeModelSortClass struct {
	native *C.GtkTreeModelSortClass
}

// TreePath: instance of this type is always passed by reference.
type TreePath struct {
	*treePath
}

// treePath is the struct that's finalized.
type treePath struct {
	native *C.GtkTreePath
}

func marshalTreePath(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TreePath{&treePath{(*C.GtkTreePath)(b)}}, nil
}

// NewTreePath constructs a struct TreePath.
func NewTreePath() *TreePath {
	var _cret *C.GtkTreePath // in

	_cret = C.gtk_tree_path_new()

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// NewTreePathFirst constructs a struct TreePath.
func NewTreePathFirst() *TreePath {
	var _cret *C.GtkTreePath // in

	_cret = C.gtk_tree_path_new_first()

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// NewTreePathFromIndices constructs a struct TreePath.
func NewTreePathFromIndices(indices []int) *TreePath {
	var _arg1 *C.gint // out
	var _arg2 C.gsize
	var _cret *C.GtkTreePath // in

	_arg2 = (C.gsize)(len(indices))
	_arg1 = (*C.gint)(C.calloc(C.size_t(len(indices)), C.size_t(C.sizeof_gint)))
	defer C.free(unsafe.Pointer(_arg1))
	{
		out := unsafe.Slice((*C.gint)(_arg1), len(indices))
		for i := range indices {
			out[i] = C.gint(indices[i])
		}
	}

	_cret = C.gtk_tree_path_new_from_indicesv(_arg1, _arg2)
	runtime.KeepAlive(indices)

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// NewTreePathFromString constructs a struct TreePath.
func NewTreePathFromString(path string) *TreePath {
	var _arg1 *C.gchar       // out
	var _cret *C.GtkTreePath // in

	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(path)))
	defer C.free(unsafe.Pointer(_arg1))

	_cret = C.gtk_tree_path_new_from_string(_arg1)
	runtime.KeepAlive(path)

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// AppendIndex appends a new index to a path.
//
// As a result, the depth of the path is increased.
//
// The function takes the following parameters:
//
//   - index_: index.
func (path *TreePath) AppendIndex(index_ int) {
	var _arg0 *C.GtkTreePath // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(index_)

	C.gtk_tree_path_append_index(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(index_)
}

// Compare compares two paths.
//
// If a appears before b in a tree, then -1 is returned. If b appears before a,
// then 1 is returned. If the two nodes are equal, then 0 is returned.
//
// The function takes the following parameters:
//
//   - b to compare with.
//
// The function returns the following values:
//
//   - gint: relative positions of a and b.
func (a *TreePath) Compare(b *TreePath) int {
	var _arg0 *C.GtkTreePath // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(a)))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(b)))

	_cret = C.gtk_tree_path_compare(_arg0, _arg1)
	runtime.KeepAlive(a)
	runtime.KeepAlive(b)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Copy creates a new TreePath-struct as a copy of path.
//
// The function returns the following values:
//
//   - treePath: new TreePath-struct.
func (path *TreePath) Copy() *TreePath {
	var _arg0 *C.GtkTreePath // out
	var _cret *C.GtkTreePath // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_copy(_arg0)
	runtime.KeepAlive(path)

	var _treePath *TreePath // out

	_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treePath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
		},
	)

	return _treePath
}

// Down moves path to point to the first child of the current path.
func (path *TreePath) Down() {
	var _arg0 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_path_down(_arg0)
	runtime.KeepAlive(path)
}

// Depth returns the current depth of path.
//
// The function returns the following values:
//
//   - gint: depth of path.
func (path *TreePath) Depth() int {
	var _arg0 *C.GtkTreePath // out
	var _cret C.gint         // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_get_depth(_arg0)
	runtime.KeepAlive(path)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Indices returns the current indices of path.
//
// This is an array of integers, each representing a node in a tree. It also
// returns the number of elements in the array. The array should not be freed.
//
// The function returns the following values:
//
//   - gints: current indices, or NULL.
func (path *TreePath) Indices() []int {
	var _arg0 *C.GtkTreePath // out
	var _cret *C.gint        // in
	var _arg1 C.gint         // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_get_indices_with_depth(_arg0, &_arg1)
	runtime.KeepAlive(path)

	var _gints []int // out

	{
		src := unsafe.Slice((*C.gint)(_cret), _arg1)
		_gints = make([]int, _arg1)
		for i := 0; i < int(_arg1); i++ {
			_gints[i] = int(src[i])
		}
	}

	return _gints
}

// IsAncestor returns TRUE if descendant is a descendant of path.
//
// The function takes the following parameters:
//
//   - descendant: another TreePath-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if descendant is contained inside path.
func (path *TreePath) IsAncestor(descendant *TreePath) bool {
	var _arg0 *C.GtkTreePath // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(descendant)))

	_cret = C.gtk_tree_path_is_ancestor(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(descendant)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsDescendant returns TRUE if path is a descendant of ancestor.
//
// The function takes the following parameters:
//
//   - ancestor: another TreePath-struct.
//
// The function returns the following values:
//
//   - ok: TRUE if ancestor contains path somewhere below it.
func (path *TreePath) IsDescendant(ancestor *TreePath) bool {
	var _arg0 *C.GtkTreePath // out
	var _arg1 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(ancestor)))

	_cret = C.gtk_tree_path_is_descendant(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(ancestor)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// Next moves the path to point to the next node at the current depth.
func (path *TreePath) Next() {
	var _arg0 *C.GtkTreePath // out

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_path_next(_arg0)
	runtime.KeepAlive(path)
}

// PrependIndex prepends a new index to a path.
//
// As a result, the depth of the path is increased.
//
// The function takes the following parameters:
//
//   - index_: index.
func (path *TreePath) PrependIndex(index_ int) {
	var _arg0 *C.GtkTreePath // out
	var _arg1 C.gint         // out

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(index_)

	C.gtk_tree_path_prepend_index(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(index_)
}

// Prev moves the path to point to the previous node at the current depth,
// if it exists.
//
// The function returns the following values:
//
//   - ok: TRUE if path has a previous node, and the move was made.
func (path *TreePath) Prev() bool {
	var _arg0 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_prev(_arg0)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// String generates a string representation of the path.
//
// This string is a “:” separated list of numbers. For example, “4:10:0:3” would
// be an acceptable return value for this string.
//
// The function returns the following values:
//
//   - utf8: newly-allocated string. Must be freed with g_free().
func (path *TreePath) String() string {
	var _arg0 *C.GtkTreePath // out
	var _cret *C.gchar       // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_to_string(_arg0)
	runtime.KeepAlive(path)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// Up moves the path to point to its parent node, if it has a parent.
//
// The function returns the following values:
//
//   - ok: TRUE if path has a parent, and the move was made.
func (path *TreePath) Up() bool {
	var _arg0 *C.GtkTreePath // out
	var _cret C.gboolean     // in

	_arg0 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_path_up(_arg0)
	runtime.KeepAlive(path)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeRowReference tracks model changes so that it always refers to the
// same row (a TreePath refers to a position, not a fixed row). Create a new
// GtkTreeRowReference with gtk_tree_row_reference_new().
//
// An instance of this type is always passed by reference.
type TreeRowReference struct {
	*treeRowReference
}

// treeRowReference is the struct that's finalized.
type treeRowReference struct {
	native *C.GtkTreeRowReference
}

func marshalTreeRowReference(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &TreeRowReference{&treeRowReference{(*C.GtkTreeRowReference)(b)}}, nil
}

// NewTreeRowReference constructs a struct TreeRowReference.
func NewTreeRowReference(model TreeModeller, path *TreePath) *TreeRowReference {
	var _arg1 *C.GtkTreeModel        // out
	var _arg2 *C.GtkTreePath         // out
	var _cret *C.GtkTreeRowReference // in

	_arg1 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_row_reference_new(_arg1, _arg2)
	runtime.KeepAlive(model)
	runtime.KeepAlive(path)

	var _treeRowReference *TreeRowReference // out

	_treeRowReference = (*TreeRowReference)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treeRowReference)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_row_reference_free((*C.GtkTreeRowReference)(intern.C))
		},
	)

	return _treeRowReference
}

// NewTreeRowReferenceProxy constructs a struct TreeRowReference.
func NewTreeRowReferenceProxy(proxy *coreglib.Object, model TreeModeller, path *TreePath) *TreeRowReference {
	var _arg1 *C.GObject             // out
	var _arg2 *C.GtkTreeModel        // out
	var _arg3 *C.GtkTreePath         // out
	var _cret *C.GtkTreeRowReference // in

	_arg1 = (*C.GObject)(unsafe.Pointer(proxy.Native()))
	_arg2 = (*C.GtkTreeModel)(unsafe.Pointer(coreglib.InternObject(model).Native()))
	_arg3 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_tree_row_reference_new_proxy(_arg1, _arg2, _arg3)
	runtime.KeepAlive(proxy)
	runtime.KeepAlive(model)
	runtime.KeepAlive(path)

	var _treeRowReference *TreeRowReference // out

	_treeRowReference = (*TreeRowReference)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treeRowReference)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_row_reference_free((*C.GtkTreeRowReference)(intern.C))
		},
	)

	return _treeRowReference
}

// Copy copies a TreeRowReference.
//
// The function returns the following values:
//
//   - treeRowReference: copy of reference.
func (reference *TreeRowReference) Copy() *TreeRowReference {
	var _arg0 *C.GtkTreeRowReference // out
	var _cret *C.GtkTreeRowReference // in

	_arg0 = (*C.GtkTreeRowReference)(gextras.StructNative(unsafe.Pointer(reference)))

	_cret = C.gtk_tree_row_reference_copy(_arg0)
	runtime.KeepAlive(reference)

	var _treeRowReference *TreeRowReference // out

	_treeRowReference = (*TreeRowReference)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_treeRowReference)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_tree_row_reference_free((*C.GtkTreeRowReference)(intern.C))
		},
	)

	return _treeRowReference
}

// Model returns the model that the row reference is monitoring.
//
// The function returns the following values:
//
//   - treeModel: model.
func (reference *TreeRowReference) Model() *TreeModel {
	var _arg0 *C.GtkTreeRowReference // out
	var _cret *C.GtkTreeModel        // in

	_arg0 = (*C.GtkTreeRowReference)(gextras.StructNative(unsafe.Pointer(reference)))

	_cret = C.gtk_tree_row_reference_get_model(_arg0)
	runtime.KeepAlive(reference)

	var _treeModel *TreeModel // out

	_treeModel = wrapTreeModel(coreglib.Take(unsafe.Pointer(_cret)))

	return _treeModel
}

// Path returns a path that the row reference currently points to, or NULL if
// the path pointed to is no longer valid.
//
// The function returns the following values:
//
//   - treePath (optional): current path, or NULL.
func (reference *TreeRowReference) Path() *TreePath {
	var _arg0 *C.GtkTreeRowReference // out
	var _cret *C.GtkTreePath         // in

	_arg0 = (*C.GtkTreeRowReference)(gextras.StructNative(unsafe.Pointer(reference)))

	_cret = C.gtk_tree_row_reference_get_path(_arg0)
	runtime.KeepAlive(reference)

	var _treePath *TreePath // out

	if _cret != nil {
		_treePath = (*TreePath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
		runtime.SetFinalizer(
			gextras.StructIntern(unsafe.Pointer(_treePath)),
			func(intern *struct{ C unsafe.Pointer }) {
				C.gtk_tree_path_free((*C.GtkTreePath)(intern.C))
			},
		)
	}

	return _treePath
}

// Valid returns TRUE if the reference is non-NULL and refers to a current valid
// path.
//
// The function returns the following values:
//
//   - ok: TRUE if reference points to a valid path.
func (reference *TreeRowReference) Valid() bool {
	var _arg0 *C.GtkTreeRowReference // out
	var _cret C.gboolean             // in

	if reference != nil {
		_arg0 = (*C.GtkTreeRowReference)(gextras.StructNative(unsafe.Pointer(reference)))
	}

	_cret = C.gtk_tree_row_reference_valid(_arg0)
	runtime.KeepAlive(reference)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// TreeRowReferenceDeleted lets a set of row reference created by
// gtk_tree_row_reference_new_proxy() know that the model emitted the
// TreeModel::row-deleted signal.
//
// The function takes the following parameters:
//
//   - proxy: #GObject.
//   - path position that was deleted.
func TreeRowReferenceDeleted(proxy *coreglib.Object, path *TreePath) {
	var _arg1 *C.GObject     // out
	var _arg2 *C.GtkTreePath // out

	_arg1 = (*C.GObject)(unsafe.Pointer(proxy.Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_row_reference_deleted(_arg1, _arg2)
	runtime.KeepAlive(proxy)
	runtime.KeepAlive(path)
}

// TreeRowReferenceInserted lets a set of row reference created by
// gtk_tree_row_reference_new_proxy() know that the model emitted the
// TreeModel::row-inserted signal.
//
// The function takes the following parameters:
//
//   - proxy: #GObject.
//   - path: row position that was inserted.
func TreeRowReferenceInserted(proxy *coreglib.Object, path *TreePath) {
	var _arg1 *C.GObject     // out
	var _arg2 *C.GtkTreePath // out

	_arg1 = (*C.GObject)(unsafe.Pointer(proxy.Native()))
	_arg2 = (*C.GtkTreePath)(gextras.StructNative(unsafe.Pointer(path)))

	C.gtk_tree_row_reference_inserted(_arg1, _arg2)
	runtime.KeepAlive(proxy)
	runtime.KeepAlive(path)
}

// TreeSelectionClass: instance of this type is always passed by reference.
type TreeSelectionClass struct {
	*treeSelectionClass
}

// treeSelectionClass is the struct that's finalized.
type treeSelectionClass struct {
	native *C.GtkTreeSelectionClass
}

// TreeSortableIface: instance of this type is always passed by reference.
type TreeSortableIface struct {
	*treeSortableIface
}

// treeSortableIface is the struct that's finalized.
type treeSortableIface struct {
	native *C.GtkTreeSortableIface
}

// TreeStoreClass: instance of this type is always passed by reference.
type TreeStoreClass struct {
	*treeStoreClass
}

// treeStoreClass is the struct that's finalized.
type treeStoreClass struct {
	native *C.GtkTreeStoreClass
}

// TreeViewAccessibleClass: instance of this type is always passed by reference.
type TreeViewAccessibleClass struct {
	*treeViewAccessibleClass
}

// treeViewAccessibleClass is the struct that's finalized.
type treeViewAccessibleClass struct {
	native *C.GtkTreeViewAccessibleClass
}

func (t *TreeViewAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &t.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TreeViewClass: instance of this type is always passed by reference.
type TreeViewClass struct {
	*treeViewClass
}

// treeViewClass is the struct that's finalized.
type treeViewClass struct {
	native *C.GtkTreeViewClass
}

func (t *TreeViewClass) ParentClass() *ContainerClass {
	valptr := &t.native.parent_class
	var _v *ContainerClass // out
	_v = (*ContainerClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// TreeViewColumnClass: instance of this type is always passed by reference.
type TreeViewColumnClass struct {
	*treeViewColumnClass
}

// treeViewColumnClass is the struct that's finalized.
type treeViewColumnClass struct {
	native *C.GtkTreeViewColumnClass
}

// UIManagerClass: instance of this type is always passed by reference.
type UIManagerClass struct {
	*uiManagerClass
}

// uiManagerClass is the struct that's finalized.
type uiManagerClass struct {
	native *C.GtkUIManagerClass
}

// VBoxClass: instance of this type is always passed by reference.
type VBoxClass struct {
	*vBoxClass
}

// vBoxClass is the struct that's finalized.
type vBoxClass struct {
	native *C.GtkVBoxClass
}

func (v *VBoxClass) ParentClass() *BoxClass {
	valptr := &v.native.parent_class
	var _v *BoxClass // out
	_v = (*BoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VButtonBoxClass: instance of this type is always passed by reference.
type VButtonBoxClass struct {
	*vButtonBoxClass
}

// vButtonBoxClass is the struct that's finalized.
type vButtonBoxClass struct {
	native *C.GtkVButtonBoxClass
}

func (v *VButtonBoxClass) ParentClass() *ButtonBoxClass {
	valptr := &v.native.parent_class
	var _v *ButtonBoxClass // out
	_v = (*ButtonBoxClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VPanedClass: instance of this type is always passed by reference.
type VPanedClass struct {
	*vPanedClass
}

// vPanedClass is the struct that's finalized.
type vPanedClass struct {
	native *C.GtkVPanedClass
}

func (v *VPanedClass) ParentClass() *PanedClass {
	valptr := &v.native.parent_class
	var _v *PanedClass // out
	_v = (*PanedClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VScaleClass: instance of this type is always passed by reference.
type VScaleClass struct {
	*vScaleClass
}

// vScaleClass is the struct that's finalized.
type vScaleClass struct {
	native *C.GtkVScaleClass
}

func (v *VScaleClass) ParentClass() *ScaleClass {
	valptr := &v.native.parent_class
	var _v *ScaleClass // out
	_v = (*ScaleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VScrollbarClass: instance of this type is always passed by reference.
type VScrollbarClass struct {
	*vScrollbarClass
}

// vScrollbarClass is the struct that's finalized.
type vScrollbarClass struct {
	native *C.GtkVScrollbarClass
}

func (v *VScrollbarClass) ParentClass() *ScrollbarClass {
	valptr := &v.native.parent_class
	var _v *ScrollbarClass // out
	_v = (*ScrollbarClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VSeparatorClass: instance of this type is always passed by reference.
type VSeparatorClass struct {
	*vSeparatorClass
}

// vSeparatorClass is the struct that's finalized.
type vSeparatorClass struct {
	native *C.GtkVSeparatorClass
}

func (v *VSeparatorClass) ParentClass() *SeparatorClass {
	valptr := &v.native.parent_class
	var _v *SeparatorClass // out
	_v = (*SeparatorClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// ViewportClass: instance of this type is always passed by reference.
type ViewportClass struct {
	*viewportClass
}

// viewportClass is the struct that's finalized.
type viewportClass struct {
	native *C.GtkViewportClass
}

// ParentClass: parent class.
func (v *ViewportClass) ParentClass() *BinClass {
	valptr := &v.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// VolumeButtonClass: instance of this type is always passed by reference.
type VolumeButtonClass struct {
	*volumeButtonClass
}

// volumeButtonClass is the struct that's finalized.
type volumeButtonClass struct {
	native *C.GtkVolumeButtonClass
}

func (v *VolumeButtonClass) ParentClass() *ScaleButtonClass {
	valptr := &v.native.parent_class
	var _v *ScaleButtonClass // out
	_v = (*ScaleButtonClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// WidgetAccessibleClass: instance of this type is always passed by reference.
type WidgetAccessibleClass struct {
	*widgetAccessibleClass
}

// widgetAccessibleClass is the struct that's finalized.
type widgetAccessibleClass struct {
	native *C.GtkWidgetAccessibleClass
}

func (w *WidgetAccessibleClass) ParentClass() *AccessibleClass {
	valptr := &w.native.parent_class
	var _v *AccessibleClass // out
	_v = (*AccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// WidgetClass: instance of this type is always passed by reference.
type WidgetClass struct {
	*widgetClass
}

// widgetClass is the struct that's finalized.
type widgetClass struct {
	native *C.GtkWidgetClass
}

// ActivateSignal: signal to emit when a widget of this class is activated,
// gtk_widget_activate() handles the emission. Implementation of this signal is
// optional.
func (w *WidgetClass) ActivateSignal() uint {
	valptr := &w.native.activate_signal
	var _v uint // out
	_v = uint(*valptr)
	return _v
}

// BindTemplateChildFull: automatically assign an object declared in the class
// template XML to be set to a location on a freshly built instance’s private
// data, or alternatively accessible via gtk_widget_get_template_child().
//
// The struct can point either into the public instance, then you should use
// G_STRUCT_OFFSET(WidgetType, member) for struct_offset, or in the private
// struct, then you should use G_PRIVATE_OFFSET(WidgetType, member).
//
// An explicit strong reference will be held automatically for the duration
// of your instance’s life cycle, it will be released automatically when
// Class.dispose() runs on your instance and if a struct_offset that is != 0 is
// specified, then the automatic location in your instance public or private
// data will be set to NULL. You can however access an automated child pointer
// the first time your classes Class.dispose() runs, or alternatively in
// WidgetClass.destroy().
//
// If internal_child is specified, BuildableIface.get_internal_child() will
// be automatically implemented by the Widget class so there is no need to
// implement it manually.
//
// The wrapper macros gtk_widget_class_bind_template_child(),
// gtk_widget_class_bind_template_child_internal(),
// gtk_widget_class_bind_template_child_private() and
// gtk_widget_class_bind_template_child_internal_private() might be more
// convenient to use.
//
// Note that this must be called from a composite widget classes class
// initializer after calling gtk_widget_class_set_template().
//
// The function takes the following parameters:
//
//   - name: “id” of the child defined in the template XML.
//   - internalChild: whether the child should be accessible as an
//     “internal-child” when this class is used in GtkBuilder XML.
//   - structOffset: structure offset into the composite widget’s instance
//     public or private structure where the automated child pointer should be
//     set, or 0 to not assign the pointer.
func (widgetClass *WidgetClass) BindTemplateChildFull(name string, internalChild bool, structOffset int) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 *C.gchar          // out
	var _arg2 C.gboolean        // out
	var _arg3 C.gssize          // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))
	if internalChild {
		_arg2 = C.TRUE
	}
	_arg3 = C.gssize(structOffset)

	C.gtk_widget_class_bind_template_child_full(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(name)
	runtime.KeepAlive(internalChild)
	runtime.KeepAlive(structOffset)
}

// CSSName gets the name used by this class for matching in CSS code. See
// gtk_widget_class_set_css_name() for details.
//
// The function returns the following values:
//
//   - utf8: CSS name of the given class.
func (widgetClass *WidgetClass) CSSName() string {
	var _arg0 *C.GtkWidgetClass // out
	var _cret *C.char           // in

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))

	_cret = C.gtk_widget_class_get_css_name(_arg0)
	runtime.KeepAlive(widgetClass)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))

	return _utf8
}

// SetAccessibleRole sets the default Role to be set on accessibles
// created for widgets of widget_class. Accessibles may decide to not
// honor this setting if their role reporting is more refined. Calls to
// gtk_widget_class_set_accessible_type() will reset this value.
//
// In cases where you want more fine-grained control over the role of
// accessibles created for widget_class, you should provide your own accessible
// type and use gtk_widget_class_set_accessible_type() instead.
//
// If role is K_ROLE_INVALID, the default role will not be changed and the
// accessible’s default role will be used instead.
//
// This function should only be called from class init functions of widgets.
//
// The function takes the following parameters:
//
//   - role to use for accessibles created for widget_class.
func (widgetClass *WidgetClass) SetAccessibleRole(role atk.Role) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 C.AtkRole         // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = C.AtkRole(role)

	C.gtk_widget_class_set_accessible_role(_arg0, _arg1)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(role)
}

// SetAccessibleType sets the type to be used for creating accessibles for
// widgets of widget_class. The given type must be a subtype of the type used
// for accessibles of the parent class.
//
// This function should only be called from class init functions of widgets.
//
// The function takes the following parameters:
//
//   - typ: object type that implements the accessible for widget_class.
func (widgetClass *WidgetClass) SetAccessibleType(typ coreglib.Type) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 C.GType           // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = C.GType(typ)

	C.gtk_widget_class_set_accessible_type(_arg0, _arg1)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(typ)
}

// SetCSSName sets the name to be used for CSS matching of widgets.
//
// If this function is not called for a given class, the name of the parent
// class is used.
//
// The function takes the following parameters:
//
//   - name to use.
func (widgetClass *WidgetClass) SetCSSName(name string) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 *C.char           // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = (*C.char)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_widget_class_set_css_name(_arg0, _arg1)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(name)
}

// SetTemplate: this should be called at class initialization time to specify
// the GtkBuilder XML to be used to extend a widget.
//
// For convenience, gtk_widget_class_set_template_from_resource() is also
// provided.
//
// Note that any class that installs templates must call
// gtk_widget_init_template() in the widget’s instance initializer.
//
// The function takes the following parameters:
//
//   - templateBytes holding the Builder XML.
func (widgetClass *WidgetClass) SetTemplate(templateBytes *glib.Bytes) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 *C.GBytes         // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = (*C.GBytes)(gextras.StructNative(unsafe.Pointer(templateBytes)))

	C.gtk_widget_class_set_template(_arg0, _arg1)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(templateBytes)
}

// SetTemplateFromResource: convenience function to call
// gtk_widget_class_set_template().
//
// Note that any class that installs templates must call
// gtk_widget_init_template() in the widget’s instance initializer.
//
// The function takes the following parameters:
//
//   - resourceName: name of the resource to load the template from.
func (widgetClass *WidgetClass) SetTemplateFromResource(resourceName string) {
	var _arg0 *C.GtkWidgetClass // out
	var _arg1 *C.gchar          // out

	_arg0 = (*C.GtkWidgetClass)(gextras.StructNative(unsafe.Pointer(widgetClass)))
	_arg1 = (*C.gchar)(unsafe.Pointer(C.CString(resourceName)))
	defer C.free(unsafe.Pointer(_arg1))

	C.gtk_widget_class_set_template_from_resource(_arg0, _arg1)
	runtime.KeepAlive(widgetClass)
	runtime.KeepAlive(resourceName)
}

// WidgetPath is a boxed type that represents a widget hierarchy from the
// topmost widget, typically a toplevel, to any child. This widget path
// abstraction is used in StyleContext on behalf of the real widget in order to
// query style information.
//
// If you are using GTK+ widgets, you probably will not need to use this API
// directly, as there is gtk_widget_get_path(), and the style context returned
// by gtk_widget_get_style_context() will be automatically updated on widget
// hierarchy changes.
//
// The widget path generation is generally simple:
//
// Defining a button within a window
//
//	{
//	  GtkWidgetPath *path;
//	  guint pos;
//
//	  path = gtk_widget_path_new ();
//
//	  pos = gtk_widget_path_append_type (path, GTK_TYPE_NOTEBOOK);
//	  gtk_widget_path_iter_add_region (path, pos, "tab", GTK_REGION_EVEN | GTK_REGION_FIRST);
//
//	  pos = gtk_widget_path_append_type (path, GTK_TYPE_LABEL);
//	  gtk_widget_path_iter_set_name (path, pos, "first tab label");
//	}
//
// All this information will be used to match the style information that applies
// to the described widget.
//
// An instance of this type is always passed by reference.
type WidgetPath struct {
	*widgetPath
}

// widgetPath is the struct that's finalized.
type widgetPath struct {
	native *C.GtkWidgetPath
}

func marshalWidgetPath(p uintptr) (interface{}, error) {
	b := coreglib.ValueFromNative(unsafe.Pointer(p)).Boxed()
	return &WidgetPath{&widgetPath{(*C.GtkWidgetPath)(b)}}, nil
}

// NewWidgetPath constructs a struct WidgetPath.
func NewWidgetPath() *WidgetPath {
	var _cret *C.GtkWidgetPath // in

	_cret = C.gtk_widget_path_new()

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// AppendForWidget appends the data from widget to the widget hierarchy
// represented by path. This function is a shortcut for adding information from
// widget to the given path. This includes setting the name or adding the style
// classes from widget.
//
// The function takes the following parameters:
//
//   - widget to append to the widget path.
//
// The function returns the following values:
//
//   - gint: position where the data was inserted.
func (path *WidgetPath) AppendForWidget(widget Widgetter) int {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 *C.GtkWidget     // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(widget).Native()))

	_cret = C.gtk_widget_path_append_for_widget(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(widget)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// AppendType appends a widget type to the widget hierarchy represented by path.
//
// The function takes the following parameters:
//
//   - typ: widget type to append.
//
// The function returns the following values:
//
//   - gint: position where the element was inserted.
func (path *WidgetPath) AppendType(typ coreglib.Type) int {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.GType          // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.GType(typ)

	_cret = C.gtk_widget_path_append_type(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(typ)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// AppendWithSiblings appends a widget type with all its siblings to the
// widget hierarchy represented by path. Using this function instead of
// gtk_widget_path_append_type() will allow the CSS theming to use sibling
// matches in selectors and apply :nth-child() pseudo classes. In turn,
// it requires a lot more care in widget implementations as widgets need to
// make sure to call gtk_widget_reset_style() on all involved widgets when the
// siblings path changes.
//
// The function takes the following parameters:
//
//   - siblings: widget path describing a list of siblings. This path may not
//     contain any siblings itself and it must not be modified afterwards.
//   - siblingIndex: index into siblings for where the added element is
//     positioned.
//
// The function returns the following values:
//
//   - gint: position where the element was inserted.
func (path *WidgetPath) AppendWithSiblings(siblings *WidgetPath, siblingIndex uint) int {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 *C.GtkWidgetPath // out
	var _arg2 C.guint          // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(siblings)))
	_arg2 = C.guint(siblingIndex)

	_cret = C.gtk_widget_path_append_with_siblings(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(siblings)
	runtime.KeepAlive(siblingIndex)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// Copy returns a copy of path.
//
// The function returns the following values:
//
//   - widgetPath: copy of path.
func (path *WidgetPath) Copy() *WidgetPath {
	var _arg0 *C.GtkWidgetPath // out
	var _cret *C.GtkWidgetPath // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_widget_path_copy(_arg0)
	runtime.KeepAlive(path)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// ObjectType returns the topmost object type, that is, the object type this
// path is representing.
//
// The function returns the following values:
//
//   - gType: object type.
func (path *WidgetPath) ObjectType() coreglib.Type {
	var _arg0 *C.GtkWidgetPath // out
	var _cret C.GType          // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_widget_path_get_object_type(_arg0)
	runtime.KeepAlive(path)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// HasParent returns TRUE if any of the parents of the widget represented in
// path is of type type, or any subtype of it.
//
// The function takes the following parameters:
//
//   - typ: widget type to check in parents.
//
// The function returns the following values:
//
//   - ok: TRUE if any parent is of type type.
func (path *WidgetPath) HasParent(typ coreglib.Type) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.GType          // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.GType(typ)

	_cret = C.gtk_widget_path_has_parent(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(typ)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IsType returns TRUE if the widget type represented by this path is type,
// or a subtype of it.
//
// The function takes the following parameters:
//
//   - typ: widget type to match.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget represented by path is of type type.
func (path *WidgetPath) IsType(typ coreglib.Type) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.GType          // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.GType(typ)

	_cret = C.gtk_widget_path_is_type(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(typ)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterAddClass adds the class name to the widget at position pos in the
// hierarchy defined in path. See gtk_style_context_add_class().
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name class name.
func (path *WidgetPath) IterAddClass(pos int, name string) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_widget_path_iter_add_class(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
}

// IterAddRegion adds the region name to the widget at position pos in the
// hierarchy defined in path. See gtk_style_context_add_region().
//
// Region names must only contain lowercase letters and “-”, starting always
// with a lowercase letter.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name: region name.
//   - flags affecting the region.
func (path *WidgetPath) IterAddRegion(pos int, name string, flags RegionFlags) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out
	var _arg3 C.GtkRegionFlags // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))
	_arg3 = C.GtkRegionFlags(flags)

	C.gtk_widget_path_iter_add_region(_arg0, _arg1, _arg2, _arg3)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
	runtime.KeepAlive(flags)
}

// IterClearClasses removes all classes from the widget at position pos in the
// hierarchy defined in path.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
func (path *WidgetPath) IterClearClasses(pos int) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	C.gtk_widget_path_iter_clear_classes(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
}

// IterClearRegions removes all regions from the widget at position pos in the
// hierarchy defined in path.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
func (path *WidgetPath) IterClearRegions(pos int) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	C.gtk_widget_path_iter_clear_regions(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
}

// IterGetName returns the name corresponding to the widget found at the
// position pos in the widget hierarchy defined by path.
//
// The function takes the following parameters:
//
//   - pos: position to get the widget name for, -1 for the path head.
//
// The function returns the following values:
//
//   - utf8 (optional): widget name, or NULL if none was set.
func (path *WidgetPath) IterGetName(pos int) string {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret *C.gchar         // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_name(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// IterGetObjectName returns the object name that is at position pos in the
// widget hierarchy defined in path.
//
// The function takes the following parameters:
//
//   - pos: position to get the object name for, -1 for the path head.
//
// The function returns the following values:
//
//   - utf8 (optional): name or NULL.
func (path *WidgetPath) IterGetObjectName(pos int) string {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret *C.char          // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_object_name(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _utf8 string // out

	if _cret != nil {
		_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	}

	return _utf8
}

// IterGetObjectType returns the object #GType that is at position pos in the
// widget hierarchy defined in path.
//
// The function takes the following parameters:
//
//   - pos: position to get the object type for, -1 for the path head.
//
// The function returns the following values:
//
//   - gType: widget type.
func (path *WidgetPath) IterGetObjectType(pos int) coreglib.Type {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret C.GType          // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_object_type(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _gType coreglib.Type // out

	_gType = coreglib.Type(_cret)

	return _gType
}

// IterGetSiblingIndex returns the index into the list of siblings for the
// element at pos as returned by gtk_widget_path_iter_get_siblings(). If that
// function would return NULL because the element at pos has no siblings,
// this function will return 0.
//
// The function takes the following parameters:
//
//   - pos: position to get the sibling index for, -1 for the path head.
//
// The function returns the following values:
//
//   - guint: 0 or the index into the list of siblings for the element at pos.
func (path *WidgetPath) IterGetSiblingIndex(pos int) uint {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret C.guint          // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_sibling_index(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _guint uint // out

	_guint = uint(_cret)

	return _guint
}

// IterGetSiblings returns the list of siblings for the element at pos. If the
// element was not added with siblings, NULL is returned.
//
// The function takes the following parameters:
//
//   - pos: position to get the siblings for, -1 for the path head.
//
// The function returns the following values:
//
//   - widgetPath: NULL or the list of siblings for the element at pos.
func (path *WidgetPath) IterGetSiblings(pos int) *WidgetPath {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret *C.GtkWidgetPath // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_siblings(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _widgetPath *WidgetPath // out

	_widgetPath = (*WidgetPath)(gextras.NewStructNative(unsafe.Pointer(_cret)))
	C.gtk_widget_path_ref(_cret)
	runtime.SetFinalizer(
		gextras.StructIntern(unsafe.Pointer(_widgetPath)),
		func(intern *struct{ C unsafe.Pointer }) {
			C.gtk_widget_path_unref((*C.GtkWidgetPath)(intern.C))
		},
	)

	return _widgetPath
}

// IterGetState returns the state flags corresponding to the widget found at the
// position pos in the widget hierarchy defined by path.
//
// The function takes the following parameters:
//
//   - pos: position to get the state for, -1 for the path head.
//
// The function returns the following values:
//
//   - stateFlags: state flags.
func (path *WidgetPath) IterGetState(pos int) StateFlags {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret C.GtkStateFlags  // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_get_state(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _stateFlags StateFlags // out

	_stateFlags = StateFlags(_cret)

	return _stateFlags
}

// IterHasClass returns TRUE if the widget at position pos has the class name
// defined, FALSE otherwise.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - name class name.
//
// The function returns the following values:
//
//   - ok: TRUE if the class name is defined for the widget at pos.
func (path *WidgetPath) IterHasClass(pos int, name string) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_widget_path_iter_has_class(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterHasName returns TRUE if the widget at position pos has the name name,
// FALSE otherwise.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - name: widget name.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget at pos has this name.
func (path *WidgetPath) IterHasName(pos int, name string) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_widget_path_iter_has_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterHasQclass: see gtk_widget_path_iter_has_class(). This is a version that
// operates with GQuarks.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - qname class name as a #GQuark.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget at pos has the class defined.
func (path *WidgetPath) IterHasQclass(pos int, qname glib.Quark) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 C.GQuark         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = C.GQuark(qname)

	_cret = C.gtk_widget_path_iter_has_qclass(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(qname)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterHasQname: see gtk_widget_path_iter_has_name(). This is a version that
// operates on #GQuarks.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - qname: widget name as a #GQuark.
//
// The function returns the following values:
//
//   - ok: TRUE if the widget at pos has this name.
func (path *WidgetPath) IterHasQname(pos int, qname glib.Quark) bool {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 C.GQuark         // out
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = C.GQuark(qname)

	_cret = C.gtk_widget_path_iter_has_qname(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(qname)

	var _ok bool // out

	if _cret != 0 {
		_ok = true
	}

	return _ok
}

// IterHasQregion: see gtk_widget_path_iter_has_region(). This is a version that
// operates with GQuarks.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - qname: region name as a #GQuark.
//
// The function returns the following values:
//
//   - flags: return location for the region flags.
//   - ok: TRUE if the widget at pos has the region defined.
func (path *WidgetPath) IterHasQregion(pos int, qname glib.Quark) (RegionFlags, bool) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 C.GQuark         // out
	var _arg3 C.GtkRegionFlags // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = C.GQuark(qname)

	_cret = C.gtk_widget_path_iter_has_qregion(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(qname)

	var _flags RegionFlags // out
	var _ok bool           // out

	_flags = RegionFlags(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _flags, _ok
}

// IterHasRegion returns TRUE if the widget at position pos has the class name
// defined, FALSE otherwise.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//   - name: region name.
//
// The function returns the following values:
//
//   - flags: return location for the region flags.
//   - ok: TRUE if the class name is defined for the widget at pos.
func (path *WidgetPath) IterHasRegion(pos int, name string) (RegionFlags, bool) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out
	var _arg3 C.GtkRegionFlags // in
	var _cret C.gboolean       // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	_cret = C.gtk_widget_path_iter_has_region(_arg0, _arg1, _arg2, &_arg3)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)

	var _flags RegionFlags // out
	var _ok bool           // out

	_flags = RegionFlags(_arg3)
	if _cret != 0 {
		_ok = true
	}

	return _flags, _ok
}

// IterListClasses returns a list with all the class names defined for the
// widget at position pos in the hierarchy defined in path.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//
// The function returns the following values:
//
//   - sList: list of classes, This is a list of strings, the List contents are
//     owned by GTK+, but you should use g_slist_free() to free the list itself.
func (path *WidgetPath) IterListClasses(pos int) []string {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret *C.GSList        // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_list_classes(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _sList []string // out

	_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// IterListRegions returns a list with all the region names defined for the
// widget at position pos in the hierarchy defined in path.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to query, -1 for the path head.
//
// The function returns the following values:
//
//   - sList: list of regions, This is a list of strings, the List contents are
//     owned by GTK+, but you should use g_slist_free() to free the list itself.
func (path *WidgetPath) IterListRegions(pos int) []string {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _cret *C.GSList        // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)

	_cret = C.gtk_widget_path_iter_list_regions(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)

	var _sList []string // out

	_sList = make([]string, 0, gextras.SListSize(unsafe.Pointer(_cret)))
	gextras.MoveSList(unsafe.Pointer(_cret), true, func(v unsafe.Pointer) {
		src := (*C.gchar)(v)
		var dst string // out
		dst = C.GoString((*C.gchar)(unsafe.Pointer(src)))
		_sList = append(_sList, dst)
	})

	return _sList
}

// IterRemoveClass removes the class name from the widget at position pos in the
// hierarchy defined in path.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name class name.
func (path *WidgetPath) IterRemoveClass(pos int, name string) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_widget_path_iter_remove_class(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
}

// IterRemoveRegion removes the region name from the widget at position pos in
// the hierarchy defined in path.
//
// Deprecated: The use of regions is deprecated.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name: region name.
func (path *WidgetPath) IterRemoveRegion(pos int, name string) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_widget_path_iter_remove_region(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
}

// IterSetName sets the widget name for the widget found at position pos in the
// widget hierarchy defined by path.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name: widget name.
func (path *WidgetPath) IterSetName(pos int, name string) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.gchar         // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = (*C.gchar)(unsafe.Pointer(C.CString(name)))
	defer C.free(unsafe.Pointer(_arg2))

	C.gtk_widget_path_iter_set_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
}

// IterSetObjectName sets the object name for a given position in the widget
// hierarchy defined by path.
//
// When set, the object name overrides the object type when matching CSS.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - name (optional): object name to set or NULL to unset.
func (path *WidgetPath) IterSetObjectName(pos int, name string) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 *C.char          // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	if name != "" {
		_arg2 = (*C.char)(unsafe.Pointer(C.CString(name)))
		defer C.free(unsafe.Pointer(_arg2))
	}

	C.gtk_widget_path_iter_set_object_name(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(name)
}

// IterSetObjectType sets the object type for a given position in the widget
// hierarchy defined by path.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - typ: object type to set.
func (path *WidgetPath) IterSetObjectType(pos int, typ coreglib.Type) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 C.GType          // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = C.GType(typ)

	C.gtk_widget_path_iter_set_object_type(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(typ)
}

// IterSetState sets the widget name for the widget found at position pos in the
// widget hierarchy defined by path.
//
// If you want to update just a single state flag, you need to do this manually,
// as this function updates all state flags.
//
// Setting a flag
//
//	gtk_widget_path_iter_set_state (path, pos, gtk_widget_path_iter_get_state (path, pos) & ~flag);.
//
// The function takes the following parameters:
//
//   - pos: position to modify, -1 for the path head.
//   - state flags.
func (path *WidgetPath) IterSetState(pos int, state StateFlags) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.gint           // out
	var _arg2 C.GtkStateFlags  // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.gint(pos)
	_arg2 = C.GtkStateFlags(state)

	C.gtk_widget_path_iter_set_state(_arg0, _arg1, _arg2)
	runtime.KeepAlive(path)
	runtime.KeepAlive(pos)
	runtime.KeepAlive(state)
}

// Length returns the number of Widget #GTypes between the represented widget
// and its topmost container.
//
// The function returns the following values:
//
//   - gint: number of elements in the path.
func (path *WidgetPath) Length() int {
	var _arg0 *C.GtkWidgetPath // out
	var _cret C.gint           // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_widget_path_length(_arg0)
	runtime.KeepAlive(path)

	var _gint int // out

	_gint = int(_cret)

	return _gint
}

// PrependType prepends a widget type to the widget hierachy represented by
// path.
//
// The function takes the following parameters:
//
//   - typ: widget type to prepend.
func (path *WidgetPath) PrependType(typ coreglib.Type) {
	var _arg0 *C.GtkWidgetPath // out
	var _arg1 C.GType          // out

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))
	_arg1 = C.GType(typ)

	C.gtk_widget_path_prepend_type(_arg0, _arg1)
	runtime.KeepAlive(path)
	runtime.KeepAlive(typ)
}

// String dumps the widget path into a string representation. It tries to match
// the CSS style as closely as possible (Note that there might be paths that
// cannot be represented in CSS).
//
// The main use of this code is for debugging purposes, so that you can
// g_print() the path or dump it in a gdb session.
//
// The function returns the following values:
//
//   - utf8: new string describing path.
func (path *WidgetPath) String() string {
	var _arg0 *C.GtkWidgetPath // out
	var _cret *C.char          // in

	_arg0 = (*C.GtkWidgetPath)(gextras.StructNative(unsafe.Pointer(path)))

	_cret = C.gtk_widget_path_to_string(_arg0)
	runtime.KeepAlive(path)

	var _utf8 string // out

	_utf8 = C.GoString((*C.gchar)(unsafe.Pointer(_cret)))
	defer C.free(unsafe.Pointer(_cret))

	return _utf8
}

// WindowAccessibleClass: instance of this type is always passed by reference.
type WindowAccessibleClass struct {
	*windowAccessibleClass
}

// windowAccessibleClass is the struct that's finalized.
type windowAccessibleClass struct {
	native *C.GtkWindowAccessibleClass
}

func (w *WindowAccessibleClass) ParentClass() *ContainerAccessibleClass {
	valptr := &w.native.parent_class
	var _v *ContainerAccessibleClass // out
	_v = (*ContainerAccessibleClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// WindowClass: instance of this type is always passed by reference.
type WindowClass struct {
	*windowClass
}

// windowClass is the struct that's finalized.
type windowClass struct {
	native *C.GtkWindowClass
}

// ParentClass: parent class.
func (w *WindowClass) ParentClass() *BinClass {
	valptr := &w.native.parent_class
	var _v *BinClass // out
	_v = (*BinClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
	return _v
}

// WindowGroupClass: instance of this type is always passed by reference.
type WindowGroupClass struct {
	*windowGroupClass
}

// windowGroupClass is the struct that's finalized.
type windowGroupClass struct {
	native *C.GtkWindowGroupClass
}

// NewDialogWithFlags is a slightly more advanced version of NewDialog,
// allowing the user to construct a new dialog with the given
// constructor-only dialog flags.
//
// It is a wrapper around Gtk.Dialog.new_with_buttons in C.
func NewDialogWithFlags(title string, parent *Window, flags DialogFlags) *Dialog {
	ctitle := C.CString(title)
	defer C.free(unsafe.Pointer(ctitle))

	w := C._gotk4_gtk3_dialog_new2(
		(*C.gchar)(unsafe.Pointer(ctitle)),
		(*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native())),
		(C.GtkDialogFlags)(flags),
	)
	runtime.KeepAlive(parent)

	return wrapDialog(coreglib.Take(unsafe.Pointer(w)))
}

// NewMessageDialog creates a new message dialog. This is a simple
// dialog with some text taht the user may want to see. When the user
// clicks a button, a "response" signal is emitted with response IDs
// from ResponseType.
func NewMessageDialog(parent *Window, flags DialogFlags, typ MessageType, buttons ButtonsType) *MessageDialog {
	w := C._gotk4_gtk_message_dialog_new2(
		(*C.GtkWindow)(unsafe.Pointer(coreglib.InternObject(parent).Native())),
		(C.GtkDialogFlags)(flags),
		(C.GtkMessageType)(typ),
		(C.GtkButtonsType)(buttons),
	)
	runtime.KeepAlive(parent)

	return wrapMessageDialog(coreglib.Take(unsafe.Pointer(w)))
}

func init() {
	runtime.LockOSThread()
}

// Init binds to the gtk_init() function. Argument parsing is not
// supported.
func Init() {
	C.gtk_init(nil, nil)
}
